diff options
author | Sean Whitton <spwhitton@spwhitton.name> | 2022-02-02 22:41:54 -0700 |
---|---|---|
committer | Sean Whitton <spwhitton@spwhitton.name> | 2022-02-03 12:14:37 -0700 |
commit | 481b0199660668067d87e7e39375837c6561eb52 (patch) | |
tree | 9c77fa85eb82aa74404c477b33bf0f310760f11f /scripts | |
parent | 4e75e8515c4a8937f246e39b2a24b08b387d879b (diff) | |
download | dotfiles-481b0199660668067d87e7e39375837c6561eb52.tar.gz |
move dmenu_* scripts bin/ -> scripts/desktop/
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/desktop/dmenu_ssh | 7 | ||||
-rwxr-xr-x | scripts/desktop/dmenu_window | 8 |
2 files changed, 15 insertions, 0 deletions
diff --git a/scripts/desktop/dmenu_ssh b/scripts/desktop/dmenu_ssh new file mode 100755 index 00000000..c833166b --- /dev/null +++ b/scripts/desktop/dmenu_ssh @@ -0,0 +1,7 @@ +#!/bin/sh + +host=$(perl -wlne'/^Host\s+(\S+)/ and !/\*/ and print $1' $HOME/.ssh/config \ + | dmenu -p "ssh to tmux on host" "$@") +if [ -n "$host" ]; then + ssh-and-tmux-term "$host" +fi diff --git a/scripts/desktop/dmenu_window b/scripts/desktop/dmenu_window new file mode 100755 index 00000000..8dc33fde --- /dev/null +++ b/scripts/desktop/dmenu_window @@ -0,0 +1,8 @@ +#!/bin/sh + +window=$(i3-msg -t get_tree \ + | jq -r "recurse(.nodes[]) | select(.window) | .name" \ + | dmenu -i -p "select window" "$@") +if [ -n "$window" ]; then + i3-msg '[title="'$window'"] focus' +fi |