feat: latest sway upgrades/changes

This commit is contained in:
Ahwx 2026-05-07 17:04:15 +02:00
parent 685415f8f7
commit fa5405afa5

View file

@ -19,13 +19,15 @@ let
bright = "#ffffff"; bright = "#ffffff";
transparent = "#ff000000"; transparent = "#ff000000";
winterBlue = "#252535"; winterBlue = "#252535";
mod = "Mod1";
altmod = "Mod4";
laptop = "eDP-1";
in in
{ {
home.packages = with pkgs; [ home.packages = with pkgs; [
autotiling
libinput-gestures libinput-gestures
wmctrl wmctrl
swaycons waylock
]; ];
wayland.windowManager.sway = { wayland.windowManager.sway = {
@ -33,6 +35,11 @@ in
package = pkgs.swayfx; package = pkgs.swayfx;
enable = true; enable = true;
config = { config = {
output = {
eDP-1 = {
scale = "1.25";
};
};
window.border = 4; window.border = 4;
colors = { colors = {
focused = { focused = {
@ -73,7 +80,7 @@ in
}; };
fonts = { fonts = {
names = [ names = [
"GohuFont 11 Nerd Font Mono" "BlexMono Nerd Font"
]; ];
style = "Bold Semi-Condensed"; style = "Bold Semi-Condensed";
size = 11.0; size = 11.0;
@ -85,7 +92,7 @@ in
xkb_options = "caps:ctrl_modifier"; xkb_options = "caps:ctrl_modifier";
}; };
}; };
modifier = "Mod1"; modifier = mod;
keybindings = lib.attrsets.mergeAttrsList [ keybindings = lib.attrsets.mergeAttrsList [
(lib.attrsets.mergeAttrsList ( (lib.attrsets.mergeAttrsList (
map map
@ -95,8 +102,8 @@ in
ws = toString num; ws = toString num;
in in
{ {
"Mod1+${ws}" = "workspace ${ws}"; "${mod}+${ws}" = "workspace ${ws}";
"Mod1+Ctrl+${ws}" = "move container to workspace ${ws}"; "${mod}+Shift+${ws}" = "move container to workspace ${ws}";
} }
) )
[ [
@ -115,8 +122,10 @@ in
(lib.attrsets.concatMapAttrs (lib.attrsets.concatMapAttrs
(key: direction: { (key: direction: {
"Mod1+${key}" = "focus parent, focus ${direction}, focus child"; # "${mod}+${key}" = "focus parent, focus ${direction}, focus child";
"Mod1+Ctrl+${key}" = "focus parent, move ${direction}, focus child"; # "${mod}+Shift+${key}" = "focus parent, move ${direction}, focus child";
"${mod}+${key}" = "focus ${direction}";
"${mod}+Shift+${key}" = "move ${direction}";
}) })
{ {
h = "left"; h = "left";
@ -128,58 +137,58 @@ in
{ {
"Mod1+q" = "kill"; "${mod}+q" = "kill";
"Mod1+w" = "layout split"; "${mod}+w" = "layout split";
"Mod1+f" = "fullscreen toggle"; "${mod}+f" = "fullscreen toggle";
"Mod1+s" = "layout stacking"; "${mod}+s" = "layout stacking";
# "Mod1+v" = "split v"; "${mod}+v" = "split v";
"Mod1+g" = "layout tabbed"; "${mod}+g" = "layout tabbed";
"Mod1+Space" = "floating toggle"; "${mod}+Space" = "floating toggle";
"Mod1+Shift+r" = "exec swaymsg reload"; "${mod}+Shift+r" = "exec swaymsg reload";
"Mod1+Tab" = "focus next"; "${mod}+Tab" = "focus next";
"Mod1+Shift+Tab" = "focus prev"; "${mod}+Shift+Tab" = "focus prev";
"Mod4+n" = "focus next"; "${altmod}+n" = "focus next";
"Mod4+p" = "focus prev"; "${altmod}+p" = "focus prev";
"Mod1+d" = "exec --no-startup-id ${pkgs.bemenu}/bin/bemenu-run -l 5 --ignorecase"; "${mod}+d" = "exec --no-startup-id ${pkgs.bemenu}/bin/bemenu-run -l 5 --ignorecase";
"Mod1+e" = "exec --no-startup-id thunar"; "${mod}+e" = "exec --no-startup-id ${pkgs.nautilus}/bin/nautilus";
"Mod1+c" = "exec --no-startup-id hyprpicker -a"; "${mod}+c" = "exec --no-startup-id ${pkgs.hyprpicker}/bin/hyprpicker -a";
"Mod1+n" = "exec --no-startup-id swaync-client -t"; "${mod}+n" = "exec --no-startup-id ${pkgs.swaynotificationcenter}/bin/swaync-client -t";
"Mod1+Return" = "exec --no-startup-id ${pkgs.foot}/bin/footclient"; "${mod}+Return" = "exec --no-startup-id ${pkgs.foot}/bin/footclient";
"Mod1+Shift+Return" = "exec --no-startup-id ${pkgs.foot}/bin/footclient --title 'float_foot'"; "${mod}+Shift+Return" = "exec --no-startup-id ${pkgs.foot}/bin/footclient --title 'float_foot'";
"Mod1+Shift+l" = "exec --no-startup-id ${pkgs.hyprlock}/bin/hyprlock"; "${altmod}+Shift+l" = "exec ${pkgs.swaylock-fancy}/bin/swaylock-fancy";
"Mod4+Shift+l" = "exec swaylock --image /home/${username}/.local/share/bg.png"; "${mod}+Shift+b" = "exec pkill -SIGUSR1 .waybar-wrapped";
"Mod1+Shift+b" = "exec pkill -SIGUSR1 .waybar-wrapped"; "${mod}+Shift+v" = "exec cliphist list | bemenu -l 5 --ignorecase | cliphist decode | wl-copy";
"Mod1+Shift+v" = "exec cliphist list | bemenu -l 5 --ignorecase | cliphist decode | wl-copy"; "${mod}+Shift+f" = "exec --no-startup-id ${pkgs.librewolf}/bin/librewolf";
"Mod1+Shift+f" = "exec --no-startup-id librewolf"; "${mod}+Shift+c" = "exec --no-startup-id ${pkgs.ungoogled-chromium}/bin/chromium";
"Mod1+Shift+c" = "exec --no-startup-id chromium"; "${mod}+Shift+q" = "exec --no-startup-id ${pkgs.qutebrowser}/bin/qutebrowser";
"Mod1+Shift+q" = "exec --no-startup-id qutebrowser"; "${mod}+Shift+w" = "exec --no-startup-id ${pkgs.wdisplays}/bin/wdisplays";
"Mod1+Shift+w" = "exec --no-startup-id wdisplays"; "${mod}+Shift+t" = "exec --no-startup-id ${pkgs.thunderbird}/bin/thunderbird";
"Mod1+Shift+t" = "exec --no-startup-id thunderbird"; "${mod}+Shift+e" = "exec --no-startup-id ${pkgs.element-desktop}/bin/element-desktop";
"Mod1+Shift+e" = "exec --no-startup-id element-desktop"; "${mod}+Shift+p" = "exec --no-startup-id ${pkgs.lxqt.pavucontrol-qt}/bin/pavucontrol-qt";
"Mod1+Shift+p" = "exec --no-startup-id pavucontrol-qt"; "${mod}+Shift+n" = "exec --no-startup-id notes";
"Mod1+Shift+n" = "exec --no-startup-id notes";
# screenshot # screenshot
"Mod1+Shift+s" = "exec grim -g \"\$(slurp)\" -t png - | wl-copy -t image/png"; "${mod}+Shift+s" =
# "Mod1+Shift+s" = "exec --no-startup-id grimblast copy area"; "exec ${pkgs.grim}/bin/grim -g \"\$(${pkgs.slurp}/bin/slurp)\" -t png - | wl-copy -t image/png";
"Mod1+Shift+g" = "exec --no-startup-id grabtext"; # "${mod}+Shift+s" = "exec --no-startup-id grimblast copy area";
"${mod}+Shift+g" = "exec --no-startup-id grabtext";
# media and volume controls # media and volume controls
"XF86AudioRaiseVolume" = "exec pamixer -i 2"; "XF86AudioRaiseVolume" = "exec pamixer -i 2";
"XF86AudioLowerVolume" = "exec pamixer -d 2"; "XF86AudioLowerVolume" = "exec pamixer -d 2";
"XF86AudioMute" = "exec pamixer -t"; "XF86AudioMute" = "exec ${pkgs.pamixer}/bin/pamixer -t";
"XF86AudioPlay" = "exec playerctl play-pause"; "XF86AudioPlay" = "exec ${pkgs.playerctl}/playerctl play-pause";
"XF86AudioNext" = "exec playerctl next"; "XF86AudioNext" = "exec ${pkgs.playerctl}/playerctl next";
"XF86AudioPrev" = "exec playerctl previous"; "XF86AudioPrev" = "exec ${pkgs.playerctl}/playerctl previous";
"XF86AudioStop" = "exec playerctl stop"; "XF86AudioStop" = "exec ${pkgs.playerctl}/playerctl stop";
# laptop brigthness # laptop brigthness
"XF86MonBrightnessUp" = "exec brightnessctl set 5%+"; "XF86MonBrightnessUp" = "exec brightnessctl set 5%+";
"XF86MonBrightnessDown" = "exec brightnessctl set 5%-"; "XF86MonBrightnessDown" = "exec brightnessctl set 5%-";
"Mod1+XF86MonBrightnessUp" = "exec brightnessctl set 100%+"; "${mod}+XF86MonBrightnessUp" = "exec brightnessctl set 100%+";
"Mod1+XF86MonBrightnessDown" = "exec brightnessctl set 100%-"; "${mod}+XF86MonBrightnessDown" = "exec brightnessctl set 100%-";
} }
]; ];
focus.followMouse = true; focus.followMouse = true;
@ -195,14 +204,26 @@ in
{ command = "wl-paste --watch cliphist store &"; } { command = "wl-paste --watch cliphist store &"; }
{ command = "yubikey-touch-detector --libnotify &"; } { command = "yubikey-touch-detector --libnotify &"; }
{ command = "mpDris2 &"; } { command = "mpDris2 &"; }
{ command = "swaycons &"; }
# { command = "wlsunset -S '06:30' -s '19:30' -d 1800 "; } # { command = "wlsunset -S '06:30' -s '19:30' -d 1800 "; }
{ command = "foot --server &"; } { command = "foot --server &"; }
{ command = "gsettings set org.gnome.desktop.interface color-scheme 'prefer-dark'"; } { command = "gsettings set org.gnome.desktop.interface color-scheme 'prefer-dark'"; }
{ command = "footclient"; }
]; ];
workspaceAutoBackAndForth = false; workspaceAutoBackAndForth = false;
bindswitches = {
"lid:on" = {
reload = true;
locked = true;
action = "output ${laptop} disable";
};
"lid:off" = {
reload = true;
locked = true;
action = "output ${laptop} enable";
};
};
}; };
# systemd.enable = true; # why would anyone do this??? # systemd.enable = true; # why would anyone do this???
wrapperFeatures = { wrapperFeatures = {
gtk = true; gtk = true;
@ -210,27 +231,43 @@ in
extraConfig = '' extraConfig = ''
set $font Ubuntu Mono set $font Ubuntu Mono
font pango:$font 7 font pango:$font 7
set $title_options text_transform='lowercase'
# window styles
hide_edge_borders none hide_edge_borders none
# title_align left title_align left
# default_border normal 4 default_border normal 2
# for_window [all] border normal 4, floating enable for_window [all] border normal 2, floating enable, title_format "<span text_transform='lowercase'>%title</span>"
# for_window [class="librewolf"], floating disable for_window [app_id="firefox"] floating disabled
# for_window [class="foot"], floating disable for_window [app_id="thudnerbird"] floating disabled
# for_window [class="Element"], floating disable for_window [app_id="Element"] floating disabled
# for_window [class="dino"], floating disable for_window [app_id="Dino"] floating disabled
# for_window [class="Signal"], floating disable for_window [app_id="Signal"] floating disabled
# for_window [class="libreoffice-writer"] floating disable for_window [app_id="librewolf"] floating disabled
# for_window [class="libreoffice-calc"] floating disable for_window [app_id="footclient"] floating disabled
# for_window [class="libreoffice-draw"] floating disable for_window [app_id="fl.exe"] floating disabled
# for_window [class="libreoffice-math"] floating disable
# for_window [class="libreoffice-impress"] floating disable for_window [class="libreoffice-startcenter"] resize set 1024 720
for_window [window_role="(?i)GtkFileChooserDialog"] resize 750 500
#for_window [class="librewolf"], floating disable
#for_window [class="foot"], floating disable
#for_window [class="Element"], floating disable
#for_window [class="dino"], floating disable
#for_window [class="Signal"], floating disable
#for_window [class="libreoffice-writer"], floating disable
#for_window [class="libreoffice-calc"], floating disable
#for_window [class="libreoffice-draw"], floating disable
#for_window [class="libreoffice-math"], floating disable
#for_window [class="libreoffice-impress"],floating disable
for_window [window_role="(?i)GtkFileChooserDialog"] resize set 720 640 for_window [window_role="(?i)GtkFileChooserDialog"] resize set 720 640
for_window [title="LibreWolf Sharing Indicator"] border none for_window [title="LibreWolf Sharing Indicator"] border none
shadows enable
shadow_offset 10 10
# blur enable
# blur_passes 2
# lbur_radius 1
''; '';
}; };
@ -246,108 +283,13 @@ in
focused_background_color = "285577"; focused_background_color = "285577";
focused_background_opacity = 1.0; focused_background_opacity = 1.0;
focused_text_color = "ffffff"; focused_text_color = "ffffff";
font_family = "GohuFont 14 Nerd Font Mono"; font_family = "BlexMono Nerd Font";
font_size = "14"; font_size = "14";
window_background_color = "d1f21"; window_background_color = "d1f21";
window_background_opacity = 0.2; window_background_opacity = 0.2;
}; };
}; };
home.file."/home/${username}/.config/swaycons/config.toml".text = ''
[global]
color = "#FFFFFF"
focused_color = "#FFFFFF"
icon = "󰖯"
size = "14pt"
separator = " "
[app_id]
"dev.alextren.Spot" = { icon = "󰓇", color = "#1ed760" }
"org.daa.NeovimGtk" = { icon = "", color = "#8fff6d" }
"org.gnome.Calculator" = { icon = "󰃬" }
"org.gnome.clocks" = { icon = "󱑈" }
"org.gnome.Nautilus" = { icon = "󰉖", color = "#6291d6" }
"im.dino.Dino" = { icon = "󰭹", color = "#3777f0" }
spt = { icon = "󰋋", color = "#ef5466" }
rmpc = { icon = "󰋋", color = "#ef5466" }
Signal = { icon = "󰭹", color = "#3777f0" }
Element = { icon = "󰭹", color = "#3777f0" }
Spotify = { icon = "󰓇", color = "#1ed760" }
chromium = { icon = "", color = "#a1c2fa", size = "13pt" }
librewolf = { icon = "", color = "#ff8817", size = "13pt" }
foot = { icon = "" }
thunderbird = { icon = "", color = "#f6d32d" }
neovide = { icon = "", color = "#8fff6d" }
nvim-qt = { icon = "", color = "#8fff6d" }
libreoffice-writer = { icon = "", color = "#00A500", size = "12pt" }
libreoffice-calc = { icon = "󰱿", color = "#00A500" }
[title]
"(?i)Thunar" = { icon = "󰉖", color = "#6291d6" }
"(?i)vim" = { app_id = ["foot", "kitty"], icon = "", color = "#8fff6d" }
"(cloud|developers)\\.google.com" = { icon = "", color = "#4285f4" }
"192\\.168\\.0\\.1|192\\.168\\.86\\.1|ui\\.com" = { icon = "󰖩", color = "#004cb6" }
"1password\\.com" = { icon = "󰍁", color = "#0572ec" }
"amazon\\.com" = { icon = "", color = "#ff9900" }
"angular\\.io" = { icon = "", color = "#dd0031" }
"archlinux\\.org" = { icon = "", color = "#1793d1" }
"atlassian\\.(net|com)" = { icon = "󰌃", color = "#0052cc" }
"aws\\.amazon\\.com" = { icon = "", color = "#ff9900" }
"bitbucket\\.org" = { icon = "󰂨", color = "#0052cc" }
"calendar\\.google\\.com" = { icon = "󰃶", color = "#4285f4" }
"coda\\.io" = { icon = "", color = "#f46a54" }
"crates\\.io" = { icon = "󰏗", color = "#ffc933" }
"deezer\\.com" = { icon = "󰋋", color = "#ef5466" }
"discogs\\.com" = { icon = "󰀥" }
"discord\\.com" = { icon = "󰙯", color = "#404eed" }
"docs\\.google\\.com" = { icon = "", color = "#4285f4" }
"docs\\.google\\.com/spreadsheets" = { icon = "󰈛", color = "#34a853" }
"docs\\.rs|rust-lang\\.org" = { icon = "", size = "16pt" }
"drive\\.google\\.com" = { icon = "󰊶", color = "#4285f4" }
"dropbox\\.com" = { icon = "󰇣", color = "#0061fe" }
"duckduckgo\\.com" = { icon = "󰇥", color = "#de5833" }
"facebook\\.com" = { icon = "", color = "#1877f2" }
"fastmail\\.com" = { icon = "󰗰", color = "#1565c0" }
"fastmail\\.com/calendar" = { icon = "", color = "#1565c0" }
"fastmail\\.com/contacts" = { size = "11pt", icon = "", color = "#1565c0" }
"feedbin\\.com" = { icon = "" }
"gitbook\\.com" = { icon = "", color = "#346ddb" }
"github\\.com" = { icon = "" }
"google\\.com" = { icon = "", color = "#4285f4" }
"google\\.com/maps" = { icon = "󰗵", color = "#4caf50" }
"insomnia\\.rest" = { icon = "", color = "#7100df" }
"keep\\.google\\.com" = { icon = "󰛜", color = "#fbbc04" }
"last\\.fm" = { icon = "", color = "#ba0000" }
"mail\\.google\\.com" = { icon = "󰊫", color = "#ad1f1c" }
"meet\\.google\\.com" = { icon = "", color = "#4285f4" }
"messages\\.google\\.com" = { icon = "󰍩", color = "#4285f4" }
"mozilla\\.org" = { icon = "" }
"nerdfonts\\.com" = { icon = "", color = "#ffce3e" }
"nytimes\\.com/games/wordle" = { icon = "󰈭", color = "#538d4e" }
"photos\\.google\\.com" = { icon = "󰄄", color = "#4285f4" }
"reactjs\\.org" = { icon = "", color = "#61dafb" }
"reddit\\.com" = { icon = "󰑍", color = "#ff4500" }
"slack\\.com" = { icon = "󰒱", color = "#2eb67d" }
"sleeper\\.com" = { icon = "󰉟", color = "#7c8ef4" }
"spotify\\.com" = { icon = "󰓇", color = "#1ed760" }
"sr\\.ht|sourcehut\\.org" = { icon = "" }
"stackoverflow\\.com" = { icon = "", color = "#f48225" }
"startpage\\.com" = { icon = "", color = "#6573ff" }
"stripe\\.com" = { icon = "", color = "#635bff" }
"ticktick\\.com" = { icon = "󰄴", color = "#4774f9" }
"todoist\\.com" = { icon = "󰄲", color = "#e44232" }
"travis-ci\\.(com|org)" = { icon = "", color = "#cd324a" }
"twitter\\.com" = { icon = "", color = "#1d9bf0" }
"webpack\\.js\\.org" = { icon = "󰆧", color = "#8ed6fb" }
"wikipedia\\.org" = { icon = "" }
"youneedabudget\\.com" = { icon = "", color = "#4495d7" }
"bandcamp\\.com" = { icon = "", color = "#1da0c3", size = "13pt" }
"zoom\\.us" = { icon = "󰕧", color = "#2d8cff" }
aerc = { app_id = ["foot", "Alacritty"], icon = "󰇰" }
litecli = { app_id = ["foot", "Alacritty"], icon = "󰆼", color = "#c74451" }
nnn = { app_id = ["foot", "Alacritty"], icon = "󰉖" }
pgcli = { app_id = ["foot", "Alacritty"], icon = "󰆼", color = "#c74451" }
'';
home.file = { home.file = {
"/home/${username}/.config/libinput-gestures/sway.conf" = { "/home/${username}/.config/libinput-gestures/sway.conf" = {
executable = false; executable = false;