commit 7661726251680465de8d04eb0b7017102bf5addb
parent b80cbb86d151222ef286a4e08734fbb14c9e2d3b
Author: Arne Swanson <nownpl@0111.click>
Date: Wed, 15 Aug 2018 21:58:49 -0300
Added scripts.
Diffstat:
8 files changed, 77 insertions(+), 1 deletion(-)
diff --git a/mkfile b/mkfile
@@ -12,4 +12,6 @@ install:
stow -t "$HOME" zsh
stow -t "$HOME" git
stow -t "$HOME" xorg
+ mkdir -p "$HOME/.bin"
+ stow -t "$HOME/.bin" scripts
diff --git a/scripts/alert b/scripts/alert
@@ -0,0 +1,3 @@
+#!/bin/sh
+play /usr/share/sounds/freedesktop/stereo/message.oga -q &
+(echo $1; sleep 5) | dzen2 -fg "#00ffa6" -bg "#000" -fn "Input Sans:size=8" -ta l -y "-28" &
diff --git a/scripts/dsurf b/scripts/dsurf
@@ -0,0 +1,33 @@
+#!/bin/sh
+#
+# See the LICENSE file for copyright and license details.
+#
+
+xidfile="$HOME/.tmp/tabbed-surf.xid"
+uri=""
+
+if [ "$#" -gt 0 ];
+then
+ uri="$1"
+fi
+
+runtabbed()
+{
+ tabbed -c -dn tabbed-surf -r 2 surf -e '' "$uri" >"$xidfile" \
+ 2>/dev/null &
+}
+
+if [ ! -r "$xidfile" ];
+then
+ runtabbed
+else
+ xid=$(cat "$xidfile")
+ xprop -id "$xid" >/dev/null 2>&1
+ if [ $? -gt 0 ];
+ then
+ runtabbed
+ else
+ surf -e "$xid" "$uri" >/dev/null 2>&1 &
+ fi
+fi
+
diff --git a/scripts/shot b/scripts/shot
@@ -0,0 +1,4 @@
+#!/bin/sh
+DIRECTORY="${HOME}/files/shot"
+import "${DIRECTORY}/$1.png"
+echo "${DIRECTORY}/$1.png" | pb -f | xc+
\ No newline at end of file
diff --git a/scripts/stt b/scripts/stt
@@ -0,0 +1,29 @@
+#!/bin/sh
+#
+# See the LICENSE file for copyright and license details.
+#
+
+xidfile="$HOME/.tmp/tabbed-st.xid"
+
+# tabbed -r 2 st -w '' -e tmux
+
+runtabbed()
+{
+ tabbed -c -dn tabbed-st -r 2 st -w '' >"$xidfile" \
+ 2>/dev/null &
+}
+
+if [ ! -r "$xidfile" ];
+then
+ runtabbed
+else
+ xid=$(cat "$xidfile")
+ xprop -id "$xid" >/dev/null 2>&1
+ if [ $? -gt 0 ];
+ then
+ runtabbed
+ else
+ st -w "$xid" >/dev/null 2>&1 &
+ fi
+fi
+
diff --git a/scripts/xc b/scripts/xc
@@ -0,0 +1,2 @@
+#!/bin/sh
+tr -d '\n' | xclip -selection clipboard
diff --git a/scripts/xp b/scripts/xp
@@ -0,0 +1,2 @@
+#!/bin/sh
+xclip -o -selection clipboard
diff --git a/zsh/.zshrc b/zsh/.zshrc
@@ -1,4 +1,4 @@
-export PATH=$HOME/.bin:$PATH
+export PATH=$HOME/.bin:$HOME/.symbin:$PATH
export ZSH="/home/$(whoami)/.oh-my-zsh"
GEOMETRY_COLOR_EXIT_VALUE="red"