c'est le bordel un peu
This commit is contained in:
141
modules/common/desktop-i3.nix
Normal file
141
modules/common/desktop-i3.nix
Normal file
@@ -0,0 +1,141 @@
|
||||
# Module: i3 Window Manager Configuration
|
||||
# Description: Enables X11 with i3 window manager and associated desktop tools
|
||||
# Services: xserver with i3
|
||||
# Packages: alacritty (terminal), tint2 (panel), rofi (launcher), i3lock, dunst
|
||||
{pkgs, ...}: let
|
||||
updatescreen = pkgs.writeShellScript "updatescreens.sh" ''
|
||||
#!/bin/sh
|
||||
i3-msg restart
|
||||
feh --bg-fill --no-xinerama Downloads/fire1.png
|
||||
'';
|
||||
in {
|
||||
services.xserver = {
|
||||
enable = true;
|
||||
windowManager.i3.enable = true;
|
||||
autorun = true;
|
||||
};
|
||||
|
||||
services.displayManager.defaultSession = "none+i3";
|
||||
|
||||
programs.i3lock.enable = true;
|
||||
programs.xss-lock = {
|
||||
enable = true;
|
||||
lockerCommand = "${pkgs.i3lock}/bin/i3lock --nofork -c 000000";
|
||||
extraOptions = ["--transfer-sleep-lock"];
|
||||
};
|
||||
|
||||
services.logind.settings.Login = {
|
||||
IdleAction = "suspend";
|
||||
IdleActionSec = "15min";
|
||||
|
||||
HandleLidSwitch = "suspend";
|
||||
};
|
||||
|
||||
services.picom = {
|
||||
enable = true;
|
||||
|
||||
backend = "glx";
|
||||
vSync = true;
|
||||
|
||||
shadow = true;
|
||||
shadowOpacity = 0.8;
|
||||
shadowOffsets = [(-5) (-5)];
|
||||
|
||||
fade = true;
|
||||
fadeDelta = 10;
|
||||
fadeSteps = [0.03 0.03];
|
||||
|
||||
opacityRules = [
|
||||
"80:class_g = 'Alacritty'"
|
||||
];
|
||||
|
||||
settings = {
|
||||
use-damage = true;
|
||||
|
||||
shadow-radius = 10;
|
||||
|
||||
frame-opacity = 1.0;
|
||||
corner-radius = 20;
|
||||
|
||||
rounded-corners-exclude = [
|
||||
"class_g = 'i3-frame'"
|
||||
"class_g = 'Polybar'"
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
alacritty
|
||||
maim
|
||||
xclip
|
||||
dunst
|
||||
dex
|
||||
rofi
|
||||
polybarFull
|
||||
oh-my-posh
|
||||
playerctl
|
||||
zscroll
|
||||
feh
|
||||
glances
|
||||
arandr
|
||||
nautilus
|
||||
brightnessctl
|
||||
busybox
|
||||
];
|
||||
|
||||
services.autorandr = {
|
||||
enable = true;
|
||||
|
||||
hooks.postswitch = {
|
||||
"desktop-refresh" = builtins.readFile updatescreen;
|
||||
};
|
||||
|
||||
profiles = {
|
||||
listriple = {
|
||||
fingerprint = {
|
||||
eDP-1 = "00ffffffffffff0006af9cd400000000141f0104a522167803f225915758952a1f505400000001010101010101010101010101010101863d80c870b026406c30aa0058d7100000180000000f0000000000000000000000000020000000fd00283c4b4b10010a202020202020000000fe004231363055414e30332e32200a0091";
|
||||
HDMI-1 = "00ffffffffffff0010ac16f04c574e300615010380342078ea1ec5ae4f34b1260e5054a54b008180a940d100714f0101010101010101283c80a070b023403020360006442100001a000000ff00463532354d313231304e574c0a000000fc0044454c4c2055323431300a2020000000fd00384c1e5111000a2020202020200150020329f15090050403020716011f121314201511062309070767030c001000382d83010000e3050301023a801871382d40582c450006442100001e011d8018711c1620582c250006442100009e011d007251d01e206e28550006442100001e8c0ad08a20e02d10103e960006442100001800000000000000000000000000003e";
|
||||
DP-1 = "00ffffffffffff0010ac16f04c3952331314010380342078ea1ec5ae4f34b1260e5054a54b008180a940d100714f0101010101010101283c80a070b023403020360006442100001a000000ff00463532354d3035363352394c0a000000fc0044454c4c2055323431300a2020000000fd00384c1e5111000a202020202020016b020329f15090100403020404011f1f1313131313132309070767030c001000002d83010000e3050000023a801871382d40582c450006442100001e011d007251d01e206e28550006442100001e011d007251d01e206e28550006442100001e011d007251d01e206e285500064421000018000000000000000000000000000077";
|
||||
};
|
||||
|
||||
config = {
|
||||
eDP-1 = {
|
||||
enable = true;
|
||||
primary = true;
|
||||
position = "1200x1020";
|
||||
mode = "1920x1200";
|
||||
rotate = "normal";
|
||||
};
|
||||
DP-1 = {
|
||||
enable = true;
|
||||
position = "3120x563";
|
||||
mode = "1920x1200";
|
||||
rotate = "normal";
|
||||
};
|
||||
HDMI-1 = {
|
||||
enable = true;
|
||||
position = "0x0";
|
||||
mode = "1920x1200";
|
||||
rotate = "left";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
default = {
|
||||
fingerprint = {
|
||||
eDP-1 = "00ffffffffffff0006af9cd400000000141f0104a522167803f225915758952a1f505400000001010101010101010101010101010101863d80c870b026406c30aa0058d7100000180000000f0000000000000000000000000020000000fd00283c4b4b10010a202020202020000000fe004231363055414e30332e32200a0091";
|
||||
};
|
||||
|
||||
config = {
|
||||
eDP-1 = {
|
||||
enable = true;
|
||||
primary = true;
|
||||
position = "0x0";
|
||||
mode = "1920x1200";
|
||||
rotate = "normal";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user