aboutsummaryrefslogtreecommitdiff
path: root/dotfiles/.local/bin
diff options
context:
space:
mode:
Diffstat (limited to 'dotfiles/.local/bin')
-rwxr-xr-xdotfiles/.local/bin/barweather2
-rwxr-xr-xdotfiles/.local/bin/lock-color1
-rwxr-xr-xdotfiles/.local/bin/menumako2
-rwxr-xr-xdotfiles/.local/bin/pipewire-restart4
-rwxr-xr-xdotfiles/.local/bin/setbg12
-rwxr-xr-xdotfiles/.local/bin/swaysession2
6 files changed, 17 insertions, 6 deletions
diff --git a/dotfiles/.local/bin/barweather b/dotfiles/.local/bin/barweather
index 3fc7f42..a608b80 100755
--- a/dotfiles/.local/bin/barweather
+++ b/dotfiles/.local/bin/barweather
@@ -12,7 +12,7 @@ update_forecast() {
forecast=$(curl -s wttr.in/"$location"?format=1)
if [ ${#forecast} -lt 30 ]; then
- printf "%s\n" "$forecast" > "$cachefile"
+ printf "%s\n" "$forecast" | sed -e 's/ / /g' > "$cachefile"
fi
}
diff --git a/dotfiles/.local/bin/lock-color b/dotfiles/.local/bin/lock-color
index 23efb78..ce008a4 100755
--- a/dotfiles/.local/bin/lock-color
+++ b/dotfiles/.local/bin/lock-color
@@ -8,6 +8,7 @@ if [ -n "$SWAYSOCK" ]; then
swayidle timeout 15 'swaymsg "output * dpms off"' resume 'swaymsg "output * dpms on"' &
fi
elif [ -n "$NIRI_SOCKET" ]; then
+ niri msg action do-screen-transition -d 700
if [ "$1" != "screenon" ]; then
echo idling
swayidle timeout 15 'niri msg action power-off-monitors' resume 'niri msg action power-on-monitors' &
diff --git a/dotfiles/.local/bin/menumako b/dotfiles/.local/bin/menumako
index 628a93a..96c564b 100755
--- a/dotfiles/.local/bin/menumako
+++ b/dotfiles/.local/bin/menumako
@@ -1,3 +1,3 @@
#!/bin/sh
-makoctl menu rofi -dmenu -p "What to do?"
+makoctl menu -- rofi -dmenu -p "What to do?"
diff --git a/dotfiles/.local/bin/pipewire-restart b/dotfiles/.local/bin/pipewire-restart
index 29309d3..da5721c 100755
--- a/dotfiles/.local/bin/pipewire-restart
+++ b/dotfiles/.local/bin/pipewire-restart
@@ -1,4 +1,6 @@
#!/bin/sh
killall pipewire wireplumber pipewire-pulse pipewire-jack
-pipewire & wireplumber & pipewire-pulse & pipewire-jack
+pipewire > ~/.cache/pw.log 2>&1 &
+wireplumber > ~/.cache/wireplumber.log 2>&1 &
+pipewire-pulse > ~/.cache/pw-pulse.log 2>&1 &
diff --git a/dotfiles/.local/bin/setbg b/dotfiles/.local/bin/setbg
index 9daca99..bc8b8a2 100755
--- a/dotfiles/.local/bin/setbg
+++ b/dotfiles/.local/bin/setbg
@@ -3,6 +3,14 @@
mon="1"
[ -n "$2" ] && mon="$2"
-cp $1 "$HOME/.config/wall$mon.png"
+dest="$HOME/.config/wall$mon.png"
-updisplay
+cp "$1" "$dest"
+
+if [ -n "$SWAYSOCK" ]; then
+ updisplay
+elif [ -n "$NIRI_SOCKET" ]; then
+ niri msg action do-screen-transition -d 200
+ killall swaybg
+ setsid swaybg -i "$dest" -m fill&
+fi
diff --git a/dotfiles/.local/bin/swaysession b/dotfiles/.local/bin/swaysession
index 218ff43..bdc02c1 100755
--- a/dotfiles/.local/bin/swaysession
+++ b/dotfiles/.local/bin/swaysession
@@ -26,7 +26,7 @@ case "$1" in
dm-tool switch-to-greeter
;;
suspend)
- lock-color & sleep 1 && $logind suspend
+ lock-color & sleep 1.5 && $logind suspend
;;
hibernate)
lock-color & sleep 1 && $logind hibernate