From b8e2eb59a2b84820719e5f6f334fbfbc05019c52 Mon Sep 17 00:00:00 2001 From: tdback Date: Fri, 10 Jan 2025 19:20:18 -0500 Subject: feat: retire x11 and go full COSMIC/wayland on workstations --- users/tdback/desktop.nix | 13 ---- users/tdback/modules/alacritty/default.nix | 66 ----------------- users/tdback/modules/dunst/default.nix | 27 ------- users/tdback/modules/polybar/default.nix | 112 ----------------------------- users/tdback/modules/rofi/default.nix | 81 --------------------- users/tdback/modules/x11/default.nix | 94 ------------------------ users/tdback/retired/alacritty/default.nix | 66 +++++++++++++++++ users/tdback/retired/dunst/default.nix | 27 +++++++ users/tdback/retired/polybar/default.nix | 112 +++++++++++++++++++++++++++++ users/tdback/retired/rofi/default.nix | 81 +++++++++++++++++++++ users/tdback/retired/x11/default.nix | 94 ++++++++++++++++++++++++ 11 files changed, 380 insertions(+), 393 deletions(-) delete mode 100644 users/tdback/modules/alacritty/default.nix delete mode 100644 users/tdback/modules/dunst/default.nix delete mode 100644 users/tdback/modules/polybar/default.nix delete mode 100644 users/tdback/modules/rofi/default.nix delete mode 100644 users/tdback/modules/x11/default.nix create mode 100644 users/tdback/retired/alacritty/default.nix create mode 100644 users/tdback/retired/dunst/default.nix create mode 100644 users/tdback/retired/polybar/default.nix create mode 100644 users/tdback/retired/rofi/default.nix create mode 100644 users/tdback/retired/x11/default.nix (limited to 'users') diff --git a/users/tdback/desktop.nix b/users/tdback/desktop.nix index 7b47c94..081487a 100644 --- a/users/tdback/desktop.nix +++ b/users/tdback/desktop.nix @@ -18,36 +18,23 @@ let in { imports = [ - #./modules/alacritty - #./modules/dunst ./modules/email ./modules/firefox ./modules/irc ./modules/mpd ./modules/ncmpcpp ./modules/neomutt - #./modules/polybar - #./modules/rofi ./modules/tmux - #./modules/x11 ]; home.packages = with pkgs.unstable; [ clang - #feh - (ffmpeg.override { withXcb = true; }) - #flameshot gimp gitu - #mpc-cli mpv - #pavucontrol - #pamixer pciutils signal-desktop - #sxiv tidal-dl - #xclip yt-dlp zathura ]; diff --git a/users/tdback/modules/alacritty/default.nix b/users/tdback/modules/alacritty/default.nix deleted file mode 100644 index 6614030..0000000 --- a/users/tdback/modules/alacritty/default.nix +++ /dev/null @@ -1,66 +0,0 @@ -{ pkgs, ... }: -{ - programs.alacritty = { - enable = true; - package = pkgs.unstable.alacritty; - settings = { - env.TERM = "xterm-256color"; - mouse.hide_when_typing = true; - scrolling.history = 10000; - window = { - decorations = "None"; - opacity = 1.0; - title = "Alacritty"; - padding.x = 4; - }; - cursor.style.blinking = "Never"; - font = { - size = 14.0; - normal = { - family = "Iosevka Comfy Motion Fixed"; - style = "Regular"; - }; - italic = { - family = "Iosevka Comfy Motion Fixed"; - style = "Italic"; - }; - bold = { - family = "Iosevka Comfy Motion Fixed"; - style = "Bold"; - }; - bold_italic = { - family = "Iosevka Comfy Motion Fixed"; - style = "Bold Italic"; - }; - }; - # Tomorrow Night Bright colorscheme. - colors = { - draw_bold_text_with_bright_colors = true; - primary = { - background = "#000000"; - foreground = "#eaeaea"; - }; - normal = { - black = "#000000"; - red = "#d54e53"; - green = "#b9ca4a"; - yellow = "#e6c547"; - blue = "#7aa6da"; - magenta = "#c397d8"; - cyan = "#70c0ba"; - white = "#424242"; - }; - bright = { - black = "#666666"; - red = "#ff3334"; - green = "#9ec400"; - yellow = "#e7c547"; - blue = "#7aa6da"; - magenta = "#b77ee0"; - cyan = "#54ced6"; - white = "#2a2a2a"; - }; - }; - }; - }; -} diff --git a/users/tdback/modules/dunst/default.nix b/users/tdback/modules/dunst/default.nix deleted file mode 100644 index 4b52def..0000000 --- a/users/tdback/modules/dunst/default.nix +++ /dev/null @@ -1,27 +0,0 @@ -{ pkgs, ... }: -{ - services.dunst = { - enable = true; - package = pkgs.unstable.dunst; - settings = { - global = { - width = 300; - height = 300; - offset = "30x50"; - origin = "top-right"; - frame_color = "#2c363c"; - font = "Iosevka Comfy Motion Fixed 12"; - }; - urgency_normal = { - background = "#37474f"; - foreground = "eceff1"; - timeout = 5; - }; - }; - iconTheme = { - name = "Papirus-Dark"; - package = pkgs.papirus-icon-theme; - size = "16x16"; - }; - }; -} diff --git a/users/tdback/modules/polybar/default.nix b/users/tdback/modules/polybar/default.nix deleted file mode 100644 index 14e9425..0000000 --- a/users/tdback/modules/polybar/default.nix +++ /dev/null @@ -1,112 +0,0 @@ -{ lib, pkgs, ... }: -{ - services.polybar = { - enable = true; - package = pkgs.unstable.polybar.override { pulseSupport = true; }; - script = "polybar main &"; - settings = - let - colors = { - alert = "#505050"; - foreground = "#F1F1F1"; - background = "#050505"; - background-alt = "#373B41"; - }; - in - { - "bar/main" = { - bottom = true; - width = "100%"; - height = "16pt"; - line.size = "3pt"; - font = [ "Iosevka Comfy Motion Fixed:size=8" ]; - - foreground = "${colors.foreground}"; - background = "${colors.background}"; - - separator = "|"; - padding = { - left = 1; - right = 1; - }; - - module.margin = 1; - modules = { - left = "bspwm"; - center = "time"; - right = "volume cpu memory date"; - }; - - wm.restack = "bspwm"; - cursor.click = "pointer"; - }; - - "module/bspwm" = { - type = "internal/bspwm"; - pin.workspaces = true; - label = { - focused = { - text = "%index%"; - foreground = "${colors.foreground}"; - padding = 1; - }; - occupied = { - text = "%index%"; - foreground = "${colors.alert}"; - padding = 1; - }; - urgent = { - text = "%index%"; - foreground = "${colors.foreground}"; - background = "${colors.background-alt}"; - padding = 1; - }; - empty.text = ""; - }; - }; - - "module/cpu" = { - type = "internal/cpu"; - interval = 3; - label = "CPU %percentage%%"; - }; - - "module/memory" = { - type = "internal/memory"; - interval = 3; - label = "RAM %percentage_used%%"; - }; - - "module/volume" = { - type = "internal/pulseaudio"; - label = { - volume = "VOL %percentage%%"; - muted = "VOL 0%"; - }; - click.right = "${lib.getExe pkgs.pavucontrol}"; - }; - - "module/time" = { - type = "internal/date"; - interval = 1; - label = "%time%"; - time = "%H:%M"; - }; - - "module/date" = { - type = "internal/date"; - interval = 1; - label = "%date%"; - date = "%m.%d.%Y"; - }; - - "settings" = { - screenchange.reload = true; - pseudo.transparency = true; - }; - }; - }; - - # Make sure polybar starts only during graphical sessions. - systemd.user.services.polybar.Install.WantedBy = [ "graphical-session.target" ]; -} diff --git a/users/tdback/modules/rofi/default.nix b/users/tdback/modules/rofi/default.nix deleted file mode 100644 index 8a439c4..0000000 --- a/users/tdback/modules/rofi/default.nix +++ /dev/null @@ -1,81 +0,0 @@ -{ config, pkgs, ... }: -{ - programs.rofi = { - enable = true; - package = pkgs.unstable.rofi; - font = "Iosevka Comfy Motion Fixed 12"; - location = "center"; - extraConfig = { - modi = "window,run,drun"; - icon-theme = "Papirus"; - show-icons = true; - display-drun = ""; - display-window = ""; - drun-display-format = "{icon} {name}"; - }; - theme = - let - inherit (config.lib.formats.rasi) mkLiteral; - in - { - "*" = { - bg = mkLiteral "#050505"; - bg-alt = mkLiteral "#191919"; - fg = mkLiteral "#FFFFFF"; - fg-alt = mkLiteral"#787c99"; - background-color = mkLiteral "@bg"; - border = 0; - margin = 0; - padding = 0; - spacing = 0; - }; - - "window" = { - width = mkLiteral "40%"; - }; - - "element" = { - padding = 12; - text-color = mkLiteral "@fg-alt"; - }; - - "element selected" = { - text-color = mkLiteral "@fg"; - }; - - "element-text" = { - background-color = mkLiteral "inherit"; - text-color = mkLiteral "inherit"; - vertical-align = mkLiteral "0.5"; - }; - - "element-icon" = { - size = 38; - }; - - "entry" = { - background-color = mkLiteral "@bg-alt"; - text-color = mkLiteral "@fg"; - padding = 14; - placeholder = "Search..."; - }; - - "inputbar" = { - children = map mkLiteral [ "prompt" "entry" ]; - }; - - "listview" = { - columns = 2; - lines = 6; - background-color = mkLiteral "@bg"; - }; - - "prompt" = { - enabled = true; - background-color = mkLiteral "@bg-alt"; - text-color = mkLiteral "@fg"; - padding = mkLiteral "14 10 0 14"; - }; - }; - }; -} diff --git a/users/tdback/modules/x11/default.nix b/users/tdback/modules/x11/default.nix deleted file mode 100644 index 06c1e2c..0000000 --- a/users/tdback/modules/x11/default.nix +++ /dev/null @@ -1,94 +0,0 @@ -{ lib, pkgs, ... }: -{ - xsession.windowManager.bspwm = { - enable = true; - package = pkgs.unstable.bspwm; - settings = let color = "#3B4252"; in { - window_gap = 0; - top_padding = 0; - bottom_padding = 0; - right_padding = 0; - left_padding = 0; - top_monocle_padding = 0; - bottom_monocle_padding = 0; - right_monocle_padding = 0; - left_monocle_padding = 0; - split_ratio = 0.5; - borderless_monocle = true; - gapless_monocle = true; - normal_border_color = color; - active_border_color = color; - focused_border_color = color; - }; - - rules = { - "Zathura".state = "tiled"; - }; - - startupPrograms = [ - "${lib.getExe pkgs.unstable.xorg.setxkbmap} -layout us" - "${lib.getExe pkgs.unstable.xorg.xsetroot} -cursor_name left_ptr" - "${lib.getExe pkgs.unstable.xorg.xset} r rate 350 40" - "~/.fehbg" - ]; - - extraConfig = '' - ${lib.getExe' pkgs.unstable.bspwm "bspc"} monitor -d 1 2 3 4 5 6 7 8 9 - ''; - }; - - services.sxhkd = let bspc = lib.getExe' pkgs.unstable.bspwm "bspc"; in { - enable = true; - package = pkgs.unstable.sxhkd; - keybindings = { - # Program hotkeys. - "alt + Tab" = "${lib.getExe pkgs.unstable.rofi} -show window"; - "super + r" = "${lib.getExe pkgs.unstable.rofi} -show drun"; - "super + x" = "${lib.getExe pkgs.unstable.alacritty}"; - "super + b" = "$BROWSER"; - "super + p" = "${lib.getExe pkgs.unstable.flameshot} full -p $HOME/.local/screenshots"; - "super + shift + p" = "${lib.getExe pkgs.unstable.flameshot} gui -p $HOME/.local/screenshots"; - "super + Escape" = "systemctl --user restart polybar"; - "super + alt + {q,r}" = "${bspc} {quit,wm -r}"; - - # Function hotkeys. - "XF86AudioPrev" = "${lib.getExe pkgs.unstable.mpc} prev"; - "XF86AudioNext" = "${lib.getExe pkgs.unstable.mpc} next"; - "XF86AudioPlay" = "${lib.getExe pkgs.unstable.mpc} toggle"; - "XF86AudioLowerVolume" = "${lib.getExe pkgs.unstable.pamixer} -d 5"; - "XF86AudioRaiseVolume" = "${lib.getExe pkgs.unstable.pamixer} -i 5"; - "XF86AudioMute" = "${lib.getExe pkgs.pamixer} -t"; - - # Manipulate window manager. - "super + q" = "${bspc} node -{c,k}"; - "super + f" = "${bspc} node focused.tiled -t fullscreen"; - "super + t" = "${bspc} node focused.fullscreen -t tiled"; - "super + shift + f" = "${bspc} node focused.tiled -t floating"; - "super + shift + t" = "${bspc} node focused.floating -t tiled"; - "super + {_,shift + }{h,j,k,l}" = "${bspc} node -{f,s} {west,south,north,east}"; - "super + {_,shift}c" = "${bspc} node -f {next,prev}.local.!hidden.window"; - "super + bracket{left,right}" = "${bspc} desktop -f {prev,next}.local"; - "super + {grave,Tab}" = "${bspc} {node,desktop} -f last"; - "super + {o,i}" = "${bspc} wm -h off; ${bspc} node {older,newer} -f; ${bspc} wm -h on"; - "super + {_,shift + }{1-9,0}" = "${bspc} {desktop -f, node -d} '^{1-9,10}'"; - "super + alt + {h,j,k,l}" = "${bspc} node -z {left -20 0, bottom 0 20, top 0 -20, right 20 0}"; - "super + alt + shift {h,j,k,l}" = "${bspc} node -z {right -20 0, top 0 20, bottom 0 -20, left 20 0}"; - "super + {Left,Down,Up,Right}" = "${bspc} node -v {-20 0,0 20,0 -20,20 0}"; - }; - }; - - # Generate X11 init scripts. - home.file = { - ".xinitrc".text = '' - [ -f ~/.xprofile ] && . ~/.xprofile - [ -f ~/.Xresources ] && ${lib.getExe pkgs.unstable.xorg.xrdb} -merge ~/.Xresources - exec ${lib.getExe' pkgs.unstable.bspwm "bspwm"} - ''; - ".xprofile".text = '' - ${lib.getExe pkgs.unstable.xorg.xrandr} --output DP-0 --primary --mode 1920x1080 --rotate normal --rate 165 - ''; - ".Xresources".text = '' - Xcursor.size: 24 - ''; - }; -} diff --git a/users/tdback/retired/alacritty/default.nix b/users/tdback/retired/alacritty/default.nix new file mode 100644 index 0000000..6614030 --- /dev/null +++ b/users/tdback/retired/alacritty/default.nix @@ -0,0 +1,66 @@ +{ pkgs, ... }: +{ + programs.alacritty = { + enable = true; + package = pkgs.unstable.alacritty; + settings = { + env.TERM = "xterm-256color"; + mouse.hide_when_typing = true; + scrolling.history = 10000; + window = { + decorations = "None"; + opacity = 1.0; + title = "Alacritty"; + padding.x = 4; + }; + cursor.style.blinking = "Never"; + font = { + size = 14.0; + normal = { + family = "Iosevka Comfy Motion Fixed"; + style = "Regular"; + }; + italic = { + family = "Iosevka Comfy Motion Fixed"; + style = "Italic"; + }; + bold = { + family = "Iosevka Comfy Motion Fixed"; + style = "Bold"; + }; + bold_italic = { + family = "Iosevka Comfy Motion Fixed"; + style = "Bold Italic"; + }; + }; + # Tomorrow Night Bright colorscheme. + colors = { + draw_bold_text_with_bright_colors = true; + primary = { + background = "#000000"; + foreground = "#eaeaea"; + }; + normal = { + black = "#000000"; + red = "#d54e53"; + green = "#b9ca4a"; + yellow = "#e6c547"; + blue = "#7aa6da"; + magenta = "#c397d8"; + cyan = "#70c0ba"; + white = "#424242"; + }; + bright = { + black = "#666666"; + red = "#ff3334"; + green = "#9ec400"; + yellow = "#e7c547"; + blue = "#7aa6da"; + magenta = "#b77ee0"; + cyan = "#54ced6"; + white = "#2a2a2a"; + }; + }; + }; + }; +} diff --git a/users/tdback/retired/dunst/default.nix b/users/tdback/retired/dunst/default.nix new file mode 100644 index 0000000..4b52def --- /dev/null +++ b/users/tdback/retired/dunst/default.nix @@ -0,0 +1,27 @@ +{ pkgs, ... }: +{ + services.dunst = { + enable = true; + package = pkgs.unstable.dunst; + settings = { + global = { + width = 300; + height = 300; + offset = "30x50"; + origin = "top-right"; + frame_color = "#2c363c"; + font = "Iosevka Comfy Motion Fixed 12"; + }; + urgency_normal = { + background = "#37474f"; + foreground = "eceff1"; + timeout = 5; + }; + }; + iconTheme = { + name = "Papirus-Dark"; + package = pkgs.papirus-icon-theme; + size = "16x16"; + }; + }; +} diff --git a/users/tdback/retired/polybar/default.nix b/users/tdback/retired/polybar/default.nix new file mode 100644 index 0000000..14e9425 --- /dev/null +++ b/users/tdback/retired/polybar/default.nix @@ -0,0 +1,112 @@ +{ lib, pkgs, ... }: +{ + services.polybar = { + enable = true; + package = pkgs.unstable.polybar.override { pulseSupport = true; }; + script = "polybar main &"; + settings = + let + colors = { + alert = "#505050"; + foreground = "#F1F1F1"; + background = "#050505"; + background-alt = "#373B41"; + }; + in + { + "bar/main" = { + bottom = true; + width = "100%"; + height = "16pt"; + line.size = "3pt"; + font = [ "Iosevka Comfy Motion Fixed:size=8" ]; + + foreground = "${colors.foreground}"; + background = "${colors.background}"; + + separator = "|"; + padding = { + left = 1; + right = 1; + }; + + module.margin = 1; + modules = { + left = "bspwm"; + center = "time"; + right = "volume cpu memory date"; + }; + + wm.restack = "bspwm"; + cursor.click = "pointer"; + }; + + "module/bspwm" = { + type = "internal/bspwm"; + pin.workspaces = true; + label = { + focused = { + text = "%index%"; + foreground = "${colors.foreground}"; + padding = 1; + }; + occupied = { + text = "%index%"; + foreground = "${colors.alert}"; + padding = 1; + }; + urgent = { + text = "%index%"; + foreground = "${colors.foreground}"; + background = "${colors.background-alt}"; + padding = 1; + }; + empty.text = ""; + }; + }; + + "module/cpu" = { + type = "internal/cpu"; + interval = 3; + label = "CPU %percentage%%"; + }; + + "module/memory" = { + type = "internal/memory"; + interval = 3; + label = "RAM %percentage_used%%"; + }; + + "module/volume" = { + type = "internal/pulseaudio"; + label = { + volume = "VOL %percentage%%"; + muted = "VOL 0%"; + }; + click.right = "${lib.getExe pkgs.pavucontrol}"; + }; + + "module/time" = { + type = "internal/date"; + interval = 1; + label = "%time%"; + time = "%H:%M"; + }; + + "module/date" = { + type = "internal/date"; + interval = 1; + label = "%date%"; + date = "%m.%d.%Y"; + }; + + "settings" = { + screenchange.reload = true; + pseudo.transparency = true; + }; + }; + }; + + # Make sure polybar starts only during graphical sessions. + systemd.user.services.polybar.Install.WantedBy = [ "graphical-session.target" ]; +} diff --git a/users/tdback/retired/rofi/default.nix b/users/tdback/retired/rofi/default.nix new file mode 100644 index 0000000..8a439c4 --- /dev/null +++ b/users/tdback/retired/rofi/default.nix @@ -0,0 +1,81 @@ +{ config, pkgs, ... }: +{ + programs.rofi = { + enable = true; + package = pkgs.unstable.rofi; + font = "Iosevka Comfy Motion Fixed 12"; + location = "center"; + extraConfig = { + modi = "window,run,drun"; + icon-theme = "Papirus"; + show-icons = true; + display-drun = ""; + display-window = ""; + drun-display-format = "{icon} {name}"; + }; + theme = + let + inherit (config.lib.formats.rasi) mkLiteral; + in + { + "*" = { + bg = mkLiteral "#050505"; + bg-alt = mkLiteral "#191919"; + fg = mkLiteral "#FFFFFF"; + fg-alt = mkLiteral"#787c99"; + background-color = mkLiteral "@bg"; + border = 0; + margin = 0; + padding = 0; + spacing = 0; + }; + + "window" = { + width = mkLiteral "40%"; + }; + + "element" = { + padding = 12; + text-color = mkLiteral "@fg-alt"; + }; + + "element selected" = { + text-color = mkLiteral "@fg"; + }; + + "element-text" = { + background-color = mkLiteral "inherit"; + text-color = mkLiteral "inherit"; + vertical-align = mkLiteral "0.5"; + }; + + "element-icon" = { + size = 38; + }; + + "entry" = { + background-color = mkLiteral "@bg-alt"; + text-color = mkLiteral "@fg"; + padding = 14; + placeholder = "Search..."; + }; + + "inputbar" = { + children = map mkLiteral [ "prompt" "entry" ]; + }; + + "listview" = { + columns = 2; + lines = 6; + background-color = mkLiteral "@bg"; + }; + + "prompt" = { + enabled = true; + background-color = mkLiteral "@bg-alt"; + text-color = mkLiteral "@fg"; + padding = mkLiteral "14 10 0 14"; + }; + }; + }; +} diff --git a/users/tdback/retired/x11/default.nix b/users/tdback/retired/x11/default.nix new file mode 100644 index 0000000..06c1e2c --- /dev/null +++ b/users/tdback/retired/x11/default.nix @@ -0,0 +1,94 @@ +{ lib, pkgs, ... }: +{ + xsession.windowManager.bspwm = { + enable = true; + package = pkgs.unstable.bspwm; + settings = let color = "#3B4252"; in { + window_gap = 0; + top_padding = 0; + bottom_padding = 0; + right_padding = 0; + left_padding = 0; + top_monocle_padding = 0; + bottom_monocle_padding = 0; + right_monocle_padding = 0; + left_monocle_padding = 0; + split_ratio = 0.5; + borderless_monocle = true; + gapless_monocle = true; + normal_border_color = color; + active_border_color = color; + focused_border_color = color; + }; + + rules = { + "Zathura".state = "tiled"; + }; + + startupPrograms = [ + "${lib.getExe pkgs.unstable.xorg.setxkbmap} -layout us" + "${lib.getExe pkgs.unstable.xorg.xsetroot} -cursor_name left_ptr" + "${lib.getExe pkgs.unstable.xorg.xset} r rate 350 40" + "~/.fehbg" + ]; + + extraConfig = '' + ${lib.getExe' pkgs.unstable.bspwm "bspc"} monitor -d 1 2 3 4 5 6 7 8 9 + ''; + }; + + services.sxhkd = let bspc = lib.getExe' pkgs.unstable.bspwm "bspc"; in { + enable = true; + package = pkgs.unstable.sxhkd; + keybindings = { + # Program hotkeys. + "alt + Tab" = "${lib.getExe pkgs.unstable.rofi} -show window"; + "super + r" = "${lib.getExe pkgs.unstable.rofi} -show drun"; + "super + x" = "${lib.getExe pkgs.unstable.alacritty}"; + "super + b" = "$BROWSER"; + "super + p" = "${lib.getExe pkgs.unstable.flameshot} full -p $HOME/.local/screenshots"; + "super + shift + p" = "${lib.getExe pkgs.unstable.flameshot} gui -p $HOME/.local/screenshots"; + "super + Escape" = "systemctl --user restart polybar"; + "super + alt + {q,r}" = "${bspc} {quit,wm -r}"; + + # Function hotkeys. + "XF86AudioPrev" = "${lib.getExe pkgs.unstable.mpc} prev"; + "XF86AudioNext" = "${lib.getExe pkgs.unstable.mpc} next"; + "XF86AudioPlay" = "${lib.getExe pkgs.unstable.mpc} toggle"; + "XF86AudioLowerVolume" = "${lib.getExe pkgs.unstable.pamixer} -d 5"; + "XF86AudioRaiseVolume" = "${lib.getExe pkgs.unstable.pamixer} -i 5"; + "XF86AudioMute" = "${lib.getExe pkgs.pamixer} -t"; + + # Manipulate window manager. + "super + q" = "${bspc} node -{c,k}"; + "super + f" = "${bspc} node focused.tiled -t fullscreen"; + "super + t" = "${bspc} node focused.fullscreen -t tiled"; + "super + shift + f" = "${bspc} node focused.tiled -t floating"; + "super + shift + t" = "${bspc} node focused.floating -t tiled"; + "super + {_,shift + }{h,j,k,l}" = "${bspc} node -{f,s} {west,south,north,east}"; + "super + {_,shift}c" = "${bspc} node -f {next,prev}.local.!hidden.window"; + "super + bracket{left,right}" = "${bspc} desktop -f {prev,next}.local"; + "super + {grave,Tab}" = "${bspc} {node,desktop} -f last"; + "super + {o,i}" = "${bspc} wm -h off; ${bspc} node {older,newer} -f; ${bspc} wm -h on"; + "super + {_,shift + }{1-9,0}" = "${bspc} {desktop -f, node -d} '^{1-9,10}'"; + "super + alt + {h,j,k,l}" = "${bspc} node -z {left -20 0, bottom 0 20, top 0 -20, right 20 0}"; + "super + alt + shift {h,j,k,l}" = "${bspc} node -z {right -20 0, top 0 20, bottom 0 -20, left 20 0}"; + "super + {Left,Down,Up,Right}" = "${bspc} node -v {-20 0,0 20,0 -20,20 0}"; + }; + }; + + # Generate X11 init scripts. + home.file = { + ".xinitrc".text = '' + [ -f ~/.xprofile ] && . ~/.xprofile + [ -f ~/.Xresources ] && ${lib.getExe pkgs.unstable.xorg.xrdb} -merge ~/.Xresources + exec ${lib.getExe' pkgs.unstable.bspwm "bspwm"} + ''; + ".xprofile".text = '' + ${lib.getExe pkgs.unstable.xorg.xrandr} --output DP-0 --primary --mode 1920x1080 --rotate normal --rate 165 + ''; + ".Xresources".text = '' + Xcursor.size: 24 + ''; + }; +} -- cgit v1.2.3