diff --git a/common/fragments/graphical/bspwm.nix b/common/fragments/graphical/bspwm.nix new file mode 100644 index 0000000..7a618e5 --- /dev/null +++ b/common/fragments/graphical/bspwm.nix @@ -0,0 +1,113 @@ +{ lib, pkgs, config, ... }@attrs: +let + utils = import ./colors.nix attrs; + colorscheme = utils.colorscheme "purple" ../../../external/6.png; +in { + home-manager.users.agatha = { + xsession.windowManager.bspwm = { + enable = true; + extraConfigEarly = lib.strings.concatStringsSep "\n" [ + "xsetroot -cursor_name left_ptr" + "xinput set-prop 'SynPS/2 Synaptics TouchPad' 'Synaptics Scrolling Distance' 60 60" + ]; + extraConfig = lib.strings.concatStringsSep "\n" + [ "nitrogen --set-zoom-fill ${../../../external/6.png}" ]; + monitors = { eDP-1 = [ "I" "II" "III" "IV" "V" "VI" "VII" "VIII" ]; }; + settings = let color = n: colorscheme.colors."${builtins.toString n}"; + in { + border_width = 3; + window_gap = 15; + top_padding = 45; + split_ratio = 0.5; + borderless_monocle = false; + gapless_monocle = false; + normal_border_color = color 0; + focused_border_color = color 1; + active_border_color = color 2; + urgent_border_color = color 2; + presel_feedback_color = color 2; + }; + rules = { + "Gimp" = { + state = "tiled"; + follow = true; + }; + "Element".desktop = "II"; + "TelegramDesktop".desktop = "III"; + "Geary".desktop = "IV"; + "firefox" = { + desktop = "I"; + state = "tiled"; + follow = false; + }; + "Yubico Authenticator".state = "floating"; + "firefox:Places".state = "floating"; + }; + }; + + services.sxhkd = { + enable = true; + keybindings = { + # Terminal + "super + Return" = "kitty"; + "Caps_Lock" = "kitty"; + # File explorer + "super + e" = "nautilus"; + # Program launcher + "super + @space" = "rofi -show drun"; + # Clipboard + "super + v" = '' + CM_LAUNCHER=rofi clipmenu \ + -theme-str 'listview \{ spacing: 0; \}' \ + -theme-str 'window \{ width: 30em; \}' + ''; + # Calculator + "super + shift + c" = '' + rofi -show calc -modi calc -calc-command 'xdotool type --clearmodifiers "\{result\}"''; + # Media keys + "XF86Audio{Raise,Lower}Volume" = "pamixer {-i,-d} 5"; + "XF86AudioMute" = "pamixer -t"; + "XF86Audio{Prev,Next}" = "playerctl {previous,next}"; + "XF86AudioPlay" = "playerctl play-pause"; + # Screenshot + "Print" = "flameshot gui && bspc desktop --focus focused"; + "shift + Print" = + "flameshot gui -d 3000 && bspc desktop --focus focused"; + # Pause notifications + "super + n" = "dunstctl set-paused toggle"; + # Reload WM + "super + shift + {q,r}" = '' + pkill -USR1 -x sxhkd \ + ; for p in picom polybar dunst; killall $p; end \ + ; bspc {quit,wm -r} + ''; + # Close/kill window + "super + {_,shift + }w" = "bspc node -{c,k}"; + # Monocle layout + "super + m" = "bspc desktop -l next"; + # Toggle hide all windows + "super + d" = + "bspc query -N -n .window | xargs -I node_id bspc node node_id -g hidden"; + # Change window state + "super + {t,shift + t,s,f}" = + "bspc node -t {tiled,pseudo_tiled,floating,fullscreen}"; + # Focus/move window + "super + {_,shift + }{j,k,i,l}" = + "bspc node -{f,s} {west,south,north,east}"; + # Focus the next window in the current desktop + "super + c" = "bspc node -f next.local.!hidden.window"; + # Focus previous/next desktop on current monitor + "super + bracket{left,right}" = "bspc desktop -f {prev,next}.local"; + # Switch desktops / Move window to desktop + "super + {_,shift + }{1-9,0}" = "bspc {desktop -f,node -d} '^{1-9,10}'"; + # Window switcher + "alt + Tab" = "rofi -show window"; + # Move floating window + "super + {Left,Down,Up,Right}" = "bspc node -v {-20 0,0 20,0 -20,20 0}"; + # Lock screen + "super + x" = + "betterlockscreen --lock dimblur; systemctl --user restart gpg-agent"; + }; + }; + }; +} diff --git a/common/fragments/graphical/default.nix b/common/fragments/graphical/default.nix new file mode 100644 index 0000000..ec6656d --- /dev/null +++ b/common/fragments/graphical/default.nix @@ -0,0 +1,167 @@ +{ pkgs, config, lib, ... }: { + imports = [ + ./bspwm.nix + ./picom.nix + ./polybar.nix + ./iosevka.nix + ./kitty.nix + ./element.nix + ]; + + # User packages + users.users.agatha.packages = with pkgs; [ + brightnessctl + broot + colmena + element-desktop + firefox + flameshot + gnome.eog + gnome.file-roller + gnome.geary + gnome.gnome-calendar + gnome.gnome-control-center + gnome.gnome-disk-utility + gnome.gnome-font-viewer + gnome.nautilus + gnome.totem + hyperfine + lxappearance + magic-wormhole + neofetch + nitrogen + pamixer + pavucontrol + pfetch + playerctl + pridefetch + rofi + rofi-calc + rofimoji + tdesktop + wireguard-tools + xdg-utils + yubioath-desktop + ]; + + # Brightness/volume keys + users.users.agatha.extraGroups = [ "video" ]; + programs.light.enable = true; + + services.xserver = { + enable = true; + displayManager = { + gdm.enable = true; + # gdm.wayland = true; + + sessionPackages = [ pkgs.sway ]; + session = [{ + manage = "window"; + name = "bspwm"; + start = let cfg = config.home-manager.users.agatha; + in '' + ${cfg.services.sxhkd.package}/bin/sxhkd ${ + toString cfg.services.sxhkd.extraOptions + } & + ${cfg.xsession.windowManager.bspwm.package}/bin/bspwm -c ${cfg.xdg.configHome}/bspwm/bspwmrc + ''; + }]; + }; + # Layout overrides + layout = lib.mkForce "eu,de(qwerty),ua,ru"; + xkbOptions = "ctrl:nocaps,compose:rctrl"; + + synaptics = { + enable = true; + + tapButtons = true; + vertTwoFingerScroll = true; + vertEdgeScroll = true; + + horizEdgeScroll = true; + horizTwoFingerScroll = true; + + palmDetect = true; + palmMinWidth = 8; + palmMinZ = 100; + }; + }; + + home-manager.users.agatha = { + # Compose key sequences + home.file.".XCompose".text = '' + include "%L" + + : "( ͡° ͜ʖ ͡°)" + : "¯\\_(ツ)_/¯" + : "༼ つ ◕_◕ ༽つ" + : "🅱️" + : "•" + : "◆" + : "✔" + : "✓" + : "​" + <0> : "§" + : "█" + : "☭" + : "√" + : "⚧️ trans rights uwu" + : "òwó" + : "ÒwÓ" +

: "👉👈" +

: "🥺" + : "/html " + ''; + + # Cursor theme + home.pointerCursor = { + name = "Adwaita"; + package = pkgs.gnome.adwaita-icon-theme; + size = 24; + x11 = { + enable = true; + defaultCursor = "Adwaita"; + }; + }; + }; + + security.polkit.enable = true; + + # Screenshare on wlroots + xdg = { + portal = { + enable = true; + extraPortals = with pkgs; [ + xdg-desktop-portal-wlr + xdg-desktop-portal-gtk + ]; + wlr.enable = true; + }; + }; + + fonts.fontconfig.enable = true; + fonts.fonts = with pkgs; [ + cantarell-fonts + crimson + dejavu_fonts + fira-code + fira-code-symbols + font-awesome_5 + iosevka + noto-fonts-cjk + siji + twitter-color-emoji + (nerdfonts.override { fonts = [ "DaddyTimeMono" "NerdFontsSymbolsOnly" ]; }) + ]; + + services.printing.enable = true; + + # Pipewire + security.rtkit.enable = true; + services.pipewire = { + enable = true; + alsa.enable = true; + alsa.support32Bit = true; + pulse.enable = true; + }; +} diff --git a/common/fragments/graphical/element.nix b/common/fragments/graphical/element.nix new file mode 100644 index 0000000..6eee16b --- /dev/null +++ b/common/fragments/graphical/element.nix @@ -0,0 +1,109 @@ +{ pkgs, config, lib, ... }: { + home-manager.users.agatha = { + xdg.configFile."Element/config.json".text = '' + { + "settingDefaults": { + "custom_themes": [ + { + "name": "Sapphic Lavender", + "is_dark": true, + "fonts": { + "general": "Allust, Twemoji, Twitter Color Emoji, sans", + "monospace": "'Iosevka Medium Extended', 'Fira Code'" + }, + "colors": { + "accent": "#D2ADC6", + "accent-color": "#D2ADC6", + "primary-color": "#D2ADC6", + "warning-color": "#BF80A6", + "alert": "#BF80A6", + "sidebar-color": "#231724", + "primary-content": "#180F19", + "secondary-content": "#E5D9E6", + "tertiary-content": "#D2ADC6", + "quaternary-content": "#E5D9E6", + "quinary-content": "#251926", + "system": "#180F19", + "background": "#00f", + "roomlist-background-color": "#231724", + "roomlist-text-color": "#E5D9E6", + "roomlist-text-secondary-color": "#ffd1dc", + "roomlist-highlights-color": "#180F19", + "roomlist-separator-color": "#180F19", + "timeline-background-color": "#180F19", + "timeline-text-color": "#E5D9E6", + "timeline-text-secondary-color": "#D2ADC6", + "timeline-highlights-color": "#231724", + "eventbubble-self-bg": "#231724", + "eventbubble-others-bg": "#231724", + "eventbubble-bg-hover": "#231724", + "eventbubble-reply-color": "#231724", + "username-colors": [ + "#D8BFD8", + "#ffd1dc", + "#DDA0DD", + "#DA70D6", + "#BA55D3", + "#9932CC", + "#800060", + "#8B008B" + ], + "avatar-background-colors": ["#896bad", "#b09cc8", "#bdacd1"], + "reaction-row-button-selected-bg-color": "#bd93f9" + } + }, + { + "name": "Transgender Vampirism", + "is_dark": true, + "fonts": { + "general": "Crimson, Noto Color Emoji, Twemoji, Twitter Color Emoji, sans", + "monospace": "'Iosevka Gothic', 'Fira Code'" + }, + "colors": { + "accent": "#747E9D", + "accent-color": "#747E9D", + "primary-color": "#747E9D", + "warning-color": "#110E18", + "sidebar-color": "#16121F", + "primary-content": "#110E18", + "secondary-content": "#D5D6E8", + "tertiary-content": "#747E9D", + "quaternary-content": "#D5D6E8", + "quinary-content": "#16121F", + "system": "#16121F", + "background": "#00f", + "roomlist-background-color": "#16121F", + "roomlist-text-color": "#D5D6E8", + "roomlist-text-secondary-color": "#747E9D", + "roomlist-highlights-color": "#110E18", + "roomlist-separator-color": "#110E18", + "timeline-background-color": "#110E18", + "timeline-text-color": "#D5D6E8", + "timeline-text-secondary-color": "#747E9D", + "timeline-highlights-color": "#16121F", + "eventbubble-self-bg": "#16121F", + "eventbubble-others-bg": "#16121F", + "eventbubble-bg-hover": "#16121F", + "eventbubble-reply-color": "#16121F", + "username-colors": [ + "#D8BFD8", + "#AA9AB6", + "#DDA0DD", + "#DA70D6", + "#7A5286", + "#9932CC", + "#800060", + "#8B008B" + ], + "avatar-background-colors": ["#896bad", "#b09cc8", "#bdacd1"], + "reaction-row-button-selected-bg-color": "#bd93f9" + } + } + ] + }, + "showLabsSettings": true, + "features": ["feature_latex_maths"] + } + ''; + }; +} diff --git a/common/fragments/graphical/iosevka.nix b/common/fragments/graphical/iosevka.nix new file mode 100644 index 0000000..a23cfe3 --- /dev/null +++ b/common/fragments/graphical/iosevka.nix @@ -0,0 +1,52 @@ +{ config, pkgs, ... }: { + # Iosevka Gothic + nixpkgs.overlays = [ + (final: prev: { + iosevka = prev.iosevka.override { + privateBuildPlan = '' + [buildPlans.iosevka-gothic] + family = "Iosevka Gothic" + spacing = "normal" + serifs = "slab" + no-cv-ss = true + export-glyph-names = true + + [buildPlans.iosevka-gothic.variants.design] + capital-a = "straight-base-serifed" + capital-b = "standard-bilateral-serifed" + capital-h = "serifed" + capital-i = "serifed" + capital-q = "crossing" + capital-r = "standing" + f = "tailed" + l = "tailed-serifed" + z = "cursive" + long-s = "bent-hook-tailed" + eszet = "sulzbacher-descending" + lower-mu = "tailed" + lower-xi = "flat-top" + three = "flat-top" + six = "straight-bar" + asterisk = "flip-penta-high" + pilcrow = "high" + caret = "medium" + paren = "normal" + brace = "curly-flat-boundary" + number-sign = "upright" + ampersand = "closed" + at = "short" + lig-ltgteq = "slanted" + ascii-single-quote = "raised-comma" + ascii-grave = "straight" + + [buildPlans.iosevka-gothic.variants.italic] + capital-z = "cursive-with-horizontal-crossbar" + + [buildPlans.iosevka-gothic.ligations] + inherits = "haskell" + ''; + set = "gothic"; + }; + }) + ]; +} diff --git a/common/fragments/graphical/kitty.nix b/common/fragments/graphical/kitty.nix new file mode 100644 index 0000000..b1ffaf4 --- /dev/null +++ b/common/fragments/graphical/kitty.nix @@ -0,0 +1,79 @@ +{ pkgs, config, ... }@attrs: +let + utils = import ./colors.nix attrs; + colorscheme = utils.colorscheme "purple" ../../../external/6.png; + color = n: colorscheme.colors."${builtins.toString n}"; +in { + home-manager.users.agatha = { + programs.kitty = { + enable = true; + font = { + package = pkgs.iosevka; + name = "Iosevka Gothic"; + size = 11.5; + }; + + keybindings = { "f5" = "load_config_file"; }; + + settings = { + disable_ligatures = "never"; + + draw_minimal_borders = false; + active_tab_font_style = "italic"; + inactive_tab_font_style = "normal"; + + scrollback_lines = -10000; + url_style = "single"; + + strip_trailing_spaces = "smart"; + enable_audio_bell = false; + + window_margin_width = 10; + window_padding_width = 10; + inactive_text_alpha = "0.8"; + enabled_layouts = "vertical, grid, stack"; + + tab_bar_edge = "top"; + tab_bar_style = "fade"; + tab_bar_margin_width = 5; + tab_separator = "•"; + tab_title_template = "☾ {index}"; + + foreground = color 15; + background = color 0; + cursor = color 16; + + color0 = color 0; + color8 = color 8; + color1 = color 1; + color9 = color 9; + color2 = color 2; + color10 = color 10; + color3 = color 3; + color11 = color 11; + color4 = color 4; + color12 = color 12; + color5 = color 5; + color13 = color 13; + color6 = color 6; + color14 = color 14; + color7 = color 7; + color15 = color 15; + + selection_foreground = color 1; + selection_background = color 15; + + url_color = color 1; + + active_border_color = color 1; + inactive_border_color = color 2; + bell_border_color = color 6; + + active_tab_foreground = color 15; + active_tab_background = color 1; + inactive_tab_foreground = color 8; + inactive_tab_background = color 2; + }; + }; + }; +} diff --git a/common/fragments/graphical/picom.nix b/common/fragments/graphical/picom.nix new file mode 100644 index 0000000..8edb0a1 --- /dev/null +++ b/common/fragments/graphical/picom.nix @@ -0,0 +1,89 @@ +{ pkgs, config, lib, ... }: { + home-manager.users.agatha = { + services.picom = { + enable = true; + package = pkgs.picom-next; + + # General + backend = "glx"; + vSync = true; + settings = { + mark-wmwin-focused = true; + detect = { + rounded-corners = true; + client-opacity = true; + transient = true; + client-leader = true; + }; + use-damage = true; + + wintypes = { + tooltip = { + fade = true; + shadow = true; + opacity = 0.75; + focus = true; + full-shadow = false; + }; + dock = { shadow = false; }; + dnd = { shadow = false; }; + popup_menu = { opacity = 0.8; }; + dropdown_menu = { opacity = 0.8; }; + }; + }; + + # Shadows + shadow = true; + shadowOpacity = 1.0; + shadowOffsets = [ (-7) (-7) ]; + shadowExclude = [ + "name = 'Notification'" + "class_g ?= 'Notify-osd'" + "class_g = 'Cairo-clock'" + "class_g = 'firefox-nightly' && argb" + "class_g = 'firefox' && argb" + "_GTK_FRAME_EXTENTS@:c" + ]; + + # Fade + fade = true; + fadeSteps = [ 5.0e-2 5.0e-2 ]; + + # Opacity + settings.frame-opacity = 0.7; + settings.inactive-opacity-override = false; + settings.inactive-dim = 0.2; + settings.focus-exclude = [ + "class_g = 'firefox-nightly'" + "class_g = 'firefox'" + "class_g = 'Dunst'" + ]; + opacityRules = [ + "100:_NET_WM_STATE@[0]:32a = '_NET_WM_STATE_FULLSCREEN'" + "100:_NET_WM_STATE@[1]:32a = '_NET_WM_STATE_FULLSCREEN'" + "100:_NET_WM_STATE@[2]:32a = '_NET_WM_STATE_FULLSCREEN'" + "100:_NET_WM_STATE@[3]:32a = '_NET_WM_STATE_FULLSCREEN'" + "100:_NET_WM_STATE@[4]:32a = '_NET_WM_STATE_FULLSCREEN'" + "0:_COMPTON_MONOCLE@:32c = 0" + "70:class_g = 'kitty'" + "80:class_g = 'Dunst'" + "20:class_g = 'Bspwm' && class_i = 'presel_feedback'" + ]; + + # Blur + settings.blur = { + method = "dual_kawase"; + strength = 3; + background = true; + kern = "3x3box"; + background-exclude = [ + "window_type = 'dock'" + "window_type = 'desktop'" + "_GTK_FRAME_EXTENTS@:c" + "class_g = 'firefox-nightly' && argb" + "class_g = 'firefox' && argb" + ]; + }; + }; + }; +} diff --git a/common/fragments/graphical/polybar.nix b/common/fragments/graphical/polybar.nix new file mode 100644 index 0000000..caa99d6 --- /dev/null +++ b/common/fragments/graphical/polybar.nix @@ -0,0 +1,258 @@ +{ lib, pkgs, config, ... }@attrs: +let + utils = import ./colors.nix attrs; + colorscheme = utils.colorscheme "purple" ../../../external/6.png; +in { + home-manager.users.agatha = { + services.polybar = { + enable = true; + package = pkgs.polybarFull; + + script = "polybar right &"; + + settings = let color = n: colorscheme.colors."${builtins.toString n}"; + in { + "colors" = { + background = color 0; + foreground = color 7; + foreground-alt = color 7; + primary = color 1; + secondary = color 2; + alert = color 3; + red = color 4; + }; + + "bar/right" = { + monitor = "\${env:MONITOR:eDP-1}"; + width = "100%:-30"; + height = 30; + offset-x = 15; + offset-y = 12; + radius = 0; + fixed-center = true; + + background = "\${colors.background}"; + foreground = "\${colors.foreground}"; + + line = { + size = 0; + color = color 3; + }; + border = { + size = 3; + color = color 1; + }; + padding = { + left = 2; + right = 2; + }; + module.margin = { + left = 1; + right = 1; + }; + + font = { + "0" = "Iosevka Gothic:pixelsize=10;3"; + "1" = "DejaVuSans:fontformat=truetype:size=8:antialias=false;2"; + "2" = "Siji:pixelsize=11;2"; + "3" = "Symbols Nerd Font:pixelsize=10;2"; + "4" = "DejaVuSans:fontformat=truetype:size=8:antialias=false;1"; + }; + + modules = { + left = "bspwm"; + center = "date"; + right = + "filesystem battery pulseaudio xkeyboard memory cpu notication-status powermenu"; + }; + + wm-restack = "bspwm"; + cursor-click = "pointer"; + locale = "de_DE.UTF-8"; + }; + + "module/xkeyboard" = { + type = "internal/xkeyboard"; + blacklist-0 = "num lock"; + + format-prefix = " "; + format-prefix-foreground = "\${colors.foreground-alt}"; + + label = { + layout = "%layout%"; + + indicator = { + padding = 2; + margin = 1; + background = "\${colors.secondary}"; + underline = "\${colors.secondary}"; + }; + }; + }; + + "module/bspwm" = { + type = "internal/bspwm"; + + label = { + focused = "%name%"; + focused-foreground = "\${colors.primary}"; + focused-padding = 1; + + occupied = "%name%"; + occupied-padding = 1; + + urgent = "%name%!"; + urgent-background = "\${xrdb:color1:#222}"; + urgent-padding = 1; + + empty = "%name%"; + empty-foreground = "\${colors.foreground-alt}"; + empty-padding = 1; + }; + }; + + "module/date" = { + type = "internal/date"; + interval = 5; + + date = ""; + date-alt = " %a, %d %b %Y"; + + time = "%H:%M"; + time-alt = "%H:%M:%S"; + + format-prefix = ""; + format-prefix-foreground = "\${colors.foreground-alt}"; + + label = '' + %{A3:dunstify ' Calendar' "$(cal --color=always | sed "s#\\x1b\\[7m##;s#\\x1b\\[27m##g")​":}%date%%{A} %time%''; + }; + + "module/filesystem" = { + type = "internal/fs"; + interval = 25; + + mount-0 = "/"; + + label-mounted = "%mountpoint%: %percentage_used%%"; + label-unmounted = "%mountpoint% not mounted"; + label-unmounted-foreground = "\${colors.foreground-alt}"; + }; + + "module/cpu" = { + type = "internal/cpu"; + interval = 2; + format-prefix = " "; + format-prefix-foreground = "\${colors.foreground-alt}"; + label = "%{A1:kitty btop:}%percentage:2%%%{A}"; + }; + + "module/memory" = { + type = "internal/memory"; + interval = 2; + format-prefix = " "; + format-prefix-foreground = "\${colors.foreground-alt}"; + label = "%{A1:kitty btop:}%percentage_used%%%{A}"; + }; + + "module/pulseaudio" = { + type = "internal/pulseaudio"; + + format-volume = "%{A3:pavucontrol:} %{A}"; + label-volume = " %percentage%%"; + label-volume-foreground = "\${root.foreground}"; + + label-muted = " muted"; + label-muted-foreground = "#666"; + + bar.volume = { + width = 14; + foreground-0 = "\${colors.secondary}"; + foreground-1 = "\${colors.secondary}"; + foreground-2 = "\${colors.primary}"; + foreground-3 = "\${colors.primary}"; + foreground-4 = "\${colors.primary}"; + foreground-5 = "\${colors.alert}"; + foreground-6 = "\${colors.red}"; + gradient = false; + indicator = "|"; + indicator-font = 5; + fill = "─"; + fill-font = 2; + empty = "─"; + empty-font = 2; + empty-foreground = "\${colors.foreground-alt}"; + }; + }; + + "module/powermenu" = { + type = "custom/menu"; + + expand-right = true; + format-spacing = 1; + + label = { + open = ""; + open-foreground = "\${colors.secondary}"; + close = " cancel"; + close-foreground = "\${colors.secondary}"; + separator = "|"; + separator-foreground = "\${colors.foreground-alt}"; + }; + + menu = { + "0-0" = "reboot"; + "0-0-exec" = "reboot"; + "0-1" = "power off"; + "0-1-exec" = "sudo poweroff"; + }; + }; + + "module/battery" = { + type = "internal/battery"; + full-at = 99; + low-at = 10; + battery = "BAT0"; + adapter = "AC"; + poll-interval = 3; + + content-font = 3; + + format-charging = " "; + format-discharging = " "; + label = { + charging = "%percentage_raw%%"; + discharging = "%percentage_raw%%"; + full = ""; + }; + + ramp = { + capacity-0 = ""; + capacity-1 = ""; + capacity-2 = ""; + capacity-3 = ""; + capacity-4 = ""; + }; + + animation = { + charging-0 = ""; + charging-1 = ""; + charging-2 = ""; + charging-3 = ""; + charging-4 = ""; + + charging-framerate = 750; + }; + }; + + "module/notification-status" = { + type = "custom/script"; + exec = '' + if $(dunstctl is-paused); then; echo "Notifications paused"; else; echo ""; fi;''; + interval = 2; + format-prefix = " "; + }; + }; + }; + }; +} diff --git a/common/fragments/graphical/sway.nix b/common/fragments/graphical/sway.nix new file mode 100644 index 0000000..eaa4507 --- /dev/null +++ b/common/fragments/graphical/sway.nix @@ -0,0 +1,103 @@ +{ pkgs, config, ... }: { + + # User packages + users.users.agatha.packages = with pkgs; [ grim rofi-wayland waybar ydotool ]; + + home-manager.users.agatha = { + wayland.windowManager.sway = let + cfg = config.home-manager.users.agatha.wayland.windowManager.sway.config; + in { + enable = true; + config = { + up = "i"; + left = "j"; + down = "k"; + right = "l"; + + modifier = "Mod4"; + terminal = "kitty"; + + fonts = { + names = [ "Font Awesome 5 Free" "Iosevka Gothic" ]; + size = 11.0; + }; + + workspaceAutoBackAndForth = true; + window = { + titlebar = true; + hideEdgeBorders = "both"; + border = 0; + }; + + gaps.inner = 15; + + output."*" = { bg = "/home/agatha/Pictures/wallpaper.png fill"; }; + + input."type:keyboard" = { + xkb_layout = config.services.xserver.layout; + xkb_options = config.services.xserver.xkbOptions; + }; + + input."type:touchpad" = { tap = "enabled"; }; + + keybindings = let mod = cfg.modifier; + in { + "${mod}+Return" = "exec ${cfg.terminal}"; + "Caps_Lock" = "exec ${cfg.terminal}"; + "${mod}+e" = "exec nautilus"; + "${mod}+space" = "exec rofi -show drun"; + "${mod}+shift+e" = "exec rofimoji --action clipboard"; + "${mod}+c" = '' + exec rofi -show calc -modi calc -calc-command 'xdotool type --clearmodifiers "\{result\}"' + ''; + XF86AudioRaiseVolume = "exec pamixer -i 5"; + XF86AudioLowerVolume = "exec pamixer -d 5"; + XF86AudioMute = "exec pamixer -t"; + XF86AudioPrev = "exec playerctl previous"; + XF86AudioNext = "exec playerctl next"; + XF86AudioPlay = "exec playerctl play-pause"; + Print = "exec flameshot gui"; + "shift+Print" = "exec flameshot gui -d 3000"; + "${mod}+n" = "exec dunstctl set-paused toggle"; + # "${mod}+o" = "TODO: port audio switcher"; + "${mod}+shift+r" = + "reload; exec 'for p in waybar dunst; do; killall $p; done'"; + "${mod}+w" = "kill"; + "${mod}+m" = "layout tabbed"; + "${mod}+t" = "layout toggle split"; + "${mod}+s" = "floating toggle"; + "${mod}+f" = "fullscreen toggle"; + + "alt+Tab" = "exec rofi -show window"; + + # "${mod}+x" = "TODO: lockscreen"; + + "${mod}+Shift+${cfg.left}" = "move left"; + "${mod}+Shift+${cfg.down}" = "move down"; + "${mod}+Shift+${cfg.up}" = "move up"; + "${mod}+Shift+${cfg.right}" = "move right"; + + "${mod}+1" = "workspace number 1"; + "${mod}+2" = "workspace number 2"; + "${mod}+3" = "workspace number 3"; + "${mod}+4" = "workspace number 4"; + "${mod}+5" = "workspace number 5"; + "${mod}+6" = "workspace number 6"; + "${mod}+7" = "workspace number 7"; + "${mod}+8" = "workspace number 8"; + "${mod}+9" = "workspace number 9"; + + "${mod}+Shift+1" = "move container to workspace number 1"; + "${mod}+Shift+2" = "move container to workspace number 2"; + "${mod}+Shift+3" = "move container to workspace number 3"; + "${mod}+Shift+4" = "move container to workspace number 4"; + "${mod}+Shift+5" = "move container to workspace number 5"; + "${mod}+Shift+6" = "move container to workspace number 6"; + "${mod}+Shift+7" = "move container to workspace number 7"; + "${mod}+Shift+8" = "move container to workspace number 8"; + "${mod}+Shift+9" = "move container to workspace number 9"; + }; + }; + }; + }; +} diff --git a/external/6.png b/external/6.png new file mode 100644 index 0000000..2d5e95c Binary files /dev/null and b/external/6.png differ