diff options
Diffstat (limited to 'ar')
27 files changed, 61 insertions, 44 deletions
diff --git a/ar/.local/bin/cron/checkup b/ar/.local/bin/cron/checkup index 801d406..2ea6772 100755 --- a/ar/.local/bin/cron/checkup +++ b/ar/.local/bin/cron/checkup @@ -7,7 +7,7 @@ notify-send "š¦ Repository Sync" "Checking for package updates..." sudo pacman -Syyuw --noconfirm || notify-send "ā Error downloading updates. Check your internet connection, if pacman is already running, or run update manually to see errors." -pkill -RTMIN+16 "${STATUSBAR:-dwmblocks}" +pkill -RTMIN+14 "${STATUSBAR:-dwmblocks}" if pacman -Qu | grep -v "\[ignored\]"; then notify-send "š Repository Sync" "Updates available. Click statusbar icon (š¦) or run sb-popupgrade in terminal for update." diff --git a/ar/.local/bin/cron/crontog b/ar/.local/bin/cron/crontog index 70e7cf1..ccabe61 100755 --- a/ar/.local/bin/cron/crontog +++ b/ar/.local/bin/cron/crontog @@ -23,4 +23,4 @@ else fi # Notify status bar to update -pkill -RTMIN+3 "${STATUSBAR:-dwmblocks}" +pkill -RTMIN+2 "${STATUSBAR:-dwmblocks}" diff --git a/ar/.local/bin/cron/newsup b/ar/.local/bin/cron/newsup index 346ec75..f8b40b7 100755 --- a/ar/.local/bin/cron/newsup +++ b/ar/.local/bin/cron/newsup @@ -8,8 +8,8 @@ pgrep -f newsboat$ && /usr/bin/xdotool key --window "$(/usr/bin/xdotool search --name "^newsboat$")" R && exit echo š >/tmp/newsupdate -pkill -RTMIN+19 "${STATUSBAR:-dwmblocks}" +pkill -RTMIN+17 "${STATUSBAR:-dwmblocks}" /usr/bin/newsboat -x reload rm -f /tmp/newsupdate -pkill -RTMIN+19 "${STATUSBAR:-dwmblocks}" +pkill -RTMIN+17 "${STATUSBAR:-dwmblocks}" /usr/bin/notify-send "š° RSS feed update complete." diff --git a/ar/.local/bin/dmenurecord b/ar/.local/bin/dmenurecord index 621133d..a497aa4 100755 --- a/ar/.local/bin/dmenurecord +++ b/ar/.local/bin/dmenurecord @@ -17,7 +17,7 @@ getdim() { xrandr | grep -oP '(?<=current ).*(?=,)' | tr -d ' '; } updateicon() { echo "$1" >/tmp/recordingicon - pkill -RTMIN+24 "${STATUSBAR:-dwmblocks}" + pkill -RTMIN+22 "${STATUSBAR:-dwmblocks}" } killrecording() { @@ -25,7 +25,7 @@ killrecording() { kill -15 "$recpid" rm -f /tmp/recordingpid updateicon "" - pkill -RTMIN+24 "${STATUSBAR:-dwmblocks}" + pkill -RTMIN+22 "${STATUSBAR:-dwmblocks}" } getmonitor() { diff --git a/ar/.local/bin/dmenuupgrade b/ar/.local/bin/dmenuupgrade index b43ff4c..b23e80a 100755 --- a/ar/.local/bin/dmenuupgrade +++ b/ar/.local/bin/dmenuupgrade @@ -16,7 +16,7 @@ case "$selection" in if [ "$(printf "No\nYes" | dmenu -i -p 'Proceed with upgrade for all packages?')" = "Yes" ]; then notify-send "š¦ Upgrading all packages..." yay -Syu --noconfirm - pkill -RTMIN+16 "${STATUSBAR:-dwmblocks}" + pkill -RTMIN+14 "${STATUSBAR:-dwmblocks}" notify-send "ā
Upgrade of all packages completed." else notify-send "ā Upgrade cancelled." @@ -31,7 +31,7 @@ case "$selection" in if [ "$(printf "No\nYes" | dmenu -i -p 'Proceed with pacman upgrade?')" = "Yes" ]; then notify-send "š¦ Upgrading pacman packages..." printf "%s" "$pacman_updates" | awk '{print $1}' | xargs sudo pacman -S --noconfirm - pkill -RTMIN+16 "${STATUSBAR:-dwmblocks}" + pkill -RTMIN+14 "${STATUSBAR:-dwmblocks}" notify-send "ā
Pacman packages upgrade completed." else notify-send "ā Upgrade cancelled." @@ -46,7 +46,7 @@ case "$selection" in if [ "$(printf "No\nYes" | dmenu -i -p 'Proceed with upgrade for this package?')" = "Yes" ]; then notify-send "š¦ Upgrading package: $selection..." sudo pacman -S --noconfirm "$(printf "%s" "$selection" | awk '{print $1}')" - pkill -RTMIN+16 "${STATUSBAR:-dwmblocks}" + pkill -RTMIN+14 "${STATUSBAR:-dwmblocks}" notify-send "ā
Upgrade completed for package: $selection." else notify-send "ā Upgrade cancelled." @@ -73,7 +73,7 @@ case "$selection" in if [ "$(printf "No\nYes" | dmenu -i -p 'Proceed with AUR upgrade?')" = "Yes" ]; then notify-send "š¦ Upgrading AUR packages..." yay -Syu --aur --noconfirm - pkill -RTMIN+16 "${STATUSBAR:-dwmblocks}" + pkill -RTMIN+14 "${STATUSBAR:-dwmblocks}" notify-send "ā
AUR packages upgrade completed." else notify-send "ā Upgrade cancelled." @@ -88,7 +88,7 @@ case "$selection" in if [ "$(printf "No\nYes" | dmenu -i -p 'Proceed with upgrade for this package?')" = "Yes" ]; then notify-send "š¦ Upgrading AUR package: $selection..." yay -S --noconfirm "$(printf "%s" "$selection" | awk '{print $2}')" - pkill -RTMIN+16 "${STATUSBAR:-dwmblocks}" + pkill -RTMIN+14 "${STATUSBAR:-dwmblocks}" notify-send "ā
Upgrade completed for AUR package: $selection." else notify-send "ā Upgrade cancelled." diff --git a/ar/.local/bin/ethwifi b/ar/.local/bin/ethwifi index 26366e9..c4fa0c6 100755 --- a/ar/.local/bin/ethwifi +++ b/ar/.local/bin/ethwifi @@ -28,4 +28,4 @@ else fi # Refresh status bar -pkill -RTMIN+7 "${STATUSBAR:-dwmblocks}" +pkill -RTMIN+6 "${STATUSBAR:-dwmblocks}" diff --git a/ar/.local/bin/extractkeys b/ar/.local/bin/extractkeys index b45358d..4e4e5b4 100755 --- a/ar/.local/bin/extractkeys +++ b/ar/.local/bin/extractkeys @@ -125,6 +125,7 @@ for file_path in "${config_files[@]}"; do s/&layouts\[12\]/"|M|"/g; s/&layouts\[13\]/">M>"/g; s/^\s*//g; + s/pkexec //g; /^\s*0\s*$/d ') diff --git a/ar/.local/bin/gitupdate b/ar/.local/bin/gitupdate index 6ee163a..87c13c3 100755 --- a/ar/.local/bin/gitupdate +++ b/ar/.local/bin/gitupdate @@ -87,4 +87,4 @@ printf "\n[repo] %s(%s): %s\n" "$(basename "$repo_root")" "$branch" "$message" # Return to the original directory cd - >/dev/null -command -v dwmblocks >/dev/null 2>&1 && pkill -RTMIN+18 "${STATUSBAR:-dwmblocks}" +command -v dwmblocks >/dev/null 2>&1 && pkill -RTMIN+16 "${STATUSBAR:-dwmblocks}" diff --git a/ar/.local/bin/monitorbright b/ar/.local/bin/monitorbright index 2de2e5d..db2bcf3 100755 --- a/ar/.local/bin/monitorbright +++ b/ar/.local/bin/monitorbright @@ -15,10 +15,6 @@ case "$monitor" in esac new_brightness=$(echo "if ($new_brightness > 1) 1 else if ($new_brightness < 0) 0 else $new_brightness" | bc -l) xrandr --output "$monitor" --brightness "$new_brightness" - current_brightness=$(echo "$new_brightness * 100" | bc -l) - else - current_brightness=$(echo "$current_brightness * 100" | bc -l) fi - printf "šŖ%.0f%%\n" "$current_brightness" ;; esac diff --git a/ar/.local/bin/qndl b/ar/.local/bin/qndl index 46b4aa8..2757eb8 100755 --- a/ar/.local/bin/qndl +++ b/ar/.local/bin/qndl @@ -47,7 +47,7 @@ case $type in video_id=$(echo "$line" | awk '{print $2}') ytdl_cmd="$ytdl_cmd_base --output \"$ytdl_output_format\" \"https://www.youtube.com/watch?v=$video_id\"" idnum=$(tsp bash -c "$ytdl_cmd") - pkill -RTMIN+21 "${STATUSBAR:-dwmblocks}" + pkill -RTMIN+19 "${STATUSBAR:-dwmblocks}" done <"$archive_file" exit 0 ;; @@ -120,7 +120,7 @@ filename=$($simulation_cmd 2>/dev/null) [ -f /tmp/qplaylist ] && rm -rf /tmp/qplaylist notify-send "ā³ Downloading $download_type:" "$filename" idnum=$(tsp bash -c "$ytdl_cmd") -pkill -RTMIN+21 "${STATUSBAR:-dwmblocks}" +pkill -RTMIN+19 "${STATUSBAR:-dwmblocks}" # Notify upon completion tsp -D "$idnum" notify-send "ā
$download_type download complete:" "$url" || diff --git a/ar/.local/bin/statusbar/sb-brightness b/ar/.local/bin/statusbar/sb-brightness index 909e676..625e69e 100755 --- a/ar/.local/bin/statusbar/sb-brightness +++ b/ar/.local/bin/statusbar/sb-brightness @@ -1,11 +1,31 @@ #!/bin/sh +monitor=$(xrandr --query | grep -i '\sconnected' | grep '[0-9]x[0-9]' | grep -i 'primary' | cut -d ' ' -f1) +[ -z "$monitor" ] && monitor=$(xrandr --query | grep -i '\sconnected' | grep '[0-9]x[0-9]' | cut -d ' ' -f1) +case "$monitor" in +*DP* | *HDMI*) + current_brightness=$(xrandr --verbose | grep -i "^$monitor connected" -A5 | grep -i "Brightness:" | cut -d ' ' -f2) + current_brightness=$(echo "$current_brightness * 100" | bc -l) + ;; +esac + case $BLOCK_BUTTON in 3) notify-send "š Backlight module -- Scroll up & down changes backlight" ;; -4) monbright -inc 5 ;; -5) monbright -dec 5 ;; +- Scroll up & down changes screen brightness +- Shift + Scroll up & down changes monitor backlight" ;; +4) pkexec brillo -A 5 -q ;; +5) pkexec brillo -U 5 -q ;; 6) setsid -f "$TERMINAL" -e "$EDITOR" "$0" ;; +7) monbright -inc 5 ;; +8) monbright -dec 5 ;; +9) setsid -f "$TERMINAL" -e "$EDITOR" "$0" ;; esac -monitorbright +if [ -r /sys/class/backlight/*/brightness ]; then + curr_brightness=$(cat /sys/class/backlight/*/brightness) + max_brightness=$(cat /sys/class/backlight/*/max_brightness) + brightness_per=$((100 * curr_brightness / max_brightness)) + printf "%s %s\n" "š”${brightness_per}%" "šŖ$current_brightness" +else + printf "%s\n" "šŖ$current_brightness" +fi diff --git a/ar/.local/bin/statusbar/sb-forecast b/ar/.local/bin/statusbar/sb-forecast index 4f78303..063c8e5 100755 --- a/ar/.local/bin/statusbar/sb-forecast +++ b/ar/.local/bin/statusbar/sb-forecast @@ -360,6 +360,6 @@ After $secs seconds, new clicks will also automatically update the doppler RADAR 8) setsid -f "$TERMINAL" -e "$EDITOR" "$0" ;; esac -checkforecast "$weatherreport" "3600" || { getweatherreport && pkill -RTMIN+15 "${STATUSBAR:-dwmblocks}" && sleep 3; } -checkforecast "$weatherreportjson" "86400" || { getweatherreportjson && pkill -RTMIN+15 "${STATUSBAR:-dwmblocks}" && sleep 3; } +checkforecast "$weatherreport" "3600" || { getweatherreport && pkill -RTMIN+13 "${STATUSBAR:-dwmblocks}" && sleep 3; } +checkforecast "$weatherreportjson" "86400" || { getweatherreportjson && pkill -RTMIN+13 "${STATUSBAR:-dwmblocks}" && sleep 3; } showweather diff --git a/ar/.local/bin/statusbar/sb-internet b/ar/.local/bin/statusbar/sb-internet index 1484f33..163b7b3 100755 --- a/ar/.local/bin/statusbar/sb-internet +++ b/ar/.local/bin/statusbar/sb-internet @@ -26,7 +26,7 @@ fi case $BLOCK_BUTTON in 1) "$TERMINAL" -e nmtui - pkill -RTMIN+7 dwmblocks + pkill -RTMIN+6 dwmblocks ;; 2) wifi_dev="$(nmcli -t -f DEVICE,TYPE device | @@ -43,7 +43,7 @@ case $BLOCK_BUTTON in notify-send "Wi-Fi" "Wi-Fi connected" fi - pkill -RTMIN+7 dwmblocks + pkill -RTMIN+6 dwmblocks ;; 3) notify-send "š Internet module" "\- Left click to connect ā: wifi disabled diff --git a/ar/.local/bin/statusbar/sb-keyboard b/ar/.local/bin/statusbar/sb-keyboard index 67b5f6d..2257b1b 100755 --- a/ar/.local/bin/statusbar/sb-keyboard +++ b/ar/.local/bin/statusbar/sb-keyboard @@ -3,7 +3,7 @@ # works on any init system # requirements: dmenu, xorg-setxkbmap case $BLOCK_BUTTON in -1) fcitx5-remote -t && kill -44 "$(pidof "${STATUSBAR:-dwmblocks}")" ;; +1) fcitx5-remote -t && kill -43 "$(pidof "${STATUSBAR:-dwmblocks}")" ;; 2) remaps ;; 3) notify-send "⨠Input Method module" "\- Shows current input method (defalt US) - Left click to switch language (EN/KO) @@ -14,7 +14,7 @@ case $BLOCK_BUTTON in [ -z "$kb_choice" ] && exit 0 kb="$(echo "$kb_choice" | awk '{print $3}')" setxkbmap "$kb" - pkill -RTMIN+10 "${STATUSBAR:-dwmblocks}" + pkill -RTMIN+9 "${STATUSBAR:-dwmblocks}" ;; esac diff --git a/ar/.local/bin/statusbar/sb-mailbox b/ar/.local/bin/statusbar/sb-mailbox index c772a0d..6926b6e 100755 --- a/ar/.local/bin/statusbar/sb-mailbox +++ b/ar/.local/bin/statusbar/sb-mailbox @@ -6,7 +6,7 @@ case $BLOCK_BUTTON in 1) setsid -w -f "$TERMINAL" -e neomutt - pkill -RTMIN+20 "${STATUSBAR:-dwmblocks}" + pkill -RTMIN+18 "${STATUSBAR:-dwmblocks}" ;; 2) setsid -f mw -Y >/dev/null ;; 3) notify-send "š¬ Mail module" "\- Shows unread mail diff --git a/ar/.local/bin/statusbar/sb-memory b/ar/.local/bin/statusbar/sb-memory index 01eb0e6..3c9dd03 100755 --- a/ar/.local/bin/statusbar/sb-memory +++ b/ar/.local/bin/statusbar/sb-memory @@ -16,9 +16,9 @@ nvme_temp=$(sensors 2>/dev/null | if [ -n "$width" ] && [ "$width" -eq "$width" ] 2>/dev/null; then if [ "$width" -lt 1920 ]; then free --mebi | sed -n '2{p;q}' | - awk -v t="$nvme_temp" '{printf "š¾%s° š%d%%\n", t, ($3/$2)*100+0.5}' + awk -v t="$nvme_temp" '{printf "š”%s° š%d%%\n", t, ($3/$2)*100+0.5}' else free --mebi | sed -n '2{p;q}' | - awk -v t="$nvme_temp" '{printf "š¾%s° š%dGB/%dGB", t, $3/1000+0.5, $2/1000+0.5}' + awk -v t="$nvme_temp" '{printf "š”%s° š%dGB/%dGB", t, $3/1000+0.5, $2/1000+0.5}' fi fi diff --git a/ar/.local/bin/statusbar/sb-mpdup b/ar/.local/bin/statusbar/sb-mpdup index 90e9c7e..fa9b61b 100755 --- a/ar/.local/bin/statusbar/sb-mpdup +++ b/ar/.local/bin/statusbar/sb-mpdup @@ -4,5 +4,5 @@ # music player's status. mpd must be running on X's start for this to work. while :; do - mpc idle >/dev/null && kill -57 "$(pidof "${STATUSBAR:-dwmblocks}")" || break + mpc idle >/dev/null && kill -55 "$(pidof "${STATUSBAR:-dwmblocks}")" || break done diff --git a/ar/.local/bin/statusbar/sb-packages b/ar/.local/bin/statusbar/sb-packages index 5955c75..467bfb3 100755 --- a/ar/.local/bin/statusbar/sb-packages +++ b/ar/.local/bin/statusbar/sb-packages @@ -15,7 +15,7 @@ # [Action] # Description = Updating statusbar... # When = PostTransaction -# Exec = /usr/bin/pkill -RTMIN+16 dwmblocks # Or i3blocks if using i3. +# Exec = /usr/bin/pkill -RTMIN+14 dwmblocks # Or i3blocks if using i3. case $BLOCK_BUTTON in 1) setsid -f "$TERMINAL" -e sb-popupgrade && remaps ;; diff --git a/ar/.local/bin/statusbar/sb-popupgrade b/ar/.local/bin/statusbar/sb-popupgrade index 14036eb..221c7db 100755 --- a/ar/.local/bin/statusbar/sb-popupgrade +++ b/ar/.local/bin/statusbar/sb-popupgrade @@ -3,7 +3,7 @@ printf "Beginning upgrade\\n" yay -Syu -pkill -RTMIN+16 "${STATUSBAR:-dwmblocks}" +pkill -RTMIN+14 "${STATUSBAR:-dwmblocks}" printf "\\nUpgrade complete.\\nPress <Enter> to exit window.\\n\\n" read -r _ diff --git a/ar/.local/bin/statusbar/sb-queues b/ar/.local/bin/statusbar/sb-queues index 40445f8..477fa7f 100755 --- a/ar/.local/bin/statusbar/sb-queues +++ b/ar/.local/bin/statusbar/sb-queues @@ -18,7 +18,7 @@ EOF if [ -z "$url" ]; then notify-send "š¤ No active yt-dlp downloads" fi - pkill -RTMIN+21 "${STATUSBAR:-dwmblocks}" + pkill -RTMIN+19 "${STATUSBAR:-dwmblocks}" } # This block displays the number of running and queued background tasks. Requires tsp. diff --git a/ar/.local/bin/statusbar/sb-volume b/ar/.local/bin/statusbar/sb-volume index 7881bfd..291e78d 100755 --- a/ar/.local/bin/statusbar/sb-volume +++ b/ar/.local/bin/statusbar/sb-volume @@ -5,7 +5,7 @@ case $BLOCK_BUTTON in 1) setsid -w -f "$TERMINAL" -e pulsemixer - pkill -RTMIN+5 "${STATUSBAR:-dwmblocks}" + pkill -RTMIN+4 "${STATUSBAR:-dwmblocks}" ;; 2) wpctl set-mute @DEFAULT_SINK@ toggle ;; 3) notify-send "š¢ Volume module" "\- Shows volume š, š if muted diff --git a/ar/.local/bin/synctime b/ar/.local/bin/synctime index 47f4310..664639f 100755 --- a/ar/.local/bin/synctime +++ b/ar/.local/bin/synctime @@ -19,4 +19,4 @@ sudo hwclock --systohc echo "Current timezone: $current_zone" date -pkill -RTMIN+3 ${STATUSBAR:-dwmblocks} +pkill -RTMIN+2 ${STATUSBAR:-dwmblocks} diff --git a/ar/.local/bin/sysact b/ar/.local/bin/sysact index d4f3653..64ef127 100755 --- a/ar/.local/bin/sysact +++ b/ar/.local/bin/sysact @@ -11,10 +11,10 @@ lock() { mpc pause pauseallmpv wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle - kill -39 "$(pidof dwmblocks)" + kill -38 "$(pidof dwmblocks)" slock wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle - kill -39 "$(pidof dwmblocks)" + kill -38 "$(pidof dwmblocks)" } wmpid() { # This function is needed if there are multiple instances of the window manager. diff --git a/ar/.local/bin/td-toggle b/ar/.local/bin/td-toggle index 4bbe75c..c71d53f 100755 --- a/ar/.local/bin/td-toggle +++ b/ar/.local/bin/td-toggle @@ -8,4 +8,4 @@ else ifinstalled transmission-cli || exit [ "$(printf "No\\nYes" | dmenu -i -p "Turn on transmission daemon?")" = "Yes" ] && transmission-daemon && notify-send "š transmission-daemon enabled." fi -sleep 3 && pkill -RTMIN+22 "${STATUSBAR:-dwmblocks}" +sleep 3 && pkill -RTMIN+20 "${STATUSBAR:-dwmblocks}" diff --git a/ar/.local/bin/tordone b/ar/.local/bin/tordone index 4e097a0..016568f 100755 --- a/ar/.local/bin/tordone +++ b/ar/.local/bin/tordone @@ -5,6 +5,6 @@ if [ -n "$completed_torrents" ]; then for torrent_id in $completed_torrents; do transmission-remote -n "$USER" -t "$torrent_id" -r done - pkill -RTMIN+22 "${STATUSBAR:-dwmblocks}" && notify-send "ā
Transmission-daemon" "Torrent(s) $TR_TORRENT_NAME has completed downloading. Deleting torrent files." + pkill -RTMIN+20 "${STATUSBAR:-dwmblocks}" && notify-send "ā
Transmission-daemon" "Torrent(s) $TR_TORRENT_NAME has completed downloading. Deleting torrent files." [ -z "$(transmission-remote -n "$USER" -l | grep -v "Sum:")" ] && killall transmission-daemon && notify-send "ā Transmission-daemon disabled." fi diff --git a/ar/.local/bin/torwrap b/ar/.local/bin/torwrap index 54f5c0e..624778a 100755 --- a/ar/.local/bin/torwrap +++ b/ar/.local/bin/torwrap @@ -5,4 +5,4 @@ ifinstalled stig transmission-cli || exit 1 ! pidof transmission-daemon >/dev/null && transmission-daemon && notify-send "Starting torrent daemon..." "${TERMINAL:-st}" -n stig -e stig -pkill -RTMIN+22 "${STATUSBAR:-dwmblocks}" +pkill -RTMIN+20 "${STATUSBAR:-dwmblocks}" diff --git a/ar/.local/bin/transadd b/ar/.local/bin/transadd index ffd8ded..567b1bc 100755 --- a/ar/.local/bin/transadd +++ b/ar/.local/bin/transadd @@ -4,7 +4,7 @@ # transmission-daemon sometimes fails to take remote requests in its first moments, hence the sleep. -pidof transmission-daemon >/dev/null || (transmission-daemon && notify-send "š” Starting transmission daemon..." && sleep 3 && pkill -RTMIN+22 "${STATUSBAR:-dwmblocks}") +pidof transmission-daemon >/dev/null || (transmission-daemon && notify-send "š” Starting transmission daemon..." && sleep 3 && pkill -RTMIN+20 "${STATUSBAR:-dwmblocks}") directory="$HOME/Torrents" |
