diff --git a/app-launch b/app-launch deleted file mode 100755 index d534677..0000000 --- a/app-launch +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh - -app=$(printf "Notes\nFiles\nEditor\nTerminal\nMultiplexer\nLBRY\nChat\nMusic\nProcesses" | dmenu -i -p "Launcher") - -case $app in - Notes) app-notes;; - Files) app-nnn;; - Editor) st -e vim;; - Terminal) st;; - Multiplexer) app-tmux;; - LBRY) lbry;; - Chat) element-desktop;; - Music) st -e ncmpcpp;; - Browser) brave-browser;; - Processes) st -e htop;; -esac diff --git a/app-nnn b/app-nnn deleted file mode 100755 index 0cc91f0..0000000 --- a/app-nnn +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh - -st -e nnn diff --git a/app-notes b/app-notes deleted file mode 100755 index 44eaf3b..0000000 --- a/app-notes +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -st -e vim "+cd ~/Notes/text" "+CtrlP" diff --git a/app-tmux b/app-tmux deleted file mode 100755 index c0d93b9..0000000 --- a/app-tmux +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -st -e tmux $* diff --git a/app-vim b/app-vim deleted file mode 100755 index 06e1e15..0000000 --- a/app-vim +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -st -e vim "$*" diff --git a/do-action b/do-action deleted file mode 100755 index ea5f815..0000000 --- a/do-action +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/sh - -action=$(printf "Play Music\nPause Music\nToggle Music\nSelect VPN\nDisable VPN\nRebind keys" | - dmenu -i -p "Actions") - -case $action in - 'Play Music') mpc play ;; - 'Pause Music') mpc pause ;; - 'Toggle Music') mpc toggle ;; - 'Rebind keys') setup-xbindkeys;; -esac diff --git a/dwm-start b/dwm-start index a1136b0..f45ff7f 100755 --- a/dwm-start +++ b/dwm-start @@ -2,6 +2,7 @@ setxkbmap -option caps:swapescape picom -b ~/.fehbg +xbindkeys -f $HOME/Backups/configs/xbindkeysrc # relaunch DWM if the binary changes, otherwise bail csum=$(sha1sum $(which dwm.winkey)) @@ -12,12 +13,7 @@ do then csum=$new_csum dwm-statusbar & - pid=$! - pulseaudio -k - dwm.winkey & - pid="$pid $!" - xbindkeys -f $HOME/Backups/configs/xbindkeysrc - wait $pid + dwm.winkey else exit 0 fi diff --git a/ewrap b/ewrap index f694ff7..a6eb365 100755 --- a/ewrap +++ b/ewrap @@ -1,8 +1,9 @@ #!/bin/sh +#This is a wrapper script for editing files from nnn. It checks if it nnn is running in tmux then calls the appropriate editor. if ! { [ "$TERM" = "tmux-256color" ] && [ -n "$TMUX" ]; } then # Remove option --tab for new window - app-vim $* + st -e vim $* else # tmux session running vim $* #tmux -u split-window "vim \"$*\"" diff --git a/prompt b/prompt new file mode 100755 index 0000000..9ad36d3 --- /dev/null +++ b/prompt @@ -0,0 +1,83 @@ +#!/bin/sh + +#Finish vpn and networking stuff after ini script is finished, then make sure printf in case goes to stderror which is shown in bar + +launch() { + app=$(printf "Notes +Files +Editor +Terminal +Multiplexer +LBRY +Chat +Music +Browser +Email +Processes" | + dmenu -i -p "Launcher") + +case $app in + Notes) st -e vim "+cd ~/Notes/text" "+CtrlP";; + Files) st -e nnn;; + Editor) st -e vim;; + Terminal) st;; + Multiplexer) st -e tmux $*;; + LBRY) lbry;; + Chat) element-desktop;; + Music) st -e ncmpcpp;; + Browser) brave-browser;; + Email) brave-browser mail.protonmail.com/login;; + Processes) st -e htop;; +esac +} + +action() { + action=$(printf "Play Music +Pause Music +Toggle Music +Select VPN +Disable VPN +Enable VPN +VPN Status +Rebind Keys +Disable Bar +Enable Bar" | + dmenu -i -p "Actions") + +case $action in + 'Play Music') mpc play ;; + 'Pause Music') mpc pause ;; + 'Toggle Music') mpc toggle ;; + 'Rebind Keys') setup-xbindkeys;; + 'Disable Bar') tmux set -g status off;; + 'Enable Bar') tmux set -g status on;; +esac +} + +screenshot() { + method=$(printf "clipboard +file +both" | + dmenu -i -p "Screenshot") + + if test $method = "file"; then + scrot --note "-f 'LiterationSans Nerd Font Book/11' -x 10 -y 20 -c 255,0,0,255 -t 'Hi'"\ + -s ~/Pictures/screenshots/screenshot-%Y-%m-%d_$wx$h.png + fi +} + if test $method = "clipboard"; then + scrot --note "-f 'LiterationSans Nerd Font Book/11' -x 10 -y 20 -c 255,0,0,255 -t 'Hi'"\ + -s ~/Pictures/screenshots/screenshot-%Y-%m-%d_$wx$h.png\ + -e "xclip $f; rm $f" + fi + + if test $method = "both"; then + scrot --note "-f 'LiterationSans Nerd Font Book/11' -x 10 -y 20 -c 255,0,0,255 -t 'Hi'"\ + -s ~/Pictures/screenshots/screenshot-%Y-%m-%d_$wx$h.png\ + -e "xclip $f;" + fi +case $1 in + launch) launch;; + action) action;; + *) printf "Invalid argument";; +esac