diff options
-rw-r--r-- | README.md | 12 | ||||
-rwxr-xr-x | browser | 2 | ||||
-rwxr-xr-x | bsc | 2 | ||||
-rwxr-xr-x | bspt | 2 | ||||
-rwxr-xr-x | crcparse | 2 | ||||
-rwxr-xr-x | dmpv | 2 | ||||
-rwxr-xr-x | fdc | 2 | ||||
-rwxr-xr-x | ffc | 2 | ||||
-rwxr-xr-x | gen_waybar_confs.sh | 10 | ||||
-rwxr-xr-x | gettags | 2 | ||||
-rwxr-xr-x | herbsttags | 2 | ||||
-rwxr-xr-x | hwinmv | 2 | ||||
-rwxr-xr-x | launch_waybar.sh | 11 | ||||
-rwxr-xr-x | liberclip | 2 | ||||
-rwxr-xr-x | lwc | 2 | ||||
-rwxr-xr-x | maim_active | 2 | ||||
-rwxr-xr-x | monattach | 2 | ||||
-rwxr-xr-x | mondetach | 2 | ||||
-rwxr-xr-x | mpdup | 2 | ||||
-rwxr-xr-x | mprisctl | 2 | ||||
-rwxr-xr-x | notify-fw | 2 | ||||
-rwxr-xr-x | qbc | 2 | ||||
-rw-r--r-- | river_sp | 5 | ||||
-rwxr-xr-x | sigdwmb | 2 | ||||
-rwxr-xr-x | slockd | 2 | ||||
-rwxr-xr-x | songgrab | 2 | ||||
-rwxr-xr-x | startvm | 2 | ||||
-rwxr-xr-x | startxw | 4 | ||||
-rwxr-xr-x | svlogc | 2 | ||||
-rwxr-xr-x | swayidlechk | 2 | ||||
-rwxr-xr-x | swayidletog | 2 | ||||
-rwxr-xr-x | tagimg | 2 | ||||
-rwxr-xr-x | tagmp3 | 2 | ||||
-rwxr-xr-x | todo | 2 | ||||
-rwxr-xr-x | toggle | 2 | ||||
-rwxr-xr-x | toggletouchpad | 2 | ||||
-rwxr-xr-x | tsoff | 2 | ||||
-rwxr-xr-x | tson | 2 | ||||
-rwxr-xr-x | waytoggle | 2 | ||||
-rwxr-xr-x | xidlechk | 2 | ||||
-rwxr-xr-x | xidletog | 2 |
41 files changed, 64 insertions, 50 deletions
@@ -17,18 +17,6 @@ accept them. ## Scripts -### barmenu - -`barmenu` is a script to call either dmenu or bemenu, depending on if Wayland or -X is running. If X is running (`$WAYLAND_DISPLAY` is unset and `$DISPLAY` is), -the script will run dmenu with the provided args. Otherwise, it will run bemenu -with the provided args (albeit replacing -h with -H). - -### barmenu_run - -`barmenu_run` is a script to replace both dmenu_run and bemenu-run, to call -barmenu instead. - ### battery `battery` is a 'block' for dwmblocks to check the status of the battery, using @@ -1,4 +1,4 @@ -#!/sbin/sh +#!/bin/sh [ -z "$BROWSER" ] && BROWSER="qbc" BROWSERS="qbc fdc @@ -1,4 +1,4 @@ -#!/sbin/sh +#!/bin/sh PROFILES=`grep 'Path=' ~/.moonchild\ productions/basilisk/profiles.ini | cut -d'.' -f2` CHOSEN=`echo "$PROFILES" | barmenu -l 15` [ -z "$CHOSEN" ] && exit 2 @@ -1,4 +1,4 @@ -#!/sbin/sh +#!/bin/sh get_cmd () { echo "$@" | sed "s/"$1" //" @@ -1,4 +1,4 @@ -#!/sbin/sh +#!/bin/sh if [ -n "$XDG_CONFIG_HOME" ]; then CONPATH="$XDG_CONFIG_HOME" @@ -1,4 +1,4 @@ -#!/sbin/sh +#!/bin/sh cd ~/Videos case "$@" in @@ -1,4 +1,4 @@ -#!/sbin/sh +#!/bin/sh PROFILES=`grep 'Path=' ~/.firedragon/profiles.ini | cut -d'.' -f2` CHOSEN=`echo "$PROFILES" | barmenu -l 15` [ -z "$CHOSEN" ] && exit 2 @@ -1,4 +1,4 @@ -#!/sbin/sh +#!/bin/sh PROFILES=`grep 'Path=' ~/.mozilla/firefox/profiles.ini | cut -d'.' -f2` CHOSEN=`echo "$PROFILES" | barmenu -l 15` [ -z "$CHOSEN" ] && exit 2 diff --git a/gen_waybar_confs.sh b/gen_waybar_confs.sh new file mode 100755 index 0000000..36befae --- /dev/null +++ b/gen_waybar_confs.sh @@ -0,0 +1,10 @@ +#!/bin/sh + +WCLONG="$(crcparse WC)" +WC="$(basename "$WCLONG")" + +OUTPUTS="$(wlr-randr | grep -B2 'Enabled: yes' | sed '/^\s\s*/d;/^--/d' | cut -d' ' -f1)" + +echo "$OUTPUTS" | while read i; do + sed 's/%%DISPLAY%%/'$i'/' "$XDG_CONFIG_HOME"/waybar/config-$WC > "$XDG_CONFIG_HOME"/waybar/config-$WC-$i +done @@ -1,4 +1,4 @@ -#!/sbin/sh +#!/bin/sh case "$(echo "$1" | rev | cut -d'.' -f1 | rev)" in "mp3") mid3v2 -l "$1" | awk 'xor(/^TPE1/,/^TALB/) {printf (NR%2==0) ? $0 "\n" : $0 "|"}' | sed 's/TPE1=//;s/TALB=//' ;; @@ -1,3 +1,3 @@ -#!/sbin/sh +#!/bin/sh herbstclient tag_status | sed 's/^\s//;s/#/%{u#00ffff}%{+u} /;s/\:/%{u#0000ff}%{+u} /g;s/\!/%{u#00ff00}%{+u} /g;s/\./%{u#ffffff} /g;s/\t/ %{-u}/g' @@ -1,3 +1,3 @@ -#!/sbin/sh +#!/bin/sh herbstclient "$1" "$2" && polybar-msg hook herbstluftwm 1 diff --git a/launch_waybar.sh b/launch_waybar.sh new file mode 100755 index 0000000..1803ada --- /dev/null +++ b/launch_waybar.sh @@ -0,0 +1,11 @@ +#!/bin/sh + +killall waybar + +if type "wlr-randr"; then + for m in $(wlr-randr | grep -B2 'Enabled: yes' | sed '/^\s\s*/d;/^--$/d' | cut -d' ' -f1); do + waybar -c "$XDG_CONFIG_HOME"/waybar/config-$1-$m & + done +else + waybar +fi @@ -1,4 +1,4 @@ -#!/sbin/sh +#!/bin/sh xclip -selection clipboard -o | \ sed -e 's/www.youtube.com/yewtu.be/;s/youtu.be/yewtu.be/' \ @@ -1,4 +1,4 @@ -#!/sbin/sh +#!/bin/sh PROFILES=`grep 'Path=' ~/.librewolf/profiles.ini | cut -d'.' -f2` CHOSEN=`echo "$PROFILES" | barmenu -l 15` [ -z "$CHOSEN" ] && exit 2 diff --git a/maim_active b/maim_active index e742c2c..2601aed 100755 --- a/maim_active +++ b/maim_active @@ -1,4 +1,4 @@ #!/bin/sh -FNAME="$(echo "" | dmenu -p 'filename: ')" +FNAME="$(echo "" | barmenu -p 'filename: ')" maim -i $(xdotool getactivewindow) "$FNAME" @@ -1,4 +1,4 @@ -#!/sbin/sh +#!/bin/sh XSTATS="$(xrandr)" @@ -1,4 +1,4 @@ -#!/sbin/sh +#!/bin/sh XSTATS="$(xrandr)" @@ -1,4 +1,4 @@ -#!/sbin/sh +#!/bin/sh # This loop will update the mpd statusbar module whenever a command changes the # music player's status. mpd must be running on X's start for this to work. @@ -1,4 +1,4 @@ -#!/sbin/sh +#!/bin/sh DMENU_PROMPT=$(playerctl -l | barmenu -p 'Players:') [ -z "$DMENU_PROMPT" ] && exit 1 @@ -1,4 +1,4 @@ -#!/sbin/sh +#!/bin/sh LIST="$(doas iptables -S)" LIST6="$(doas ip6tables -S)" @@ -1,4 +1,4 @@ -#!/sbin/sh +#!/bin/sh SESSIONS=`qbpm list` [ -z "$SESSIONS" ] && qutebrowser $@ diff --git a/river_sp b/river_sp new file mode 100644 index 0000000..198aaac --- /dev/null +++ b/river_sp @@ -0,0 +1,5 @@ +#!/bin/sh + +scratch_tag=$((1 << 9)) + +riverctl map normal Alt Z toggle-focused-tags ${scratch_tag} @@ -1,4 +1,4 @@ -#!/sbin/sh +#!/bin/sh BLOCKS=`grep '^\s*{"' ~/.local/src/dwmblocks/config.h | cut -d'"' -f4 | uniq` for i in $@; do if `echo "$BLOCKS" | grep "$i" >/dev/null`; then @@ -1,4 +1,4 @@ -#!/sbin/sh +#!/bin/sh if [ -z "$WAYLAND_DISPLAY" ]; then LOCKER=slock @@ -1,4 +1,4 @@ -#!/sbin/sh +#!/bin/sh # check flags for i in $@; do @@ -1,4 +1,4 @@ -#!/sbin/sh +#!/bin/sh SERVICES="libvirtd virtlockd virtlogd" doas rsm start $SERVICES virt-manager --no-fork && doas rsm stop $SERVICES @@ -1,11 +1,11 @@ -#!/sbin/sh +#!/bin/sh if [ `crcparse wayland` = "y" ]; then case `crcparse WC` in `which dwl`) exec `which dwl` > ~/.cache/dwltags ;; - "*") + *) exec `crcparse WC` ;; esac else @@ -1,4 +1,4 @@ -#!/sbin/sh +#!/bin/sh SERV_NAME=$(echo "$1" | sed 's/\/log$//') [ -f /var/log/"$SERV_NAME"/current ] && tac /var/log/"$(echo "$1" | sed 's/\/log$//')"/current | less || echo "Cannot read log" diff --git a/swayidlechk b/swayidlechk index 60322b9..8717360 100755 --- a/swayidlechk +++ b/swayidlechk @@ -1,3 +1,3 @@ -#!/sbin/sh +#!/bin/sh [ $(pidof swayidle) ] && echo "🌑" || echo "🌕" diff --git a/swayidletog b/swayidletog index 42510ac..27d9db8 100755 --- a/swayidletog +++ b/swayidletog @@ -1,4 +1,4 @@ -#!/sbin/sh +#!/bin/sh SWIDLE=$(pidof swayidle) if [ ! -z "$SWIDLE" ] ; then @@ -1,4 +1,4 @@ -#!/sbin/sh +#!/bin/sh # check for flags for i in $@; do @@ -1,4 +1,4 @@ -#!/sbin/sh +#!/bin/sh FILENAME=`echo $@ | rev | cut -d' ' -f1 | rev` @@ -1,3 +1,3 @@ -#!/sbin/sh +#!/bin/sh "${EDITOR:-nvim}" ~/todo.txt @@ -1,4 +1,4 @@ -#!/sbin/sh +#!/bin/sh if type disown >/dev/null; then killall $1 ; $@ >/dev/null & disown diff --git a/toggletouchpad b/toggletouchpad index 553cf60..b10d10d 100755 --- a/toggletouchpad +++ b/toggletouchpad @@ -1,4 +1,4 @@ -#!/sbin/sh +#!/bin/sh CONTROLLER=`which synclient` [ -x "$CONTROLLER" ] && SYNCLIENT=y || CONTROLLER=`which xinput` [ ! -x "$CONTROLLER" ] && XINPUT=y || echo "This script requires X11" @@ -1,4 +1,4 @@ -#!/sbin/sh +#!/bin/sh if [ -n "$XDG_CONFIG_HOME" ]; then CONPATH="$XDG_CONFIG_HOME" @@ -1,4 +1,4 @@ -#!/sbin/sh +#!/bin/sh if [ -n "$XDG_CONFIG_HOME" ]; then CONPATH="$XDG_CONFIG_HOME" @@ -1,4 +1,4 @@ -#!/sbin/sh +#!/bin/sh if [ -n "$(pgrep -x waybar)" ]; then pkill waybar @@ -1,4 +1,4 @@ -#!/sbin/sh +#!/bin/sh case $BLOCK_BUTTON in 1) xidletog ;; @@ -1,4 +1,4 @@ -#!/sbin/sh +#!/bin/sh if [ ! -f /tmp/xorg-awake ]; then touch /tmp/xorg-awake |