diff options
Diffstat (limited to '.config/waybar')
-rw-r--r-- | .config/waybar/config | 30 | ||||
-rwxr-xr-x | .config/waybar/scripts/layout.sh | 14 | ||||
-rwxr-xr-x | .config/waybar/scripts/swayidle-update.sh | 6 | ||||
-rw-r--r-- | .config/waybar/style.css | 109 |
4 files changed, 56 insertions, 103 deletions
diff --git a/.config/waybar/config b/.config/waybar/config index ad3478b..dce6025 100644 --- a/.config/waybar/config +++ b/.config/waybar/config @@ -1,20 +1,21 @@ { "layer": "top", - "height": 20, + "height": 27, "spacing": 5, "margin-top" :5, "margin-right" :10, "margin-left" :10, + "margin-bottom" :-5, "modules-left": [ "dwl/tags", - "dwl/window", + "custom/layout", ], "modules-center": ["custom/clock"], "modules-right": [ - //"custom/scratchpad-indicator", + "custom/keyboard-layout", "idle_inhibitor", "custom/brightness", "custom/audio", @@ -26,17 +27,20 @@ "tag-labels": ["1", "2", "3", "4", "5", "6", "7", "8", "9"] }, - "dwl/window": { - "format": "<span color='#202020' bgcolor='#d3869b' > </span> {app_id} - {title}", - "icon":false, - "max-length": 100, - }, - - "custom/scratchpad-indicator": { - "format": "<span color='#202020' bgcolor='#8ec07c' > </span> {}", + "custom/layout": { + "format": "<span color='#202020' bgcolor='#d79921'> </span> {}", "return-type": "json", + "exec": "~/.config/waybar/scripts/layout.sh", + "on-click": "~/.config/waybar/scripts/layout.sh toggle", + "interval" : 1, + "tooltip" : false + }, + + "custom/keyboard-layout": { + "format": "<span color='#202020' bgcolor='#98971a' > </span> {}", + "return-type": "text", "interval": 1, - "exec": "~/.local/bin/scratchpad-indicator.sh" + "exec": "mmsg -k | awk '{print toupper($3); exit}'" }, "idle_inhibitor": { @@ -59,7 +63,7 @@ "custom/battery": { "format-icons": ["","","","","","","","","",""], - "format": "<span color='#202020' bgcolor='#689d6a' > {icon}{alt} </span> {}%", + "format": "<span color='#202020' bgcolor='#689d6a' > {icon}{alt} </span> {text}%", "return-type": "json", "interval": 1, "exec": "~/.config/waybar/scripts/battery.sh", diff --git a/.config/waybar/scripts/layout.sh b/.config/waybar/scripts/layout.sh new file mode 100755 index 0000000..997d837 --- /dev/null +++ b/.config/waybar/scripts/layout.sh @@ -0,0 +1,14 @@ +#!/bin/sh + +# Get focused output +output="$(mmsg -g | grep "selmon 1" | awk '{print$1}')" + +case $1 in + toggle) + mmsg -d switch_layout + ;; + *) + text=$(mmsg -g | grep " layout" | sort -t: -k2,2nr | awk '{ print $3 }' FS=' ') + echo "{\"text\":\""$text"\", \"tooltip\":\""$tooltip"\"}" + ;; +esac diff --git a/.config/waybar/scripts/swayidle-update.sh b/.config/waybar/scripts/swayidle-update.sh index f451b38..fcc0f9a 100755 --- a/.config/waybar/scripts/swayidle-update.sh +++ b/.config/waybar/scripts/swayidle-update.sh @@ -2,6 +2,6 @@ pkill -f swayidle read -r wallpaper<"$HOME/.cache/wallpaper" swayidle -w \ - timeout 300 "swaylock -f -i $wallpaper" \ - timeout 600 "wlopm --off \*;swaylock -F -i $wallpaper" resume "wlopm --on \*" \ - before-sleep "swaylock -f -i $wallpaper" & + timeout 300 "swaylock -f -i $wallpaper --effect-blur 10x5 --clock --datestr '%a %d %b %Y' --indicator" \ + timeout 600 "wlopm --off \*;swaylock -F -i $wallpaper --effect-blur 10x5 --clock --datestr '%a %d %b %Y' --indicator" resume "wlopm --on \*" \ + before-sleep "swaylock -f -i $wallpaper --effect-blur 10x5 --clock --datestr '%a %d %b %Y' --indicator" & diff --git a/.config/waybar/style.css b/.config/waybar/style.css index 923d175..182a733 100644 --- a/.config/waybar/style.css +++ b/.config/waybar/style.css @@ -9,8 +9,8 @@ border-radius: 0; border: none; text-shadow: none; + text-decoration: none; transition: none; - box-shadow: none; } /* the whole window */ @@ -24,22 +24,15 @@ window#waybar.hidden { } #tags, -/* #tags button, */ +#tags button, /* #tags button.occupied, */ /* #tags button.focused, */ /* #tags button.urgent, */ -/* #tags button:not(.occupied):not(.focused), */ -#workspaces button, -#workspaces button:hover, -#workspaces button.visible, -#workspaces button.visible:hover, -#workspaces button.active, -#workspaces button.active:hover, -#workspaces button.urgent, -#window, +/* #window, */ #idle_inhibitor, #language, -#custom-scratchpad-indicator, +#custom-layout, +#custom-keyboard-layout, #custom-brightness, #custom-memory, #custom-battery, @@ -53,12 +46,15 @@ window#waybar.hidden { color: #202020; background: #202020; border: 2px solid #202020; + margin: 0px 4px 4px 0px; + box-shadow: 3px 4px 2px -2px rgba(0, 0, 0, 0.5); } -#window, +/* #window, */ #idle_inhibitor, #language, -#custom-scratchpad-indicator, +#custom-layout, +#custom-keyboard-layout, #custom-brightness, #custom-memory, #custom-battery, @@ -70,64 +66,6 @@ window#waybar.hidden { } /* ================================ */ -/* workspaces module */ -/* ================================ */ -#workspaces { - margin: 0px; -} - -#workspaces button { - color: #fff4d2; - padding: 0 4px; - margin: 0px 3px; - min-width: 15px; -} - -#workspaces button:hover { - background: #d3869b; -} - -#workspaces button.visible { - background: #8ec07c; -} - -#workspaces button.visible:hover { - background: #8ec07c; -} - -#workspaces button.active { - background: #8ec07c; -} - -#workspaces button.active:hover { - background: #8ec07c; -} - -#workspaces button.urgent { - background: #cc241d; -} - -/* ================================ */ -/* window */ -/* ================================ */ - -#window { - color: #d3869b; - margin-right: 4px; -} - -window#waybar.empty #window { - background-color: transparent; - color: transparent; - border-bottom: none; - box-shadow: none; - padding-right: 0px; - padding-left: 0px; - margin-left: 0px; - margin-right: 0px; -} - -/* ================================ */ /* idle_inhibitor */ /* ================================ */ @@ -162,11 +100,18 @@ window#waybar.empty #window { color: #d79921; } +/* ================================ */ +/* custom-layout */ +/* ================================ */ +#custom-layout { + color: #d79921; +} + /*================================= */ -/* custom-scratchpad-indicator */ +/* custom-keyboard-layout */ /*==================================*/ -#custom-scratchpad-indicator { - color: #8ec07c; +#custom-keyboard-layout { + color: #98971a; } /* ================================ */ @@ -207,14 +152,14 @@ window#waybar.empty #window { /* ================================ */ #tags { - margin: 0px; + padding: 0; } #tags button { color: #928374; background: #3c3836; padding: 0 4px; - margin: 0px 2px; + margin: 0px -0.5px; min-width: 15px; } @@ -223,16 +168,6 @@ window#waybar.empty #window { background: #fe8019; } -#tags button:not(.occupied):not(.focused) { - /* font-size: 0; */ - /* min-width: 0; */ - /* min-height: 0; */ - /* margin: 0; */ - /* padding: 0; */ - /* color: transparent; */ - /* background-color: transparent; */ -} - #tags button.occupied { color: #fff4d2; background: #98971a; |