Add wofi support.
This commit is contained in:
parent
52844192b7
commit
ff58229b23
1
Makefile
1
Makefile
@ -5,6 +5,7 @@ FILES = bashrc bash_profile vimrc zshrc gitconfig screenrc commonshrc liquidprom
|
|||||||
config/khal config/vdirsyncer/config config/khard \
|
config/khal config/vdirsyncer/config config/khard \
|
||||||
config/rofi-pass gdbinit notmuch-config \
|
config/rofi-pass gdbinit notmuch-config \
|
||||||
config/fish tridactylrc config/sway/config config/mpv/mpv.conf \
|
config/fish tridactylrc config/sway/config config/mpv/mpv.conf \
|
||||||
|
config/wofi \
|
||||||
$(wildcard sbt/0.13/*.sbt sbt/0.13/plugins/*.sbt) \
|
$(wildcard sbt/0.13/*.sbt sbt/0.13/plugins/*.sbt) \
|
||||||
$(wildcard sbt/1.0/plugins/*.sbt)
|
$(wildcard sbt/1.0/plugins/*.sbt)
|
||||||
|
|
||||||
|
26
config/wofi/style.css
Normal file
26
config/wofi/style.css
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
window {
|
||||||
|
margin: 0px;
|
||||||
|
border: 1px solid #666;
|
||||||
|
background-color: #222;
|
||||||
|
color: white;
|
||||||
|
font-family: "Fira Code";
|
||||||
|
}
|
||||||
|
|
||||||
|
#input {
|
||||||
|
padding: 5px;
|
||||||
|
border: none;
|
||||||
|
background-color: #333;
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
|
||||||
|
#inner-box, #input, #outer-box, #text {
|
||||||
|
margin: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#scroll {
|
||||||
|
margin: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#entry:selected {
|
||||||
|
background-color: #555;
|
||||||
|
}
|
10
wofi_windows.sh
Executable file
10
wofi_windows.sh
Executable file
@ -0,0 +1,10 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# Get available windows
|
||||||
|
windows=$(swaymsg -t get_tree | jq -r 'recurse(.nodes[]?)|recurse(.floating_nodes[]?)|select(.type=="con"),select(.type=="floating_con")|(.id|tostring)+" "+.app_id+": "+.name')
|
||||||
|
|
||||||
|
# Select window with rofi
|
||||||
|
selected=$(echo "$windows" | wofi --show dmenu -i | awk '{print $1}')
|
||||||
|
|
||||||
|
# Tell sway to focus said window
|
||||||
|
swaymsg "[con_id=$selected]" focus
|
Loading…
Reference in New Issue
Block a user