Hyprdock

A small utility to handle automatic monitor docking.

HardRequirements

Soft Requirements

These are programs that were meant to be used with hyprdock, however, the toml allows you to specify the commands you would like to run. So feel free to test out other programs. - Hyprland - swaylock - systemd

behavior and features

Example config

path needs to be $HOME/.config/hypr/hyprdock.toml

~~~ monitorname = "eDP-1" openbarcommand = "eww open bar" closebarcommand = "eww close-all" reloadbarcommand = "eww reload" suspendcommand = "systemctl suspend" lockcommand = "swaylock -c 000000" utilitycommand = "playerctl --all-players -a pause" getmonitorscommand = "hyprctl monitors" enableinternalmonitorcommand = "hyprctl keyword monitor eDP-1,highrr,0x0,1" disableinternalmonitorcommand = "hyprctl keyword monitor eDP-1,disabled" enableexternalmonitorcommand = "hyprctl keyword monitor ,highrr,0x0,1" disableexternalmonitorcommand = "hyprctl keyword monitor ,disabled" extendcommand = "hyprctl keyword monitor ,highrr,1920x0,1" mirrorcommand = "hyprctl keyword monitor ,highrr,0x0,1" wallpaper_command = "hyprctl dispatch hyprpaper" ~~~

multiple commands in 1 line

~~~

make sure to leave a blank space between the start and end of the ;;, which marks the end and start of commands.

utility_command = "yourcommand args ;; yourothercommand args" ~~~

extend and mirror

You can specify which should be the default command after plugging in monitors or opening the laptop lid when an external monitor is still connected: ~~~ defaultexternalcommand = "extend" # or "mirror" ~~~

When are specific functions called?