summaryrefslogtreecommitdiff
path: root/mksh/mkshfunc
diff options
context:
space:
mode:
authorzachir <zachir@librem.one>2022-10-05 22:00:32 -0500
committerzachir <zachir@librem.one>2022-10-05 22:00:32 -0500
commitf39d735e2ba625a31a7dbf6fb8bdd62501379ad1 (patch)
treed17c96714c930e0b8bc75616cc9c81b961ed5aa0 /mksh/mkshfunc
Initial Commit
Diffstat (limited to 'mksh/mkshfunc')
-rw-r--r--mksh/mkshfunc58
1 files changed, 58 insertions, 0 deletions
diff --git a/mksh/mkshfunc b/mksh/mkshfunc
new file mode 100644
index 0000000..adb6a91
--- /dev/null
+++ b/mksh/mkshfunc
@@ -0,0 +1,58 @@
+#!/bin/mksh
+catclip () {
+ cat "$@" | xclip -selection clipboard
+}
+
+catpass () {
+ PASSWD=$(cat ~/pass.txt); echo "$PASSWD\n$PASSWD" | pass insert "$1"; unset PASSWD
+}
+
+sigdwmblocks () {
+ pkill -RTMIN+$(grep "$1" ~/git/dwmblocks/config.h | awk '{print $4}' | cut -d'}' -f1) dwmblocks
+}
+
+mkcd () {
+ mkdir $@ && cd $1
+}
+
+sc () {
+ if [ "$1" = "" ]; then
+ cd $HOME
+ else
+ case "$1" in
+ "-l") echo "
+a - ~/.config/awesome
+cpr- ~/.config/primrose
+db - ~/git/dwmbar
+dwm- ~/suckless/dwm
+g - ~/git
+pr - ~/git/primrose
+s - ~/.local/scripts
+slo- ~/suckless/slock
+st - ~/suckless/st
+tfd- ~/Documents/fllixel/TheFiniteDemo
+tst- !tabbed -c st -w
+v - ~/.vst
+vsv- ~/.local/volsv
+z - ~/.config/zsh
+zx - ~/Documents/zachir.xyz
+";;
+ "a") cd $XDG_CONFIG_HOME/awesome/ ;;
+ "cpr") cd $XDG_CONFIG_HOME/primrose/ ;;
+ "dwm") cd $HOME/suckless/dwm/ ;;
+ "db") cd $HOME/git/dwmbar/ ;;
+ "g") cd $HOME/git/ ;;
+ "pr") cd $HOME/git/primrose/ ;;
+ "slo") cd $HOME/suckless/slock/ ;;
+ "s") cd $HOME/.local/scripts/ ;;
+ "st") cd $HOME/suckless/st/ ;;
+ "tfd") cd $HOME/Documents/flixel/TheFiniteDemo/ ;;
+ "tst") tabbed -c st -w ;;
+ "v") cd $HOME/.vst/ ;;
+ "vsv") cd $HOME/.local/volsv ;;
+ "z") cd $ZDOTDIR/ ;;
+ "zx") cd $HOME/Documents/zachir.xyz/ ;;
+ *) cd $1 ;;
+ esac
+ fi
+}