From 694430f24ba5d7e0a67a968b55906d2412803a48 Mon Sep 17 00:00:00 2001 From: Michel Fedde Date: Tue, 18 Mar 2025 19:26:34 +0100 Subject: [PATCH] Adds hidden waybar that shows up when pressing SUPER --- .config/hypr/config/Animation.conf | 5 +- .config/hypr/config/Keybinds.conf | 9 +- .config/hypr/config/Startup_Apps.conf | 2 +- .config/hypr/config/settings/Render.conf | 1 - .config/waybar/config | 46 +----- .config/waybar/configurations/default.json | 44 ++++++ .config/waybar/configurations/hidden.json | 12 ++ .config/waybar/scss/_modules.scss | 109 +++++++++++++ .config/waybar/scss/style.scss | 173 ++------------------- .config/waybar/style.css | 64 ++------ 10 files changed, 195 insertions(+), 270 deletions(-) mode change 100644 => 120000 .config/waybar/config create mode 100644 .config/waybar/configurations/default.json create mode 100644 .config/waybar/configurations/hidden.json create mode 100644 .config/waybar/scss/_modules.scss diff --git a/.config/hypr/config/Animation.conf b/.config/hypr/config/Animation.conf index f7b3c2b..68b7fc6 100644 --- a/.config/hypr/config/Animation.conf +++ b/.config/hypr/config/Animation.conf @@ -11,11 +11,10 @@ animations { bezier = smoothIn, 0.5, -0.5, 0.68, 1.5 animation = windows, 1, 6, wind, slide - animation = windowsIn, 1, 5, winIn, slide - animation = windowsOut, 1, 3, smoothOut, slide + animation = windowsIn, 1, 2, winIn, slide + animation = windowsOut, 1, 2, smoothOut, slide animation = windowsMove, 1, 5, wind, slide animation = border, 1, 1, liner - animation = borderangle, 1, 180, liner, loop #used by rainbow borders and rotating colors animation = fade, 1, 3, smoothOut animation = workspaces, 1, 5, overshot diff --git a/.config/hypr/config/Keybinds.conf b/.config/hypr/config/Keybinds.conf index 7d209da..9272767 100644 --- a/.config/hypr/config/Keybinds.conf +++ b/.config/hypr/config/Keybinds.conf @@ -24,6 +24,9 @@ bindl = , xf86AudioNext, exec, $scriptsDir/MediaCtrl.sh --nxt bindl = , xf86AudioPrev, exec, $scriptsDir/MediaCtrl.sh --prv bindl = , xf86audiostop, exec, $scriptsDir/MediaCtrl.sh --stop +bindtn = , $mainMod_L, exec, waybar -c ~/.config/waybar/configurations/hidden.json & +bindtrn = $mainMod, $mainMod_L, exec, pkill waybar + # Move focus with mainMod + LHKJ bind = $mainMod, H, movefocus, l bind = $mainMod, L, movefocus, r @@ -77,8 +80,8 @@ bind = $mainMod, bracketright, workspace, e+1 bind = $mainMod, bracketleft, workspace, e-1 # Move/resize windows with mainMod + LMB/RMB and dragging -bindm = $mainMod, mouse:272, movewindow -bindm = $mainMod, mouse:273, resizewindow +bindm = $mainMod SHIFT, mouse:272, movewindow +bindm = $mainMod SHIFT, mouse:273, resizewindow # Stuff bind = $mainMod SHIFT, C, exec, $scriptsDir/Refresh.sh # Refresh waybar, swaync, rofi @@ -110,3 +113,5 @@ bind = ALT, Tab, exec, hyprswitch gui --mod-key alt --key tab bind = $mainMod, Return, exec, $term #terminal bind = $mainMod Shift, Return, exec, hyprdrop ghostty --identifier term_hyprdrop bind = $mainMod, T, exec, $files #file manager + +bind = $mainMod, R, focusurgentorlast diff --git a/.config/hypr/config/Startup_Apps.conf b/.config/hypr/config/Startup_Apps.conf index 0c13d53..9bff6df 100644 --- a/.config/hypr/config/Startup_Apps.conf +++ b/.config/hypr/config/Startup_Apps.conf @@ -15,7 +15,7 @@ exec-once = systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESK exec-once = $scriptsDir/Polkit.sh # starup apps -exec-once = waybar & +# exec-once = waybar & exec-once = nm-applet --indicator & exec-once = swaync & exec-once = ags & diff --git a/.config/hypr/config/settings/Render.conf b/.config/hypr/config/settings/Render.conf index f2d60e7..26fc902 100644 --- a/.config/hypr/config/settings/Render.conf +++ b/.config/hypr/config/settings/Render.conf @@ -1,4 +1,3 @@ - render { explicit_sync = 2 explicit_sync_kms = 2 diff --git a/.config/waybar/config b/.config/waybar/config deleted file mode 100644 index 19d73df..0000000 --- a/.config/waybar/config +++ /dev/null @@ -1,45 +0,0 @@ -{ - "include": [ - "$HOME/.config/waybar/Modules.json", - "$HOME/.config/waybar/ModulesWorkspaces.json", - "$HOME/.config/waybar/ModulesCustom.json", - "$HOME/.config/waybar/ModulesGroups.json", - "$HOME/.config/waybar/Output.config.json" - ], - "layer": "top", - "exclusive": true, - "passthrough": false, - "position": "top", - "spacing": 3, - "fixed-center": true, - "ipc": true, - "margin-top": 3, - "margin-left": 8, - "margin-right": 8, - - "modules-left": [ - "group/app_drawer", - "custom/separator#dot-line", - "group/mobo_drawer", - "custom/separator#line", - "custom/weather", - ], - - "modules-center": [ - "clock", - "custom/separator#line", - "hyprland/workspaces#rw", - ], - - "modules-right": [ - "network#speed", - "custom/updates", - "group/laptop", - "custom/separator#line", - "tray", - "group/audio#pulsecontrol", - "custom/separator#dot-line", - "group/status", - "custom/swaync", - ], -} diff --git a/.config/waybar/config b/.config/waybar/config new file mode 120000 index 0000000..b25692d --- /dev/null +++ b/.config/waybar/config @@ -0,0 +1 @@ +configurations/hidden.json \ No newline at end of file diff --git a/.config/waybar/configurations/default.json b/.config/waybar/configurations/default.json new file mode 100644 index 0000000..5ea1c59 --- /dev/null +++ b/.config/waybar/configurations/default.json @@ -0,0 +1,44 @@ +{ + "include": [ + "$HOME/.config/waybar/Modules.json", + "$HOME/.config/waybar/ModulesWorkspaces.json", + "$HOME/.config/waybar/ModulesCustom.json", + "$HOME/.config/waybar/ModulesGroups.json", + "$HOME/.config/waybar/Output.config.json" + ], + "layer": "top", + "exclusive": true, + "passthrough": false, + "position": "top", + "spacing": 3, + "fixed-center": true, + "ipc": true, + "margin-top": 3, + "margin-left": 8, + "margin-right": 8, + + "modules-left": [ + "group/app_drawer", + "custom/separator#dot-line", + "group/mobo_drawer", + "custom/separator#line", + "custom/weather", + ], + + "modules-center": [ + "clock", + "custom/separator#line", + "hyprland/workspaces#rw", + ], + + "modules-right": [ + "network#speed", + "group/laptop", + "custom/separator#line", + "tray", + "group/audio#pulsecontrol", + "custom/separator#dot-line", + "group/status", + "custom/swaync", + ], +} diff --git a/.config/waybar/configurations/hidden.json b/.config/waybar/configurations/hidden.json new file mode 100644 index 0000000..f099db9 --- /dev/null +++ b/.config/waybar/configurations/hidden.json @@ -0,0 +1,12 @@ +{ + "include": [ + "$HOME/.config/waybar/configurations/default.json" + ], + + "layer": "overlay", + "exclusive": false, + "position": "top", + "reload_style_on_change": true, + "name": "semi-hidden", + "id": "semi-hidden" +} diff --git a/.config/waybar/scss/_modules.scss b/.config/waybar/scss/_modules.scss new file mode 100644 index 0000000..2784f9b --- /dev/null +++ b/.config/waybar/scss/_modules.scss @@ -0,0 +1,109 @@ +.module +{ + color: $foreground; + padding: 3px 6px 3px 6px; +} + +#battery.warning, +#disk.warning, +#memory.warning, +#cpu.warning { + border-top: 3px solid $background; + border-bottom: 3px solid $yellow; +} + +@keyframes blink { + to { + color: $background; + } +} + +#battery.critical:not(.charging) { + background-color: $red; + color: white; + animation-name: blink; + animation-duration: 3.0s; + animation-timing-function: steps(12); + animation-iteration-count: infinite; + animation-direction: alternate; + box-shadow: inset 0 -3px transparent; +} + +/*-----Indicators----*/ +#custom-hypridle.notactive, +#idle_inhibitor.activated { + color: #39FF14; +} + +#battery.critical, +#disk.critical, +#memory.critical, +#cpu.critical { + border-top: 3px solid $background; + border-bottom: 3px solid $red; +} + +#temperature.critical { + background-color: $red; +} + +#battery.charging { + border-top: 3px solid $background; + border-bottom: 3px solid $green; +} + +#pulseaudio-slider slider { + min-width: 0px; + min-height: 0px; + opacity: 0; + background-image: none; + border: none; + box-shadow: none; +} + +#pulseaudio-slider trough { + min-width: 80px; + min-height: 5px; + border-radius: 5px; + background-color: $dim; +} + +#pulseaudio-slider highlight { + min-height: 10px; + border-radius: 5px; + background-color: $orange; +} + +#backlight-slider slider { + min-width: 0px; + min-height: 0px; + opacity: 0; + background-image: none; + border: none; + box-shadow: none; +} + +#backlight-slider trough { + min-width: 80px; + min-height: 10px; + border-radius: 5px; + background-color: $cursor; +} + +#backlight-slider highlight { + min-width: 10px; + border-radius: 5px; + background-color: $orange; +} + +#custom-swaync { + min-width: 10px; + border-right: 1px solid $cursor; +} +#custom-swaync:hover { + background-color: $green; +} + +#custom-updates.pending-updates { + background-color: dodgerblue; +} diff --git a/.config/waybar/scss/style.scss b/.config/waybar/scss/style.scss index 3fcedc7..9527afc 100644 --- a/.config/waybar/scss/style.scss +++ b/.config/waybar/scss/style.scss @@ -7,6 +7,7 @@ $yellow: $color4; $dim: rgba($background, 0.75); + * { font-family: "JetBrainsMono Nerd Font"; font-weight: bold; @@ -18,12 +19,19 @@ $dim: rgba($background, 0.75); border-radius: $border-radius; } -window#waybar { +window { background: $background-semitransparent; color: $foreground; transition-property: background-color; transition-duration: 0.5s; +} +window.semi-hidden { + background-color: transparent; + + .modules-left, .modules-center, .modules-right { + background-color: $background; + } } #taskbar button, @@ -45,165 +53,4 @@ window#waybar { border-bottom: 1px solid $red; } -#backlight, -#backlight-slider, -#battery, -#bluetooth, -#clock, -#cpu, -#disk, -#idle_inhibitor, -#keyboard-state, -#memory, -#mode, -#mpris, -#network, -#power-profiles-daemon, -#pulseaudio, -#pulseaudio-slider, -#taskbar button, -#taskbar, -#temperature, -#tray, -#window, -#wireplumber, -#workspaces, #custom-backlight, -#custom-browser, -#custom-cava_mviz, -#custom-cycle_wall, -#custom-file_manager, -#custom-keybinds, -#custom-keyboard, -#custom-light_dark, -#custom-lock, -#custom-hint, -#custom-hypridle, -#custom-menu, -#custom-power_vertical, -#custom-power, -#custom-settings, -#custom-spotify, -#custom-swaync, -#custom-tty, -#custom-updater, -#custom-weather, -#custom-weather.clearNight, -#custom-weather.cloudyFoggyDay, -#custom-weather.cloudyFoggyNight, -#custom-weather.default, -#custom-weather.rainyDay, -#custom-weather.rainyNight, -#custom-weather.severe, -#custom-weather.showyIcyDay, -#custom-weather.snowyIcyNight, -#custom-weather.sunnyDay, -#custom-updates, -#custom-updates.pending-updates -{ - color: $foreground; - padding: 3px 6px 3px 6px; -} - -#battery.warning, -#disk.warning, -#memory.warning, -#cpu.warning { - border-top: 3px solid $background; - border-bottom: 3px solid $yellow; -} - -@keyframes blink { - to { - color: $background; - } -} - -#battery.critical:not(.charging) { - background-color: $red; - color: white; - animation-name: blink; - animation-duration: 3.0s; - animation-timing-function: steps(12); - animation-iteration-count: infinite; - animation-direction: alternate; - box-shadow: inset 0 -3px transparent; -} - -/*-----Indicators----*/ -#custom-hypridle.notactive, -#idle_inhibitor.activated { - color: #39FF14; -} - -#battery.critical, -#disk.critical, -#memory.critical, -#cpu.critical { - border-top: 3px solid $background; - border-bottom: 3px solid $red; -} - -#temperature.critical { - background-color: $red; -} - -#battery.charging { - border-top: 3px solid $background; - border-bottom: 3px solid $green; -} - -#pulseaudio-slider slider { - min-width: 0px; - min-height: 0px; - opacity: 0; - background-image: none; - border: none; - box-shadow: none; -} - -#pulseaudio-slider trough { - min-width: 80px; - min-height: 5px; - border-radius: 5px; - background-color: $dim; -} - -#pulseaudio-slider highlight { - min-height: 10px; - border-radius: 5px; - background-color: $orange; -} - -#backlight-slider slider { - min-width: 0px; - min-height: 0px; - opacity: 0; - background-image: none; - border: none; - box-shadow: none; -} - -#backlight-slider trough { - min-width: 80px; - min-height: 10px; - border-radius: 5px; - background-color: $cursor; -} - -#backlight-slider highlight { - min-width: 10px; - border-radius: 5px; - background-color: $orange; -} - -#custom-swaync { - min-width: 10px; - border-right: 1px solid $cursor; -} -#custom-swaync:hover { - background-color: $green; -} - -#custom-updates.pending-updates { - background-color: dodgerblue; -} +@import "./_modules.scss"; diff --git a/.config/waybar/style.css b/.config/waybar/style.css index 75de769..12c449a 100644 --- a/.config/waybar/style.css +++ b/.config/waybar/style.css @@ -8,13 +8,20 @@ border-radius: 0.3rem; } -window#waybar { +window { background: rgba(40, 40, 40, 0.95); color: #d5c4a1; transition-property: background-color; transition-duration: 0.5s; } +window.semi-hidden { + background-color: transparent; +} +window.semi-hidden .modules-left, window.semi-hidden .modules-center, window.semi-hidden .modules-right { + background-color: #282828; +} + #taskbar button, #workspaces button { color: #d5c4a1; @@ -34,60 +41,7 @@ window#waybar { border-bottom: 1px solid #fb4934; } -#backlight, -#backlight-slider, -#battery, -#bluetooth, -#clock, -#cpu, -#disk, -#idle_inhibitor, -#keyboard-state, -#memory, -#mode, -#mpris, -#network, -#power-profiles-daemon, -#pulseaudio, -#pulseaudio-slider, -#taskbar button, -#taskbar, -#temperature, -#tray, -#window, -#wireplumber, -#workspaces, #custom-backlight, -#custom-browser, -#custom-cava_mviz, -#custom-cycle_wall, -#custom-file_manager, -#custom-keybinds, -#custom-keyboard, -#custom-light_dark, -#custom-lock, -#custom-hint, -#custom-hypridle, -#custom-menu, -#custom-power_vertical, -#custom-power, -#custom-settings, -#custom-spotify, -#custom-swaync, -#custom-tty, -#custom-updater, -#custom-weather, -#custom-weather.clearNight, -#custom-weather.cloudyFoggyDay, -#custom-weather.cloudyFoggyNight, -#custom-weather.default, -#custom-weather.rainyDay, -#custom-weather.rainyNight, -#custom-weather.severe, -#custom-weather.showyIcyDay, -#custom-weather.snowyIcyNight, -#custom-weather.sunnyDay, -#custom-updates, -#custom-updates.pending-updates { +.module { color: #d5c4a1; padding: 3px 6px 3px 6px; }