Add rofi configuration
This commit is contained in:
parent
6cabddd647
commit
393087e8a5
5 changed files with 32 additions and 0 deletions
6
rofi/.config/Xresources/Rofi.conf
Normal file
6
rofi/.config/Xresources/Rofi.conf
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
! Use a nice font.
|
||||||
|
rofi.font: Fantasque Sans Mono 15
|
||||||
|
|
||||||
|
! Add C-g to the keys used to cancel an action in Rofi. I am used to
|
||||||
|
! this from Emacs and I always press it before I press ESC.
|
||||||
|
rofi.kb-cancel: Escape,Control+bracketleft,Control+g
|
14
rofi/.config/herbstluftwm/autostart.d/rofi.sh
Executable file
14
rofi/.config/herbstluftwm/autostart.d/rofi.sh
Executable file
|
@ -0,0 +1,14 @@
|
||||||
|
#!/usr/bin/env zsh
|
||||||
|
|
||||||
|
if ! whence hc; then
|
||||||
|
function hc() { herbstclient "$@"; }
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Run things with rofi
|
||||||
|
hc keybind Mod4-r spawn rofi -show run -m 0
|
||||||
|
|
||||||
|
# Use a special rofi configuration that allows windows to be locked by
|
||||||
|
# herbstluftwm.
|
||||||
|
hc keybind Mod4-w spawn rofi -show window -m 0 \
|
||||||
|
-window-command "$HOME/usr/bin/hlwm-switch-to-window {window}" \
|
||||||
|
-config "$HOME/.config/rofi/windows.conf"
|
3
rofi/.config/rofi/windows.conf
Normal file
3
rofi/.config/rofi/windows.conf
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
! -*- mode: conf-xdefaults; -*-
|
||||||
|
rofi.kb-accept-entry: Control+Return,Shift+Return
|
||||||
|
rofi.kb-accept-custom: Control+j,Control+m,Return,KP_Enter
|
8
rofi/usr/bin/hlwm-switch-to-window
Executable file
8
rofi/usr/bin/hlwm-switch-to-window
Executable file
|
@ -0,0 +1,8 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
winid="0x$(printf "%x\n" $1)"
|
||||||
|
tag=$(herbstclient attr clients.$winid.tag)
|
||||||
|
herbstclient chain \
|
||||||
|
, silent substitute M tags.by-name.$tag.my_monitor focus_monitor M \
|
||||||
|
, use $tag \
|
||||||
|
, jumpto $winid
|
1
x11/.Xresources
Normal file
1
x11/.Xresources
Normal file
|
@ -0,0 +1 @@
|
||||||
|
#include ".config/Xresources/Rofi.conf"
|
Loading…
Reference in a new issue