Marty Oehme
3d0446de05
Changed the way to exit sxhkd chain modes. Instead of using `esc` to get out of them, now pressing the mode key chain again will also exit out of the mode (e.g. `alt + m` to get into `media` mode, then `alt + m` once more to exit it). This is done since using escape will interfere with many normal-use scenarios while in a chain-mode, especially if those modes are intended to be used over somewhat longer periods of time (somewhat like vim-modes or emacs layers). The key to exit modes has now been moved to `copyright`, so in the rather improbable case that your keyboard contains a `copyright` key, be careful of accidentally hitting it when in an sxhkd chain mode. Fixed passing arguments to the sxhkd-piped script. It will pass along any commandline arguments passed now (even `-s`, though then the script will cease to do anything). Improved version output of sxhkd-chain-labels a little, invoking `sxhkd-chain-labels -v` will now show the correct configuration file and FIFO pipe being used, as well as whether they exist on the file system. Fixed the versioning of the script to display the correct version. |
||
---|---|---|
.. | ||
.config/sxhkd | ||
.local/bin | ||
README.md |
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.