mirror of
https://codeberg.org/muon/home.git
synced 2025-12-06 08:07:45 +00:00
Configure i3
This commit is contained in:
parent
5f6f020888
commit
58128797de
5 changed files with 88 additions and 13 deletions
|
|
@ -36,28 +36,33 @@ in {
|
|||
mods.unfree.steam.enable = true;
|
||||
mods.unfree.nvidia.enable = true;
|
||||
|
||||
# Hardware settings
|
||||
services.xserver.displayManager.sessionCommands = ''
|
||||
${pkgs.xorg.xinput} --set-prop "pointer:Logitech Gaming Mouse G502" "libinput Accel Profile Enabled" 0, 1
|
||||
${pkgs.xorg.xinput} --set-prop "pointer:Logitech Gaming Mouse G502" "libinput Accel Speed" -0.4
|
||||
'';
|
||||
# services.xserver.displayManager.setupCommands = ''
|
||||
# ${pkgs.xorg.xrandr}/bin/xrandr --output HDMI-1 --mode 1920x1080 --pos 2560x0 --rotate right --output DP-2 --primary --mode 2560x1440 --pos 0x480 --rotate normal
|
||||
# Host specific
|
||||
|
||||
## Network
|
||||
# networking.interfaces.enp0s31f6.mtu = 1200;
|
||||
|
||||
## Mouse
|
||||
services.xserver.libinput.mouse.accelProfile = "flat";
|
||||
# services.xserver.displayManager.sessionCommands = ''
|
||||
# ${pkgs.xorg.xinput} --set-prop "pointer:Logitech Gaming Mouse G502" "libinput Accel Profile Enabled" 0, 1
|
||||
# ${pkgs.xorg.xinput} --set-prop "pointer:Logitech Gaming Mouse G502" "libinput Accel Speed" -0.4
|
||||
# '';
|
||||
|
||||
## Monitors
|
||||
services.xserver.xrandrHeads = [
|
||||
{
|
||||
output = "DP-2";
|
||||
primary = true;
|
||||
monitorConfig = ''
|
||||
Option "PreferredMode" "2560x1440"
|
||||
Option "Position" "0 480"
|
||||
Option "Position" "0x480"
|
||||
'';
|
||||
}
|
||||
{
|
||||
output = "HDMI-1";
|
||||
monitorConfig = ''
|
||||
Option "PreferredMode" "1920x1080"
|
||||
Option "Position" "2560 0"
|
||||
Option "Position" "2560x-480"
|
||||
Option "Rotate" "right"
|
||||
'';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,8 +12,21 @@ let cfg = osConfig.mods; in {
|
|||
mods.terminal.emulator.enable = true;
|
||||
mods.terminal.development.enable = true;
|
||||
mods.terminal.tools.enable = true;
|
||||
mods.desktop.development.enable = true;
|
||||
|
||||
# Host specific
|
||||
|
||||
## Monitors
|
||||
xsession.windowManager.i3.config.workspaceOutputAssign = [
|
||||
{
|
||||
workspace = "1";
|
||||
output = "DP-2";
|
||||
} {
|
||||
workspace = "2";
|
||||
output = "HDMI-1";
|
||||
}
|
||||
];
|
||||
|
||||
# Hardware settings
|
||||
wayland.windowManager.hyprland.settings = {
|
||||
monitor = [
|
||||
"DP-2,2560x1440@144,0x480,1"
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ in {
|
|||
./i3.nix
|
||||
./hyprland.nix
|
||||
./social.nix
|
||||
./development.nix
|
||||
];
|
||||
|
||||
mods.hyprland.enable = lib.mkIf cfg.wayland.enable true;
|
||||
|
|
|
|||
|
|
@ -1,9 +1,36 @@
|
|||
{ pkgs, lib, config, ... }: {
|
||||
options.mods.i3.enable = lib.mkEnableOption "enables bspwm";
|
||||
{ pkgs, lib, config, options, ... }: {
|
||||
options.mods.i3.enable = lib.mkEnableOption "enables i3";
|
||||
|
||||
config = lib.mkIf config.mods.i3.enable {
|
||||
programs.rofi.enable = true;
|
||||
|
||||
programs.i3status = {
|
||||
enable = true;
|
||||
general.interval = 1;
|
||||
modules = {
|
||||
"volume master" = {
|
||||
position = 1;
|
||||
settings = {
|
||||
format = "🔊 %volume";
|
||||
format_muted = "🔇 %volume";
|
||||
device = "default";
|
||||
mixer = "Master";
|
||||
mixer_idx = 0;
|
||||
};
|
||||
};
|
||||
"tztime local".settings = {
|
||||
format = "🗓 %Y-%m-%d %H:%M:%S ";
|
||||
};
|
||||
ipv6.enable = false;
|
||||
"wireless _first_".enable = false;
|
||||
"ethernet _first_".enable = false;
|
||||
"battery all".enable = false;
|
||||
"disk /".enable = false;
|
||||
load.enable = false;
|
||||
memory.enable = false;
|
||||
};
|
||||
};
|
||||
|
||||
xsession.windowManager.i3 = {
|
||||
enable = true;
|
||||
config = {
|
||||
|
|
@ -11,6 +38,15 @@
|
|||
terminal = "alacritty";
|
||||
menu = "rofi -show drun";
|
||||
|
||||
window = {
|
||||
titlebar = false;
|
||||
hideEdgeBorders = "smart";
|
||||
};
|
||||
|
||||
defaultWorkspace = "workspace number 1";
|
||||
workspaceAutoBackAndForth = true;
|
||||
focus.wrapping = "yes";
|
||||
|
||||
keybindings = let
|
||||
modifier = config.xsession.windowManager.i3.config.modifier;
|
||||
in lib.mkOptionDefault {
|
||||
|
|
@ -19,6 +55,25 @@
|
|||
"${modifier}+k" = "focus up";
|
||||
"${modifier}+l" = "focus right";
|
||||
};
|
||||
|
||||
bars = let
|
||||
stylix_bar = {
|
||||
mode = "dock";
|
||||
hiddenState = "hide";
|
||||
position = "bottom";
|
||||
statusCommand = "${lib.getExe pkgs.i3status}";
|
||||
command = "${pkgs.i3}/bin/i3bar";
|
||||
workspaceButtons = true;
|
||||
workspaceNumbers = true;
|
||||
trayOutput = "primary";
|
||||
} // config.lib.stylix.i3.bar;
|
||||
in [
|
||||
stylix_bar
|
||||
];
|
||||
# bars = [
|
||||
# options.xsession.windowManager.i3.config.default
|
||||
# config.lib.stylix.i3.bar
|
||||
# ];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -2,6 +2,8 @@
|
|||
options.mods.terminal.tools.enable = lib.mkEnableOption "enables cli tools";
|
||||
|
||||
config = lib.mkIf config.mods.terminal.tools.enable {
|
||||
programs.zellij.enable = true;
|
||||
|
||||
home.packages = with pkgs; [
|
||||
# libraries
|
||||
glow
|
||||
|
|
@ -14,7 +16,6 @@
|
|||
|
||||
# programs
|
||||
bottom
|
||||
zellij
|
||||
fend
|
||||
];
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue