From 27c114b8017bd02a1bb80c4f659a86731081f7b6 Mon Sep 17 00:00:00 2001 From: "Wyatt J. Miller" Date: Wed, 9 Jul 2025 20:08:16 -0400 Subject: [PATCH] little sway update --- defaults/sway/config | 23 +++++----- home/sway.nix | 99 +++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 111 insertions(+), 11 deletions(-) diff --git a/defaults/sway/config b/defaults/sway/config index 30775df..40c4ff0 100644 --- a/defaults/sway/config +++ b/defaults/sway/config @@ -10,8 +10,7 @@ set $right l set $term alacritty # Menu (rofi) -set $rofi_cmd rofi -terminal '$term' -set $menu $rofi_cmd -show combi -combi-modes drun#run -modes combi +set $menu wofi --term '$term' ### Output configuration output DP-3 pos 3840 0 res 1920x1080@59Hz @@ -28,13 +27,17 @@ output DP-3 bg ~/.wallpaper/.wallpaper.png fill ## DP-3 bindings workspace 1 output DP-2 workspace 2 output DP-2 +workspace 4 output DP-2 +workspace 5 output DP-2 ## HDMI-A-1 bindings -workspace 3 output HDMI-A-1 +workspace 3 output HDMI-A-1 +workspace 9 output HDMI-A-1 ## DP-2 bindings workspace 6 output DP-3 workspace 7 output DP-3 +workspace 8 output DP-3 ### Colour options set $bg #24283b @@ -87,8 +90,9 @@ floating_modifier $mod normal # Reload the configuration file bindsym $mod+Shift+c reload - # Exit sway (logs you out of your Wayland session) - bindsym $mod+Shift+e exec swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -b 'Yes, exit sway' 'swaymsg exit' + # Shutdown and reboot hotkeys + bindsym $mod+Shift+e exec swaynag -t warning -m 'You pressed the shutdown shortcut. Do you really want to shutdown your computer?' -b 'Yes, shutdown' 'systemctl poweroff' + bindsym $mod+Shift+r exec swaynag -t warning -m 'You pressed the reboot shortcut. Do you really want to reboot your computer?' -b 'Yes, reboot' 'systemctl reboot' ### Navigation # Move your focus around @@ -182,8 +186,9 @@ mode "resize" { bindsym Return mode "default" bindsym Escape mode "default" } -bindsym $mod+r mode "resize" +### resize +bindsym $mod+r mode "resize" ### Audio and brightness keybinds bindsym XF86AudioRaiseVolume exec pactl set-sink-volume @DEFAULT_SINK@ +5% @@ -196,16 +201,14 @@ bindsym XF86AudioPrev exec playerctl previous bindsym XF86MonBrightnessUp exec light -A 5 bindsym XF86MonBrightnessDown exec light -U 5 -### Lock the screen so my brother -### won't dick with my computer -bindsym $mod+Ctrl+l 'swaylock -f -i /home/wyatt/.wallpaper_lock.jpeg' +### Lock the screen +bindsym $mod+Ctrl+q 'swaylock -f -i /home/wyatt/.wallpaper/.wallpaper_lock.png' ### Status Bar: bar { swaybar_command waybar } - ### Font settings: font pango:FiraCode: 14px diff --git a/home/sway.nix b/home/sway.nix index 061291f..5778135 100644 --- a/home/sway.nix +++ b/home/sway.nix @@ -29,7 +29,104 @@ in { xdg.configFile."sway/config".source = lib.mkForce (dirs.defaults + /sway/config); xdg.configFile."waybar/config".source = lib.mkForce (dirs.defaults + /waybar/config); xdg.configFile."waybar/style.css".source = lib.mkForce (dirs.defaults + /waybar/style.css); - programs.rofi.enable = pkgs.stdenv.isLinux; + + programs.wofi = { + enable = pkgs.stdenv.isLinux; + settings = { + width=600; + height=350; + location="center"; + show="drun"; + prompt="Search..."; + filter_rate=100; + allow_markup=true; + no_actions=true; + halign="fill"; + orientation="vertical"; + content_halign="fill"; + insensitive=true; + allow_images=true; + image_size=40; + gtk_dark=true; + }; + style = '' + @define-color selected-text #8caaee; + @define-color text #c6d0f5; + @define-color base #24273a; + + * { + font-family: 'Monaspace Krypton 9', monospace; + font-size: 18px; + } + + window { + margin: 0px; + padding: 20px; + background-color: @base; + opacity: 0.95; + } + + #inner-box { + margin: 0; + padding: 0; + border: none; + background-color: @base; + } + + #outer-box { + margin: 0; + padding: 20px; + border: none; + background-color: @base; + } + + #scroll { + margin: 0; + padding: 0; + border: none; + background-color: @base; + } + + #input { + margin: 0; + padding: 10px; + border: none; + background-color: @base; + color: @text; + } + + #input:focus { + outline: none; + box-shadow: none; + border: none; + } + + #text { + margin: 5px; + border: none; + color: @text; + } + + #entry { + background-color: @base; + } + + #entry:selected { + outline: none; + border: none; + } + + #entry:selected #text { + color: @selected-text; + } + + #entry image { + -gtk-icon-transform: scale(0.7); + } + ''; + }; + programs.swaylock.enable = pkgs.stdenv.isLinux; + services.mako = { enable = pkgs.stdenv.isLinux; settings = {