commit bba496a914d09e688fafc6c5e855cada0e18d341 parent f3300a2949c8015f4a3149825acffbf17f8eb9f9 Author: jacob@thinkpad <jacobouno@protonmail.com> Date: Wed, 8 Apr 2020 01:54:53 -0700 remove useless utilities Diffstat:
| D | bspwm/.config/bspwm/bspc-utils/trash/bspR-d | | | 31 | ------------------------------- |
| D | bspwm/.config/bspwm/bspc-utils/trash/bspc-allgap | | | 14 | -------------- |
| D | bspwm/.config/bspwm/bspc-utils/trash/bspc-hjkl | | | 91 | ------------------------------------------------------------------------------- |
| D | bspwm/.config/bspwm/bspc-utils/trash/bspc-rainbow-border | | | 72 | ------------------------------------------------------------------------ |
| D | bspwm/.config/bspwm/bspc-utils/trash/bspc-subscribe-desktop | | | 35 | ----------------------------------- |
| D | bspwm/.config/bspwm/bspc-utils/trash/bspwm-query | | | 46 | ---------------------------------------------- |
| D | bspwm/.config/bspwm/bspc-utils/trash/bspwm-resize | | | 95 | ------------------------------------------------------------------------------- |
| D | bspwm/.config/bspwm/bspc-utils/trash/conky-bspwm | | | 4 | ---- |
| D | bspwm/.config/bspwm/bspc-utils/trash/resize.fail | | | 79 | ------------------------------------------------------------------------------- |
| D | bspwm/.config/bspwm/bspc-utils/trash/resize.save.firstworking | | | 72 | ------------------------------------------------------------------------ |
10 files changed, 0 insertions(+), 539 deletions(-)
diff --git a/bspwm/.config/bspwm/bspc-utils/trash/bspR-d b/bspwm/.config/bspwm/bspc-utils/trash/bspR-d @@ -1,31 +0,0 @@ -#!/bin/dash -# trying dash to see if its faster. -# maybe there is a premade script (definitaly) but -# oh well im not on internet for a week and I find it fun -# jacob edwards -- 09/01/2020 - -bspc query --nodes --node north -north=$? - -bspc query --nodes --node east -east=$? - -bspc query --nodes --node south -south=$? - -bspc query --nodes --node west -west=$? - - -if [ "$1" = '--enlarge' ]; then - if [ "$north" -eq '0' ]; then bspc node --resize top 0 -50 ;fi - if [ "$east" -eq '0' ]; then bspc node --resize right 50 0 ;fi - if [ "$south" -eq '0' ]; then bspc node --resize bottom 0 50 ;fi - if [ "$west" -eq '0' ]; then bspc node --resize left -50 0 ;fi - -elif [ "$1" = '--shrink' ]; then - if [ "$north" -eq '0' ]; then bspc node --resize top 0 50 ;fi - if [ "$east" -eq '0' ]; then bspc node --resize right -50 0 ;fi - if [ "$south" -eq '0' ]; then bspc node --resize bottom 0 -50 ;fi - if [ "$west" -eq '0' ]; then bspc node --resize left 50 0 ;fi -fi diff --git a/bspwm/.config/bspwm/bspc-utils/trash/bspc-allgap b/bspwm/.config/bspwm/bspc-utils/trash/bspc-allgap @@ -1,14 +0,0 @@ -#!/bin/dash -# Jacob Edwards, 2020 -# Increment gaps of monocle in monocle mode, and tiled in tiled ("do what I mean"? I think I heard that from emacs) - -bspc-querydesktop '"layout":"monocle"' - -if [ "$?" = '0' ]; then - bspc-inc left_monocle_padding "$@" - bspc-inc right_monocle_padding "$@" - bspc-inc top_monocle_padding "$@" - bspc-inc bottom_monocle_padding "$@" -else - bspc-inc window_gap "$@" -fi diff --git a/bspwm/.config/bspwm/bspc-utils/trash/bspc-hjkl b/bspwm/.config/bspwm/bspc-utils/trash/bspc-hjkl @@ -1,91 +0,0 @@ -#!/bin/dash -# -# Jacob Edwards -# resizing bspwm nodes (windows) meant to be used with keybinder (sxhkd,xbindkeys) - - -if [ -z "$1" ]; then - printf 'error, no arguments\nUsage, bspc-hjkl -{n,e,s,w}\n' - exit 1 -fi - -# don't know how to silence these. -(bspc query --nodes --node west); west=$? -(bspc query --nodes --node east); east=$? -(bspc query --nodes --node north); north=$? -(bspc query --nodes --node south); south=$? - -if [ "$north" -eq '1' ] && [ "$east" -eq '1' ]; then # :. - if [ "$1" = '-n' ]; then - bspc node --resize top 0 50 - bspc node --resize bottom 0 -50 - elif [ "$1" = '-e' ]; then - bspc node --resize left 50 0 - bspc node --resize right -50 0 - elif [ "$1" = '-s' ]; then - bspc node --resize top 0 -50 - bspc node --resize bottom 0 50 - elif [ "$1" = '-w' ]; then - bspc node --resize left -50 0 - bspc node --resize right 50 0 - fi - -elif [ "$north" -eq '1' ] && [ "$west" -eq '1' ]; then # .: - if [ "$1" = '-n' ]; then - bspc node --resize top 0 50 - bspc node --resize bottom 0 -50 - elif [ "$1" = '-e' ]; then - bspc node --resize left -50 0 - bspc node --resize right 50 0 - elif [ "$1" = '-s' ]; then - bspc node --resize top 0 -50 - bspc node --resize bottom 0 50 - elif [ "$1" = '-w' ]; then - bspc node --resize left 50 0 - bspc node --resize right -50 0 - fi - -elif [ "$south" -eq '1' ] && [ "$east" -eq '1' ]; then # :` - if [ "$1" = '-n' ]; then - bspc node --resize top 0 -50 - bspc node --resize bottom 0 50 - elif [ "$1" = '-e' ]; then - bspc node --resize left 50 0 - bspc node --resize right -50 0 - elif [ "$1" = '-s' ]; then - bspc node --resize top 0 50 - bspc node --resize bottom 0 -50 - elif [ "$1" = '-w' ]; then - bspc node --resize left -50 0 - bspc node --resize right 50 0 - fi - -elif [ "$south" -eq '1' ] && [ "$west" -eq '1' ]; then # `: - if [ "$1" = '-n' ]; then - bspc node --resize top 0 -50 - bspc node --resize bottom 0 50 - elif [ "$1" = '-e' ]; then - bspc node --resize left -50 0 - bspc node --resize right 50 0 - elif [ "$1" = '-s' ]; then - bspc node --resize top 0 50 - bspc node --resize bottom 0 -50 - elif [ "$1" = '-w' ]; then - bspc node --resize left 50 0 - bspc node --resize right -50 0 - fi -else - if [ "$1" = '-n' ]; then - bspc node --resize bottom 0 -50 - bspc node --resize top 0 -50 - elif [ "$1" = '-e' ]; then - bspc node --resize left -50 0 - bspc node --resize right 50 0 - elif [ "$1" = '-s' ]; then - bspc node --resize bottom 0 50 - bspc node --resize top 0 50 - elif [ "$1" = '-w' ]; then - bspc node --resize left 50 0 - bspc node --resize right -50 0 - fi -fi diff --git a/bspwm/.config/bspwm/bspc-utils/trash/bspc-rainbow-border b/bspwm/.config/bspwm/bspc-utils/trash/bspc-rainbow-border @@ -1,72 +0,0 @@ -#!/bin/dash -step=5 - -lowT="$(expr "$step" + 60)" -highT="$(expr 98 - "$step")" -r=9 -radd=true -g=35 -gadd=false -b=68 -badd=true - -rand(){ - # rand [num] makes $rand into a random number between 0 & that number - num="$( grep -m 1 'MHz' /proc/cpuinfo | awk -F '.' '{print $2}' )" - rand="$( expr $num % "$( expr $1 + 1 )" )" -} - -randomise(){ - # randomise red - if [ "$r" -gt "$highT" ]; then - radd=false - elif [ "$r" -lt "$lowT" ]; then - radd=true - fi - - if [ "$radd" = 'true' ]; then - rand 4 - r="$( expr "$r" + "$rand" )" - elif [ "$radd" = 'false' ]; then - rand 4 - r="$( expr "$r" - "$rand" )" - fi - - # randomise blue - if [ "$b" -gt "$highT" ]; then - badd=false - elif [ "$b" -lt "$lowT" ]; then - badd=true - fi - - if [ "$badd" = 'true' ]; then - rand 4 - b="$( expr "$b" + "$rand" )" - elif [ "$badd" = 'false' ]; then - rand 4 - b="$( expr "$b" - "$rand" )" - fi - - # randomise green - if [ "$g" -gt "$highT" ]; then - gadd=false - elif [ "$g" -lt "$lowT" ]; then - gadd=true - fi - - if [ "$gadd" = 'true' ]; then - rand 4 - g="$( expr "$g" + "$rand" )" - elif [ "$gadd" = 'false' ]; then - rand 4 - g="$( expr "$g" - "$rand" )" - fi -} - - -while true; do - randomise - - bspc config focused_border_color \#$r$g$b - sleep 0.05 -done diff --git a/bspwm/.config/bspwm/bspc-utils/trash/bspc-subscribe-desktop b/bspwm/.config/bspwm/bspc-utils/trash/bspc-subscribe-desktop @@ -1,35 +0,0 @@ -#!/bin/dash -# Jacob Edwards, 2020 -# bspwm utility for notifying of desktop change - -tmpfile='/tmp/bspc-focus' - - -if [ "$1" = '--help' ]; then - printf 'error, no arguments `--help` for help\n' - exit 1 -elif [ -z "$1" ]; then - delay=0.15 -else - delay="$1" -fi - - -# init log -if [ -e "$tmpfile" ]; then - rm "$tmpfile" -fi - - - -bspc subscribe desktop_focus > "$tmpfile" & - -while true; do - if [ "$focus" != "$( tail -n 1 "$tmpfile" )" ]; then - desktop="$(bspc query --desktops --desktop --names)" - notifysend-replace "$desktop" & - fi - - focus="$( tail -n 1 "$tmpfile" )" - sleep "$delay" -done diff --git a/bspwm/.config/bspwm/bspc-utils/trash/bspwm-query b/bspwm/.config/bspwm/bspc-utils/trash/bspwm-query @@ -1,46 +0,0 @@ -#!/bin/dash -# Jacob Edwards, 2020 -# script to query things from bspwm - - -delay=$1 - - -# set delay -if [ -z $1 ]; then - delay=0.35 -fi - - -# files to read and write from -desktop="/tmp/query-bspwm-desktop" -node="/tmp/query-bspwm-node" -pipe='/tmp/bspwm.info' - - - -# syntax: query [SEARCH] [FILE] [INSERTED] [APPENDED] -query(){ - query="$query$3$(grep "$1" "$2" | awk -F ':' '{print $2}')$4" -} - - - -while true; do - # get data - bspc query --tree --desktop | sed 's/,/\n/g' > "$desktop" - bspc query --tree --node | sed 's/,/\n/g' > "$node" - - - query='' - - # querys - query layout "$desktop" 'layout ' '\n' - query name "$desktop" 'workspace ' '\n' - query instanceName "$node" 'window ' '\n' - - - # print cleaned query into file - printf "$query\n" | sed 's/"//g' > "$pipe" - sleep $delay -done diff --git a/bspwm/.config/bspwm/bspc-utils/trash/bspwm-resize b/bspwm/.config/bspwm/bspc-utils/trash/bspwm-resize @@ -1,95 +0,0 @@ -#!/bin/dash -# trying dash to see if its faster. -# maybe there is a premade script (definitaly) but -# oh well im not on internet for a week and I find it fun -# jacob edwards -- 09/01/2020 - -bspc query --nodes --node north -north=$? - -bspc query --nodes --node east -east=$? - -bspc query --nodes --node south -south=$? - -bspc query --nodes --node west -west=$? - -printf "N;$north\nE;$east\nS;$south\nW;$west" - - - -if [ "$north" -eq '0' ] && [ "$east" -eq '0' ] && [ "$west" -eq '0' ] && [ "$south" -ne '0' ]; then - #bspc node --resize bottom 0 50 - bspc node --resize left -50 0 - bspc node --resize top 0 -50 - bspc node --resize right 50 0 -elif [ "$north" -eq '0' ] && [ "$east" -eq '0' ] && [ "$west" -ne '0' ] && [ "$south" -eq '0' ]; then - bspc node --resize bottom 0 50 - #bspc node --resize left -50 0 - bspc node --resize top 0 -50 - bspc node --resize right 50 0 -elif [ "$north" -eq '0' ] && [ "$east" -ne '0' ] && [ "$west" -eq '0' ] && [ "$south" -eq '0' ]; then - bspc node --resize bottom 0 50 - bspc node --resize left -50 0 - #bspc node --resize top 0 -50 - bspc node --resize right 50 0 -elif [ "$north" -ne '0' ] && [ "$east" -eq '0' ] && [ "$west" -eq '0' ] && [ "$south" -eq '0' ]; then - bspc node --resize bottom 0 50 - bspc node --resize left -50 0 - bspc node --resize top 0 -50 - #bspc node --resize right 50 0 - - - -elif [ "$north" -eq '0' ] && [ "$east" -eq '0' ] && [ "$west" -ne '0' ] && [ "$south" -ne '0' ]; then - #bspc node --resize bottom 0 50 - #bspc node --resize left -50 0 - bspc node --resize top 0 -50 - bspc node --resize right 50 0 -elif [ "$north" -eq '0' ] && [ "$east" -ne '0' ] && [ "$west" -ne '0' ] && [ "$south" -eq '0' ]; then - #WORKS - bspc node --resize bottom 0 50 - #bspc node --resize left -50 0 - #bspc node --resize top 0 -50 - bspc node --resize right 50 0 -elif [ "$north" -ne '0' ] && [ "$east" -ne '0' ] && [ "$west" -eq '0' ] && [ "$south" -eq '0' ]; then - bspc node --resize bottom 0 50 - bspc node --resize left -50 0 - #bspc node --resize top 0 -50 - #bspc node --resize right 50 0 -elif [ "$north" -ne '0' ] && [ "$east" -eq '0' ] && [ "$west" -eq '0' ] && [ "$south" -ne '0' ]; then - #bspc node --resize bottom 0 50 - bspc node --resize left -50 0 - bspc node --resize top 0 -50 - #bspc node --resize right 50 0 - - - -elif [ "$north" -eq '0' ] && [ "$east" -ne '0' ] && [ "$west" -ne '0' ] && [ "$south" -ne '0' ]; then - #bspc node --resize bottom 0 50 - #bspc node --resize left -50 0 - #bspc node --resize top 0 -50 - bspc node --resize right 50 0 -elif [ "$north" -ne '0' ] && [ "$east" -ne '0' ] && [ "$west" -ne '0' ] && [ "$south" -eq '0' ]; then - bspc node --resize bottom 0 50 - #bspc node --resize left -50 0 - #bspc node --resize top 0 -50 - #bspc node --resize right 50 0 -elif [ "$north" -ne '0' ] && [ "$east" -ne '0' ] && [ "$west" -eq '0' ] && [ "$south" -ne '0' ]; then - #bspc node --resize bottom 0 50 - bspc node --resize left -50 0 - #bspc node --resize top 0 -50 - #bspc node --resize right 50 0 -elif [ "$north" -ne '0' ] && [ "$east" -eq '0' ] && [ "$west" -ne '0' ] && [ "$south" -ne '0' ]; then - #bspc node --resize bottom 0 50 - #bspc node --resize left -50 0 - bspc node --resize top 0 -50 - #bspc node --resize right 50 0 -elif [ "$north" -eq '0' ] && [ "$east" -eq '0' ] && [ "$west" -eq '0' ] && [ "$south" -eq '0' ]; then - bspc node --resize bottom 0 50 - bspc node --resize left -50 0 - bspc node --resize top 0 -50 - bspc node --resize right 50 0 -fi diff --git a/bspwm/.config/bspwm/bspc-utils/trash/conky-bspwm b/bspwm/.config/bspwm/bspc-utils/trash/conky-bspwm @@ -1,4 +0,0 @@ -#!/bin/dash - -bspwm-query & -conky -c $HOME/.config/conky/conky-bspwm.conf diff --git a/bspwm/.config/bspwm/bspc-utils/trash/resize.fail b/bspwm/.config/bspwm/bspc-utils/trash/resize.fail @@ -1,79 +0,0 @@ -#!/bin/dash - -# get various geometry -getgeometry(){ - Xgeo="$(xdotool getwindowgeometry "$(xdotool getactivewindow)" | tail -n 1 | awk '{print $2}' | awk -F 'x' '{print $1}' )" - Ygeo="$(xdotool getwindowgeometry "$(xdotool getactivewindow)" | tail -n 1 | awk '{print $2}' | awk -F 'x' '{print $2}' )" -} - -nodeGeometry="$(xdotool getwindowgeometry "$(xdotool getactivewindow)" | tail -n 1 | awk '{print $2}' )" -nodeX="$(printf "$nodeGeometry" | awk -F 'x' '{print $1}')" -nodeY="$(printf "$nodeGeometry" | awk -F 'x' '{print $2}')" - -monitorGeometry="$(xdotool getdisplaygeometry)" -monitorX="$(printf "$monitorGeometry" | awk '{print $1}' )" -monitorY="$(printf "$monitorGeometry" | awk '{print $2}' )" - - -Xpercent="$(expr $monitorX / 100)" -Ypercent="$(expr $monitorY / 100)" - -scaleX="$(expr $2 \* $Xpercent)" -scaleY="$(expr $1 \* $Ypercent)" - - -# true equals adding, false means subtracting -if [ "$nodeY" -lt "$scaleY" ]; then - stepsizeY="$(expr "$scaleY" - "$nodeY" / 10)" - Y=true -else - stepsizeY="$(expr "$nodeY" - "$scaleX" / 10)" - Y=false -fi - -if [ "$nodeX" -lt "$scaleX" ]; then - stepsizeX="$(expr "$scaleX" - "$nodeX" / 10)" - X=true -else - stepsizeX="$(expr "$nodeX" - "$scaleX" / 10)" - X=false -fi - -stepsizeX=4 -stepsizeY=8 -notify-send-replace "X:$stepsizeX\nY:$stepsizeY\n" - - -if [ "$Y" = 'true' ]; then # adding to node - while [ "$nodeY" -lt "$scaleY" ]; do - bspc node --resize top 0 "-$stepsizeY" - bspc node --resize bottom 0 "$stepsizeY" - nodeY="$( expr $nodeY + "$( expr "$stepsizeY" / 2 )" )" - sleep 0.01 - done & - -elif [ "$Y" = 'false' ]; then # subtracting - while [ "$nodeY" -gt "$scaleY" ]; do - bspc node --resize top 0 "$stepsizeY" - bspc node --resize bottom 0 "-$stepsizeY" - nodeY="$( expr $nodeY - "$( expr "$stepsizeY" / 2 )" )" - sleep 0.01 - done & -fi - -if [ "$X" = 'true' ]; then # adding - while [ "$nodeX" -lt "$scaleX" ]; do - bspc node --resize left "-$stepsizeX" 0 - bspc node --resize right "$stepsizeX" 0 - nodeX="$( expr $nodeX + "$( expr "$stepsizeX" / 2 )" )" - sleep 0.01 - done & - -elif [ "$X" = 'false' ]; then # subtracting - while [ "$nodeX" -gt "$scaleX" ]; do - bspc node --resize left "$stepsizeX" 0 - bspc node --resize right "-$stepsizeX" 0 - nodeX="$( expr $nodeX - "$( expr "$stepsizeX" / 2 )" )" - sleep 0.01 - done & -fi diff --git a/bspwm/.config/bspwm/bspc-utils/trash/resize.save.firstworking b/bspwm/.config/bspwm/bspc-utils/trash/resize.save.firstworking @@ -1,72 +0,0 @@ -#!/bin/dash - -# get various geometry -getgeometry(){ - Xgeo="$(xdotool getwindowgeometry "$(xdotool getactivewindow)" | tail -n 1 | awk '{print $2}' | awk -F 'x' '{print $1}' )" - Ygeo="$(xdotool getwindowgeometry "$(xdotool getactivewindow)" | tail -n 1 | awk '{print $2}' | awk -F 'x' '{print $2}' )" -} - -nodeGeometry="$(xdotool getwindowgeometry "$(xdotool getactivewindow)" | tail -n 1 | awk '{print $2}' )" -nodeX="$(printf "$nodeGeometry" | awk -F 'x' '{print $1}')" -nodeY="$(printf "$nodeGeometry" | awk -F 'x' '{print $2}')" - -monitorGeometry="$(xdotool getdisplaygeometry)" -monitorX="$(printf "$monitorGeometry" | awk '{print $1}' )" -monitorY="$(printf "$monitorGeometry" | awk '{print $2}' )" - - -Xpercent="$(expr $monitorX / 100)" -Ypercent="$(expr $monitorY / 100)" - -scaleX="$(expr $2 \* $Xpercent)" -scaleY="$(expr $1 \* $Ypercent)" - - -# true equals adding, false means subtracting -if [ "$nodeY" -lt "$scaleY" ]; then - Y=true -else - Y=false -fi - -if [ "$nodeX" -lt "$scaleX" ]; then - X=true -else - X=false -fi - - - -if [ "$Y" = 'true' ]; then # adding to node - while [ "$nodeY" -lt "$scaleY" ]; do - bspc node --resize top 0 -10 - bspc node --resize bottom 0 10 - nodeY="$(expr $nodeY + 20)" - #sleep 0.1 - done & - -elif [ "$Y" = 'false' ]; then # subtracting - while [ "$nodeY" -gt "$scaleY" ]; do - bspc node --resize top 0 10 - bspc node --resize bottom 0 -10 - nodeY="$(expr $nodeY - 20)" - #sleep 0.1 - done & -fi - -if [ "$X" = 'true' ]; then # adding - while [ "$nodeX" -lt "$scaleX" ]; do - bspc node --resize left -10 0 - bspc node --resize right 10 0 - nodeX="$(expr $nodeX + 20)" - #sleep 0.1 - done & - -elif [ "$X" = 'false' ]; then # subtracting - while [ "$nodeX" -gt "$scaleX" ]; do - bspc node --resize left 10 0 - bspc node --resize right -10 0 - nodeX="$(expr $nodeX - 20)" - #sleep 0.1 - done & -fi