dotfiles/sxhkd
Marty Oehme f94759697d
qutebrowser: Add launcher to open links
Added bemenu launcher (can alternatively use dmenu) to find and
quickly open a link in the current qutebrowser instance (or a new one if
none exist). Will open it by default in a new tab or if `tab` argument
passed, if `open` option is passed it will open it in the current page
instead.

The script can be used both standalone by being invoked as `qutedmenu`,
or from qutebrowser itself, invoked from its commandline as `spawn
--userscript qutedmenu <open|tab>`.

By default uses bemenu, but if that is not found on system will
automatically switch to make use of dmenu. If you want to use rofi as
your dmenu replacement, generally I will assume it is already symlinked
to dmenu.

Added a keymapping to sxhkd `Mod-Shift-O`, which invokes it from
anywhere.
2021-08-18 23:35:24 +02:00
..
.config/sxhkd qutebrowser: Add launcher to open links 2021-08-18 23:35:24 +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.