Compare commits

...

2 Commits

Author SHA1 Message Date
430064c8de MPD status changes 2024-09-29 13:27:00 -07:00
0aa36e8575 Action buttons with SHIFT/CTRL modifiers 2024-09-29 13:26:40 -07:00
2 changed files with 61 additions and 3 deletions

61
dwl_act
View File

@ -11,6 +11,7 @@ echo "$0 - $timestamp - $act" >> ~/dwl_key_act.log
# #
case $act in case $act in
# Without modifier
vol_mute) wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle;; vol_mute) wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle;;
vol_lower) wpctl set-volume --limit 1.0 @DEFAULT_AUDIO_SINK@ 10%-;; vol_lower) wpctl set-volume --limit 1.0 @DEFAULT_AUDIO_SINK@ 10%-;;
vol_raise) wpctl set-volume --limit 1.0 @DEFAULT_AUDIO_SINK@ 10%+;; vol_raise) wpctl set-volume --limit 1.0 @DEFAULT_AUDIO_SINK@ 10%+;;
@ -21,12 +22,68 @@ case $act in
media_stop) mpc stop;; # XF86AudioStop media_stop) mpc stop;; # XF86AudioStop
media_prev) mpc prev;; # XF86AudioPrev media_prev) mpc prev;; # XF86AudioPrev
media_next) mpc next;; # XF86AudioNext media_next) mpc next;; # XF86AudioNext
# disp) ;; disp) /home/mahesh/bin/switch_context.sh;;
# wlan) ;; # wlan) ;;
# tools) ;; # tools) ;;
# search) ;; # search) ;;
launch) wldash;; launch) wldash;;
# explore) ;; # explore) ;;
# print) grim -g "$(slurp)" -t png "$(date +/tmp/grim_%d%b%Y_%H_%M_%S.png)" ;; print) grim -c -g "$(slurp -o -r -c '#ff0000ff')" -t ppm - | satty --filename - --fullscreen --output-filename ~/Screenshots/satty-$(date '+%Y%m%d-%H:%M:%S').png ;;
# With CTRL modifier
# C_vol_mute) ;;
# C_vol_lower) ;;
# C_vol_raise) ;;
# C_mic_mute) ;;
# C_bright_low) ;;
# C_bright_high) ;;
# C_media_toggle) ;;
# C_media_stop) ;;
# C_media_prev) ;;
# C_media_next) ;;
# C_disp) ;;
# C_wlan) ;;
# C_tools) ;;
# C_search) ;;
# C_launch) ;;
# C_explore) ;;
C_print) grim -c -g "$(slurp -d -c '#0000ffff')" -t ppm - | satty --filename - --fullscreen --output-filename ~/Screenshots/satty-$(date '+%Y%m%d-%H:%M:%S').png ;;
# With SHIFT modifier
# S_vol_mute) ;;
# S_vol_lower) ;;
# S_vol_raise) ;;
# S_mic_mute) ;;
# S_bright_low) ;;
# S_bright_high) ;;
# S_media_toggle) ;;
# S_media_stop) ;;
# S_media_prev) ;;
# S_media_next) ;;
# S_disp) ;;
# S_wlan) ;;
# S_tools) ;;
# S_search) ;;
# S_launch) ;;
# S_explore) ;;
# S_print) ;;
# With SHIFT+CTRL modifiers
# SC_vol_mute) ;;
# SC_vol_lower) ;;
# SC_vol_raise) ;;
# SC_mic_mute) ;;
# SC_bright_low) ;;
# SC_bright_high) ;;
# SC_media_toggle) ;;
# SC_media_stop) ;;
# SC_media_prev) ;;
# SC_media_next) ;;
# SC_disp) ;;
# SC_wlan) ;;
# SC_tools) ;;
# SC_search) ;;
# SC_launch) ;;
*) echo "Unknown action '$act'";; *) echo "Unknown action '$act'";;
esac esac

View File

@ -39,6 +39,7 @@ conky.config = {
--[[ For Somebar ]] --[[ For Somebar ]]
conky.text = [[ conky.text = [[
${if_existing /usr/local/bin/somebar}status${endif} \ ${if_existing /usr/local/bin/somebar}status${endif} \
${if_mpd_playing}𝄞 [${mpd_percent}] ${mpd_smart 50}${endif} \
💻 ${cpu}% \ 💻 ${cpu}% \
💾 ${memperc}% \ 💾 ${memperc}% \
${if_existing /sys/class/net/enp0s20f0u1u1u2/operstate up}🌎 ${addr enp0s20f0u1u1u2}${else}\ ${if_existing /sys/class/net/enp0s20f0u1u1u2/operstate up}🌎 ${addr enp0s20f0u1u1u2}${else}\
@ -49,7 +50,7 @@ ${if_existing /sys/class/net/wlp4s0/operstate up}📶 ${addr wlp4s0}${else}\
${if_up eth0}🌎 ${addr eth0}${else}\ ${if_up eth0}🌎 ${addr eth0}${else}\
network down ${endif}${endif}${endif}${endif}${endif}${endif} \ network down ${endif}${endif}${endif}${endif}${endif}${endif} \
${execi 600 curl 'wttr.in/~45.54,-122.83?u&format=%c%t'} \ ${execi 600 curl 'wttr.in/~45.54,-122.83?u&format=%c%t'} \
🔊 ${execi 10 wpctl get-volume 54 | tail -1 | perl -ne 'm/([\d\.]+)/; print scalar (($1>1) ? 100 : ($1*100))'} \ 🔊 ${execi 10 wpctl get-volume 53 | tail -1 | perl -ne 'm/([\d\.]+)/; print scalar (($1>1) ? 100 : ($1*100))'} \
${if_existing /sys/class/power_supply/ADP0/online 1}🔌${else}🔋${endif} ${battery_percent}% \ ${if_existing /sys/class/power_supply/ADP0/online 1}🔌${else}🔋${endif} ${battery_percent}% \
📅 ${time %Y %h %d} \ 📅 ${time %Y %h %d} \
🕑 ${time %I:%M%p %Z} 🕑 ${time %I:%M%p %Z}