hyprdots

my dotfiles
git clone https://git.awy.one/hyprdots.git
Log | Files | Refs | README | LICENSE

commit b7a996ad6f53183cde2e3c2f8a44f91a86434da6
parent b388f3199fce4a8d81c70d7a9824314cfa2ec184
Author: awy <awy@awy.one>
Date:   Sun, 25 May 2025 17:14:44 +0300

update

Diffstat:
M.config/mako/config | 1+
M.local/bin/statusbar/sb-clock | 28+++++-----------------------
M.local/bin/statusbar/sb-forecast | 14+++++++-------
M.local/bin/statusbar/sb-internet | 24++++++++++++------------
M.local/bin/statusbar/sb-mailbox | 10+++++-----
M.local/bin/statusbar/sb-memory | 4++--
M.local/bin/statusbar/sb-microphone | 10+++++-----
M.local/bin/statusbar/sb-music | 10+++++-----
M.local/bin/statusbar/sb-nettraf | 26+++++++++++++-------------
M.local/bin/statusbar/sb-news | 10+++++-----
M.local/bin/statusbar/sb-pacpackages | 10+++++-----
M.local/bin/statusbar/sb-volume | 22+++++++++++-----------
12 files changed, 76 insertions(+), 93 deletions(-)

diff --git a/.config/mako/config b/.config/mako/config @@ -8,6 +8,7 @@ border-radius=5 padding=10 font=sans 14 width=400 +height=400 default-timeout=5000 [urgency=high] diff --git a/.local/bin/statusbar/sb-clock b/.local/bin/statusbar/sb-clock @@ -1,29 +1,11 @@ #!/bin/sh -clock=$(date '+%I') - -case "$clock" in - "00") icon="🕛" ;; - "01") icon="🕐" ;; - "02") icon="🕑" ;; - "03") icon="🕒" ;; - "04") icon="🕓" ;; - "05") icon="🕔" ;; - "06") icon="🕕" ;; - "07") icon="🕖" ;; - "08") icon="🕗" ;; - "09") icon="🕘" ;; - "10") icon="🕙" ;; - "11") icon="🕚" ;; - "12") icon="🕛" ;; -esac - case $1 in - 1) notify-send "This Month" "$(cal | sed "s/\<$(date +'%e'|tr -d ' ')\>/<b><span color='red'>&<\/span><\/b>/")" && notify-send "Appointments" "$(calcurse -d3)" ;; - 2) setsid -f "$TERMINAL" -e calcurse ;; - 3) notify-send "📅 Time/date module" "\- Left click to show upcoming appointments for the next three days via \`calcurse -d3\` and show the month via \`cal\` + 1) notify-send "This Month" "$(cal | sed "s/\<$(date +'%e'|tr -d ' ')\>/<b><span color='red'>&<\/span><\/b>/")" && notify-send "Appointments" "$(calcurse -d3)" ;; + 2) setsid -f "$TERMINAL" -e calcurse ;; + 3) notify-send " Time/date module" "\- Left click to show upcoming appointments for the next three days via \`calcurse -d3\` and show the month via \`cal\` - Middle click opens calcurse if installed" ;; - 8) setsid -f "$TERMINAL" -e "$EDITOR" "$0" ;; + 8) setsid -f "$TERMINAL" -e "$EDITOR" "$0" ;; esac -date "+$icon %H:%M" +date "+%H:%M" diff --git a/.local/bin/statusbar/sb-forecast b/.local/bin/statusbar/sb-forecast @@ -41,14 +41,14 @@ showweather() { } case $1 in - 1) setsid -f "$TERMINAL" -e less -Sf "$weatherreport" ;; - 2) getforecast && showweather ;; - 3) notify-send "🌈 Weather module" "\- Left click for full forecast. + 1) setsid -f "$TERMINAL" -e less -Sf "$weatherreport" ;; + 2) getforecast && showweather ;; + 3) notify-send " Weather module" "\- Left click for full forecast. - Middle click to update forecast. -☔: Chance of rain/snow -🥶: Daily low -🌞: Daily high" ;; - 8) setsid -f "$TERMINAL" -e "$EDITOR" "$0" ;; + : Chance of rain/snow + : Daily low + : Daily high" ;; + 8) setsid -f "$TERMINAL" -e "$EDITOR" "$0" ;; esac # shellcheck disable=SC2015 diff --git a/.local/bin/statusbar/sb-internet b/.local/bin/statusbar/sb-internet @@ -1,33 +1,33 @@ #!/bin/sh # Show wifi 📶 and percent strength or 📡 if none. -# Show 🌐 if connected to ethernet or ❎ if none. +# Show  if connected to ethernet or ❎ if none. # Show 🔒 if a vpn connection is active case $1 in 1) "$TERMINAL" -e nmtui; pkill -RTMIN+4 waybar ;; - 3) notify-send "🌐 Internet module" "\- Click to connect -❌: wifi disabled -📡: no wifi connection -📶: wifi connection with quality -❎: no ethernet -🌐: ethernet working -🔒: vpn is active + 3) notify-send " Internet module" "\- Click to connect + : wifi disabled + : no wifi connection + : wifi connection with quality + : no ethernet + : ethernet working + : vpn is active " ;; 8) setsid -f "$TERMINAL" -e "$EDITOR" "$0" ;; esac # Wifi if [ "$(cat /sys/class/net/w*/operstate 2>/dev/null)" = 'up' ] ; then - wifiicon="$(awk '/^\s*w/ { print "📶", int($3 * 100 / 70) "% " }' /proc/net/wireless)" + wifiicon="$(awk '/^\s*w/ { print " ", int($3 * 100 / 70) "% " }' /proc/net/wireless)" elif [ "$(cat /sys/class/net/w*/operstate 2>/dev/null)" = 'down' ] ; then - [ "$(cat /sys/class/net/w*/flags 2>/dev/null)" = '0x1003' ] && wifiicon="📡 " || wifiicon="❌ " + [ "$(cat /sys/class/net/w*/flags 2>/dev/null)" = '0x1003' ] && wifiicon=" " || wifiicon=" " fi # Ethernet -[ "$(cat /sys/class/net/e*/operstate 2>/dev/null)" = 'up' ] && ethericon="🌐" || ethericon="❎" +[ "$(cat /sys/class/net/e*/operstate 2>/dev/null)" = 'up' ] && ethericon=" " || ethericon=" " # TUN -[ -n "$(cat /sys/class/net/libre*/operstate 2>/dev/null)" ] && tunicon=" 🔒" +[ -n "$(cat /sys/class/net/libre*/operstate 2>/dev/null)" ] && tunicon=" " printf "%s%s%s\n" "$wifiicon" "$ethericon" "$tunicon" diff --git a/.local/bin/statusbar/sb-mailbox b/.local/bin/statusbar/sb-mailbox @@ -4,17 +4,17 @@ # When clicked, brings up `neomutt`. case $1 in - 1) setsid -w -f "$TERMINAL" -e neomutt; pkill -RTMIN+12 "${STATUSBAR:-waybar}" ;; - 2) setsid -f mailsync >/dev/null ;; - 3) notify-send "📬 Mail module" "\- Shows unread mail + 1) setsid -w -f "$TERMINAL" -e neomutt; pkill -RTMIN+12 "${STATUSBAR:-waybar}" ;; + 2) setsid -f mailsync >/dev/null ;; + 3) notify-send " Mail module" "\- Shows unread mail - Shows 🔃 if syncing mail - Left click opens neomutt - Middle click syncs mail" ;; - 8) setsid -f "$TERMINAL" -e "$EDITOR" "$0" ;; + 8) setsid -f "$TERMINAL" -e "$EDITOR" "$0" ;; esac unread="$(find "${XDG_DATA_HOME:-$HOME/.local/share}"/mail/*/[Ii][Nn][Bb][Oo][Xx]/new/* -type f | wc -l 2>/dev/null)" pidof mailsync >/dev/null 2>&1 && icon="🔃" -[ "$unread" = "0" ] && [ "$icon" = "" ] || echo "📬$unread$icon" +[ "$unread" = "0" ] && [ "$icon" = "" ] || echo " $unread$icon" diff --git a/.local/bin/statusbar/sb-memory b/.local/bin/statusbar/sb-memory @@ -1,9 +1,9 @@ #!/bin/sh case $1 in - 1) notify-send "🧠 Memory hogs" "$(ps axch -o cmd:15,%mem --sort=-%mem | head)" ;; + 1) notify-send " Memory hogs" "$(ps axch -o cmd:15,%mem --sort=-%mem | head)" ;; 2) setsid -f "$TERMINAL" -e btop ;; - 3) notify-send "🧠 Memory module" "\- Shows Memory Used/Total. + 3) notify-send " Memory module" "\- Shows Memory Used/Total. - Click to show memory hogs. - Middle click to open htop." ;; 8) setsid -f "$TERMINAL" -e "$EDITOR" "$0" ;; diff --git a/.local/bin/statusbar/sb-microphone b/.local/bin/statusbar/sb-microphone @@ -7,7 +7,7 @@ case $1 in 2) wpctl set-mute @DEFAULT_SOURCE@ toggle ;; 4) wpctl set-volume @DEFAULT_SOURCE@ 1%+ ;; 5) wpctl set-volume @DEFAULT_SOURCE@ 1%- ;; - 3) notify-send "🎤 Microphone volume module" "\- Shows volume 🎙️,  if muted. + 3) notify-send " Microphone volume module" "\- Shows volume ,  if muted. - Middle click to mute. - Scroll to change." ;; 8) setsid -f "$TERMINAL" -e "$EDITOR" "$0" ;; @@ -30,10 +30,10 @@ split() { vol="$(printf "%.0f" "$(split "$vol" ".")")" case 1 in - $((vol >= 70)) ) icon="🎙️" ;; - $((vol >= 30)) ) icon="🎙️" ;; - $((vol >= 1)) ) icon="🎙️" ;; - * ) echo  && exit ;; + $((vol >= 70)) ) icon=" " ;; + $((vol >= 30)) ) icon=" " ;; + $((vol >= 1)) ) icon=" " ;; + * ) echo  && exit ;; esac echo "$icon$vol%" diff --git a/.local/bin/statusbar/sb-music b/.local/bin/statusbar/sb-music @@ -7,11 +7,11 @@ pidof -x sb-mpdup >/dev/null 2>&1 || sb-mpdup >/dev/null 2>&1 & case $1 in 1) mpc status | filter ; setsid -f "$TERMINAL" -e ncmpcpp ;; # right click, pause/unpause 2) mpc toggle | filter ;; # right click, pause/unpause - 3) mpc status | filter ; notify-send "🎵 Music module" "\- Shows mpd song playing. - - ⏸ when paused. - - Left click opens ncmpcpp. - - Middle click pauses. - - Scroll changes track.";; # right click, pause/unpause + 3) mpc status | filter ; notify-send " Music module" "\- Shows mpd song playing. +- ⏸ when paused. +- Left click opens ncmpcpp. +- Middle click pauses. +- Scroll changes track.";; # right click, pause/unpause 4) mpc prev | filter ;; # scroll up, previous 5) mpc next | filter ;; # scroll down, next 8) mpc status | filter ; setsid -f "$TERMINAL" -e "$EDITOR" "$0" ;; diff --git a/.local/bin/statusbar/sb-nettraf b/.local/bin/statusbar/sb-nettraf @@ -3,22 +3,22 @@ # Show per-second network traffic using consistent-width output case $1 in - 1) setsid -f "$TERMINAL" -e sudo -A bandwhich ;; - 3) notify-send "🌐 Network traffic module" "🔻: Traffic received -🔺: Traffic transmitted" ;; - 8) setsid -f "$TERMINAL" -e "$EDITOR" "$0" ;; + 1) setsid -f "$TERMINAL" -e sudo -A bandwhich ;; + 3) notify-send " Network traffic module" " : Traffic received + : Traffic transmitted" ;; + 8) setsid -f "$TERMINAL" -e "$EDITOR" "$0" ;; esac update() { - sum=0 - for arg; do - read -r i < "$arg" - sum=$(( sum + i )) - done - cache=/tmp/${1##*/} - [ -f "$cache" ] && read -r old < "$cache" || old=0 - printf %d\\n "$sum" > "$cache" - printf %d\\n $(( sum - old )) + sum=0 + for arg; do + read -r i < "$arg" + sum=$(( sum + i )) + done + cache=/tmp/${1##*/} + [ -f "$cache" ] && read -r old < "$cache" || old=0 + printf %d\\n "$sum" > "$cache" + printf %d\\n $(( sum - old )) } rx=$(update /sys/class/net/[ew]*/statistics/rx_bytes) diff --git a/.local/bin/statusbar/sb-news b/.local/bin/statusbar/sb-news @@ -4,14 +4,14 @@ # When clicked, brings up `newsboat`. case $1 in - 1) setsid "$TERMINAL" -e newsboat ;; - 2) setsid -f newsup >/dev/null && exit ;; - 3) notify-send "📰 News module" "\- Shows unread news items + 1) setsid "$TERMINAL" -e newsboat ;; + 2) setsid -f newsup >/dev/null && exit ;; + 3) notify-send " News module" "\- Shows unread news items - Shows 🔃 if updating with \`newsup\` - Left click opens newsboat - Middle click syncs RSS feeds <b>Note:</b> Only one instance of newsboat (including updates) may be running at a time." ;; - 8) setsid -f "$TERMINAL" -e "$EDITOR" "$0" ;; + 8) setsid -f "$TERMINAL" -e "$EDITOR" "$0" ;; esac - cat /tmp/newsupdate 2>/dev/null || echo "$(newsboat -x print-unread | awk '{ if($1>0) print "📰" $1}')$(cat "${XDG_CONFIG_HOME:-$HOME/.config}"/newsboat/.update 2>/dev/null)" + cat /tmp/newsupdate 2>/dev/null || echo "$(newsboat -x print-unread | awk '{ if($1>0) print " " $1}')$(cat "${XDG_CONFIG_HOME:-$HOME/.config}"/newsboat/.update 2>/dev/null)" diff --git a/.local/bin/statusbar/sb-pacpackages b/.local/bin/statusbar/sb-pacpackages @@ -18,12 +18,12 @@ # Exec = /usr/bin/pkill -RTMIN+8 dwmblocks # Or i3blocks if using i3. case $1 in - 1) setsid -f "$TERMINAL" -e sb-popupgrade ;; - 2) notify-send "$(/usr/bin/pacman -Qu)" ;; - 3) notify-send "🎁 Upgrade module" "📦: number of upgradable packages + 1) setsid -f "$TERMINAL" -e sb-popupgrade ;; + 2) notify-send "$(/usr/bin/pacman -Qu)" ;; + 3) notify-send " Upgrade module" " : number of upgradable packages - Left click to upgrade packages - Middle click to show upgradable packages" ;; - 8) setsid -f "$TERMINAL" -e "$EDITOR" "$0" ;; + 8) setsid -f "$TERMINAL" -e "$EDITOR" "$0" ;; esac -pacman -Qu | grep -Fcv "[ignored]" | sed "s/^/📦/;s/^📦0$//g" +pacman -Qu | grep -Fcv "[ignored]" | sed "s/^/ /;s/^ 0$//g" diff --git a/.local/bin/statusbar/sb-volume b/.local/bin/statusbar/sb-volume @@ -3,20 +3,20 @@ # Prints the current volume or 🔇 if muted. case $1 in - 1) setsid -w -f "$TERMINAL" -e pulsemixer; pkill -RTMIN+10 "${STATUSBAR:-waybar}" ;; - 2) wpctl set-mute @DEFAULT_SINK@ toggle ;; - 4) wpctl set-volume @DEFAULT_SINK@ 1%+ ;; - 5) wpctl set-volume @DEFAULT_SINK@ 1%- ;; - 3) notify-send "📢 Volume module" "\- Shows volume 🔊, 🔇 if muted. + 1) setsid -w -f "$TERMINAL" -e pulsemixer; pkill -RTMIN+10 "${STATUSBAR:-waybar}" ;; + 2) wpctl set-mute @DEFAULT_SINK@ toggle ;; + 4) wpctl set-volume @DEFAULT_SINK@ 1%+ ;; + 5) wpctl set-volume @DEFAULT_SINK@ 1%- ;; + 3) notify-send " Volume module" "\- Shows volume  ,  if muted. - Middle click to mute. - Scroll to change." ;; - 8) setsid -f "$TERMINAL" -e "$EDITOR" "$0" ;; + 8) setsid -f "$TERMINAL" -e "$EDITOR" "$0" ;; esac vol="$(wpctl get-volume @DEFAULT_AUDIO_SINK@)" # If muted, print 🔇 and exit. -[ "$vol" != "${vol%\[MUTED\]}" ] && echo 🔇 && exit +[ "$vol" != "${vol%\[MUTED\]}" ] && echo  && exit vol="${vol#Volume: }" @@ -30,10 +30,10 @@ split() { vol="$(printf "%.0f" "$(split "$vol" ".")")" case 1 in - $((vol >= 70)) ) icon="🔊" ;; - $((vol >= 30)) ) icon="🔉" ;; - $((vol >= 1)) ) icon="🔈" ;; - * ) echo 🔇 && exit ;; + $((vol >= 70)) ) icon=" " ;; + $((vol >= 30)) ) icon=" " ;; + $((vol >= 1)) ) icon=" " ;; + * ) echo  && exit ;; esac echo "$icon$vol%"