diff --git a/bin/cheat b/bin/cheat new file mode 100755 index 0000000..d2ad000 --- /dev/null +++ b/bin/cheat @@ -0,0 +1,3 @@ +#!/bin/bash +cat="$(which bat 2>/dev/null || which cat)" +curl -s "cheat.sh/$1" | eval $cat diff --git a/bin/cycle_sinks.sh b/bin/cycle_sinks.sh new file mode 100755 index 0000000..1e0f6f6 --- /dev/null +++ b/bin/cycle_sinks.sh @@ -0,0 +1,18 @@ +#!/bin/bash + +# get the default sink +default_sink="$(pactl info | grep -e "Default Sink:" | awk '{print $3}')" +echo "current default: $default_sink" + +# get the sinks +sinks="$(pactl list sinks short | awk '{print $2}')" + +# filter out the default sink +not_active="$(echo "$sinks" | grep -v -e "$default_sink")" + +# get the sink after the dafault one +next_sink="$(echo -e "$sinks\n$not_active" | grep -e "$default_sink" -A 1 | tail -n 1 )" + +# set the new default-sink +pactl set-default-sink "$next_sink" +echo "new default: $next_sink" diff --git a/bin/remove_orphans b/bin/remove_orphans new file mode 100755 index 0000000..bdc60bf --- /dev/null +++ b/bin/remove_orphans @@ -0,0 +1,2 @@ +#!/bin/bash +sudo pacman -Qtdq | sudo pacman -Rns - 2> /dev/null|| echo "No orphans to remove" diff --git a/bin/sxhkd-help b/bin/sxhkd-help new file mode 100755 index 0000000..6c7f8cb --- /dev/null +++ b/bin/sxhkd-help @@ -0,0 +1,5 @@ +#!/bin/bash + +awk '/^[a-z]/ && last {print "",$0,"\t",last,""} {last=""} /^#/{last=$0}' ~/.config/sxhkd/sxhkdrc | + column -t -s $'\t' | + rofi -dmenu -i -markup-rows -no-show-icons -width 1000 -lines 15 -yoffset 40