Compare commits

...
3 Commits
Author SHA1 Message Date
Daniele Fucini 2f6d080976 Update bash aliases 2026-10-10 09:19:49 +02:00
Daniele Fucini 7bf049100b Add xautolock-inhibit to xmonad startup 2026-10-10 09:19:35 +02:00
Daniele Fucini a7f19fe2a7 Add ens-forecast to xmobar 2026-10-10 09:18:57 +02:00
6 changed files with 45 additions and 4 deletions

No files matched your search

+1
View File
@@ -12,6 +12,7 @@ alias mutt='bash -c "pushd ~/Downloads > /dev/null; mutt; popd > /dev/null"'
alias rm='rm -I'
alias runhaskell='stack runhaskell'
alias sort='sort -n'
alias scrcpy='scrcpy --disable-screensaver'
alias ssh='kitten ssh'
alias sudo='doas'
alias sudoedit='doas rvim'
+22
View File
@@ -0,0 +1,22 @@
#!/bin/bash
# Next day from ens-forecast for xmobar, e.g. "Sat 19/10° 39%" (today before 18:00, then tomorrow)
# With "week": show the next 7 days in a notification (for a click on the bar)
if [ "$1" = "week" ]; then
if ! line=$(ens-forecast --brief 7 2>&1); then
notify-send "ens-forecast" "$line"
exit
fi
body=""
while IFS= read -r part; do
read -r day temps rain extra <<< "$part"
temps=${temps%°C}
body+="$day ${temps%/*}° / ${temps#*/}° rain $rain${extra:+ $extra}"$'\n'
done <<< "$(sed "s/ | /\n/g" <<< "${line#*: }")"
notify-send "${line%%: *}" "${body%$'\n'}"
exit
fi
line=$(ens-forecast --brief 1 2>/dev/null) || exit 0
read -r day temps rain <<< "${line#*: }"
echo "$day ${temps%C} "$'\uf043'" $rain"
+15
View File
@@ -0,0 +1,15 @@
#!/bin/bash
sink=$(pactl get-default-sink)
muted=$(pactl get-sink-mute "$sink" | cut -d' ' -f2)
if [ "$muted" = "yes" ]; then
echo " 0%"
else
case "$sink" in
bluez_output.*) icon="" ;;
*) icon="" ;;
esac
echo "$icon $(pactl get-sink-volume "$sink" | grep Volume | cut -d/ -f2 | xargs)"
fi
+3 -2
View File
@@ -9,7 +9,7 @@ Config { overrideRedirect = True
, allDesktops = True
, pickBroadest = True
, commands = [ Run Weather "LZIB"
[ "--template", "\xe302 <station>: <tempC>°C"
[ "--template", "\xf2c9 <tempC>°C"
, "-L", "5"
, "-H", "25"
, "--low" , "#8be9fd"
@@ -50,9 +50,10 @@ Config { overrideRedirect = True
[ "--template" , "\xf017 Uptime: <days>d <hours>h <minutes>m"
] 600
, Run Com "/home/fuxino/.config/xmobar/pactl_volume.sh" [] "pactl_volume" 10
, Run Com "/home/fuxino/.config/xmobar/ens_brief.sh" [] "ens_brief" 18000
, Run XMonadLog
]
, sepChar = "%"
, alignSep = "}{"
, template = "  | %XMonadLog% } %uptime% | %multicpu%, %coretemp% | %memory% |  %kbd% { %LZIB% | %pactl_volume% | %date% "
, template = "  | %XMonadLog% } %uptime% | %multicpu%, %coretemp% | %memory% |  %kbd% { <action=`/home/fuxino/.config/xmobar/ens_brief.sh week`>%LZIB% <fc=#565f89>·</fc> %ens_brief%</action> | %pactl_volume% | %date% "
}
+3 -2
View File
@@ -9,7 +9,7 @@ Config { overrideRedirect = True
, allDesktops = True
, pickBroadest = True
, commands = [ Run Weather "LZIB"
[ "--template", "\xe302 <station>: <tempC>°C"
[ "--template", "\xf2c9 <tempC>°C"
, "-L", "5"
, "-H", "25"
, "--low" , "#8be9fd"
@@ -51,9 +51,10 @@ Config { overrideRedirect = True
] 600
, Run XPropertyLog "_XMONAD_TRAYPAD"
, Run Com "/home/fuxino/.config/xmobar/pactl_volume.sh" [] "pactl_volume" 10
, Run Com "/home/fuxino/.config/xmobar/ens_brief.sh" [] "ens_brief" 18000
, Run XMonadLog
]
, sepChar = "%"
, alignSep = "}{"
, template = "  | %XMonadLog% } %uptime% | %multicpu%, %coretemp% | %memory% |  %kbd% { %LZIB% | %pactl_volume% | %date% %_XMONAD_TRAYPAD% "
, template = "  | %XMonadLog% } %uptime% | %multicpu%, %coretemp% | %memory% |  %kbd% { <action=`/home/fuxino/.config/xmobar/ens_brief.sh week`>%LZIB% <fc=#565f89>·</fc> %ens_brief%</action> | %pactl_volume% | %date% %_XMONAD_TRAYPAD% "
}
+1
View File
@@ -232,6 +232,7 @@ myStartupHook = do
spawnOnce myScreenSetup
spawnOnce "xsetroot -cursor_name left_ptr"
spawnOnce "xautolock -time 10 -locker slock -detectsleep"
spawnOnce "systemctl --user start xautolock-inhibit"
spawnOnce "redshift-gtk"
spawnOnce "udiskie"
spawnOnce "nm-applet"