Iterating sway config
This commit is contained in:
parent
3922c11801
commit
33666bad90
|
@ -2,6 +2,7 @@
|
||||||
let
|
let
|
||||||
cfg = config.this.application.sway;
|
cfg = config.this.application.sway;
|
||||||
graphical = config.this.graphical;
|
graphical = config.this.graphical;
|
||||||
|
modifier = "Mod4";
|
||||||
wallpaper = pkgs.fetchurl {
|
wallpaper = pkgs.fetchurl {
|
||||||
url =
|
url =
|
||||||
"https://raw.githubusercontent.com/catppuccin/wallpapers/main/landscapes/evening-sky.png";
|
"https://raw.githubusercontent.com/catppuccin/wallpapers/main/landscapes/evening-sky.png";
|
||||||
|
@ -23,13 +24,17 @@ in with lib; {
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
|
|
||||||
|
this.graphical.protocol = "Wayland";
|
||||||
|
|
||||||
home-manager.users.james = {
|
home-manager.users.james = {
|
||||||
home.sessionVariables = { XDG_CURRENT_DESKTOP = "sway"; };
|
home.sessionVariables = { XDG_CURRENT_DESKTOP = "sway"; };
|
||||||
wayland.windowManager.sway = {
|
wayland.windowManager.sway = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
package = null;
|
||||||
wrapperFeatures.gtk = true;
|
wrapperFeatures.gtk = true;
|
||||||
config = {
|
config = {
|
||||||
bars = [ ];
|
# bars = [ ];
|
||||||
colors = {
|
colors = {
|
||||||
focusedInactive = {
|
focusedInactive = {
|
||||||
background = "#1E1E2E";
|
background = "#1E1E2E";
|
||||||
|
@ -86,13 +91,20 @@ in with lib; {
|
||||||
};
|
};
|
||||||
# And import and scripts as scene here would be good.
|
# And import and scripts as scene here would be good.
|
||||||
keybindings = mkOptionDefault {
|
keybindings = mkOptionDefault {
|
||||||
|
"${modifier}+q" = "kill";
|
||||||
|
"${modifier}+d" = "focus mode_toggle";
|
||||||
|
"${modifier}+a" = "focus parent";
|
||||||
|
"${modifier}+shift+s" = "sticky toggle";
|
||||||
|
"${modifier}+shift+f" = "floating toggle";
|
||||||
|
"${modifier}+space" =
|
||||||
|
"exec $(${pkgs.dmenu}/bin/dmenu_path | ${pkgs.dmenu}/bin/dmenu)";
|
||||||
|
Pause = "exec ${pkgs.playerctl}/bin/playerctl play-pause";
|
||||||
|
XF86AudioLowerVolume = "exec ${volume-sh}/bin/volume.sh down";
|
||||||
XF86AudioMute = "exec ${volume-sh}/bin/volume.sh mute";
|
XF86AudioMute = "exec ${volume-sh}/bin/volume.sh mute";
|
||||||
XF86AudioRaiseVolume = "exec ${volume-sh}/bin/volume.sh up";
|
XF86AudioRaiseVolume = "exec ${volume-sh}/bin/volume.sh up";
|
||||||
XF86AudioLowerVolume = "exec ${volume-sh}/bin/volume.sh down";
|
|
||||||
Pause = "exec ${pkgs.playerctl}/bin/playerctl play-pause";
|
|
||||||
XF86MonBrightnessUp = "exec ${brightness-sh}/bin/brightness.sh up";
|
|
||||||
XF86MonBrightnessDown =
|
XF86MonBrightnessDown =
|
||||||
"exec ${brightness-sh}/bin/brightness.sh down";
|
"exec ${brightness-sh}/bin/brightness.sh down";
|
||||||
|
XF86MonBrightnessUp = "exec ${brightness-sh}/bin/brightness.sh up";
|
||||||
};
|
};
|
||||||
# https://github.com/gytis-ivaskevicius/nixfiles/blob/master/home-manager/i3-sway.nix
|
# https://github.com/gytis-ivaskevicius/nixfiles/blob/master/home-manager/i3-sway.nix
|
||||||
modifier = "Mod4";
|
modifier = "Mod4";
|
||||||
|
@ -134,7 +146,6 @@ in with lib; {
|
||||||
wants = [ "graphical-session-pre.target" ];
|
wants = [ "graphical-session-pre.target" ];
|
||||||
after = [ "graphical-session-pre.target" ];
|
after = [ "graphical-session-pre.target" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
systemd.user.services.sway = {
|
systemd.user.services.sway = {
|
||||||
enable = true;
|
enable = true;
|
||||||
description = "Sway - Wayland window manager";
|
description = "Sway - Wayland window manager";
|
||||||
|
@ -161,4 +172,3 @@ in with lib; {
|
||||||
users.users.james.extraGroups = [ "video" "audio" ];
|
users.users.james.extraGroups = [ "video" "audio" ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Reference in New Issue
Block a user