dotfiles/sxhkd
Marty Oehme b628f7e4e8
sxhkd: Switch dunst pause for history search
Removed the unused dunst pausing hotkey, and switched it for a search of
qutebrowser bookmarks, quickmarks, and history.
Key mapping is fn+<Search-Key> (F9 on my machine), and it will open in a
dmenu-like frame.
Results will open in the last opened browser instance, or open a new
one.
2021-10-20 22:35:49 +02:00
..
.config/sxhkd sxhkd: Switch dunst pause for history search 2021-10-20 22:35:49 +02:00
.local/bin sxhkd: Change chain mode exiting 2021-07-10 18:03:50 +02:00
README.md [sxhkd] Add script to show current sxhkd mode 2020-05-26 11:50:20 +02:00

sxhkd

sxhkd -- simple X hotkey daemon

sxhkd is set up to manage most of the key bindings in this dotfile configuraition. It is primarily used for three things: system control, to invoke rofi, and to switch between different desktop operating modes.

system control

  • super+x: lock the system, i.e. put a lockscreen in front of it, unlocked with your password
  • media keys: control the Brightness, Volume, Mute of the system
  • super+return: open a terminal

rofi invocations

  • super+backspace: system management (shutdown,reboot,logout,..)
  • super+space: app launching
  • super+r: extended run menu
  • super+p: password/secret autofill menu
  • super+F8: theme setting menu
  • super+q: quick access to bookmarks and search bangs

modal desktop

The modal setup of this desktop allows to first invoke an operating mode and then open the possibility for additional keybindings. For example, alt + m will invoke the media mode and then media playback can be controlled through the hjkl keys. Think of it like invoking the insert mode, or visual mode in a modal editor like vim.

The idea behind the modal system is to not overload normal system operation with key binds that are only needed every now and again, and mostly as a coherent package. If I want to control my media playback, by seeking forward or backward, having quick access to controlling the volume seems logical. But I may not want to open a scholarly pdf, or programming project at the same time, so these actions don't need to be included in a coherent 'media' mode.

The modes currently are:

  • media, for controlling playback and volume
  • academia, for opening pdf, seeing upcoming readings, and editing references

They are still in flux and may change every now and again as I put this modal setup to the test. To get a closer look at the actual key binds, look into .config/sxhkd/sxhkdrc for now.

modal notifications

To know which mode is currently active on the desktop, this module includes a script which will print sxhkd's current mode to stdout, or a file. This script can be used to show the active mode in a status bar, for example (as the polybar module in these dotfiles does).

The script lives in .local/bin/sxhkd-chain-labels and can be invoked from the path by default. To see available options and the configuration file format use sxhkd-chain-labels -h, or take look at the script itself.

This module overwrites the usual sxhkd program invocation using an alias, which makes sxhkd always (if no options are passed) create and use a named pipe in the XDG_RUNTIME_DIR directory. This is the default location the script will pick it up in.