refactoring in to modules and things, color changes, niri testing
This commit is contained in:
parent
585438f1ce
commit
326acd2c65
9 changed files with 366 additions and 167 deletions
|
@ -1,2 +1 @@
|
|||
{
|
||||
}
|
||||
{}
|
||||
|
|
|
@ -1,9 +1,14 @@
|
|||
{ lib, config, pkgs, home, ... }:
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
xwayland-satellite
|
||||
];
|
||||
programs.niri = {
|
||||
enable = true;
|
||||
|
||||
settings = {
|
||||
environment = {
|
||||
"DISPLAY" = ":0";
|
||||
"NIXOS_OZONE_WL" = "1";
|
||||
"QT_QPA_PLATFORM" = "wayland";
|
||||
};
|
||||
|
@ -23,8 +28,9 @@
|
|||
"Mod+Shift+Slash".action.show-hotkey-overlay = {};
|
||||
|
||||
# Suggested binds for running programs: terminal, app launcher, screen locker.
|
||||
"Mod+T".action.spawn = "alacritty";
|
||||
# "Mod+T".action.spawn = "alacritty";
|
||||
"Mod+D".action.spawn = "fuzzel";
|
||||
"Mod+Return".action.spawn = "kitty";
|
||||
"Super+Alt+L".action.spawn = "swaylock";
|
||||
|
||||
# You can also use a shell. Do this if you need pipes, multiple commands, etc.
|
||||
|
@ -61,14 +67,14 @@
|
|||
"Mod+K".action.focus-window-up = {};
|
||||
"Mod+L".action.focus-column-right = {};
|
||||
|
||||
"Mod+Ctrl+Left".action.move-column-left = {};
|
||||
"Mod+Ctrl+Down".action.move-window-down = {};
|
||||
"Mod+Ctrl+Up".action.move-window-up = {};
|
||||
"Mod+Ctrl+Right".action.move-column-right = {};
|
||||
"Mod+Ctrl+H".action.move-column-left = {};
|
||||
"Mod+Ctrl+J".action.move-window-down = {};
|
||||
"Mod+Ctrl+K".action.move-window-up = {};
|
||||
"Mod+Ctrl+L".action.move-column-right = {};
|
||||
"Mod+Shift+Left".action.move-column-left = {};
|
||||
"Mod+Shift+Down".action.move-window-down = {};
|
||||
"Mod+Shift+Up".action.move-window-up = {};
|
||||
"Mod+Shift+Right".action.move-column-right = {};
|
||||
"Mod+Shift+H".action.move-column-left = {};
|
||||
"Mod+Shift+J".action.move-window-down = {};
|
||||
"Mod+Shift+K".action.move-window-up = {};
|
||||
"Mod+Shift+L".action.move-column-right = {};
|
||||
|
||||
# Alternative commands that move across workspaces when reaching
|
||||
# the first or last window in a column.
|
||||
|
@ -82,14 +88,14 @@
|
|||
"Mod+Ctrl+Home".action.move-column-to-first = {};
|
||||
"Mod+Ctrl+End".action.move-column-to-last = {};
|
||||
|
||||
"Mod+Shift+Left".action.focus-monitor-left = {};
|
||||
"Mod+Shift+Down".action.focus-monitor-down = {};
|
||||
"Mod+Shift+Up".action.focus-monitor-up = {};
|
||||
"Mod+Shift+Right".action.focus-monitor-right = {};
|
||||
"Mod+Shift+H".action.focus-monitor-left = {};
|
||||
"Mod+Shift+J".action.focus-monitor-down = {};
|
||||
"Mod+Shift+K".action.focus-monitor-up = {};
|
||||
"Mod+Shift+L".action.focus-monitor-right = {};
|
||||
"Mod+Ctrl+Left".action.focus-monitor-left = {};
|
||||
"Mod+Ctrl+Down".action.focus-monitor-down = {};
|
||||
"Mod+Ctrl+Up".action.focus-monitor-up = {};
|
||||
"Mod+Ctrl+Right".action.focus-monitor-right = {};
|
||||
"Mod+Ctrl+H".action.focus-monitor-left = {};
|
||||
"Mod+Ctrl+J".action.focus-monitor-down = {};
|
||||
"Mod+Ctrl+K".action.focus-monitor-up = {};
|
||||
"Mod+Ctrl+L".action.focus-monitor-right = {};
|
||||
|
||||
"Mod+Shift+Ctrl+Left".action.move-column-to-monitor-left = {};
|
||||
"Mod+Shift+Ctrl+Down".action.move-column-to-monitor-down = {};
|
||||
|
@ -112,19 +118,19 @@
|
|||
"Mod+Page_Up".action.focus-workspace-up = {};
|
||||
"Mod+U".action.focus-workspace-down = {};
|
||||
"Mod+I".action.focus-workspace-up = {};
|
||||
"Mod+Ctrl+Page_Down".action.move-column-to-workspace-down = {};
|
||||
"Mod+Ctrl+Page_Up".action.move-column-to-workspace-up = {};
|
||||
"Mod+Ctrl+U".action.move-column-to-workspace-down = {};
|
||||
"Mod+Ctrl+I".action.move-column-to-workspace-up = {};
|
||||
"Mod+Shift+Page_Down".action.move-column-to-workspace-down = {};
|
||||
"Mod+Shift+Page_Up".action.move-column-to-workspace-up = {};
|
||||
"Mod+Shift+U".action.move-column-to-workspace-down = {};
|
||||
"Mod+Shift+I".action.move-column-to-workspace-up = {};
|
||||
|
||||
# Alternatively, there are commands to move just a single window:
|
||||
# Mod+Ctrl+Page_Down { move-window-to-workspace-down; }
|
||||
# ...
|
||||
|
||||
"Mod+Shift+Page_Down".action.move-workspace-down = {};
|
||||
"Mod+Shift+Page_Up".action.move-workspace-up = {};
|
||||
"Mod+Shift+U".action.move-workspace-down = {};
|
||||
"Mod+Shift+I".action.move-workspace-up = {};
|
||||
"Mod+Ctrl+Page_Down".action.move-workspace-down = {};
|
||||
"Mod+Ctrl+Page_Up".action.move-workspace-up = {};
|
||||
"Mod+Ctrl+U".action.move-workspace-down = {};
|
||||
"Mod+Ctrl+I".action.move-workspace-up = {};
|
||||
|
||||
# You can bind mouse wheel scroll ticks using the following syntax.
|
||||
# These binds will change direction based on the natural-scroll setting.
|
||||
|
@ -187,15 +193,15 @@
|
|||
"Mod+7".action.focus-workspace = 7;
|
||||
"Mod+8".action.focus-workspace = 8;
|
||||
"Mod+9".action.focus-workspace = 9;
|
||||
"Mod+Ctrl+1".action.move-column-to-workspace = 1;
|
||||
"Mod+Ctrl+2".action.move-column-to-workspace = 2;
|
||||
"Mod+Ctrl+3".action.move-column-to-workspace = 3;
|
||||
"Mod+Ctrl+4".action.move-column-to-workspace = 4;
|
||||
"Mod+Ctrl+5".action.move-column-to-workspace = 5;
|
||||
"Mod+Ctrl+6".action.move-column-to-workspace = 6;
|
||||
"Mod+Ctrl+7".action.move-column-to-workspace = 7;
|
||||
"Mod+Ctrl+8".action.move-column-to-workspace = 8;
|
||||
"Mod+Ctrl+9".action.move-column-to-workspace = 9;
|
||||
"Mod+Shift+1".action.move-column-to-workspace = 1;
|
||||
"Mod+Shift+2".action.move-column-to-workspace = 2;
|
||||
"Mod+Shift+3".action.move-column-to-workspace = 3;
|
||||
"Mod+Shift+4".action.move-column-to-workspace = 4;
|
||||
"Mod+Shift+5".action.move-column-to-workspace = 5;
|
||||
"Mod+Shift+6".action.move-column-to-workspace = 6;
|
||||
"Mod+Shift+7".action.move-column-to-workspace = 7;
|
||||
"Mod+Shift+8".action.move-column-to-workspace = 8;
|
||||
"Mod+Shift+9".action.move-column-to-workspace = 9;
|
||||
|
||||
# Alternatively, there are commands to move just a single window:
|
||||
# Mod+Ctrl+1 { move-window-to-workspace 1; }
|
||||
|
@ -261,12 +267,20 @@
|
|||
};
|
||||
};
|
||||
outputs = {
|
||||
"DP-1" = {
|
||||
position = { x = 0; y = 0; };
|
||||
scale = 1.3334;
|
||||
};
|
||||
"HDMI-A-1" = {
|
||||
position = { x = 1920; y = 0; };
|
||||
transform = {
|
||||
flipped = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
spawn-at-startup = [
|
||||
{ command = [ "xwayland-satellite" ]; }
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -0,0 +1,123 @@
|
|||
{ lib, config, pkgs, ... }:
|
||||
{
|
||||
programs = {
|
||||
swaylock.enable = true;
|
||||
};
|
||||
services = {
|
||||
swayidle = {
|
||||
enable = true;
|
||||
events = [
|
||||
{ event = "before-sleep"; command = "${pkgs.swaylock}/bin/swaylock -fF"; }
|
||||
];
|
||||
timeouts = [
|
||||
{
|
||||
timeout = 300;
|
||||
command = "${pkgs.swaylock}/bin/swaylock -fF";
|
||||
}
|
||||
{
|
||||
timeout = 330;
|
||||
command = "${pkgs.sway}/bin/swaymsg 'output * dpms off'";
|
||||
resumeCommand = "${pkgs.sway}/bin/swaymsg 'output * dpms on'";
|
||||
}
|
||||
];
|
||||
};
|
||||
swaync = {
|
||||
enable = true;
|
||||
|
||||
};
|
||||
swayosd = {
|
||||
enable = true;
|
||||
display = "DP-1";
|
||||
};
|
||||
};
|
||||
wayland.windowManager = {
|
||||
sway = {
|
||||
enable = true;
|
||||
extraConfig = ''
|
||||
smart_gaps inverse_outer
|
||||
'';
|
||||
config = {
|
||||
bars = [];
|
||||
window = {
|
||||
commands = [
|
||||
{
|
||||
command = "floating enable, sticky enable, resize set 20 ppt 40 ppt, border pixel 10";
|
||||
criteria = {
|
||||
app_id = "^launcher";
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
gaps = {
|
||||
inner = 30;
|
||||
vertical = 50;
|
||||
horizontal = 400;
|
||||
# smartGaps = true;
|
||||
smartBorders = "on";
|
||||
};
|
||||
input = {
|
||||
"type:keyboard" = {
|
||||
xkb_layout = "eu";
|
||||
xkb_options = "compose:rwin";
|
||||
};
|
||||
"type:touchpad" = {
|
||||
tap = "enabled";
|
||||
natural_scroll = "enabled";
|
||||
dwt = "enabled";
|
||||
accel_profile = "adaptive";
|
||||
pointer_accel = "0.5";
|
||||
};
|
||||
};
|
||||
keybindings = let
|
||||
modifier = config.wayland.windowManager.sway.config.modifier;
|
||||
in lib.mkOptionDefault {
|
||||
"XF86AudioRaiseVolume" = "exec wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+";
|
||||
"XF86AudioLowerVolume" = "exec wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-";
|
||||
"XF86AudioMute" = "exec wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle";
|
||||
"XF86MonBrightnessUp" = "exec brightnessctl set 10%+";
|
||||
"XF86MonBrightnessDown" = "exec brightnessctl set 10%-";
|
||||
"XF86AudioPlay" = "exec playerctl play-pause";
|
||||
"XF86AudioNext" = "exec playerctl next";
|
||||
"XF86AudioPrev" = "exec playerctl previous";
|
||||
"${modifier}+o" = "for_window [class=obsidian] scratchpad show";
|
||||
};
|
||||
menu = "kitty --app-id launcher -e sway-launcher-desktop";
|
||||
modifier = "Mod4";
|
||||
output = {
|
||||
DP-1 = {
|
||||
resolution = "3840x2160@30Hz";
|
||||
position = "1280 0";
|
||||
# background = "/home/muhh/Sync/Backgrounds/wald.jpg fill";
|
||||
scale = "1.5";
|
||||
};
|
||||
HDMI-A-1 = {
|
||||
resolution = "1920x1080@60.000Hz";
|
||||
transform = "180";
|
||||
position = "0 0";
|
||||
scale = "1.5";
|
||||
# background = "/home/muhh/Sync/Backgrounds/pfuetze.jpg fill";
|
||||
};
|
||||
};
|
||||
seat = {
|
||||
"*" = {
|
||||
hide_cursor = "5000";
|
||||
};
|
||||
};
|
||||
terminal = "kitty";
|
||||
window = {
|
||||
titlebar = false;
|
||||
};
|
||||
workspaceOutputAssign =
|
||||
map (x: {
|
||||
workspace = x;
|
||||
output = "DP-1";
|
||||
}) ["1" "2" "3" "4" "5" "6" "7"]
|
||||
++ map (x: {
|
||||
workspace = x;
|
||||
output = "HDMI-A-1";
|
||||
}) ["8" "9" "10"];
|
||||
};
|
||||
wrapperFeatures.gtk = true;
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue