Skip to content

Commit

Permalink
Add and configure swayr daemon
Browse files Browse the repository at this point in the history
  • Loading branch information
hzmmohamed committed Jan 7, 2024
1 parent ceb49f5 commit 712edd3
Showing 1 changed file with 42 additions and 1 deletion.
43 changes: 42 additions & 1 deletion modules/nixos/desktop/sway/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,49 @@ in {
};

# TODO: Borrow a more featureful setup from jake's config or others.
home.packages = with pkgs; [wl-clipboard wtype wofi-emoji swayr swaycons swayws qt6.qtwayland libsForQt5.qt5.qtwayland];
home.packages = with pkgs; [
wl-clipboard
wtype
wofi-emoji

swaycons
swayws
qt6.qtwayland
libsForQt5.qt5.qtwayland

wallutils
swww
waypaper
];
services.swayidle = {enable = true;};
programs.swaylock.enable = true;
services.swayr = {
enable = true;
systemd.enable = true;
settings = {
menu = {
executable = "${pkgs.wofi}/bin/wofi";
args = ["--show=dmenu" "--allow-markup" "--allow-images" "--insensitive" "--cache-file=/dev/null" "--parse-search" "--height=40%" "--prompt={prompt}"];
};
format = {
output_format = "{indent}Output {name} ({id})";
workspace_format = "{indent}Workspace {name} [{layout}] on output {output_name} ({id})";
container_format = "{indent}Container [{layout}] {marks} on workspace {workspace_name} ({id})";
window_format = "img:{app_icon}:text:{indent}{app_name} — {urgency_start}“{title}”{urgency_end} {marks} on workspace {workspace_name} / {output_name} ({id})";
indent = " ";
urgency_start = "";
urgency_end = "";
html_escape = true;
};
layout = {
auto_tile = false;
auto_tile_min_window_width_per_output_width = [[800 400] [1024 500] [1280 600] [1400 680] [1440 700] [1600 780] [1680 780] [1920 920] [2048 980] [2560 1000] [3440 1200] [3840 1280] [4096 1400] [4480 1600] [7680 2400]];
};
focus = {lockin_delay = 750;};
misc = {seq_inhibit = false;};
};
};


wayland.windowManager.sway = {
enable = true;
Expand Down Expand Up @@ -118,6 +158,7 @@ in {
in
# lib.nixpkgs.attrsets.mergeAttrsList [
{
# TODO: Add shortcuts for swayws
"${modifier}+Left" = "focus left";
"${modifier}+Down" = "focus down";
"${modifier}+Up" = "focus up";
Expand Down

0 comments on commit 712edd3

Please sign in to comment.