more or less wayland support

This commit is contained in:
CDaut 2024-04-25 09:33:20 +02:00
parent ada74f1c4e
commit 87f9fb7bb6
Signed by: clara
GPG key ID: 223391B52FAD4463
6 changed files with 188 additions and 7 deletions

121
programm_configs/sway.nix Normal file
View file

@ -0,0 +1,121 @@
{ config, lib, pkgs, ... }:
{
wayland.windowManager.sway = let mod = "Mod4"; in {
enable = true;
systemd = {
enable = true;
};
config = rec {
fonts = { names = [ "DejaVu Sans Mono" "FontAwesome 6" ]; };
terminal = "alacritty";
bars = [ ];
input = {
"*" = {
xkb_layout = "de";
};
};
menu = "${pkgs.rofi}/bin/rofi -show combi -config ~/.config/rofi/config.rasi";
modifier = mod; # Super key
gaps = {
inner = 10;
outer = 0;
};
keybindings = {
# screenlock
"${mod}+shift+l" = "exec --no-startup-id ~/.config/i3/lock.sh";
# audio control fluff
"XF86AudioRaiseVolume" = "exec --no-startup-id wpctl set-volume @DEFAULT_SINK@ 5%+ && $refresh_i3status";
"XF86AudioLowerVolume" = "exec --no-startup-id wpctl set-volume @DEFAULT_SINK@ 5%- && $refresh_i3status";
"XF86AudioMute" = "exec --no-startup-id wpctl set-mute @DEFAULT_SINK@ toggle && $refresh_i3status";
# Terminal
"${mod}+Return" = "exec alacritty";
"${mod}+Shift+q" = "kill";
"${mod}+d" = "exec ${pkgs.rofi}/bin/rofi -show combi -config ~/.config/rofi/config.rasi";
"${mod}+Left" = "focus left";
"${mod}+Down" = "focus down";
"${mod}+Up" = "focus up";
"${mod}+Right" = "focus right";
"${mod}+Shift+Left" = "move left";
"${mod}+Shift+Down" = "move down";
"${mod}+Shift+Up" = "move up";
"${mod}+Shift+Right" = "move right";
"${mod}+h" = "splith";
"${mod}+v" = "splitv";
"${mod}+f" = "fullscreen toggle";
"${mod}+s" = "layout stacking";
"${mod}+w" = "layout tabbed";
"${mod}+e" = "layout toggle split";
"${mod}+Shift+space" = "floating toggle";
"${mod}+space" = "focus mode_toggle";
"${mod}+1" = "workspace number 1";
"${mod}+2" = "workspace number 2";
"${mod}+3" = "workspace number 3";
"${mod}+4" = "workspace number 4";
"${mod}+5" = "workspace number 5";
"${mod}+6" = "workspace number 6";
"${mod}+7" = "workspace number 7";
"${mod}+8" = "workspace number 8";
"${mod}+9" = "workspace number 9";
"${mod}+0" = "workspace number 10";
"${mod}+Shift+1" =
"move container to workspace number 1";
"${mod}+Shift+2" =
"move container to workspace number 2";
"${mod}+Shift+3" =
"move container to workspace number 3";
"${mod}+Shift+4" =
"move container to workspace number 4";
"${mod}+Shift+5" =
"move container to workspace number 5";
"${mod}+Shift+6" =
"move container to workspace number 6";
"${mod}+Shift+7" =
"move container to workspace number 7";
"${mod}+Shift+8" =
"move container to workspace number 8";
"${mod}+Shift+9" =
"move container to workspace number 9";
"${mod}+Shift+0" =
"move container to workspace number 10";
"${mod}+Shift+r" = "reload";
"${mod}+Shift+e" =
"exec swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -b 'Yes, exit sway' 'swaymsg exit'";
"${mod}+r" = "mode resize";
};
startup = [
{
command = "systemctl --user restart waybar";
always = true;
}
{
command = "nextcloud";
always = true;
}
{
command = "systemctl --user restart redshift";
always = true;
}
{
command = "systemctl --user restart xfce4-notifyd.service";
always = true;
}
{
command = "blueman-applet";
always = true;
}
];
};
};
}

View file

@ -0,0 +1,24 @@
{ pkgs, ... }:
let
colors = {
background = "#222";
background-alt = "#444";
foreground = "#dfdfdf";
foreground-alt = "#555";
primary = "#ffb52a";
secondary = "#e60053";
alert = "#bd2c40";
accent = "#ffbb00";
};
in
{
programs.waybar = {
enable = true;
systemd = {
enable = true;
};
settings = [
];
};
}

View file

@ -0,0 +1,27 @@
{ config, pkgs, ... }:
let
swayconf = ''
input * {
xkb_layout "de"
}
output eDP-2 mode 3840x2160
exec "regreet; swaymsg exit"
include /etc/sway/config.d/*
'';
in
{
# greeter for wayland
hardware.opengl.enable = true;
services.greetd.enable = true;
programs.regreet = {
enable = true;
settings = {
default_session = {
command = "${pkgs.sway}/bin/sway --config ${swayconf}";
};
};
};
}

View file

@ -1,5 +1,6 @@
{ config, pkgs, ... }:
{
services.displayManager.defaultSession = "none+i3";
services.xserver = {
xkb.layout = "de";
xkb.variant = "";