2021-10-07 22:32:45 +02:00
|
|
|
{ config, pkgs, ... }:
|
2021-10-07 18:36:34 +02:00
|
|
|
{
|
|
|
|
|
|
|
|
home.sessionVariables = {
|
|
|
|
XDG_CURRENT_DESKTOP = "sway";
|
|
|
|
MOZ_ENABLE_WAYLAND = "1";
|
|
|
|
};
|
|
|
|
|
|
|
|
home.packages = with pkgs; [
|
2021-10-13 00:47:43 +02:00
|
|
|
# sway
|
|
|
|
# alacritty
|
|
|
|
# swayidle
|
|
|
|
# swaylock-effects
|
|
|
|
# mako
|
|
|
|
# wl-clipboard
|
|
|
|
#- xdg-desktop-portal-wlr
|
|
|
|
# bemenu
|
|
|
|
# i3blocks
|
|
|
|
# acpi
|
|
|
|
# lm_sensors
|
|
|
|
# ponymix
|
|
|
|
# brightnessctl
|
|
|
|
# gammastep
|
|
|
|
# grim
|
|
|
|
# slurp
|
|
|
|
# kdeconnect
|
2021-11-06 13:12:01 +01:00
|
|
|
# wdisplays
|
2021-10-07 18:36:34 +02:00
|
|
|
];
|
|
|
|
|
2021-10-07 22:32:45 +02:00
|
|
|
wayland.windowManager.sway =
|
|
|
|
let
|
2021-10-08 04:20:14 +02:00
|
|
|
ws1 = "1💬";
|
|
|
|
#ws2 = "2📝";
|
|
|
|
ws2 = "2🌟";
|
|
|
|
ws3 = "3🍁";
|
|
|
|
ws4 = "4🍀";
|
|
|
|
ws5 = "5🌈";
|
|
|
|
ws6 = "6💎";
|
|
|
|
ws7 = "7🎥";
|
|
|
|
ws8 = "8🌍";
|
|
|
|
ws9 = "9🔒";
|
|
|
|
ws10 = "10🌀";
|
|
|
|
|
|
|
|
white = "#ffffff";
|
|
|
|
cyan = "#00afd7";
|
|
|
|
acqua = "#00d787";
|
|
|
|
violet = "#800080";
|
|
|
|
wine = "#72003e";
|
|
|
|
magenta = "#af005f";
|
|
|
|
orange = "#ff8700";
|
|
|
|
silver = "#e4e4e4";
|
|
|
|
gray = "#353535";
|
|
|
|
elegant = "#1b1d1e";
|
|
|
|
# transparent = "#000000";
|
|
|
|
transparent = "#000000b2";
|
|
|
|
|
|
|
|
modifier = "Mod4";
|
|
|
|
menu = "bemenu-run -i -p 'Run:' --fn 'pango:monospace 7'";
|
|
|
|
# config.wayland.windowManager.sway.config.modifier;
|
2021-10-07 22:32:45 +02:00
|
|
|
in {
|
2021-10-08 04:20:14 +02:00
|
|
|
enable = true;
|
2021-10-07 22:32:45 +02:00
|
|
|
xwayland = false;
|
|
|
|
config = {
|
2021-10-08 04:20:14 +02:00
|
|
|
input = {
|
|
|
|
"*" = {
|
|
|
|
xkb_layout = "de";
|
|
|
|
xkb_model = "chromebook";
|
|
|
|
# no click needed
|
|
|
|
tap = "enabled";
|
|
|
|
};
|
|
|
|
"1452:544:Apple,_Inc_Apple_Keyboard" = {
|
|
|
|
xkb_layout = "us";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
output = {
|
|
|
|
"*".bg = "~/.config/wallpaper.png fill";
|
|
|
|
# fireThink
|
|
|
|
"Unknown 0x226D 0x00000000" = {
|
|
|
|
enable = "";
|
|
|
|
};
|
|
|
|
# fireG0
|
|
|
|
"Unknown 0x405C 0x00000000" = {
|
|
|
|
position = "0 0";
|
|
|
|
# scale = "0.7";
|
|
|
|
# resolution = "1920x1080";
|
|
|
|
resolution = "1366x768@60Hz";
|
|
|
|
};
|
|
|
|
# fireEmerald
|
|
|
|
"Unknown 0x364C 0x00000000" = {
|
|
|
|
position = "0 0";
|
|
|
|
scale = "1.25";
|
|
|
|
};
|
|
|
|
"Goldstar Company Ltd LG HDR 4K 0x0000655D" = {
|
|
|
|
position = "3000 0";
|
|
|
|
enable = "";
|
2021-10-27 16:35:36 +02:00
|
|
|
scale = "1.0";
|
2021-10-08 04:20:14 +02:00
|
|
|
# disable = true;
|
|
|
|
# resolution = "3840x2160@30Hz";
|
|
|
|
resolution = "3840x2160";
|
|
|
|
};
|
|
|
|
"HEADLESS-1" = {
|
|
|
|
resolution = "2560x1440";
|
|
|
|
};
|
|
|
|
"DP-1" = {
|
|
|
|
position = "3000 0";
|
|
|
|
# resolution = "2560x1440";
|
|
|
|
};
|
|
|
|
# "DP-2" = {
|
|
|
|
# position = "1920 0";
|
|
|
|
# # position = "4480 0";
|
|
|
|
# # resolution = "1280x1024";
|
|
|
|
# };
|
|
|
|
};
|
|
|
|
modifier = "${modifier}";
|
|
|
|
menu = "${menu}";
|
2021-10-07 22:32:45 +02:00
|
|
|
terminal = "alacritty";
|
2021-10-08 04:20:14 +02:00
|
|
|
# fonts = { names = ["monospace"]; style = "monospace"; size = 7;};
|
|
|
|
fonts = [ "pango:monospace 7" ];
|
|
|
|
colors = {
|
|
|
|
focused = { background = "${cyan}"; border = "${cyan}"; childBorder = "${cyan}"; indicator = "${white}"; text = "${elegant}"; };
|
|
|
|
focusedInactive = { background = "${gray}"; border = "${gray}"; childBorder = "${gray}"; indicator = "${magenta}"; text = "${cyan}"; };
|
|
|
|
unfocused = { background = "${elegant}"; border = "${elegant}"; childBorder = "${elegant}"; indicator = "${white}"; text = "${orange}"; };
|
|
|
|
urgent = { background = "${magenta}"; border = "${magenta}"; childBorder = "${magenta}"; indicator = "${magenta}"; text = "${silver}"; };
|
|
|
|
placeholder = { background = "${magenta}"; border = "${magenta}"; childBorder = "${magenta}"; indicator = "${white}"; text = "${silver}"; };
|
|
|
|
background = "${transparent}";
|
|
|
|
};
|
2021-10-07 22:32:45 +02:00
|
|
|
bars = [{
|
|
|
|
position = "top";
|
2021-10-08 04:20:14 +02:00
|
|
|
statusCommand = "i3blocks";
|
2021-10-11 11:37:10 +02:00
|
|
|
trayOutput = "*";
|
2021-10-08 04:20:14 +02:00
|
|
|
colors = {
|
|
|
|
statusline = "${white}";
|
|
|
|
# focusedStatusline = "${white}";
|
|
|
|
background = "${elegant}";
|
|
|
|
# focusedBackground = "${transparent}";
|
|
|
|
activeWorkspace = { background = "${cyan}"; border = "${gray}"; text = "${white}"; };
|
|
|
|
focusedWorkspace = { background = "${cyan}"; border = "${cyan}"; text = "${white}"; };
|
|
|
|
inactiveWorkspace = { background = "${transparent}"; border = "${elegant}"; text = "${orange}"; };
|
|
|
|
urgentWorkspace = { background = "${magenta}"; border = "${magenta}"; text = "${white}"; };
|
|
|
|
bindingMode = { background = "${orange}"; border = "${orange}"; text = "${white}"; };
|
|
|
|
};
|
2021-10-07 22:32:45 +02:00
|
|
|
}];
|
2021-10-08 04:20:14 +02:00
|
|
|
gaps = {
|
|
|
|
inner = 2;
|
|
|
|
outer = 0;
|
|
|
|
smartGaps = true;
|
|
|
|
smartBorders = "no_gaps";
|
|
|
|
};
|
|
|
|
modes.resize = {
|
|
|
|
Left = "resize shrink width 10 px or 10 ppt";
|
|
|
|
Down = "resize grow height 10 px or 10 ppt";
|
|
|
|
Up = "resize shrink height 10 px or 10 ppt";
|
|
|
|
Right = "resize grow width 10 px or 10 ppt";
|
|
|
|
|
|
|
|
j = "resize grow height 10 px or 10 ppt";
|
|
|
|
k = "resize shrink height 10 px or 10 ppt";
|
|
|
|
l = "resize grow width 10 px or 10 ppt";
|
|
|
|
h = "resize shrink width 10 px or 10 ppt";
|
|
|
|
|
|
|
|
Return = "mode default";
|
|
|
|
Escape = "mode default";
|
|
|
|
"${modifier}+r" = "mode default";
|
|
|
|
};
|
|
|
|
workspaceAutoBackAndForth = true;
|
|
|
|
keybindings = {
|
|
|
|
"${modifier}+Return" = "exec alacritty";
|
|
|
|
# "${modifier}+Return" = "exec ${config.wayland.windowManager.sway.config.terminal}";
|
|
|
|
"${modifier}+Shift+c" = "reload";
|
|
|
|
"${modifier}+Shift+r" = "restart";
|
|
|
|
"${modifier}+c" = "kill";
|
|
|
|
"${modifier}+Shift+e" = "exec swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway?' -b 'Yes, exit sway' 'swaymsg exit'";
|
|
|
|
|
|
|
|
"${modifier}+Shift+h" = "split h";
|
|
|
|
"${modifier}+Shift+v" = "split v";
|
|
|
|
|
|
|
|
"${modifier}+z" = "fullscreen toggle";
|
|
|
|
|
|
|
|
"${modifier}+s" = "layout stacking";
|
|
|
|
"${modifier}+w" = "layout tabbed";
|
|
|
|
"${modifier}+e" = "layout toggle split";
|
|
|
|
|
|
|
|
"${modifier}+Shift+space" = "floating toggle";
|
|
|
|
"${modifier}+space" = "focus mode_toggle";
|
|
|
|
"${modifier}+a" = "focus parent";
|
2021-10-08 04:36:02 +02:00
|
|
|
"${modifier}+d" = "focus child";
|
|
|
|
"${modifier}+v" = "exec ${menu}";
|
2021-10-08 04:20:14 +02:00
|
|
|
|
|
|
|
"${modifier}+x" = "sticky toggle";
|
|
|
|
"${modifier}+Shift+x" = "move workspace to output left";
|
|
|
|
|
|
|
|
"${modifier}+r" = "mode resize";
|
|
|
|
|
2021-10-11 12:12:41 +02:00
|
|
|
# window
|
|
|
|
"${modifier}+Left" = "focus left";
|
|
|
|
"${modifier}+Down" = "focus down";
|
|
|
|
"${modifier}+Up" = "focus up";
|
|
|
|
"${modifier}+Right" = "focus right";
|
|
|
|
"${modifier}+j" = "focus left";
|
|
|
|
"${modifier}+k" = "focus down";
|
|
|
|
"${modifier}+l" = "focus up";
|
|
|
|
"${modifier}+odiaeresis" = "focus right";
|
|
|
|
|
|
|
|
"${modifier}+Shift+Left" = "move left";
|
|
|
|
"${modifier}+Shift+Down" = "move down";
|
|
|
|
"${modifier}+Shift+Up" = "move up";
|
|
|
|
"${modifier}+Shift+Right" = "move right";
|
|
|
|
"${modifier}+Shift+j" = "move left";
|
|
|
|
"${modifier}+Shift+k" = "move down";
|
|
|
|
"${modifier}+Shift+l" = "move up";
|
|
|
|
"${modifier}+Shift+odiaeresis" = "move right";
|
|
|
|
|
2021-10-08 04:20:14 +02:00
|
|
|
# workspace
|
|
|
|
"${modifier}+1" = "workspace number ${ws1}";
|
|
|
|
"${modifier}+2" = "workspace number ${ws2}";
|
|
|
|
"${modifier}+3" = "workspace number ${ws3}";
|
|
|
|
"${modifier}+4" = "workspace number ${ws4}";
|
|
|
|
"${modifier}+5" = "workspace number ${ws5}";
|
|
|
|
"${modifier}+6" = "workspace number ${ws6}";
|
|
|
|
"${modifier}+7" = "workspace number ${ws7}";
|
|
|
|
"${modifier}+8" = "workspace number ${ws8}";
|
|
|
|
"${modifier}+9" = "workspace number ${ws9}";
|
|
|
|
"${modifier}+0" = "workspace number ${ws10}";
|
|
|
|
|
|
|
|
"${modifier}+Shift+1" = "move container to workspace number ${ws1}";
|
|
|
|
"${modifier}+Shift+2" = "move container to workspace number ${ws2}";
|
|
|
|
"${modifier}+Shift+3" = "move container to workspace number ${ws3}";
|
|
|
|
"${modifier}+Shift+4" = "move container to workspace number ${ws4}";
|
|
|
|
"${modifier}+Shift+5" = "move container to workspace number ${ws5}";
|
|
|
|
"${modifier}+Shift+6" = "move container to workspace number ${ws6}";
|
|
|
|
"${modifier}+Shift+7" = "move container to workspace number ${ws7}";
|
|
|
|
"${modifier}+Shift+8" = "move container to workspace number ${ws8}";
|
|
|
|
"${modifier}+Shift+9" = "move container to workspace number ${ws9}";
|
|
|
|
"${modifier}+Shift+0" = "move container to workspace number ${ws10}";
|
|
|
|
|
2021-10-08 13:53:08 +02:00
|
|
|
"XF86AudioLowerVolume" = "exec ponymix -N decrease 5";
|
|
|
|
"${modifier}+XF86AudioLowerVolume" = ''exec "ponymix -N -t source -d $(ponymix -t source list | grep source | grep -v -E '(monitor|fallback)' | sed -r 's/source\s([0-9]+):.*/\1/') decrease 5"'';
|
|
|
|
"XF86AudioRaiseVolume" = "exec ponymix -N increase 5";
|
|
|
|
"${modifier}+XF86AudioRaiseVolume" = ''exec "ponymix -N -t source -d $(ponymix -t source list | grep source | grep -v -E '(monitor|fallback)' | sed -r 's/source\s([0-9]+):.*/\1/') increase 5"'';
|
|
|
|
|
|
|
|
"XF86AudioMute" = "exec ponymix -N toggle";
|
|
|
|
|
|
|
|
"${modifier}+XF86AudioMute" = ''exec "ponymix -N -t source -d $(ponymix -t source list | grep source | grep -v -E '(monitor|fallback)' | sed -r 's/source\s([0-9]+):.*/\1/') toggle"'';
|
|
|
|
"XF86AudioMicMute" = ''exec "ponymix -N -t source -d $(ponymix -t source list | grep source | grep -v -E '(monitor|fallback)' | sed -r 's/source\s([0-9]+):.*/\1/') toggle"'';
|
|
|
|
|
|
|
|
"XF86MonBrightnessUp" = ''exec "sh ~/.local/bin/key_light.sh up"'';
|
|
|
|
"XF86MonBrightnessDown" = ''exec "sh ~/.local/bin/key_light.sh down"'';
|
|
|
|
"XF86Display" = ''exec "swaymsg output eDP-1 toggle"'';
|
|
|
|
|
|
|
|
"${modifier}+p" = "exec passmenu";
|
|
|
|
|
|
|
|
"${modifier}+F11" = ''exec "swaylock -SeFfk --clock --effect-blur 7x5 --effect-vignette 0.5:0.5 --grace 2 --fade-in 0.2 --submit-on-touch"'';
|
|
|
|
"Print" = ''exec "grim -g \"$(slurp)\""'';
|
2021-10-08 04:20:14 +02:00
|
|
|
};
|
2021-10-07 22:32:45 +02:00
|
|
|
assigns = {
|
|
|
|
"${ws1}" = [
|
|
|
|
{ app_id = "(?i)empathy"; }
|
|
|
|
{ app_id = "(?i)gajim"; }
|
|
|
|
{ app_id = "(?i)dino"; }
|
|
|
|
{ app_id = "(?i)pidgin"; }
|
|
|
|
];
|
|
|
|
"${ws2}" = [
|
|
|
|
{ app_id = "(?i)thunderbird"; }
|
|
|
|
{ app_id = "(?i)evolution"; }
|
|
|
|
];
|
|
|
|
"${ws4}" = [
|
|
|
|
{ app_id = "(?i)atril"; }
|
|
|
|
{ app_id = "(?i)evince"; }
|
|
|
|
];
|
|
|
|
"${ws7}" = [
|
|
|
|
{ app_id = "(?i)mpv"; }
|
|
|
|
];
|
|
|
|
"${ws8}" = [
|
|
|
|
{ app_id = "(?i)firefox"; }
|
|
|
|
{ app_id = "(?i)firefoxdeveloperedition"; }
|
|
|
|
];
|
|
|
|
};
|
2021-10-08 04:20:14 +02:00
|
|
|
floating = {
|
|
|
|
modifier = modifier;
|
|
|
|
};
|
|
|
|
window = {
|
|
|
|
border = 1;
|
|
|
|
# hideEdgeBorders = "smart_no_gaps";
|
|
|
|
hideEdgeBorders = "smart";
|
|
|
|
commands = [
|
|
|
|
{ command = "move to scratchpad"; criteria = { title = "Firefox.* Sharing Indicator"; }; }
|
|
|
|
{ command = "sticky enable"; criteria = { title = "Picture-in-Picture"; }; }
|
|
|
|
{ command = "floating enable"; criteria = { title = "Picture-in-Picture"; }; }
|
|
|
|
{ command = "floating enable"; criteria = { title = "Extension: \(Tree Style Tab\) - .*"; }; }
|
|
|
|
];
|
|
|
|
};
|
|
|
|
startup = [
|
2021-10-08 04:36:02 +02:00
|
|
|
{ command = "systemctl --user import-environment DISPLAY WAYLAND_DISPLAY SWAYSOCK"; }
|
|
|
|
{ command = "hash dbus-update-activation-environment 2>/dev/null && dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK" ; }
|
2021-10-08 04:20:14 +02:00
|
|
|
{ command = "swayidle -w \\
|
|
|
|
timeout 300 'swaylock -SeFfk --clock --effect-blur 7x5 --effect-vignette 0.5:0.5 --grace 2 --fade-in 0.2 --submit-on-touch' \\
|
|
|
|
timeout 600 'swaymsg output * dpms off' \\
|
|
|
|
resume 'swaymsg output * dpms on' \\
|
|
|
|
before-sleep 'swaylock -SeFfk --clock --effect-blur 7x5 --effect-vignette 0.5:0.5 --grace 2 --fade-in 0.2 --submit-on-touch'"; }
|
|
|
|
{ command = "mako"; }
|
|
|
|
#{ command = "kanshi"; }
|
|
|
|
# indicator
|
|
|
|
{ command = "/usr/lib/kdeconnectd"; }
|
2021-10-11 11:37:10 +02:00
|
|
|
{ command = "/home/genofire/.nix-profile/libexec/kdeconnectd"; }
|
2021-10-08 04:20:14 +02:00
|
|
|
{ command = "kdeconnect-indicator"; }
|
|
|
|
{ command = "networkd-notify"; }
|
|
|
|
# needs x11
|
|
|
|
#{ command = "udiskie -t"; }
|
|
|
|
#{ command = "modem-manager-gui -i"; }
|
|
|
|
#{ command = "nm-applet"; }
|
|
|
|
# apps
|
|
|
|
{ command = "thunderbird"; }
|
|
|
|
{ command = "firefox"; }
|
|
|
|
#{ command = "firefoxdeveloperedition"; }
|
|
|
|
{ command = "nextcloud"; }
|
|
|
|
{ command = "dino"; }
|
|
|
|
#{ command = "gajim"; }
|
2021-10-07 22:32:45 +02:00
|
|
|
];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2021-10-13 00:47:43 +02:00
|
|
|
# use nixos's ....
|
2021-10-10 14:08:20 +02:00
|
|
|
# from programs.sway:
|
|
|
|
# xdg.portal.enable = true;
|
|
|
|
# xdg.portal.extraPortals = [ pkgs.xdg-desktop-portal-wlr ];
|
|
|
|
|
2021-10-07 18:36:34 +02:00
|
|
|
services.gammastep = {
|
|
|
|
enable = true;
|
|
|
|
provider = "geoclue2";
|
|
|
|
# duskTime = "22:00-23:00";
|
|
|
|
# dawnTime = "6:00-10:00";
|
|
|
|
};
|
2021-10-07 22:32:45 +02:00
|
|
|
|
|
|
|
programs.alacritty = {
|
|
|
|
enable = false;
|
|
|
|
settings = {
|
|
|
|
background_opacity = 0.95;
|
|
|
|
font.size = 8;
|
|
|
|
schemes.base16.primary.background = "0x0a0a0a";
|
|
|
|
colors = "*base16";
|
|
|
|
};
|
|
|
|
};
|
2021-10-07 18:36:34 +02:00
|
|
|
}
|