summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorKevin Chabowski <kevin@kch42.de>2013-12-01 23:59:31 +0100
committerKevin Chabowski <kevin@kch42.de>2013-12-01 23:59:31 +0100
commitb3eaf4d3e1e3031054fadbc47eb749f47f901e83 (patch)
treebb595da73ea856a77e15420b43d3b43c003963dd /bin
downloaddotfiles-b3eaf4d3e1e3031054fadbc47eb749f47f901e83.tar.gz
dotfiles-b3eaf4d3e1e3031054fadbc47eb749f47f901e83.tar.bz2
dotfiles-b3eaf4d3e1e3031054fadbc47eb749f47f901e83.zip
Initial commit
Diffstat (limited to 'bin')
-rwxr-xr-xbin/dmenu3
-rwxr-xr-xbin/myredshift57
-rwxr-xr-xbin/myxlock3
-rwxr-xr-xbin/opera2
-rwxr-xr-xbin/quitmenu32
5 files changed, 97 insertions, 0 deletions
diff --git a/bin/dmenu b/bin/dmenu
new file mode 100755
index 0000000..d26c459
--- /dev/null
+++ b/bin/dmenu
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+/usr/bin/dmenu -b -nb '#333333' -nf '#cccccc' -sb '#45A5FF' -sf '#ffffff' "$@"
diff --git a/bin/myredshift b/bin/myredshift
new file mode 100755
index 0000000..96f9d96
--- /dev/null
+++ b/bin/myredshift
@@ -0,0 +1,57 @@
+#!/bin/sh
+
+rs() {
+ redshift -o -l 53.8695616:10.6875833 -t 6200:4800 "$@" >/dev/null
+}
+
+tick() {
+ while true; do
+ echo "tick"
+ sleep 30
+ done > "$REDSHIFT_FIFO"
+}
+
+daemon() {
+ test -e "$REDSHIFT_FIFO" && rm -f "$REDSHIFT_FIFO"
+ mkfifo "$REDSHIFT_FIFO"
+
+ tick &
+ tick_pid=$!
+
+ flag=""
+ cat "$REDSHIFT_FIFO" | while read cmd; do
+ case $cmd in
+ quit)
+ kill $tick_pid &
+ break
+ ;;
+ toggle)
+ if test -n "$flag"; then
+ flag=""
+ else
+ flag="-x"
+ fi
+
+ echo "redshift $flag" > "$BAR_FIFO"
+
+ rs $flag
+ ;;
+ tick)
+ rs $flag
+ ;;
+ esac
+ done
+}
+
+toggle() {
+ echo "toggle" > "$REDSHIFT_FIFO"
+}
+
+case $1 in
+daemon)
+ daemon
+ ;;
+toggle)
+ toggle
+ ;;
+esac
diff --git a/bin/myxlock b/bin/myxlock
new file mode 100755
index 0000000..f531e66
--- /dev/null
+++ b/bin/myxlock
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+xlock -mode blank
diff --git a/bin/opera b/bin/opera
new file mode 100755
index 0000000..654f023
--- /dev/null
+++ b/bin/opera
@@ -0,0 +1,2 @@
+#!/bin/bash
+/usr/bin/opera -noargb -nolirc "$@"
diff --git a/bin/quitmenu b/bin/quitmenu
new file mode 100755
index 0000000..e9823b8
--- /dev/null
+++ b/bin/quitmenu
@@ -0,0 +1,32 @@
+#!/bin/sh
+
+mkopts() {
+ echo 'Quit
+Poweroff
+Reboot
+Suspend
+Lock
+'
+}
+
+if choice="`mkopts | dmenu -i`"; then
+ case "$choice" in
+ Quit)
+ pkill mybar
+ bspc quit
+ ;;
+ Poweroff)
+ poweroff
+ ;;
+ Reboot)
+ reboot
+ ;;
+ Suspend)
+ myxlock &
+ systemctl suspend
+ ;;
+ Lock)
+ myxlock
+ ;;
+ esac
+fi