aboutsummaryrefslogtreecommitdiff
path: root/.config/waybar/scripts
diff options
context:
space:
mode:
Diffstat (limited to '.config/waybar/scripts')
-rwxr-xr-x.config/waybar/scripts/layout.sh14
-rwxr-xr-x.config/waybar/scripts/swayidle-update.sh6
2 files changed, 17 insertions, 3 deletions
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" &