summaryrefslogtreecommitdiffstats
path: root/.local/bin
diff options
context:
space:
mode:
Diffstat (limited to '.local/bin')
-rwxr-xr-x.local/bin/compiler83
-rwxr-xr-x.local/bin/displayselect6
-rwxr-xr-x.local/bin/dmenurecord2
-rwxr-xr-x.local/bin/getcomproot9
-rwxr-xr-x.local/bin/lfub2
-rwxr-xr-x.local/bin/maimpick2
-rwxr-xr-x.local/bin/shortcuts5
-rwxr-xr-x.local/bin/statusbar/sb-battery2
-rwxr-xr-x.local/bin/statusbar/sb-clock4
-rwxr-xr-x.local/bin/statusbar/sb-cpu2
-rwxr-xr-x.local/bin/statusbar/sb-cpubars2
-rwxr-xr-x.local/bin/statusbar/sb-disk2
-rwxr-xr-x.local/bin/statusbar/sb-doppler2
-rwxr-xr-x.local/bin/statusbar/sb-forecast2
-rwxr-xr-x.local/bin/statusbar/sb-help-icon2
-rwxr-xr-x.local/bin/statusbar/sb-internet2
-rwxr-xr-x.local/bin/statusbar/sb-kbselect2
-rwxr-xr-x.local/bin/statusbar/sb-mailbox2
-rwxr-xr-x.local/bin/statusbar/sb-memory2
-rwxr-xr-x.local/bin/statusbar/sb-moonphase2
-rwxr-xr-x.local/bin/statusbar/sb-music4
-rwxr-xr-x.local/bin/statusbar/sb-nettraf2
-rwxr-xr-x.local/bin/statusbar/sb-news4
-rwxr-xr-x.local/bin/statusbar/sb-pacpackages2
-rwxr-xr-x.local/bin/statusbar/sb-price2
-rwxr-xr-x.local/bin/statusbar/sb-tasks2
-rwxr-xr-x.local/bin/statusbar/sb-torrent2
-rwxr-xr-x.local/bin/statusbar/sb-volume2
28 files changed, 72 insertions, 85 deletions
diff --git a/.local/bin/compiler b/.local/bin/compiler
index 8420e25..5713590 100755
--- a/.local/bin/compiler
+++ b/.local/bin/compiler
@@ -2,58 +2,51 @@
# This script will compile or run another finishing operation on a document. I
# have this script run via vim.
-#
+
# Compiles .tex. groff (.mom, .ms), .rmd, .md, .org. Opens .sent files as sent
# presentations. Runs scripts based on extension or shebang.
-#
+
# Note that .tex files which you wish to compile with XeLaTeX should have the
# string "xelatex" somewhere in a comment/command in the first 5 lines.
-file=$(readlink -f "$1")
+file="${1}"
+ext="${file##*.}"
dir=${file%/*}
base="${file%.*}"
-ext="${file##*.}"
-
-cd "$dir" || exit 1
-textype() { \
- textarget="$(getcomproot "$file" || echo "$file")"
- echo "$textarget"
- command="pdflatex"
- ( head -n5 "$textarget" | grep -qi 'xelatex' ) && command="xelatex"
- $command --output-directory="${textarget%/*}" "${textarget%.*}"
- grep -qi addbibresource "$textarget" &&
- biber --input-directory "${textarget%/*}" "${textarget%.*}" &&
- $command --output-directory="${textarget%/*}" "${textarget%.*}" &&
- $command --output-directory="${textarget%/*}" "${textarget%.*}"
-}
+cd "${dir}" || exit "1"
-case "$ext" in
- # Try to keep these cases in alphabetical order.
- [0-9]) preconv "$file" | refer -PS -e | groff -mandoc -T pdf > "$base".pdf ;;
- c) cc "$file" -o "$base" && "$base" ;;
- cpp) g++ "$file" -o "$base" && "$base" ;;
- cs) mcs "$file" && mono "$base".exe ;;
- go) go run "$file" ;;
- h) sudo make install ;;
- java) javac -d classes "$file" && java -cp classes "${1%.*}" ;;
- m) octave "$file" ;;
- md) if [ -x "$(command -v lowdown)" ]; then
- lowdown --parse-no-intraemph "$file" -Tms | groff -mpdfmark -ms -kept -T pdf > "$base".pdf
- elif [ -x "$(command -v groffdown)" ]; then
- groffdown -i "$file" | groff -T pdf > "$base".pdf
- else
- pandoc -t ms --highlight-style=kate -s -o "$base".pdf "$file"
- fi ; ;;
- mom) preconv "$file" | refer -PS -e | groff -mom -kept -T pdf > "$base".pdf ;;
- ms) preconv "$file" | refer -PS -e | groff -me -ms -kept -T pdf > "$base".pdf ;;
- org) emacs "$file" --batch -u "$USER" -f org-latex-export-to-pdf ;;
- py) python "$file" ;;
- [rR]md) Rscript -e "rmarkdown::render('$file', quiet=TRUE)" ;;
- rs) cargo build ;;
- sass) sassc -a "$file" "$base".css ;;
- scad) openscad -o "$base".stl "$file" ;;
- sent) setsid -f sent "$file" 2>/dev/null ;;
- tex) textype "$file" ;;
- *) sed -n '/^#!/s/^#!//p; q' "$file" | xargs -r -I % "$file" ;;
+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}" ;;
+ cpp) g++ "${file}" -o "${base}" && "./${base}" ;;
+ cs) mcs "${file}" && mono "${base}.exe" ;;
+ go) go run "${file}" ;;
+ h) sudo make install ;;
+ java) javac -d classes "${file}" && java -cp classes "${base}" ;;
+ m) octave "${file}" ;;
+ md) [ -x "$(command -v lowdown)" ] && \
+ lowdown --parse-no-intraemph "${file}" -Tms | groff -mpdfmark -ms -kept -T pdf > "${base}.pdf" || \
+ [ -x "$(command -v groffdown)" ] && \
+ groffdown -i "${file}" | groff -T pdf > "${base}.pdf" || \
+ 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}" ;;
+ [rR]md) Rscript -e "rmarkdown::render('${file}', quiet=TRUE)" ;;
+ rs) cargo build ;;
+ sass) sassc -a "${file}" "${base}.css" ;;
+ scad) openscad -o "${base}.stl" "${file}" ;;
+ sent) setsid -f sent "${file}" 2> "/dev/null" ;;
+ tex)
+ textarget="$(getcomproot "${file}" || echo "${file}")"
+ command="pdflatex"
+ head -n5 "${textarget}" | grep -qi "xelatex" && command="xelatex"
+ ${command} --output-directory="${textarget%/*}" "${textarget%.*}" &&
+ grep -qi addbibresource "${textarget}" &&
+ biber --input-directory "${textarget%/*}" "${textarget%.*}" &&
+ ${command} --output-directory="${textarget%/*}" "${textarget%.*}" &&
+ ${command} --output-directory="${textarget%/*}" "${textarget%.*}"
+ ;;
+ *) sed -n '/^#!/s/^#!//p; q' "${file}" | xargs -r -I % "${file}" ;;
esac
diff --git a/.local/bin/displayselect b/.local/bin/displayselect
index 0227a32..51dd468 100755
--- a/.local/bin/displayselect
+++ b/.local/bin/displayselect
@@ -32,7 +32,7 @@ twoscreen() { # If multi-monitor is selected and there are two screens.
else
primary=$(echo "$screens" | dmenu -i -p "Select primary display:")
- secondary=$(echo "$screens" | grep -v "$primary")
+ secondary=$(echo "$screens" | grep -v ^"$primary"$)
direction=$(printf "left\\nright" | dmenu -i -p "What side of $primary should $secondary be on?")
xrandr --output "$primary" --auto --scale 1.0x1.0 --output "$secondary" --"$direction"-of "$primary" --auto --scale 1.0x1.0
fi
@@ -40,9 +40,9 @@ twoscreen() { # If multi-monitor is selected and there are two screens.
morescreen() { # If multi-monitor is selected and there are more than two screens.
primary=$(echo "$screens" | dmenu -i -p "Select primary display:")
- secondary=$(echo "$screens" | grep -v "$primary" | dmenu -i -p "Select secondary display:")
+ secondary=$(echo "$screens" | grep -v ^"$primary"$ | dmenu -i -p "Select secondary display:")
direction=$(printf "left\\nright" | dmenu -i -p "What side of $primary should $secondary be on?")
- tertiary=$(echo "$screens" | grep -v "$primary" | grep -v "$secondary" | dmenu -i -p "Select third display:")
+ tertiary=$(echo "$screens" | grep -v ^"$primary"$ | grep -v ^"$secondary"$ | dmenu -i -p "Select third display:")
xrandr --output "$primary" --auto --output "$secondary" --"$direction"-of "$primary" --auto --output "$tertiary" --"$(printf "left\\nright" | grep -v "$direction")"-of "$primary" --auto
}
diff --git a/.local/bin/dmenurecord b/.local/bin/dmenurecord
index 990b7b3..ca6b011 100755
--- a/.local/bin/dmenurecord
+++ b/.local/bin/dmenurecord
@@ -9,7 +9,7 @@
#
# If there is already a running instance, user will be prompted to end it.
-getdim() { xrandr | sed -n "s/\s*\([0-9]\+x[0-9]\+\).*\*.*/\1/p" ;}
+getdim() { xrandr | grep -oP '(?<=current ).*(?=,)' | tr -d ' ' ;}
updateicon() { \
echo "$1" > /tmp/recordingicon
diff --git a/.local/bin/getcomproot b/.local/bin/getcomproot
index d34a2e4..dbee348 100755
--- a/.local/bin/getcomproot
+++ b/.local/bin/getcomproot
@@ -1,12 +1,9 @@
-#!/bin/bash
+#!/bin/sh
# A helper script for LaTeX/groff files used by `compiler` and `opout`.
# The user can add the root file of a larger project as a comment as below:
# % root = mainfile.tex
# And the compiler script will run on that instead of the opened file.
-texroot="$(grep -i "^.\+\s*root\s*=\s*\S\+" "$1")"
-texroot="${texroot##*=}"
-texroot="${texroot//[\"\' ]}"
-
-[ -f "$texroot" ] && readlink -f "$texroot" || exit 1
+texroot="$(sed -n 's/^\s*%.*root\s*=\s*\(\S\+\).*/\1/p' "${1}")"
+[ -f "${texroot}" ] && readlink -f "${texroot}" || exit "1"
diff --git a/.local/bin/lfub b/.local/bin/lfub
index 9012f50..f9bb2df 100755
--- a/.local/bin/lfub
+++ b/.local/bin/lfub
@@ -1,6 +1,6 @@
#!/bin/sh
-# This is a wrapper script for lb that allows it to create image previews with
+# This is a wrapper script for lf that allows it to create image previews with
# ueberzug. This works in concert with the lf configuration file and the
# lf-cleaner script.
diff --git a/.local/bin/maimpick b/.local/bin/maimpick
index 5de26c1..7717501 100755
--- a/.local/bin/maimpick
+++ b/.local/bin/maimpick
@@ -10,7 +10,7 @@ xclip_cmd="xclip -sel clip -t image/png"
case "$(printf "a selected area\\ncurrent window\\nfull screen\\na selected area (copy)\\ncurrent window (copy)\\nfull screen (copy)" | dmenu -l 6 -i -p "Screenshot which area?")" in
"a selected area") maim -u -s pic-selected-"${output}" ;;
- "current window") maim -q -d 0.2 -i "$(xdotool getactivewindow)" pic-window-"${output}" ;;
+ "current window") maim -B -q -d 0.2 -i "$(xdotool getactivewindow)" pic-window-"${output}" ;;
"full screen") maim -q -d 0.2 pic-full-"${output}" ;;
"a selected area (copy)") maim -u -s | ${xclip_cmd} ;;
"current window (copy)") maim -q -d 0.2 -i "$(xdotool getactivewindow)" | ${xclip_cmd} ;;
diff --git a/.local/bin/shortcuts b/.local/bin/shortcuts
index 7d7a190..0c7cf75 100755
--- a/.local/bin/shortcuts
+++ b/.local/bin/shortcuts
@@ -8,13 +8,12 @@ shell_shortcuts="${XDG_CONFIG_HOME:-$HOME/.config}/shell/shortcutrc"
zsh_named_dirs="${XDG_CONFIG_HOME:-$HOME/.config}/shell/zshnameddirrc"
lf_shortcuts="${XDG_CONFIG_HOME:-$HOME/.config}/lf/shortcutrc"
vim_shortcuts="${XDG_CONFIG_HOME:-$HOME/.config}/nvim/shortcuts.vim"
-ranger_shortcuts="/dev/null"
qute_shortcuts="/dev/null"
fish_shortcuts="/dev/null"
vifm_shortcuts="/dev/null"
# Remove, prepare files
-rm -f "$lf_shortcuts" "$ranger_shortcuts" "$qute_shortcuts" "$zsh_named_dirs" "$vim_shortcuts" 2>/dev/null
+rm -f "$lf_shortcuts" "$qute_shortcuts" "$zsh_named_dirs" "$vim_shortcuts" 2>/dev/null
printf "# vim: filetype=sh\\n" > "$fish_shortcuts"
printf "# vim: filetype=sh\\nalias " > "$shell_shortcuts"
printf "\" vim: filetype=vim\\n" > "$vifm_shortcuts"
@@ -27,7 +26,6 @@ awk "!/^\s*#/ && !/^\s*\$/ {gsub(\"\\\s*#.*$\",\"\");
printf(\"abbr %s \42cd %s; and ls -A\42\n\",\$1,\$2) >> \"$fish_shortcuts\" ;
printf(\"map g%s :cd %s<CR>\nmap t%s <tab>:cd %s<CR><tab>\nmap M%s <tab>:cd %s<CR><tab>:mo<CR>\nmap Y%s <tab>:cd %s<CR><tab>:co<CR> \n\",\$1,\$2, \$1, \$2, \$1, \$2, \$1, \$2) >> \"$vifm_shortcuts\" ;
printf(\"config.bind(';%s', \42set downloads.location.directory %s ;; hint links download\42) \n\",\$1,\$2) >> \"$qute_shortcuts\" ;
- printf(\"map g%s cd %s\nmap t%s tab_new %s\nmap m%s shell mv -v %%s %s\nmap Y%s shell cp -rv %%s %s \n\",\$1,\$2,\$1,\$2, \$1, \$2, \$1, \$2) >> \"$ranger_shortcuts\" ;
printf(\"map C%s cd \42%s\42 \n\",\$1,\$2) >> \"$lf_shortcuts\" ;
printf(\"cmap ;%s %s\n\",\$1,\$2) >> \"$vim_shortcuts\" }"
@@ -38,6 +36,5 @@ awk "!/^\s*#/ && !/^\s*\$/ {gsub(\"\\\s*#.*$\",\"\");
printf(\"hash -d %s=%s \n\",\$1,\$2) >> \"$zsh_named_dirs\" ;
printf(\"abbr %s \42\$EDITOR %s\42 \n\",\$1,\$2) >> \"$fish_shortcuts\" ;
printf(\"map %s :e %s<CR> \n\",\$1,\$2) >> \"$vifm_shortcuts\" ;
- printf(\"map %s shell \$EDITOR %s \n\",\$1,\$2) >> \"$ranger_shortcuts\" ;
printf(\"map E%s \$\$EDITOR \42%s\42 \n\",\$1,\$2) >> \"$lf_shortcuts\" ;
printf(\"cmap ;%s %s\n\",\$1,\$2) >> \"$vim_shortcuts\" }"
diff --git a/.local/bin/statusbar/sb-battery b/.local/bin/statusbar/sb-battery
index 93cbe08..79030bc 100755
--- a/.local/bin/statusbar/sb-battery
+++ b/.local/bin/statusbar/sb-battery
@@ -13,7 +13,7 @@ case $BLOCK_BUTTON in
- Scroll to change adjust xbacklight." ;;
4) xbacklight -inc 10 ;;
5) xbacklight -dec 10 ;;
- 6) "$TERMINAL" -e "$EDITOR" "$0" ;;
+ 6) setsid -f "$TERMINAL" -e "$EDITOR" "$0" ;;
esac
# Loop through all attached batteries and format the info
diff --git a/.local/bin/statusbar/sb-clock b/.local/bin/statusbar/sb-clock
index 93f8aea..85f1d34 100755
--- a/.local/bin/statusbar/sb-clock
+++ b/.local/bin/statusbar/sb-clock
@@ -19,11 +19,11 @@ case "$clock" in
esac
case $BLOCK_BUTTON in
- 1) notify-send "This Month" "$(cal | sed "s/\<$(date +'%e')\>/<b><span color='red'>&<\/span><\/b>/")" && notify-send "Appointments" "$(calcurse -d3)" ;;
+ 1) notify-send "This Month" "$(cal | sed "s/\<$(date +'%e'|sed 's/ //g')\>/<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" ;;
- 6) "$TERMINAL" -e "$EDITOR" "$0" ;;
+ 6) setsid -f "$TERMINAL" -e "$EDITOR" "$0" ;;
esac
date "+%Y %b %d (%a) $icon%I:%M%p"
diff --git a/.local/bin/statusbar/sb-cpu b/.local/bin/statusbar/sb-cpu
index 1572b52..5b8fb93 100755
--- a/.local/bin/statusbar/sb-cpu
+++ b/.local/bin/statusbar/sb-cpu
@@ -6,7 +6,7 @@ case $BLOCK_BUTTON in
3) notify-send "πŸ–₯ CPU module " "\- Shows CPU temperature.
- Click to show intensive processes.
- Middle click to open htop." ;;
- 6) "$TERMINAL" -e "$EDITOR" "$0" ;;
+ 6) setsid -f "$TERMINAL" -e "$EDITOR" "$0" ;;
esac
sensors | awk '/Core 0/ {print "🌑" $3}'
diff --git a/.local/bin/statusbar/sb-cpubars b/.local/bin/statusbar/sb-cpubars
index 297424e..4015893 100755
--- a/.local/bin/statusbar/sb-cpubars
+++ b/.local/bin/statusbar/sb-cpubars
@@ -12,7 +12,7 @@ case $BLOCK_BUTTON in
2) setsid -f "$TERMINAL" -e htop ;;
3) notify-send "πŸͺ¨ CPU load module" "Each bar represents
one CPU core";;
- 6) "$TERMINAL" -e "$EDITOR" "$0" ;;
+ 6) setsid -f "$TERMINAL" -e "$EDITOR" "$0" ;;
esac
# id total idle
diff --git a/.local/bin/statusbar/sb-disk b/.local/bin/statusbar/sb-disk
index e947509..7f3ff79 100755
--- a/.local/bin/statusbar/sb-disk
+++ b/.local/bin/statusbar/sb-disk
@@ -11,7 +11,7 @@ case $BLOCK_BUTTON in
1) notify-send "πŸ’½ Disk space" "$(df -h --output=target,used,size)" ;;
3) notify-send "πŸ’½ Disk module" "\- Shows used hard drive space.
- Click to show all disk info." ;;
- 6) "$TERMINAL" -e "$EDITOR" "$0" ;;
+ 6) setsid -f "$TERMINAL" -e "$EDITOR" "$0" ;;
esac
case "$location" in
diff --git a/.local/bin/statusbar/sb-doppler b/.local/bin/statusbar/sb-doppler
index f58b744..a687c68 100755
--- a/.local/bin/statusbar/sb-doppler
+++ b/.local/bin/statusbar/sb-doppler
@@ -274,7 +274,7 @@ case $BLOCK_BUTTON in
3) notify-send "πŸ—ΊοΈ Doppler RADAR module" "\- Left click for local Doppler RADAR.
- Middle click to update RADAR location.
After $secs seconds, new clicks will also automatically update the doppler RADAR." ;;
- 6) "$TERMINAL" -e "$EDITOR" "$0" ;;
+ 6) setsid -f "$TERMINAL" -e "$EDITOR" "$0" ;;
esac
echo πŸŒ…
diff --git a/.local/bin/statusbar/sb-forecast b/.local/bin/statusbar/sb-forecast
index d8a16aa..5225601 100755
--- a/.local/bin/statusbar/sb-forecast
+++ b/.local/bin/statusbar/sb-forecast
@@ -45,7 +45,7 @@ case $BLOCK_BUTTON in
β˜”: Chance of rain/snow
πŸ₯Ά: Daily low
🌞: Daily high" ;;
- 6) "$TERMINAL" -e "$EDITOR" "$0" ;;
+ 6) setsid -f "$TERMINAL" -e "$EDITOR" "$0" ;;
esac
checkforecast || getforecast
diff --git a/.local/bin/statusbar/sb-help-icon b/.local/bin/statusbar/sb-help-icon
index 8fa4a52..8372e6f 100755
--- a/.local/bin/statusbar/sb-help-icon
+++ b/.local/bin/statusbar/sb-help-icon
@@ -13,5 +13,5 @@ case $BLOCK_BUTTON in
2) restartwm ;;
3) notify-send "❓ Help module" "\- Left click to open LARBS guide.
- Middle click to refresh window manager." ;;
- 6) "$TERMINAL" -e "$EDITOR" "$0" ;;
+ 6) setsid -f "$TERMINAL" -e "$EDITOR" "$0" ;;
esac; echo "❓"
diff --git a/.local/bin/statusbar/sb-internet b/.local/bin/statusbar/sb-internet
index 5440a52..6d0c513 100755
--- a/.local/bin/statusbar/sb-internet
+++ b/.local/bin/statusbar/sb-internet
@@ -14,7 +14,7 @@ case $BLOCK_BUTTON in
🌐: ethernet working
πŸ”’: vpn is active
" ;;
- 6) "$TERMINAL" -e "$EDITOR" "$0" ;;
+ 6) setsid -f "$TERMINAL" -e "$EDITOR" "$0" ;;
esac
# Wifi
diff --git a/.local/bin/statusbar/sb-kbselect b/.local/bin/statusbar/sb-kbselect
index ab2140c..df455c1 100755
--- a/.local/bin/statusbar/sb-kbselect
+++ b/.local/bin/statusbar/sb-kbselect
@@ -11,7 +11,7 @@ case $BLOCK_BUTTON in
pkill -RTMIN+30 "${STATUSBAR:-dwmblocks}";;
3) notify-send "⌨ Keyboard/language module" "$(printf "%s" "\- Current layout: $(setxkbmap -query | grep -oP 'layout:\s*\K\w+')")
- Left click to change keyboard.";;
- 6) "$TERMINAL" -e "$EDITOR" "$0" ;;
+ 6) setsid -f "$TERMINAL" -e "$EDITOR" "$0" ;;
esac
echo "$kb"
diff --git a/.local/bin/statusbar/sb-mailbox b/.local/bin/statusbar/sb-mailbox
index 88522f2..7483aa4 100755
--- a/.local/bin/statusbar/sb-mailbox
+++ b/.local/bin/statusbar/sb-mailbox
@@ -10,7 +10,7 @@ case $BLOCK_BUTTON in
- Shows πŸ”ƒ if syncing mail
- Left click opens neomutt
- Middle click syncs mail" ;;
- 6) "$TERMINAL" -e "$EDITOR" "$0" ;;
+ 6) 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)"
diff --git a/.local/bin/statusbar/sb-memory b/.local/bin/statusbar/sb-memory
index 01d3daf..8178b10 100755
--- a/.local/bin/statusbar/sb-memory
+++ b/.local/bin/statusbar/sb-memory
@@ -6,7 +6,7 @@ case $BLOCK_BUTTON in
3) notify-send "🧠 Memory module" "\- Shows Memory Used/Total.
- Click to show memory hogs.
- Middle click to open htop." ;;
- 6) "$TERMINAL" -e "$EDITOR" "$0" ;;
+ 6) setsid -f "$TERMINAL" -e "$EDITOR" "$0" ;;
esac
free --mebi | sed -n '2{p;q}' | awk '{printf ("🧠%2.2fGiB/%2.2fGiB\n", ( $3 / 1024), ($2 / 1024))}'
diff --git a/.local/bin/statusbar/sb-moonphase b/.local/bin/statusbar/sb-moonphase
index 99adaee..d496ae2 100755
--- a/.local/bin/statusbar/sb-moonphase
+++ b/.local/bin/statusbar/sb-moonphase
@@ -33,5 +33,5 @@ case $BLOCK_BUTTON in
- πŸŒ–: Waning Gibbous
- πŸŒ—: Last Quarter
- 🌘: Waning Crescent" ;;
- 6) "$TERMINAL" -e "$EDITOR" "$0" ;;
+ 6) setsid -f "$TERMINAL" -e "$EDITOR" "$0" ;;
esac
diff --git a/.local/bin/statusbar/sb-music b/.local/bin/statusbar/sb-music
index d164b4b..6734eeb 100755
--- a/.local/bin/statusbar/sb-music
+++ b/.local/bin/statusbar/sb-music
@@ -1,6 +1,6 @@
#!/bin/sh
-filter() { sed "/^volume:/d;s/\\&/&amp;/g;s/\\[paused\\].*/⏸/g;/\\[playing\\].*/d;/^ERROR/Q" | paste -sd ' ' -;}
+filter() { sed "/^volume:/d;s/\\[paused\\].*/⏸/g;/\\[playing\\].*/d;/^ERROR/Q" | paste -sd ' ' -;}
pidof -x sb-mpdup >/dev/null 2>&1 || sb-mpdup >/dev/null 2>&1 &
@@ -14,6 +14,6 @@ case $BLOCK_BUTTON in
- Scroll changes track.";; # right click, pause/unpause
4) mpc prev | filter ;; # scroll up, previous
5) mpc next | filter ;; # scroll down, next
- 6) mpc status | filter ; "$TERMINAL" -e "$EDITOR" "$0" ;;
+ 6) mpc status | filter ; setsid -f "$TERMINAL" -e "$EDITOR" "$0" ;;
*) mpc status | filter ;;
esac
diff --git a/.local/bin/statusbar/sb-nettraf b/.local/bin/statusbar/sb-nettraf
index 178f677..08cb829 100755
--- a/.local/bin/statusbar/sb-nettraf
+++ b/.local/bin/statusbar/sb-nettraf
@@ -8,7 +8,7 @@ case $BLOCK_BUTTON in
1) setsid -f "$TERMINAL" -e bmon ;;
3) notify-send "🌐 Network traffic module" "πŸ”»: Traffic received
πŸ”Ί: Traffic transmitted" ;;
- 6) "$TERMINAL" -e "$EDITOR" "$0" ;;
+ 6) setsid -f "$TERMINAL" -e "$EDITOR" "$0" ;;
esac
update() {
diff --git a/.local/bin/statusbar/sb-news b/.local/bin/statusbar/sb-news
index fe701db..cc481e1 100755
--- a/.local/bin/statusbar/sb-news
+++ b/.local/bin/statusbar/sb-news
@@ -5,13 +5,13 @@
case $BLOCK_BUTTON in
1) setsid "$TERMINAL" -e newsboat ;;
- 2) setsid -f newsup >/dev/null exit ;;
+ 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." ;;
- 6) "$TERMINAL" -e "$EDITOR" "$0" ;;
+ 6) 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)"
diff --git a/.local/bin/statusbar/sb-pacpackages b/.local/bin/statusbar/sb-pacpackages
index 37ebed3..6acdce6 100755
--- a/.local/bin/statusbar/sb-pacpackages
+++ b/.local/bin/statusbar/sb-pacpackages
@@ -23,7 +23,7 @@ case $BLOCK_BUTTON in
3) notify-send "🎁 Upgrade module" "πŸ“¦: number of upgradable packages
- Left click to upgrade packages
- Middle click to show upgradable packages" ;;
- 6) "$TERMINAL" -e "$EDITOR" "$0" ;;
+ 6) setsid -f "$TERMINAL" -e "$EDITOR" "$0" ;;
esac
pacman -Qu | grep -Fcv "[ignored]" | sed "s/^/πŸ“¦/;s/^πŸ“¦0$//g"
diff --git a/.local/bin/statusbar/sb-price b/.local/bin/statusbar/sb-price
index f95c815..611ec36 100755
--- a/.local/bin/statusbar/sb-price
+++ b/.local/bin/statusbar/sb-price
@@ -44,7 +44,7 @@ case $BLOCK_BUTTON in
- Shows πŸ”ƒ if updating prices.
- <b>Last updated:
$uptime</b>" ;;
- 6) "$TERMINAL" -e "$EDITOR" "$0" ;;
+ 6) setsid -f "$TERMINAL" -e "$EDITOR" "$0" ;;
esac
[ -n "$updateme" ] &&
diff --git a/.local/bin/statusbar/sb-tasks b/.local/bin/statusbar/sb-tasks
index 586300e..4beb2d0 100755
--- a/.local/bin/statusbar/sb-tasks
+++ b/.local/bin/statusbar/sb-tasks
@@ -13,7 +13,7 @@ case $BLOCK_BUTTON in
1) setsid -f "$TERMINAL" -e tsp -l ;;
3) notify-send "Tasks module" "πŸ€–: number of running/queued background tasks
- Left click opens tsp" ;; # Right click
- 2) $EDITOR "$0" ;; # Middle click
+ 6) setsid -f "$TERMINAL" -e "$EDITOR" "$0" ;;
esac
[ "$num" != "0(0)" ] &&
diff --git a/.local/bin/statusbar/sb-torrent b/.local/bin/statusbar/sb-torrent
index 08c9173..493631b 100755
--- a/.local/bin/statusbar/sb-torrent
+++ b/.local/bin/statusbar/sb-torrent
@@ -23,5 +23,5 @@ Module shows number of torrents:
πŸ”½: downloading
βœ…: done
🌱: done and seeding" ;;
- 6) "$TERMINAL" -e "$EDITOR" "$0" ;;
+ 6) setsid -f "$TERMINAL" -e "$EDITOR" "$0" ;;
esac
diff --git a/.local/bin/statusbar/sb-volume b/.local/bin/statusbar/sb-volume
index fa0abcd..e66dea7 100755
--- a/.local/bin/statusbar/sb-volume
+++ b/.local/bin/statusbar/sb-volume
@@ -10,7 +10,7 @@ case $BLOCK_BUTTON in
3) notify-send "πŸ“’ Volume module" "\- Shows volume πŸ”Š, πŸ”‡ if muted.
- Middle click to mute.
- Scroll to change." ;;
- 6) "$TERMINAL" -e "$EDITOR" "$0" ;;
+ 6) setsid -f "$TERMINAL" -e "$EDITOR" "$0" ;;
esac
vol="$(wpctl get-volume @DEFAULT_AUDIO_SINK@)"