summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.config/dunst/dunstrc4
-rw-r--r--.config/lf/lfrc6
-rwxr-xr-x.config/nsxiv/exec/key-handler6
-rw-r--r--.config/shell/aliasrc7
-rwxr-xr-x.local/bin/arkenfox-auto-update23
-rwxr-xr-x.local/bin/compiler2
-rwxr-xr-x.local/bin/statusbar/sb-cpu2
-rwxr-xr-x.local/bin/statusbar/sb-doppler69
-rwxr-xr-x.local/bin/statusbar/sb-memory2
-rwxr-xr-x.local/bin/sysact12
10 files changed, 42 insertions, 91 deletions
diff --git a/.config/dunst/dunstrc b/.config/dunst/dunstrc
index d03af62..94eee7c 100644
--- a/.config/dunst/dunstrc
+++ b/.config/dunst/dunstrc
@@ -2,8 +2,8 @@
monitor = 0
follow = keyboard
width = 370
- height = 350
- offset = 0x19
+ height = (0,350)
+ offset = (0,19)
padding = 2
horizontal_padding = 2
transparency = 25
diff --git a/.config/lf/lfrc b/.config/lf/lfrc
index 5598a30..d877ab6 100644
--- a/.config/lf/lfrc
+++ b/.config/lf/lfrc
@@ -93,7 +93,8 @@ cmd delete ${{
cmd moveto ${{
set -f
- dest=$(sed -e 's/\s*#.*//' -e '/^$/d' -e 's/^\S*\s*//' "${XDG_CONFIG_HOME:-$HOME/.config}/shell/bm-dirs" | fzf --prompt 'Move to where? ' | sed 's|~|$HOME|')
+ clear; tput cup $(($(tput lines)/3))
+ dest=$(sed -e 's/\s*#.*//' -e '/^$/d' -e 's/^\S*\s*//' "${XDG_CONFIG_HOME:-$HOME/.config}/shell/bm-dirs" | fzf --layout=reverse --height 40% --prompt 'Move to where? ' | sed 's|~|$HOME|')
[ -z "$dest" ] && exit
destpath=$(eval printf '%s' \"$dest\")
clear; tput cup $(($(tput lines)/3)); tput bold
@@ -110,7 +111,8 @@ cmd moveto ${{
cmd copyto ${{
set -f
- dest=$(sed -e 's/\s*#.*//' -e '/^$/d' -e 's/^\S*\s*//' "${XDG_CONFIG_HOME:-$HOME/.config}/shell/bm-dirs" | fzf --prompt 'Copy to where? ' | sed 's|~|$HOME|')
+ clear; tput cup $(($(tput lines)/3))
+ dest=$(sed -e 's/\s*#.*//' -e '/^$/d' -e 's/^\S*\s*//' "${XDG_CONFIG_HOME:-$HOME/.config}/shell/bm-dirs" | fzf --layout=reverse --height 40% --prompt 'Copy to where? ' | sed 's|~|$HOME|')
[ -z "$dest" ] && exit
destpath=$(eval printf '%s' \"$dest\")
clear; tput cup $(($(tput lines)/3)); tput bold
diff --git a/.config/nsxiv/exec/key-handler b/.config/nsxiv/exec/key-handler
index c743be4..fbbf289 100755
--- a/.config/nsxiv/exec/key-handler
+++ b/.config/nsxiv/exec/key-handler
@@ -14,11 +14,11 @@ do
mv "$file" "$destdir" && notify-send -i "$(readlink -f "$file")" "$file moved to $destdir." &
;;
"r")
- magick -rotate 90 "$file" "$file" ;;
+ magick "$file" -rotate 90 "$file" ;;
"R")
- magick -rotate -90 "$file" "$file" ;;
+ magick "$file" -rotate -90 "$file" ;;
"f")
- magick -flop "$file" "$file" ;;
+ magick "$file" -flop "$file" ;;
"y")
printf "%s" "$file" | tr -d '\n' | xclip -selection clipboard &&
notify-send "$file copied to clipboard" & ;;
diff --git a/.config/shell/aliasrc b/.config/shell/aliasrc
index 75327bf..5347fcd 100644
--- a/.config/shell/aliasrc
+++ b/.config/shell/aliasrc
@@ -14,9 +14,10 @@ for command in mount umount sv pacman updatedb su shutdown poweroff reboot ; do
done; unset command
se() {
- choice="$(find ~/.local/bin -mindepth 1 -printf '%P\n' | fzf)"
- [ -f "$HOME/.local/bin/$choice" ] && $EDITOR "$HOME/.local/bin/$choice"
- }
+ s=("${HOME}/.local/bin/"**/*(.))
+ c="$(print -lnr ${s:t:r} | fzf)"
+ [[ "${c}" ]] && "${EDITOR}" ${${(M)s:#*/${c}*}[1]}
+}
# Verbosity and settings that you pretty much just always are going to want.
alias \
diff --git a/.local/bin/arkenfox-auto-update b/.local/bin/arkenfox-auto-update
deleted file mode 100755
index 7664a4f..0000000
--- a/.local/bin/arkenfox-auto-update
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/bin/sh
-
-# A wrapper for the arkenfox-updater that runs it on all pre-existing Arkenfox
-# user.js files on the machine.
-
-# On installation of LARBS, this file is copied to /usr/local/lib/ where it is
-# run by a pacman hook set up. The user should not have to run this manually.
-
-# Search for all Firefox and Librewolf profiles using Arkenfox.
-profiles="$(grep -sH "arkenfox user.js" \
- /home/*/.librewolf/*.default-release/user.js \
- /home/*/.mozilla/firefox/*.default-release/user.js)"
-
-IFS='
-'
-
-# Update each found profile.
-for profile in $profiles; do
- userjs=${profile%%/user.js*}
- user=$(stat -c '%U' "$userjs") || continue
-
- su -l "$user" -c "arkenfox-updater -c -p $userjs -s"
-done
diff --git a/.local/bin/compiler b/.local/bin/compiler
index 7497ad2..1c83910 100755
--- a/.local/bin/compiler
+++ b/.local/bin/compiler
@@ -17,6 +17,7 @@ case "${ext}" in
[0-9]) preconv "${file}" | refer -PS -e | groff -mandoc -T pdf > "${base}.pdf" ;;
mom|ms) preconv "${file}" | refer -PS -e | groff -T pdf -m"${ext}" > "${base}.pdf" ;;
c) cc "${file}" -o "${base}" && "./${base}" ;;
+ cob) cobc -x -o "$base" "$file" && "$base" ;;
cpp) g++ "${file}" -o "${base}" && "./${base}" ;;
cs) mcs "${file}" && mono "${base}.exe" ;;
go) go run "${file}" ;;
@@ -30,6 +31,7 @@ case "${ext}" in
pandoc -t ms --highlight-style="kate" -s -o "${base}.pdf" "${file}" ;;
org) emacs "${file}" --batch -u "${USER}" -f org-latex-export-to-pdf ;;
py) python "${file}" ;;
+ rink) rink -f "${file}" ;;
[rR]md) Rscript -e "rmarkdown::render('${file}', quiet=TRUE)" ;;
rs) cargo build ;;
sass) sassc -a "${file}" "${base}.css" ;;
diff --git a/.local/bin/statusbar/sb-cpu b/.local/bin/statusbar/sb-cpu
index 5b8fb93..598b04f 100755
--- a/.local/bin/statusbar/sb-cpu
+++ b/.local/bin/statusbar/sb-cpu
@@ -1,7 +1,7 @@
#!/bin/sh
case $BLOCK_BUTTON in
- 1) notify-send "🖥 CPU hogs" "$(ps axch -o cmd:15,%cpu --sort=-%cpu | head)\\n(100% per core)" ;;
+ 1) notify-send "🖥 CPU hogs" "$(ps axch -o cmd,%cpu | awk '{cmd[$1]+=$2} END {for (i in cmd) print i, cmd[i]}' | sort -nrk2 | head)\\n(100% per core)" ;;
2) setsid -f "$TERMINAL" -e htop ;;
3) notify-send "🖥 CPU module " "\- Shows CPU temperature.
- Click to show intensive processes.
diff --git a/.local/bin/statusbar/sb-doppler b/.local/bin/statusbar/sb-doppler
index a687c68..58f17a4 100755
--- a/.local/bin/statusbar/sb-doppler
+++ b/.local/bin/statusbar/sb-doppler
@@ -182,48 +182,6 @@ US: KVAX: Jacksonville, FL
US: KJGX: Peachtree City/atlanta, GA
US: KVNX: Norman, OK
US: KVBX: Vandenberg Afb: Orcutt, CA
-EU: Europe
-EU: GB: Great Brittain
-EU: SCAN: Scandinavia. Norway, Sweden And Denmark
-EU: ALPS: The Alps
-EU: NL: The Netherlands
-EU: DE: Germany
-EU: SP: Spain
-EU: FR: France
-EU: IT: Italy
-EU: PL: Poland
-EU: GR: Greece
-EU: TU: Turkey
-EU: RU: Russia
-EU: BA: Bahrain
-EU: BC: Botswana
-EU: SE: Republic of Seychelles
-EU: HU: Hungary
-EU: UK: Ukraine
-AF: AF: Africa
-AF: WA: West Africa
-AF: ZA: South Africa
-AF: DZ: Algeria
-AF: CE: Canary Islands
-AF: NG: Nigeria
-AF: TD: Chad
-AF: CG: Democratic Republic of Congo
-AF: EG: Egypt
-AF: ET: Ethiopia
-AF: CM: Cameroon
-AF: IS: Israel
-AF: LY: Libya
-AF: MG: Madagascar
-AF: MO: Morocco
-AF: BW: Namibia
-AF: SA: Saudi Arabia
-AF: SO: Somalia
-AF: SD: Sudan
-AF: TZ: Tanzania
-AF: TN: Tunisia
-AF: ZM: Zambia
-AF: KE: Kenya
-AF: AO: Angola
DE: BAW: Baden-Württemberg
DE: BAY: Bavaria
DE: BBB: Berlin
@@ -239,28 +197,29 @@ DE: SAC: Saxony
DE: SAA: Saxony-Anhalt
DE: SHH: Schleswig-Holstein
DE: SHH: Hamburg
-DE: THU: Thuringia" | dmenu -r -i -l 50 -p "Select a radar to use as default:" | tr "[:lower:]" "[:upper:]")"
+DE: THU: Thuringia
+NL: The Netherlands" | dmenu -r -i -l 50 -p "Select a radar to use as default:")"
# Ensure user did not escape.
[ -z "$chosen" ] && exit 1
-# Set continent code and radar code.
-continentcode=${chosen%%:*}
+# Set country code and radar code.
+countrycode=${chosen%%:*}
radarcode=${chosen#* } radarcode=${radarcode%:*}
# Print codes to $radarloc file.
- printf "%s,%s\\n" "$continentcode" "$radarcode" > "$radarloc" ;}
+ printf "%s,%s\\n" "$countrycode" "$radarcode" > "$radarloc" ;}
getdoppler() {
- cont=$(cut -c -2 "$radarloc")
- loc=$(cut -c 4- "$radarloc")
- notify-send "🌦️ Doppler RADAR" "Pulling most recent Doppler RADAR for $loc."
- case "$cont" in
- "US") curl -sL "https://radar.weather.gov/ridge/standard/${loc}_loop.gif" > "$doppler" ;;
- "EU") curl -sL "https://api.sat24.com/animated/${loc}/rainTMC/2/" > "$doppler" ;;
- "AF") curl -sL "https://api.sat24.com/animated/${loc}/rain/2/" > "$doppler" ;;
- "DE") loc="$(echo "$loc" | tr "[:upper:]" "[:lower:]")"
- curl -sL "https://www.dwd.de/DWD/wetter/radar/radfilm_${loc}_akt.gif" > "$doppler" ;;
+ country=$(cut -c -2 "$radarloc")
+ province=$(cut -c 4- "$radarloc")
+ notify-send "🌦️ Doppler RADAR" "Pulling most recent Doppler RADAR for $province."
+ case "$country" in
+ "US") province="$(echo "$province" | tr "[:lower:]" "[:upper:]")"
+ curl -sL "https://radar.weather.gov/ridge/standard/${province}_loop.gif" > "$doppler" ;;
+ "DE") province="$(echo "$province" | tr "[:upper:]" "[:lower:]")"
+ curl -sL "https://www.dwd.de/DWD/wetter/radar/radfilm_${province}_akt.gif" > "$doppler" ;;
+ "NL") curl -sL "https://cdn.knmi.nl/knmi/map/general/weather-map.gif" > "$doppler" ;;
esac
}
diff --git a/.local/bin/statusbar/sb-memory b/.local/bin/statusbar/sb-memory
index 8178b10..ac0a5bd 100755
--- a/.local/bin/statusbar/sb-memory
+++ b/.local/bin/statusbar/sb-memory
@@ -1,7 +1,7 @@
#!/bin/sh
case $BLOCK_BUTTON in
- 1) notify-send "🧠 Memory hogs" "$(ps axch -o cmd:15,%mem --sort=-%mem | head)" ;;
+ 1) notify-send "🧠 Memory hogs" "$(ps axch -o cmd,%mem | awk '{cmd[$1]+=$2} END {for (i in cmd) print i, cmd[i]}' | sort -nrk2 | head)" ;;
2) setsid -f "$TERMINAL" -e htop ;;
3) notify-send "🧠 Memory module" "\- Shows Memory Used/Total.
- Click to show memory hogs.
diff --git a/.local/bin/sysact b/.local/bin/sysact
index 64c2f32..85488e5 100755
--- a/.local/bin/sysact
+++ b/.local/bin/sysact
@@ -13,8 +13,18 @@ wmpid(){ # This function is needed if there are multiple instances of the window
echo "${tree%%)*}"
}
+lock(){
+ mpc pause
+ pauseallmpv
+ wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle
+ kill -44 $(pidof dwmblocks)
+ slock
+ wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle
+ kill -44 $(pidof dwmblocks)
+}
+
case "$(printf "🔒 lock\n🚪 leave $WM\n♻️ renew $WM\n🐻 hibernate\n🔃 reboot\n🖥️shutdown\n💤 sleep\n📺 display off" | dmenu -i -p 'Action: ')" in
- '🔒 lock') slock ;;
+ '🔒 lock') lock ;;
"🚪 leave $WM") kill -TERM "$(wmpid)" ;;
"♻️ renew $WM") kill -HUP "$(wmpid)" ;;
'🐻 hibernate') slock $ctl hibernate -i ;;