diff options
| -rw-r--r-- | Makefile | 7 | ||||
| -rwxr-xr-x | power | 8 | ||||
| -rw-r--r-- | server_download | 9 | ||||
| -rwxr-xr-x | sxiv-launch | 4 | ||||
| -rwxr-xr-x | web_search | 13 |
5 files changed, 37 insertions, 4 deletions
diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..00337cd --- /dev/null +++ b/Makefile @@ -0,0 +1,7 @@ +all: install + +install: + mkdir -p ~/.local/bin/ + cp * ~/.local/bin + + @@ -9,6 +9,11 @@ tearing() { fi } +kill_program() { + target=$(ps ax | awk '{print $5}' | cut -d "[" -f1 | sed 's/COMMAND//g' | grep . | dmenu -p "Enter program to kill: ") + sudo killall $target +} + jellyfin() { status=$(pidof jellyfin) if [[ -z $status ]]; then @@ -102,13 +107,14 @@ status() { notify-send Status "Redshift: $redstats\nTearFree: $tearing\nMonero: $moneropid\nCompositor: $compstats" } -case "$(printf "compositor\ntearfree\nredshift\nJellyfin\nmonero\nVPN\nstatus\nreboot\nshutdown\n" | dmenu -i -p 'Power: ')" in +case "$(printf "compositor\ntearfree\nredshift\nJellyfin\nmonero\nVPN\nkill\nstatus\nreboot\nshutdown\n" | dmenu -i -p 'Power: ')" in 'tearfree') tearing;; 'redshift') redshift;; 'Jellyfin') jellyfin;; 'compositor') compositor;; 'monero') monero;; 'VPN') vpn;; + 'kill') kill_program;; 'status') status;; 'reboot') sudo reboot;; 'shutdown') sudo shutdown now;; diff --git a/server_download b/server_download new file mode 100644 index 0000000..d901c4d --- /dev/null +++ b/server_download @@ -0,0 +1,9 @@ +#!/bin/sh + +SERVER=$(cat ~/.config/server_download.conf | dmenu -i "Servers: ") +LOC=/ + +lookup() { + file=$(ssh $SERVER ls $LOC | dmenu -p "Files: ") + + diff --git a/sxiv-launch b/sxiv-launch new file mode 100755 index 0000000..928b6c7 --- /dev/null +++ b/sxiv-launch @@ -0,0 +1,4 @@ +#!/bin/bash + +folder=$(find ~ -type d | dmenu -p "Choose a folder: " -l 25) +sxiv $folder/ @@ -2,12 +2,13 @@ BROWSER="firefox" QUERY=$(tac ~/.config/sarc/search.txt | sort -u | dmenu -l 20 -p "Search or enter URL: ") -SEARCH=$(echo $QUERY | sed 's/ /+/g; s/-e//') +SEARCH=$(echo $QUERY | sed 's/ /+/g; s/-e//; s/\:g//g') open_search() { - URL="duckduckgo.com/?q=$SEARCH" + if [[ $URL == "null" ]]; then + URL="duckduckgo.com/?q=$SEARCH" + fi CMD="$BROWSER $URL" - $CMD } @@ -23,6 +24,12 @@ save_query() { } case $SEARCH in + + *:g) + save_query + URL="https://google.com/search?q=" + open_url + ;; *.com) save_query open_url |