aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDuncaen <mail@duncano.de>2017-02-16 01:13:36 +0100
committerDuncaen <mail@duncano.de>2017-02-16 01:13:36 +0100
commit6744c75461d96634c483278766ff50a53c5226f7 (patch)
tree1ec5efa3a8e9b0e7db7c5208a05b5116bdebf2f2
parent03ff6c9d5bea1fabbfad44a899076da9c8ee5955 (diff)
downloaddotfiles-6744c75461d96634c483278766ff50a53c5226f7.tar.gz
bin: remove dmenu scripts i never used
-rwxr-xr-xbin/dmenu_playerctl77
-rwxr-xr-xbin/dmenu_power11
-rwxr-xr-xbin/dmenu_runit8
-rwxr-xr-xbin/dmenu_z7
4 files changed, 0 insertions, 103 deletions
diff --git a/bin/dmenu_playerctl b/bin/dmenu_playerctl
deleted file mode 100755
index 0bffc70..0000000
--- a/bin/dmenu_playerctl
+++ /dev/null
@@ -1,77 +0,0 @@
-#!/bin/sh
-
-select_player() {
- playing=""
- for p in $1; do
- if [ $(playerctl -p "$p" status) == "Playing" ]; then
- [ -z "$playing" ] && playing="$p" || playing="$playing\n$p"
- fi
- done
- case $(echo "$playing" | wc -l) in
- 0) exit ;;
- 1) echo "$playing" ;;
- *) echo $(echo "$playing" | ${DMENU}) ;;
- esac
-}
-
-prompt() {
- a=$(playerctl -p $1 metadata xesam:artist)
- t=$(playerctl -p $1 metadata xesam:title)
- if [ -n "$a" -a -n "$t" ]; then
- echo "$1: $a - $t"
- else
- echo "$1:"
- fi
-}
-
-play_pause() {
- [ $(playerctl -p $1 status) == "Playing" ] && echo "Pause" || echo "Play"
-}
-
-player_menu() {
- [ -z "$1" ] && exit
- CMDS="$(play_pause $1)\nStop\nNext\nPrevious\nVolume"
- ret=$(echo $CMDS | ${DMENU} -p "$(prompt $1)" -i | tr '[A-Z]' '[a-z]')
- case "$ret" in
- play|pause|stop|next|previous) playerctl -p $1 $ret ;;
- volume) volume_menu $1 ;;
- esac
-}
-
-volume_menu() {
- cmds="Up\nDown"
- while :
- do
- vol=$(echo "$(playerctl -p $1 volume) * 100" | bc)
- vol=${vol%.*}
- ret=$(echo "$cmds" | ${DMENU} -p "$1: $vol" -i | tr '[A-Z]' '[a-z]')
- case "$ret" in
- up)
- playerctl -p $1 volume $(echo "($vol + 5) / 100" | bc -l)
- cmds="Up\nDown"
- ;;
- down)
- playerctl -p $1 volume $(echo "($vol - 5) / 100" | bc -l)
- cmds="Down\nUp"
- ;;
- *)
- [ -z "$ret" ] && break
- [ -n "$(echo $ret | tr -d '[[:digit:]]')" ] && break
- playerctl -p $1 volume $(echo "$ret / 100" | bc -l)
- if [ "$ret" -gt "$vol" ]; then
- cmds="Up\nDown"
- else
- cmds="Down\nUp"
- fi
- ;;
- esac
- done
-}
-
-: ${DMENU:=dmenu}
-: ${PLAYER:=$(playerctl -l)}
-case "$(echo ${PLAYER} | wc -w)" in
- 0) echo "No player running" && exit ;;
- 1) player_menu "$PLAYER" ;;
- *) player_menu $(select_player "$PLAYER") ;;
-esac
diff --git a/bin/dmenu_power b/bin/dmenu_power
deleted file mode 100755
index 7bacda8..0000000
--- a/bin/dmenu_power
+++ /dev/null
@@ -1,11 +0,0 @@
-#!/bin/sh
-
-: ${DMENU:=dmenu}
-ret=$(echo "Suspend\nLock\nHibernate\nReboot\nShutdown" | ${DMENU} -p "Power:" -i | tr '[A-Z]' '[a-z]')
-case "$ret" in
- suspend) sudo zzz ;;
- lock) slock ;;
- hibernate) sudo ZZZ ;;
- reboot) sudo reboot ;;
- shutdown) sudo halt ;;
-esac
diff --git a/bin/dmenu_runit b/bin/dmenu_runit
deleted file mode 100755
index 2d83011..0000000
--- a/bin/dmenu_runit
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/bin/sh
-
-list() {
-
-}
-
-dmenu |
-
diff --git a/bin/dmenu_z b/bin/dmenu_z
deleted file mode 100755
index 9affd62..0000000
--- a/bin/dmenu_z
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/bin/sh
-
-. /home/duncan/repos/github.com/Duncaen/dotfiles/z/z.sh
-ret=$(z -l | sort -nr | awk '{print $2}' | dmenu -l 10)
-if [ -n "$ret" -a -d "$ret" ]; then
- cd "$ret" ; st
-fi