summaryrefslogtreecommitdiff
path: root/.scripts
diff options
context:
space:
mode:
Diffstat (limited to '.scripts')
-rwxr-xr-x.scripts/pdfconv3
-rwxr-xr-x.scripts/pidkillall10
-rwxr-xr-x.scripts/volumecurr10
3 files changed, 23 insertions, 0 deletions
diff --git a/.scripts/pdfconv b/.scripts/pdfconv
new file mode 100755
index 0000000..5a723d7
--- /dev/null
+++ b/.scripts/pdfconv
@@ -0,0 +1,3 @@
+#!/bin/sh
+find . -type f -iname "*.*" -exec soffice --headless --convert-to pdf {} + &&
+pdfunite *.pdf output.pdf
diff --git a/.scripts/pidkillall b/.scripts/pidkillall
new file mode 100755
index 0000000..f4c0e6c
--- /dev/null
+++ b/.scripts/pidkillall
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+psout=$(ps -u $USER -o pid,%cpu,%mem,comm | sed -n '1!p' | sort -b -k2 -r| cut --characters=1-18 --complement | awk '!x[$0]++'| dmenu -i -l 15 )
+##uniq without piping into sort before with the help of awk
+
+##pname of telegram-desktop is displayed as telegram-deskto
+[ "$psout" == telegram-deskto ] && psout=telegram-desktop
+
+killall $psout 2>/dev/null &&
+[ -n "$psout" ] && dunstify "Terminated all processes Successfully" "$psout was killed" -i skull
diff --git a/.scripts/volumecurr b/.scripts/volumecurr
new file mode 100755
index 0000000..7b08cab
--- /dev/null
+++ b/.scripts/volumecurr
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+volume="$(wpctl get-volume @DEFAULT_SINK@)"
+volume=${volume#Volume: *}
+
+case "$volume"
+ in (*MUTED*) volume=0;;
+esac
+
+printf "%0.0f%%\n" "${volume%% *}e+2"