Move nki-home to sway

This commit is contained in:
Natsu Kagami 2022-05-03 10:30:53 -04:00
parent 9bb3cc915c
commit 4b473b6a71
Signed by: nki
GPG key ID: 7306B3D3C3AD6E51
5 changed files with 40 additions and 26 deletions

View file

@ -29,10 +29,20 @@
]);
# Enable X11 configuration
linux.graphical.type = "x11";
linux.graphical.type = "wayland";
linux.graphical.wallpaper = ./images/wallpaper_1.png;
linux.graphical.x11.hidpi = true;
linux.graphical.x11.enablei3 = true;
programs.my-sway.enable = true;
programs.my-sway.fontSize = 13.0;
programs.my-sway.enableLaptopBars = false;
# Keyboard options
wayland.windowManager.sway.config.input."type:keyboard".xkb_layout = "jp";
# 144hz adaptive refresh ON!
wayland.windowManager.sway.config.output."ViewSonic Corporation XG2402 SERIES V4K182501054" = {
mode = "1920x1080@144Hz";
adaptive_sync = "on";
};
# linux.graphical.x11.hidpi = true;
# linux.graphical.x11.enablei3 = true;
# This value determines the Home Manager release that your
# configuration is compatible with. This helps avoid breakage

View file

@ -54,6 +54,12 @@ in
description = "The command to the terminal emulator to be used";
default = "${pkgs.alacritty}/bin/alacritty";
};
enableLaptopBars = mkOption {
type = types.bool;
description = "Whether to enable laptop-specific bars (battery)";
default = true;
};
};
config.wayland.windowManager.sway = mkIf cfg.enable {
@ -225,8 +231,11 @@ in
"memory"
"temperature"
"backlight"
"battery"
"battery#bat2"
] ++ (
if cfg.enableLaptopBars
then [ "battery" "battery#bat2" ]
else [ ]
) ++ [
"clock"
];
@ -261,7 +270,7 @@ in
states = [ 0 50 ];
format-icons = [ "" "" ];
};
"battery" = {
"battery" = mkIf cfg.enableLaptopBars {
states = {
good = 95;
warning = 30;
@ -272,7 +281,7 @@ in
# format-full = "";
format-icons = [ "" "" "" "" "" ];
};
"battery#bat2" = {
"battery#bat2" = mkIf cfg.enableLaptopBars {
bat = "BAT2";
};
"network" = {