diff --git a/roles/hyprland/files/hypr/hyprland.conf b/roles/hyprland/files/hypr/hyprland.conf index 4614cc3..92ab65e 100644 --- a/roles/hyprland/files/hypr/hyprland.conf +++ b/roles/hyprland/files/hypr/hyprland.conf @@ -5,43 +5,7 @@ # See https://wiki.hypr.land/Configuring/Monitors/ monitor=,preferred,auto,auto source = ./monitors.conf -# monitor = DP-2, 2560x1440@165, 0x0, 1 -# monitor = DP-1, 2560x1440@165, 2560x0, 1 -# monitor = HDMI-A-2, 1920x1080@60, 5120x-360, 1, transform, 3 - -workspace = 1, monitor:DP-1, persistent:true, default:true -workspace = 4, monitor:DP-1, persistent:true -workspace = 7, monitor:DP-1, persistent:true -workspace = 10, monitor:DP-1, persistent:true -workspace = 13, monitor:DP-1, persistent:true -workspace = 16, monitor:DP-1, persistent:true -workspace = 19, monitor:DP-1, persistent:true -workspace = 22, monitor:DP-1, persistent:true -workspace = 25, monitor:DP-1, persistent:true -workspace = 28, monitor:DP-1, persistent:true - -workspace = 2, monitor:HDMI-A-2, persistent:true, default:true -workspace = 5, monitor:HDMI-A-2, persistent:true -workspace = 8, monitor:HDMI-A-2, persistent:true -workspace = 11, monitor:HDMI-A-2, persistent:true -workspace = 14, monitor:HDMI-A-2, persistent:true -workspace = 17, monitor:HDMI-A-2, persistent:true -workspace = 20, monitor:HDMI-A-2, persistent:true -workspace = 23, monitor:HDMI-A-2, persistent:true -workspace = 26, monitor:HDMI-A-2, persistent:true -workspace = 29, monitor:HDMI-A-2, persistent:true - -workspace = 3, monitor:DP-2, persistent:true, default:true -workspace = 6, monitor:DP-2, persistent:true -workspace = 9, monitor:DP-2, persistent:true -workspace = 12, monitor:DP-2, persistent:true -workspace = 15, monitor:DP-2, persistent:true -workspace = 18, monitor:DP-2, persistent:true -workspace = 21, monitor:DP-2, persistent:true -workspace = 24, monitor:DP-2, persistent:true -workspace = 27, monitor:DP-2, persistent:true -workspace = 30, monitor:DP-2, persistent:true - +source = ./workspaces.conf ################### ### MY PROGRAMS ### @@ -49,7 +13,6 @@ workspace = 30, monitor:DP-2, persistent:true # See https://wiki.hypr.land/Configuring/Keywords/ -# Set programs that you use $terminal = ghostty $fileManager = thunar $menu = wofi --show drun @@ -171,7 +134,6 @@ layerrule = ignorezero, wofi # keep blur even on near-opaque colors layerrule = dimaround, wofi # optional: dim background behind wofi layerrule = ignorealpha 0.90, wofi # target overall opacity for the layer - # waybar layerrule = blur, waybar layerrule = ignorealpha 0.15, waybar @@ -286,132 +248,6 @@ bind = $mainMod, right, movefocus, r bind = $mainMod, up, movefocus, u bind = $mainMod, down, movefocus, d -# Switch workspaces with mainMod + [0-9] -# -------- PAGE 1 → 1-2-3 -bind = SUPER, 1, exec, hyprctl --batch " \ - dispatch focusmonitor DP-1; dispatch workspace 1; \ - dispatch focusmonitor DP-2; dispatch workspace 2; \ - dispatch focusmonitor HDMI-A-2; dispatch workspace 3; \ - dispatch focusmonitor DP-1" - -bind = SUPER, 2, exec, hyprctl --batch " \ - dispatch focusmonitor DP-1; dispatch workspace 4; \ - dispatch focusmonitor DP-2; dispatch workspace 5; \ - dispatch focusmonitor HDMI-A-2; dispatch workspace 6; \ - dispatch focusmonitor DP-1" - -bind = SUPER, 3, exec, hyprctl --batch " \ - dispatch focusmonitor DP-1; dispatch workspace 7; \ - dispatch focusmonitor DP-2; dispatch workspace 8; \ - dispatch focusmonitor HDMI-A-2; dispatch workspace 9; \ - dispatch focusmonitor DP-1" - -bind = SUPER, 4, exec, hyprctl --batch " \ - dispatch focusmonitor DP-1; dispatch workspace 10; \ - dispatch focusmonitor DP-2; dispatch workspace 11; \ - dispatch focusmonitor HDMI-A-2; dispatch workspace 12; \ - dispatch focusmonitor DP-1" - -bind = SUPER, 5, exec, hyprctl --batch " \ - dispatch focusmonitor DP-1; dispatch workspace 13; \ - dispatch focusmonitor DP-2; dispatch workspace 14; \ - dispatch focusmonitor HDMI-A-2; dispatch workspace 15; \ - dispatch focusmonitor DP-1" - -bind = SUPER, 6, exec, hyprctl --batch " \ - dispatch focusmonitor DP-1; dispatch workspace 16; \ - dispatch focusmonitor DP-2; dispatch workspace 17; \ - dispatch focusmonitor HDMI-A-2; dispatch workspace 18; \ - dispatch focusmonitor DP-1" - -bind = SUPER, 7, exec, hyprctl --batch " \ - dispatch focusmonitor DP-1; dispatch workspace 19; \ - dispatch focusmonitor DP-2; dispatch workspace 20; \ - dispatch focusmonitor HDMI-A-2; dispatch workspace 21; \ - dispatch focusmonitor DP-1" - -bind = SUPER, 8, exec, hyprctl --batch " \ - dispatch focusmonitor DP-1; dispatch workspace 22; \ - dispatch focusmonitor DP-2; dispatch workspace 23; \ - dispatch focusmonitor HDMI-A-2; dispatch workspace 24; \ - dispatch focusmonitor DP-1" - -bind = SUPER, 9, exec, hyprctl --batch " \ - dispatch focusmonitor DP-1; dispatch workspace 25; \ - dispatch focusmonitor DP-2; dispatch workspace 26; \ - dispatch focusmonitor HDMI-A-2; dispatch workspace 27; \ - dispatch focusmonitor DP-1" - -bind = SUPER, 0, exec, hyprctl --batch " \ - dispatch focusmonitor DP-1; dispatch workspace 28; \ - dispatch focusmonitor DP-2; dispatch workspace 29; \ - dispatch focusmonitor HDMI-A-2; dispatch workspace 30; \ - dispatch focusmonitor DP-1" - -bind = SUPER SHIFT, 1, exec, hyprctl --batch " \ - dispatch focusmonitor DP-1; dispatch workspace 1; \ - dispatch focusmonitor DP-2; dispatch workspace 2; \ - dispatch focusmonitor HDMI-A-2; dispatch workspace 3; \ - dispatch focusmonitor DP-1" -bind = SUPER SHIFT, 2, exec, hyprctl --batch " \ - dispatch focusmonitor DP-1; dispatch workspace 4; \ - dispatch focusmonitor DP-2; dispatch workspace 5; \ - dispatch focusmonitor HDMI-A-2; dispatch workspace 6; \ - dispatch focusmonitor DP-1" -bind = SUPER SHIFT, 3, exec, hyprctl --batch " \ - dispatch focusmonitor DP-1; dispatch workspace 7; \ - dispatch focusmonitor DP-2; dispatch workspace 8; \ - dispatch focusmonitor HDMI-A-2; dispatch workspace 9; \ - dispatch focusmonitor DP-1" -bind = SUPER SHIFT, 4, exec, hyprctl --batch " \ - dispatch focusmonitor DP-1; dispatch workspace 10; \ - dispatch focusmonitor DP-2; dispatch workspace 11; \ - dispatch focusmonitor HDMI-A-2; dispatch workspace 12; \ - dispatch focusmonitor DP-1" -bind = SUPER SHIFT, 5, exec, hyprctl --batch " \ - dispatch focusmonitor DP-1; dispatch workspace 13; \ - dispatch focusmonitor DP-2; dispatch workspace 14; \ - dispatch focusmonitor HDMI-A-2; dispatch workspace 15; \ - dispatch focusmonitor DP-1" -bind = SUPER SHIFT, 6, exec, hyprctl --batch " \ - dispatch focusmonitor DP-1; dispatch workspace 16; \ - dispatch focusmonitor DP-2; dispatch workspace 17; \ - dispatch focusmonitor HDMI-A-2; dispatch workspace 18; \ - dispatch focusmonitor DP-1" -bind = SUPER SHIFT, 7, exec, hyprctl --batch " \ - dispatch focusmonitor DP-1; dispatch workspace 19; \ - dispatch focusmonitor DP-2; dispatch workspace 20; \ - dispatch focusmonitor HDMI-A-2; dispatch workspace 21; \ - dispatch focusmonitor DP-1" -bind = SUPER SHIFT, 8, exec, hyprctl --batch " \ - dispatch focusmonitor DP-1; dispatch workspace 22; \ - dispatch focusmonitor DP-2; dispatch workspace 23; \ - dispatch focusmonitor HDMI-A-2; dispatch workspace 24; \ - dispatch focusmonitor DP-1" -bind = SUPER SHIFT, 9, exec, hyprctl --batch " \ - dispatch focusmonitor DP-1; dispatch workspace 25; \ - dispatch focusmonitor DP-2; dispatch workspace 26; \ - dispatch focusmonitor HDMI-A-2; dispatch workspace 27; \ - dispatch focusmonitor DP-1" -bind = SUPER SHIFT, 0, exec, hyprctl --batch " \ - dispatch focusmonitor DP-1; dispatch workspace 28; \ - dispatch focusmonitor DP-2; dispatch workspace 29; \ - dispatch focusmonitor HDMI-A-2; dispatch workspace 30; \ - dispatch focusmonitor DP-1" - - - -bind = $mainMod SHIFT, 1, movetoworkspace, 1 -bind = $mainMod SHIFT, 2, movetoworkspace, 4 -bind = $mainMod SHIFT, 3, movetoworkspace, 7 -bind = $mainMod SHIFT, 4, movetoworkspace, 10 -bind = $mainMod SHIFT, 5, movetoworkspace, 13 -bind = $mainMod SHIFT, 6, movetoworkspace, 16 -bind = $mainMod SHIFT, 7, movetoworkspace, 19 -bind = $mainMod SHIFT, 8, movetoworkspace, 22 -bind = $mainMod SHIFT, 9, movetoworkspace, 25 -bind = $mainMod SHIFT, 0, movetoworkspace, 28 - bind = $mainMod SHIFT, left, movewindow, l bind = $mainMod SHIFT, right, movewindow, r bind = $mainMod SHIFT, up, movewindow, u @@ -446,6 +282,7 @@ bind = CTRL ALT, Up, exec, playerctl --player=spotify volume 0.05+ bind = CTRL ALT, Down, exec, playerctl --player=spotify volume 0.05- bind = ,F7,pass,class:^(discord)$ +bind = ,F8,pass,class:^(discord)$ # Printscreen # Screenshot a selected region (interactive) @@ -453,7 +290,7 @@ bind = ,F7,pass,class:^(discord)$ bind = , Print, exec, hyprshot -zm region ############################## -### WINDOWS AND WORKSPACES ### +### WINDOWRULES ### ############################## # See https://wiki.hypr.land/Configuring/Window-Rules/ for more diff --git a/roles/hyprland/files/hypr/workspaces.conf b/roles/hyprland/files/hypr/workspaces.conf index e69de29..ba4b7c3 100644 --- a/roles/hyprland/files/hypr/workspaces.conf +++ b/roles/hyprland/files/hypr/workspaces.conf @@ -0,0 +1,34 @@ +$mainMod = SUPER # Sets "Super" key as main modifier + +workspace = 1, monitor:DP-1, persistent:true, default:true +workspace = 2, monitor:DP-1, persistent:true +workspace = 3, monitor:DP-1, persistent:true +workspace = 4, monitor:DP-2, persistent:true, default:true +workspace = 5, monitor:DP-2, persistent:true +workspace = 6, monitor:DP-2, persistent:true +workspace = 7, monitor:HDMI-A-2, persistent:true, default:true +workspace = 8, monitor:HDMI-A-2, persistent:true +workspace = 9, monitor:HDMI-A-2, persistent:true +workspace = 10, monitor:HDMI-A-1, persistent:true, default:true + +bind = $mainMod, 1, exec, hyprctl --batch "dispatch focusmonitor DP-1; dispatch workspace 1;" +bind = $mainMod, 2, exec, hyprctl --batch "dispatch focusmonitor DP-1; dispatch workspace 2;" +bind = $mainMod, 3, exec, hyprctl --batch "dispatch focusmonitor DP-1; dispatch workspace 3;" +bind = $mainMod, 4, exec, hyprctl --batch "dispatch focusmonitor DP-2; dispatch workspace 4;" +bind = $mainMod, 5, exec, hyprctl --batch "dispatch focusmonitor DP-2; dispatch workspace 5;" +bind = $mainMod, 6, exec, hyprctl --batch "dispatch focusmonitor DP-2; dispatch workspace 6;" +bind = $mainMod, 7, exec, hyprctl --batch "dispatch focusmonitor HDMI-A-2; dispatch workspace 7;" +bind = $mainMod, 8, exec, hyprctl --batch "dispatch focusmonitor HDMI-A-2; dispatch workspace 8;" +bind = $mainMod, 9, exec, hyprctl --batch "dispatch focusmonitor HDMI-A-2; dispatch workspace 9;" +bind = $mainMod, 0, exec, hyprctl --batch "dispatch focusmonitor HDMI-A-1; dispatch workspace 10;" + +bind = $mainMod SHIFT, 1, movetoworkspacesilent, 1 +bind = $mainMod SHIFT, 2, movetoworkspacesilent, 2 +bind = $mainMod SHIFT, 3, movetoworkspacesilent, 3 +bind = $mainMod SHIFT, 4, movetoworkspacesilent, 4 +bind = $mainMod SHIFT, 5, movetoworkspacesilent, 5 +bind = $mainMod SHIFT, 6, movetoworkspacesilent, 6 +bind = $mainMod SHIFT, 7, movetoworkspacesilent, 7 +bind = $mainMod SHIFT, 8, movetoworkspacesilent, 8 +bind = $mainMod SHIFT, 9, movetoworkspacesilent, 9 +bind = $mainMod SHIFT, 0, movetoworkspacesilent, 10 diff --git a/roles/hyprland/files/waybar/config.jsonc b/roles/hyprland/files/waybar/config.jsonc index 1cb4e03..34693fd 100644 --- a/roles/hyprland/files/waybar/config.jsonc +++ b/roles/hyprland/files/waybar/config.jsonc @@ -9,124 +9,45 @@ "margin-bottom": 0, /* order: 1-2-3 | window-title | tray + clock */ - "modules-left": [ "custom/group1", "custom/group2", "custom/group3", "custom/group4","custom/group5","custom/group6","custom/group7","custom/group8","custom/group9","custom/group10"], + // "modules-left": [ "custom/group1", "custom/group2", "custom/group3", "custom/group4","custom/group5","custom/group6","custom/group7","custom/group8","custom/group9","custom/group10"], + "modules-left": ["hyprland/workspaces"], "modules-center": [ "hyprland/window" ], "modules-right": [ "tray", "custom/separator", "network", "bluetooth", "custom/separator", "disk", "cpu", "memory", "pulseaudio", "custom/separator", "clock"], - "custom/group1": { - "exec": "~/.config/waybar/scripts/groups.sh 1", - "return-type": "json", - "interval": 1, - "on-click": "~/.config/waybar/scripts/groups.sh click 1" - }, - "custom/group2": { - "exec": "~/.config/waybar/scripts/groups.sh 2", - "return-type": "json", - "interval": 1, - "on-click": "~/.config/waybar/scripts/groups.sh click 2" - }, - "custom/group3": { - "exec": "~/.config/waybar/scripts/groups.sh 3", - "return-type": "json", - "interval": 1, - "on-click": "~/.config/waybar/scripts/groups.sh click 3" - }, - "custom/group4": { - "exec": "~/.config/waybar/scripts/groups.sh 4", - "return-type": "json", - "interval": 1, - "on-click": "~/.config/waybar/scripts/groups.sh click 4" - }, - "custom/group5": { - "exec": "~/.config/waybar/scripts/groups.sh 5", - "return-type": "json", - "interval": 1, - "on-click": "~/.config/waybar/scripts/groups.sh click 5" - }, - "custom/group6": { - "exec": "~/.config/waybar/scripts/groups.sh 6", - "return-type": "json", - "interval": 1, - "on-click": "~/.config/waybar/scripts/groups.sh click 6" - }, - "custom/group7": { - "exec": "~/.config/waybar/scripts/groups.sh 7", - "return-type": "json", - "interval": 1, - "on-click": "~/.config/waybar/scripts/groups.sh click 7" - }, - "custom/group8": { - "exec": "~/.config/waybar/scripts/groups.sh 8", - "return-type": "json", - "interval": 1, - "on-click": "~/.config/waybar/scripts/groups.sh click 8" - }, - "custom/group9": { - "exec": "~/.config/waybar/scripts/groups.sh 9", - "return-type": "json", - "interval": 1, - "on-click": "~/.config/waybar/scripts/groups.sh click 9" - }, - "custom/group10": { - "exec": "~/.config/waybar/scripts/groups.sh 10", - "return-type": "json", - "interval": 1, - "on-click": "~/.config/waybar/scripts/groups.sh click 10" - }, - // "custom/page1": { - // "exec": "~/.config/waybar/scripts/page.sh 1", - // "exec-persistent": true, - // "return-type": "json" - // }, - // "custom/page2": { - // "exec": "~/.config/waybar/scripts/page.sh 2", - // "exec-persistent": true, - // "return-type": "json" - // }, - // "custom/page3": { - // "exec": "~/.config/waybar/scripts/page.sh 3", - // "exec-persistent": true, - // "return-type": "json" - // }, - // "custom/page4": { - // "exec": "~/.config/waybar/scripts/page.sh 4", - // "exec-persistent": true, - // "return-type": "json" - // }, - // "custom/page5": { - // "exec": "~/.config/waybar/scripts/page.sh 5", - // "exec-persistent": true, - // "return-type": "json" - // }, - // "custom/page6": { - // "exec": "~/.config/waybar/scripts/page.sh 6", - // "exec-persistent": true, - // "return-type": "json" - // }, - // "custom/page7": { - // "exec": "~/.config/waybar/scripts/page.sh 7", - // "exec-persistent": true, - // "return-type": "json" - // }, - // "custom/page8": { - // "exec": "~/.config/waybar/scripts/page.sh 8", - // "exec-persistent": true, - // "return-type": "json" - // }, - // "custom/page9": { - // "exec": "~/.config/waybar/scripts/page.sh 9", - // "exec-persistent": true, - // "return-type": "json" - // }, - // "custom/page10": { - // "exec": "~/.config/waybar/scripts/page.sh 10", - // "exec-persistent": true, - // "return-type": "json" - // }, + "hyprland/workspaces": { + "disable-scroll": true, + "all-outputs": true, + "warp-on-scroll": false, + "format": "{icon}", + "format-icons": { + "1": "1", + "2": "2", + "3": "3", + "4": "4", + "5": "5", + "6": "6", + "7": "7", + "8": "8", + "9": "9", + "10": "0" + }, + "persistent-workspaces": { + "1": [], + "2": [], + "3": [], + "4": [], + "5": [], + "6": [], + "7": [], + "8": [], + "9": [], + "10": [] + } + }, + "hyprland/window": { "format": "{title}", "max-length": 60 }, - // "tray": { "icon-size": 16, "spacing": 6 }, "tray": { "icon-size": 16, "spacing": 10 }, "pulseaudio": { diff --git a/roles/hyprland/files/waybar/style.css b/roles/hyprland/files/waybar/style.css index 6b90f27..eb9c920 100644 --- a/roles/hyprland/files/waybar/style.css +++ b/roles/hyprland/files/waybar/style.css @@ -1,12 +1,11 @@ -/* ==== Waybar GTK CSS: Cosmic glass (v2 lighter) ================= */ - /* Palette */ -@define-color glass rgba(12, 14, 20, 0.34); /* was 0.62 → much more transparent */ -@define-color glass_strong rgba(12, 14, 20, 0.46); /* chips / active */ +@define-color glass rgba(12, 14, 20, 0.34); +@define-color glass_strong rgba(12, 14, 20, 0.46); @define-color fg #DDE1EA; @define-color fg_dim #B8BECC; @define-color accent1 #7F5AF0; @define-color accent2 #00D1FF; +@define-color occupied #a8557f; /* Whole bar: more vertical padding, no border, stronger shadow */ window#waybar { @@ -19,7 +18,6 @@ window#waybar { -gtk-outline-radius: 12px; } -/* Global typography: Roboto Mono Nerd Font */ * { border: none; padding: 2px 6px; @@ -45,33 +43,6 @@ window#waybar { padding: 0 4px; } -/* --- group BUTTONS --------------------------------------------------------- */ -#custom-group1, #custom-group2, #custom-group3, #custom-group4, #custom-group5, -#custom-group6, #custom-group7, #custom-group8, #custom-group9, #custom-group10 { - background: transparent; - min-width: 18px; - padding-left: 2px; - /* color: @fg_dim; */ -} - -/* Active group: glass chip, no border */ -#custom-group1.active, #custom-group2.active, #custom-group3.active, #custom-group4.active, -#custom-group5.active, #custom-group6.active, #custom-group7.active, #custom-group8.active, -#custom-group9.active, #custom-group10.active { - background: @glass_strong; - border-radius: 8px; - color: #a8557f; - box-shadow: inset 0 0 0 9999px rgba(255,255,255,0.015); -} - -/* Hover feedback (very light) */ -#custom-group1:hover, #custom-group2:hover, #custom-group3:hover, #custom-group4:hover, -#custom-group5:hover, #custom-group6:hover, #custom-group7:hover, #custom-group8:hover, -#custom-group9:hover, #custom-group10:hover { - background: rgba(255,255,255,0.03); - border-radius: 8px; -} - /* Tray tweaks */ #tray { margin-right: 0px; } #tray * { padding-left: 0px; padding-right: 0px; } @@ -88,24 +59,42 @@ window#waybar { #tray menu menuitem { padding: 6px 12px; } #tray menu menuitem:hover { background: alpha(@accent1, 0.16); } - - -#custom-hyprland-workspaces { - padding: 0; - margin: 0 4px; -} - -.workspace { - /* display: inline-block; */ - padding: 4px 8px; - margin: 0 2px; - border-radius: 4px; - color: #e6e6e6; /* off-white for empty workspaces */ +#workspaces button { + padding: 0 8px; background-color: transparent; - border: 1px solid #444; - /* cursor: pointer; */ - transition: all 0.2s ease; - min-width: 20px; - /* text-align: center; */ + color: #6c7086; + border-radius: 3px; + margin: 2px; + transition: all 0.2s ease-in-out; +} + +/* Hover effect */ +#workspaces button:hover { + background-color: #74c7ec; + color: #1e1e2e; +} + +#workspaces button:not(.active):not(.empty) { + color: #cdd6f4; + background-color: #585b70; +} + +/* Active/focused workspace */ +#workspaces button.active { + color: #1e1e2e; + background-color: @occupied; + font-weight: bold; +} + +#workspaces button.visible { + color: #f9e2af; + /* background-color: #45475a; */ + border: 1px solid #f9e2af; +} + +/* Default state for persistent workspaces */ +#workspaces button { + color: #6c7086; + background-color: @glass; }