From fb18c07c68dcbeb2974a452c6b0bb7d498b7ff79 Mon Sep 17 00:00:00 2001 From: Evie Litherland-Smith Date: Tue, 4 Jul 2023 14:45:59 +0100 Subject: [PATCH] Add some extra workspaces to bspwm and polybar --- flake.nix | 7 +++---- home/desktop/bspwm.nix | 22 +++++----------------- home/desktop/config/polybar/polybar.ini | 15 +++++++++------ 3 files changed, 17 insertions(+), 27 deletions(-) diff --git a/flake.nix b/flake.nix index eb3c758e..04d44094 100644 --- a/flake.nix +++ b/flake.nix @@ -77,7 +77,6 @@ services.xserver.displayManager = { autoLogin.user = "xenia"; defaultSession = "xfce+bspwm"; - # defaultSession = "xfce+awesome"; }; hardware.steam-hardware.enable = true; programs = { @@ -160,11 +159,11 @@ bspc monitor DP-1-1 -r bspc monitor DP-1-2 -r fi - for desktop in "dev" "browser" "files" "chat" "remote"; do + for desktop in "main" "dev" "browser" "files" "chat" "remote" "steam" "misc"; do bspc desktop $desktop --to-monitor primary done - bspc monitor primary -o dev browser files chat remote - bspc monitor primary -d dev browser files chat remote + bspc monitor primary -o main dev browser files chat remote steam misc + bspc monitor primary -d main dev browser files chat remote steam misc bspc wm -o ${pkgs.feh}/bin/feh --no-fehbg --bg-fill ${wallpapers.outputs.default} ''; diff --git a/home/desktop/bspwm.nix b/home/desktop/bspwm.nix index 3b4cc5fd..86476bef 100644 --- a/home/desktop/bspwm.nix +++ b/home/desktop/bspwm.nix @@ -14,7 +14,7 @@ pointer_action3 = "resize_corner"; focus_follows_pointer = true; }; - monitors."primary" = ["dev" "browser" "files" "chat" "remote"]; + monitors."primary" = ["main" "dev" "browser" "files" "chat" "remote" "steam" "misc"]; rules = { "Xfce4-terminal".state = "floating"; "Nm-connection-editor".state = "floating"; @@ -44,45 +44,33 @@ # Terminal emulators "super + Return" = "wezterm"; "super + shift + Return" = "xfce4-terminal --drop-down"; - # Launcher "super + @space" = "rofi -show drun"; - # Shortcuts - "super + n" = "bspc desktop -f dev && neovide --multigrid"; - "super + r" = "bspc desktop -f files && wezterm -e ranger"; - "super + p" = "xfce4-session-logout"; + "super + shift + q" = "xfce4-session-logout"; "super + F1" = "xfce4-screensaver-command --lock"; - + "super + r" = "bspc desktop -f files && wezterm -e ranger"; # bspwm hotkeys "super + Escape" = "pkill -USR1 -x sxhkd"; "super + alt + {q,r}" = "bspc {quit,wm -r}"; "super + {_,shift + }q" = "bspc node -{c,k}"; "super + m" = "bspc desktop -l next"; - # State/Flags - "super + {t,shift + t,s,shift + m}" = "bspc node -t {tiled,pseudo_tiled,floating,fullscreen}"; - + "super + {t,shift + t,v,shift + m}" = "bspc node -t {tiled,pseudo_tiled,floating,fullscreen}"; # Focus/Scap "super + {_,shift + }{h,j,k,l}" = "bspc node -{f,s} {west,south,north,east}"; "super + {_,shift + }{Left,Down,Up,Right}" = "bspc node -{f,s} {west,south,north,east}"; "super + {_,shift + }{comma,period}" = "bspc {desktop -f,node -d} {prev,next}.local.occupied --follow"; "super + {_,shift + }c" = "bspc node -f {next,prev}.local.!hidden.window"; - "super + {_,shift + }n" = "bspc {desktop -f,node -d} next.local --follow"; "super + {_,shift + }bracket{left,right}" = "bspc {monitor -f,node -m} {prev,next} --follow"; "super + {grave,Tab}" = "bspc {node,desktop} -f last"; - "super + {_,shift + }{1-9}" = "bspc {desktop -f,node -d} '^{1-9}' --follow"; - # Named workspaces - "super + {_,shift + }{d,w,f,e}" = "bspc {desktop -f,node -d} '{dev,browser,files,chat}' --follow"; - + "super + {_,shift + }{a,s,d,f,u,i,o,p}" = "bspc {desktop -f,node -d} '{main,dev,browser,files,chat,remote,steam,misc}' --follow"; # Preselect "super + ctrl + {h,j,k,l}" = "bspc node -p {west,south,north,east}"; "super + ctrl + space" = "bspc node -p cancel"; "super + ctrl + shift + space" = "bspc query -N -d | xargs -I id -n 1 bspc node id -p cancel"; - # Screenshot "Print" = "flameshot gui"; - # Volume control keys "XF86AudioMute" = "pamixer -t"; "XF86AudioRaiseVolume" = "pamixer -i 2"; diff --git a/home/desktop/config/polybar/polybar.ini b/home/desktop/config/polybar/polybar.ini index 68b0c774..3e7eb160 100644 --- a/home/desktop/config/polybar/polybar.ini +++ b/home/desktop/config/polybar/polybar.ini @@ -103,12 +103,15 @@ click-left = "powermenu" [module/xworkspaces] type = internal/xworkspaces -icon-0 = "dev;󰅴" -icon-1 = "browser;󰈹" -icon-2 = "files;󰝰" -icon-3 = "chat;󰭹" -icon-4 = "remote;" -icon-default = " " +icon-0 = "main;󰟀 " +icon-1 = "dev;󰅴 " +icon-2 = "browser;󰈹 " +icon-3 = "files;󰝰 " +icon-4 = "chat;󰭹 " +icon-5 = "remote; " +icon-6 = "steam;󰓓 " +icon-7 = "misc;󰣙 " +icon-default = "󰣘 " label-active = %icon% label-active-background = ${colors.background-alt}