diff options
| author | JopStro <[email protected]> | 2020-06-19 10:06:46 +0100 |
|---|---|---|
| committer | JopStro <[email protected]> | 2020-06-19 10:06:46 +0100 |
| commit | 1ed1e7896089bc3bc5aae19c245791fc2b9bd310 (patch) | |
| tree | 5f8784b11d113fb820d9e6a1fe666b47b4a048eb | |
| parent | 68cf698a11018ede0bc635edee1b69e587a91ddd (diff) | |
Swap the main script and the alternative script
| -rw-r--r-- | README.md | 2 | ||||
| -rw-r--r-- | alternative/README.md | 2 | ||||
| -rwxr-xr-x[-rw-r--r--] | alternative/bspswallow | 2 | ||||
| -rwxr-xr-x | bspswallow | 2 | ||||
| -rw-r--r-- | examples/noswallow | 1 | ||||
| -rw-r--r-- | examples/swallow | 2 |
6 files changed, 5 insertions, 6 deletions
@@ -9,7 +9,7 @@ Adds functionality provided by the dwm "swallow" patch to bspwm. # Instalation Add two files to ~/.config/bspwm -* swallow - list of classes of windows that you want to swallow the terminal +* noswallow - list of classes of windows that you dont't to swallow the terminal * terminals - list of classes of terminals that you want to be swallowed diff --git a/alternative/README.md b/alternative/README.md index 0794648..8e98ae0 100644 --- a/alternative/README.md +++ b/alternative/README.md @@ -1,3 +1,3 @@ # Alternative version -This is a version of the script in which you specify a list of classes of programs that you don't want to swallow the terminal in a file called "noswallow". +This is a version of the script in which you specify a list of classes of programs that you *do* want to swallow the terminal in a file called "swallow" and everything else isn't swallowed. diff --git a/alternative/bspswallow b/alternative/bspswallow index 8e787a3..1406fcf 100644..100755 --- a/alternative/bspswallow +++ b/alternative/bspswallow @@ -13,7 +13,7 @@ get_class() { swallow() { swallowerid=$1 swallowingid=$(bspc query -n prev -N) - cat ~/.config/bspwm/noswallow ~/.config/bspwm/terminals | grep "^$(get_class $swallowerid)$" && return + grep "^$(get_class $swallowerid)$" ~/.config/bspwm/swallow || return grep "^$(get_class $swallowingid)$" ~/.config/bspwm/terminals || return echo $swallowerid $swallowingid >> /tmp/swallowids bspc node $swallowingid --flag hidden=on @@ -13,7 +13,7 @@ get_class() { swallow() { swallowerid=$1 swallowingid=$(bspc query -n prev -N) - grep "^$(get_class $swallowerid)$" ~/.config/bspwm/swallow || return + cat ~/.config/bspwm/noswallow ~/.config/bspwm/terminals | grep "^$(get_class $swallowerid)$" && return grep "^$(get_class $swallowingid)$" ~/.config/bspwm/terminals || return echo $swallowerid $swallowingid >> /tmp/swallowids bspc node $swallowingid --flag hidden=on diff --git a/examples/noswallow b/examples/noswallow new file mode 100644 index 0000000..9f23d84 --- /dev/null +++ b/examples/noswallow @@ -0,0 +1 @@ +xev diff --git a/examples/swallow b/examples/swallow deleted file mode 100644 index 47ed947..0000000 --- a/examples/swallow +++ /dev/null @@ -1,2 +0,0 @@ -mpv -Sxiv |
