Compare commits
2 Commits
3d388e9fc8
...
494ea544a0
Author | SHA1 | Date |
---|---|---|
Ray Elliott | 494ea544a0 | |
Ray Elliott | 848802eb94 |
|
@ -4,8 +4,14 @@ Useful utility scripts.
|
||||||
|
|
||||||
`install.sh` -- install all files in `./src/` to install directory (`/usr/local/bin/`).
|
`install.sh` -- install all files in `./src/` to install directory (`/usr/local/bin/`).
|
||||||
|
|
||||||
|
`install.sh -o` -- overwrite pre-existing files in destination directory.
|
||||||
|
|
||||||
`install.sh -u` -- uninstall all files in `./src/` from install directory.
|
`install.sh -u` -- uninstall all files in `./src/` from install directory.
|
||||||
|
|
||||||
|
### Dependencies
|
||||||
|
|
||||||
|
* `xtitle` - available in AUR.
|
||||||
|
|
||||||
## Files
|
## Files
|
||||||
|
|
||||||
| Script | Comment |
|
| Script | Comment |
|
||||||
|
@ -15,4 +21,5 @@ Useful utility scripts.
|
||||||
|newsh ["command"]|Create executable `sh` script. Optionally add `command`.|
|
|newsh ["command"]|Create executable `sh` script. Optionally add `command`.|
|
||||||
|pam-say <text>|Tells Pamela to say something.|
|
|pam-say <text>|Tells Pamela to say something.|
|
||||||
|qutesesh|Open a Qutebrowser session.|
|
|qutesesh|Open a Qutebrowser session.|
|
||||||
|
|window-select|Use Dmenu to select from all windows.|
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,20 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# dependency - xtitle
|
||||||
|
|
||||||
|
. "$HOME/.config/dmenu/dmenurc"
|
||||||
|
|
||||||
|
if command -v bspc ; then
|
||||||
|
# adapted from: https://www.reddit.com/r/bspwm/comments/er2olp/dmenu_window_picker/ff16ff0/
|
||||||
|
ids=($(bspc query -N -n .window))
|
||||||
|
options="$(xtitle "${ids[@]}" | awk '{ print ++i": "$0 }')"
|
||||||
|
|
||||||
|
[[ -n "$options" ]] || exit
|
||||||
|
|
||||||
|
id_index="$(<<< "$options" dmenu $DMENU_OPTIONS | cut -d: -f1)"
|
||||||
|
[[ -n "$id_index" ]] || exit
|
||||||
|
bspc node "${ids[$((id_index - 1))]}" -f
|
||||||
|
|
||||||
|
# NOTE: you can change the query from '.window' to '.local.window', '.local.tiled' (to only have tiled windows
|
||||||
|
# as options) or '.local.window.!fullscreen.!floating' (to only have tiled and pseudo_tiled windows as options).
|
||||||
|
fi
|
Loading…
Reference in New Issue