| Crates.io | hyprdock |
| lib.rs | hyprdock |
| version | 0.4.3 |
| created_at | 2023-03-22 08:48:37.424563+00 |
| updated_at | 2025-06-08 13:36:45.750733+00 |
| description | A small program to handle external pluggable screens with hyprland and acpid |
| homepage | |
| repository | https://github.com/DashieTM/hyprdock |
| max_upload_size | |
| id | 816820 |
| size | 106,165 |
A small utility to handle automatic monitor docking for Hyprland.
Location: $XDG_CONFIG_HOME/hyprdock/config.toml
default_external_mode = "extend"
css_string = ""
[init_command]
base = ""
args = []
[open_bar_command]
base = "ironbar"
args = []
[close_bar_command]
base = "killall"
args = ["ironbar"]
[reload_bar_command]
base = "ironbar"
args = []
[suspend_command]
base = "systemctl"
args = ["suspend"]
[lock_command]
base = "hyprlock"
args = []
[utility_command]
base = "playerctl"
args = ["--all-players", "-a", "pause"]
[get_monitors_command]
base = "hyprctl"
args = ["monitors"]
[enable_internal_monitor_command]
base = "hyprctl"
args = ["keyword", "monitor", "eDP-1,highres,0x0,1"]
[disable_internal_monitor_command]
base = "hyprctl"
args = ["keyword", "monitor", "eDP-1,disabled"]
[enable_external_monitor_command]
base = "hyprctl"
args = ["keyword", "monitor", ",highres,0x0,1"]
[disable_external_monitor_command]
base = "hyprctl"
args = ["keyword", "monitor", ",disabled"]
[extend_command]
base = "hyprctl"
args = ["keyword", "monitor", ",highres,1920x0,1"]
[mirror_command]
base = "hyprctl"
args = ["keyword", "monitor", ",highres,0x0,1"]
[wallpaper_command]
base = "hyprctl"
args = ["dispatch", "hyprpaper"]
In order to use the server mode properly, you need to override existing lid switch behavior.
For systemd/logind, you can ignore the lid switch events like this in the file /etc/systemd/logind.conf:
HandleLidSwitch=ignore
HandleLidSwitchExternalPower=ignore
HandleLidSwitchDocked=ignore
As of right now, hyprdock is not packaged in upstream NixOS or home-manager. The NixOS PR is open, with a home-manager PR following after. You therefore have to include hyprdock as a standalone flake:
inuts = {
hyprdock.url = "github:Xetibo/hyprdock";
};
And then also include the module for home-manager if you want to automatically configure it:
home-manager.users.${username} = {
imports = [
inputs.hyprdock.homeManagerModules.default
./yourconfig.nix
];
};
For only NixOS you can use the package directly:
environment.systemPackages = [
inputs.hyprdock.packages.${system}.default
];
If you are using home-manager, you can enable and configure hyprdock via nix directly:
programs.hyprdock = {
enable = true;
settings = {
# set to whatever monitor you have
monitor_name = "HDMI-1";
# Commands are attrsets as well:
open_bar_command = {
base = "ironbar";
args = [];
};
};
};
Lid switch behavior has to be set as a NixOS option:
services.logind.lidSwitch = "ignore";
By default hyprdock uses your system gtk4 theme.
The style can be configured with your own CSS file.
Just overwrite the css_string variable in the toml configuration file.
List of IDs: