dotfiles

configuration files
git clone https://pi.duncano.de/git/dotfiles.git
Log | Files | Refs | README

commit 6744c75461d96634c483278766ff50a53c5226f7
parent 03ff6c9d5bea1fabbfad44a899076da9c8ee5955
Author: Duncaen <mail@duncano.de>
Date:   Thu, 16 Feb 2017 01:13:36 +0100

bin: remove dmenu scripts i never used

Diffstat:
bin/dmenu_playerctl | 77-----------------------------------------------------------------------------
bin/dmenu_power | 11-----------
bin/dmenu_runit | 8--------
bin/dmenu_z | 7-------
4 files changed, 0 insertions(+), 103 deletions(-)

diff --git a/bin/dmenu_playerctl b/bin/dmenu_playerctl @@ -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 @@ -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 @@ -1,8 +0,0 @@ -#!/bin/sh - -list() { - -} - -dmenu | - diff --git a/bin/dmenu_z b/bin/dmenu_z @@ -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