bin

git clone git://git.codymlewis.com/bin.git
Log | Files | Refs

commit 8537abab5ac45076f98912fb670f67f7cf490881
parent d5ee803c014f8eb2fd77648d11123a3c39817611
Author: Cody Lewis <cody@codymlewis.com>
Date:   Sat,  4 Jul 2020 11:54:43 +1000

Artix related updates

Diffstat:
A.gitignore | 2++
Mdmenumpc | 4++--
Dget-pass | 8--------
Aget_pass | 8++++++++
Agget_pass | 3+++
Rnew-pass -> new_pass | 0
Anew_repo | 5+++++
Mpowermenu | 4++--
Mstatusbar/brightness | 2+-
Mstatusbar/music | 2+-
Mxrs | 4++--
11 files changed, 26 insertions(+), 16 deletions(-)

diff --git a/.gitignore b/.gitignore @@ -0,0 +1,2 @@ +tags +Session.vim diff --git a/dmenumpc b/dmenumpc @@ -1,10 +1,10 @@ #!/bin/bash -artist="$(mpc list Artist | dmenu -p 'Choose an Artist')" +artist="$(mpc list Artist | dmenu -i -p 'Choose an Artist')" [[ $artist = "" ]] && exit -title="$(mpc list Title Artist "$artist" | dmenu -p 'Choose a Song')" +title="$(mpc list Title Artist "$artist" | dmenu -i -p 'Choose a Song')" [[ $title = "" ]] && exit diff --git a/get-pass b/get-pass @@ -1,8 +0,0 @@ -#!/bin/sh - -a=$(ls "$HOME/.password-store" | dmenu -p "What website do you want a password for") -[ $(ls "$HOME/.password-store/$a" | wc -l) = 1 ] && - b=$(ls "$HOME/.password-store/$a" | sed 's/\.gpg//') || - b=$(ls "$HOME/.password-store/$a" | sed 's/\.gpg//' | dmenu "Which account do you want a password for") - -(tpm show "$a/$b" | xsel -p) && (echo "$a" | xsel -b) && notify-send "Password for $a/$b copied to clipboard" diff --git a/get_pass b/get_pass @@ -0,0 +1,8 @@ +#!/bin/sh + +a=$(ls "$HOME/.password-store" | fzf -i --prompt="What website do you want a password for?") +[ $(ls "$HOME/.password-store/$a" | wc -l) = 1 ] && + b=$(ls "$HOME/.password-store/$a" | sed 's/\.gpg//') || + b=$(ls "$HOME/.password-store/$a" | sed 's/\.gpg//' | fzf -i --prompt="Which account do you want a password for") + +(tpm show "$a/$b" | xsel -p) && (echo "$a" | xsel -b) && notify-send "Password for $a/$b copied to clipboard" diff --git a/gget_pass b/gget_pass @@ -0,0 +1,3 @@ +#!/bin/sh + +st -e $HOME/bin/get_pass diff --git a/new-pass b/new_pass diff --git a/new_repo b/new_repo @@ -0,0 +1,5 @@ +#!/bin/sh + +[ $# -lt 1 ] && echo "Usage: new_repo <repo_name>" && exit + +ssh git@codymlewis.com "./mkrepo $1" diff --git a/powermenu b/powermenu @@ -7,9 +7,9 @@ case $PWR_OPT in xsetroot -name "fsignal:1" ;; "Shutdown") - shutdown -h now + sudo shutdown -h now ;; "Reboot") - reboot + sudo reboot ;; esac diff --git a/statusbar/brightness b/statusbar/brightness @@ -1,5 +1,5 @@ #!/bin/sh -brightness=$(xbacklight | sed 's/\\..*//') +brightness=$(xbacklight -get | sed 's/\\..*//') printf "%4.1f%%" "$brightness" diff --git a/statusbar/music b/statusbar/music @@ -8,4 +8,4 @@ esac mpc_status=$(mpc status) printf "%s" "$mpc_status" | grep 'playing' > /dev/null && \ - printf " %s" "$mpc_status" | head -n1 + printf " %s" "$mpc_status" | head -n1 | cut -c -46 diff --git a/xrs b/xrs @@ -4,9 +4,9 @@ primary="eDP1" other_mons="$(xrandr | awk '/\sconnected\s[^p]/{ print $1 }')" -mon="$(printf "%s" "$other_mons" | dmenu -p 'Which monitor')" +mon="$(printf "%s" "$other_mons" | dmenu -i -p 'Which monitor')" -dir=$(printf "Right\nLeft\nMirror\nAbove\nBelow\nOff" | dmenu -p 'Which direction') +dir=$(printf "Right\nLeft\nMirror\nAbove\nBelow\nOff" | dmenu -i -p 'Which direction') case "$dir" in "Right")