mirror of
https://github.com/nmasur/dotfiles
synced 2024-11-26 09:35:37 +00:00
actually activate i3 config
This commit is contained in:
parent
69f5375541
commit
47d09a98e2
@ -11,215 +11,226 @@
|
|||||||
polybarFull # Polybar + PulseAudio
|
polybarFull # Polybar + PulseAudio
|
||||||
];
|
];
|
||||||
|
|
||||||
home-manager.users.${user}.xsession.windowManager.i3.config = let
|
home-manager.users.${user}.xsession.windowManager.i3 = {
|
||||||
modifier = "Mod4"; # Super key
|
enable = true;
|
||||||
ws1 = "1:";
|
config = let
|
||||||
ws2 = "2:";
|
modifier =
|
||||||
ws3 = "3:";
|
config.home-manager.users.${user}.xsession.windowManager.i3.config.modifier;
|
||||||
ws4 = "4:";
|
ws1 = "1:";
|
||||||
ws5 = "5:";
|
ws2 = "2:";
|
||||||
ws6 = "6:";
|
ws3 = "3:";
|
||||||
ws7 = "7:";
|
ws4 = "4:";
|
||||||
ws8 = "8:";
|
ws5 = "5:";
|
||||||
ws9 = "9:";
|
ws6 = "6:";
|
||||||
ws10 = "10:";
|
ws7 = "7:";
|
||||||
in {
|
ws8 = "8:";
|
||||||
modifier = modifier;
|
ws9 = "9:";
|
||||||
assigns = {
|
ws10 = "10:";
|
||||||
"${ws1}" = [{ class = "^Firefox$"; }];
|
|
||||||
"${ws2}" = [{ class = "^Alacritty$"; }];
|
|
||||||
"${ws3}" = [{ class = "^Discord$"; }];
|
|
||||||
"${ws4}" = [{ class = "^Steam$"; }];
|
|
||||||
};
|
|
||||||
colors = let
|
|
||||||
background = "#2f343f";
|
|
||||||
inactiveBackground = "#2f343f";
|
|
||||||
text = "#f3f4f5";
|
|
||||||
inactiveText = "#676E7D";
|
|
||||||
urgentBackground = "#E53935";
|
|
||||||
indicator = "#00ff00";
|
|
||||||
in {
|
in {
|
||||||
background = background;
|
modifier = "Mod4"; # Super key
|
||||||
focused = {
|
assigns = {
|
||||||
inherit background indicator text;
|
"${ws1}" = [{ class = "^Firefox$"; }];
|
||||||
border = background;
|
"${ws2}" = [{ class = "^Alacritty$"; }];
|
||||||
|
"${ws3}" = [{ class = "^Discord$"; }];
|
||||||
|
"${ws4}" = [{ class = "^Steam$"; }];
|
||||||
};
|
};
|
||||||
focusedInactive = {
|
bars = [{ command = "echo"; }]; # Disable i3bar
|
||||||
inherit indicator;
|
colors = let
|
||||||
background = inactiveBackground;
|
background = "#2f343f";
|
||||||
border = inactiveBackground;
|
inactiveBackground = "#2f343f";
|
||||||
text = inactiveText;
|
text = "#f3f4f5";
|
||||||
|
inactiveText = "#676E7D";
|
||||||
|
urgentBackground = "#E53935";
|
||||||
|
indicator = "#00ff00";
|
||||||
|
in {
|
||||||
|
background = background;
|
||||||
|
focused = {
|
||||||
|
inherit background indicator text;
|
||||||
|
border = background;
|
||||||
|
childBorder = background;
|
||||||
|
};
|
||||||
|
focusedInactive = {
|
||||||
|
inherit indicator;
|
||||||
|
background = inactiveBackground;
|
||||||
|
border = inactiveBackground;
|
||||||
|
childBorder = inactiveBackground;
|
||||||
|
text = inactiveText;
|
||||||
|
};
|
||||||
|
# placeholder = { };
|
||||||
|
unfocused = {
|
||||||
|
inherit indicator;
|
||||||
|
background = inactiveBackground;
|
||||||
|
border = inactiveBackground;
|
||||||
|
childBorder = inactiveBackground;
|
||||||
|
text = inactiveText;
|
||||||
|
};
|
||||||
|
urgent = {
|
||||||
|
inherit text indicator;
|
||||||
|
background = urgentBackground;
|
||||||
|
border = urgentBackground;
|
||||||
|
childBorder = urgentBackground;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
placeholder = { };
|
floating.modifier = modifier;
|
||||||
unfocused = {
|
focus = {
|
||||||
inherit indicator;
|
mouseWarping = true;
|
||||||
background = inactiveBackground;
|
newWindow = "smart";
|
||||||
border = inactiveBackground;
|
|
||||||
text = inactiveText;
|
|
||||||
};
|
};
|
||||||
urgent = {
|
fonts = {
|
||||||
inherit text indicator;
|
names = [ "pango:Victor Mono" "FontAwesome 12" ];
|
||||||
background = urgentBackground;
|
# style = "Regular";
|
||||||
border = urgentBackground;
|
# size = 11.0;
|
||||||
};
|
};
|
||||||
};
|
keybindings = {
|
||||||
floating.modifier = modifier;
|
|
||||||
focus = {
|
|
||||||
mouseWarping = true;
|
|
||||||
newWindow = "smart";
|
|
||||||
};
|
|
||||||
fonts = {
|
|
||||||
names = [ "pango:Victor Mono" "FontAwesome 12" ];
|
|
||||||
# style = "Regular";
|
|
||||||
# size = 11.0;
|
|
||||||
};
|
|
||||||
keybindings = {
|
|
||||||
|
|
||||||
# PulseAudio adjust volume
|
# PulseAudio adjust volume
|
||||||
"XF86AudioRaiseVolume" = "exec --no-startup-id pamixer -i 2";
|
"XF86AudioRaiseVolume" = "exec --no-startup-id pamixer -i 2";
|
||||||
"XF86AudioLowerVolume" = "exec --no-startup-id pamixer -d 2";
|
"XF86AudioLowerVolume" = "exec --no-startup-id pamixer -d 2";
|
||||||
"XF86AudioMute" = "exec --no-startup-id pamixer -t";
|
"XF86AudioMute" = "exec --no-startup-id pamixer -t";
|
||||||
"XF86AudioMicMute" = "exec --no-startup-id pamixer --default-source -t";
|
"XF86AudioMicMute" =
|
||||||
|
"exec --no-startup-id pamixer --default-source -t";
|
||||||
|
|
||||||
# Adjust screen brightness
|
# Adjust screen brightness
|
||||||
"Shift+F12" =
|
"Shift+F12" =
|
||||||
"exec ddcutil --display 1 setvcp 10 + 20; exec ddcutil --display 2 setvcp 10 + 20";
|
"exec ddcutil --display 1 setvcp 10 + 20; exec ddcutil --display 2 setvcp 10 + 20";
|
||||||
"Shift+F11" =
|
"Shift+F11" =
|
||||||
"exec ddcutil --display 1 setvcp 10 - 20; exec ddcutil --display 2 setvcp 10 - 20";
|
"exec ddcutil --display 1 setvcp 10 - 20; exec ddcutil --display 2 setvcp 10 - 20";
|
||||||
"XF86MonBrightnessUp" =
|
"XF86MonBrightnessUp" =
|
||||||
"exec ddcutil --display 1 setvcp 10 + 20; exec ddcutil --display 2 setvcp 10 + 20";
|
"exec ddcutil --display 1 setvcp 10 + 20; exec ddcutil --display 2 setvcp 10 + 20";
|
||||||
"XF86MonBrightnessDown" =
|
"XF86MonBrightnessDown" =
|
||||||
"exec ddcutil --display 1 setvcp 10 - 20; exec ddcutil --display 2 setvcp 10 - 20";
|
"exec ddcutil --display 1 setvcp 10 - 20; exec ddcutil --display 2 setvcp 10 - 20";
|
||||||
|
|
||||||
# Media player controls
|
# Media player controls
|
||||||
"XF86AudioPlay" = "exec playerctl play-pause";
|
"XF86AudioPlay" = "exec playerctl play-pause";
|
||||||
"XF86AudioStop" = "exec playerctl stop";
|
"XF86AudioStop" = "exec playerctl stop";
|
||||||
"XF86AudioNext" = "exec playerctl next";
|
"XF86AudioNext" = "exec playerctl next";
|
||||||
"XF86AudioPrev" = "exec playerctl previous";
|
"XF86AudioPrev" = "exec playerctl previous";
|
||||||
|
|
||||||
# Launchers
|
# Launchers
|
||||||
"${modifier}+Return" = "exec alacritty";
|
"${modifier}+Return" = "exec alacritty";
|
||||||
"${modifier}+d" = "exec --no-startup-id dmenu_run";
|
"${modifier}+d" = "exec --no-startup-id dmenu_run";
|
||||||
"${modifier}+c" = "reload";
|
"${modifier}+Shift+c" = "reload";
|
||||||
"${modifier}+r" = "restart";
|
"${modifier}+Shift+r" = "restart";
|
||||||
"${modifier}+Shift+e" = ''
|
"${modifier}+Shift+e" = ''
|
||||||
exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -B 'Yes, exit i3' 'i3-msg exit'"'';
|
exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -B 'Yes, exit i3' 'i3-msg exit'"'';
|
||||||
"${modifier}+Shift+x" = ''exec i3lock --color "#2f343f"'';
|
"${modifier}+Shift+x" = ''exec i3lock --color "#2f343f"'';
|
||||||
|
"${modifier}+Shift+t" = "exec alacritty";
|
||||||
|
|
||||||
# Window options
|
# Window options
|
||||||
"${modifier}+Shift+q" = "kill";
|
"${modifier}+Shift+q" = "kill";
|
||||||
"${modifier}+h" = "focus left";
|
"${modifier}+h" = "focus left";
|
||||||
"${modifier}+j" = "focus down";
|
"${modifier}+j" = "focus down";
|
||||||
"${modifier}+k" = "focus up";
|
"${modifier}+k" = "focus up";
|
||||||
"${modifier}+l" = "focus right";
|
"${modifier}+l" = "focus right";
|
||||||
"${modifier}+Left" = "focus left";
|
"${modifier}+Left" = "focus left";
|
||||||
"${modifier}+Down" = "focus down";
|
"${modifier}+Down" = "focus down";
|
||||||
"${modifier}+Up" = "focus up";
|
"${modifier}+Up" = "focus up";
|
||||||
"${modifier}+Right" = "focus right";
|
"${modifier}+Right" = "focus right";
|
||||||
"${modifier}+Shift+h" = "move left";
|
"${modifier}+Shift+h" = "move left";
|
||||||
"${modifier}+Shift+j" = "move down";
|
"${modifier}+Shift+j" = "move down";
|
||||||
"${modifier}+Shift+k" = "move up";
|
"${modifier}+Shift+k" = "move up";
|
||||||
"${modifier}+Shift+l" = "move right";
|
"${modifier}+Shift+l" = "move right";
|
||||||
"${modifier}+Shift+Left" = "move left";
|
"${modifier}+Shift+Left" = "move left";
|
||||||
"${modifier}+Shift+Down" = "move down";
|
"${modifier}+Shift+Down" = "move down";
|
||||||
"${modifier}+Shift+Up" = "move up";
|
"${modifier}+Shift+Up" = "move up";
|
||||||
"${modifier}+Shift+Right" = "move right";
|
"${modifier}+Shift+Right" = "move right";
|
||||||
|
|
||||||
# Tiling
|
# Tiling
|
||||||
"${modifier}+i" = "split h";
|
"${modifier}+i" = "split h";
|
||||||
"${modifier}+v" = "split v";
|
"${modifier}+v" = "split v";
|
||||||
"${modifier}+s" = "layout stacking";
|
"${modifier}+s" = "layout stacking";
|
||||||
"${modifier}+w" = "layout tabbed";
|
"${modifier}+w" = "layout tabbed";
|
||||||
"${modifier}+e" = "layout toggle split";
|
"${modifier}+e" = "layout toggle split";
|
||||||
"${modifier}+Shift+space" = "floating toggle";
|
"${modifier}+Shift+space" = "floating toggle";
|
||||||
"${modifier}+space" = "focus mode_toggle";
|
"${modifier}+space" = "focus mode_toggle";
|
||||||
"${modifier}+a" = "focus parent";
|
"${modifier}+a" = "focus parent";
|
||||||
|
|
||||||
# Workspaces
|
# Workspaces
|
||||||
"${modifier}+1" = "workspace ${ws1}";
|
"${modifier}+1" = "workspace ${ws1}";
|
||||||
"${modifier}+2" = "workspace ${ws2}";
|
"${modifier}+2" = "workspace ${ws2}";
|
||||||
"${modifier}+3" = "workspace ${ws3}";
|
"${modifier}+3" = "workspace ${ws3}";
|
||||||
"${modifier}+4" = "workspace ${ws4}";
|
"${modifier}+4" = "workspace ${ws4}";
|
||||||
"${modifier}+5" = "workspace ${ws5}";
|
"${modifier}+5" = "workspace ${ws5}";
|
||||||
"${modifier}+6" = "workspace ${ws6}";
|
"${modifier}+6" = "workspace ${ws6}";
|
||||||
"${modifier}+7" = "workspace ${ws7}";
|
"${modifier}+7" = "workspace ${ws7}";
|
||||||
"${modifier}+8" = "workspace ${ws8}";
|
"${modifier}+8" = "workspace ${ws8}";
|
||||||
"${modifier}+9" = "workspace ${ws9}";
|
"${modifier}+9" = "workspace ${ws9}";
|
||||||
"${modifier}+0" = "workspace ${ws10}";
|
"${modifier}+0" = "workspace ${ws10}";
|
||||||
|
|
||||||
# Move windows
|
# Move windows
|
||||||
"${modifier}+Shift+1" = "move container to workspace ${ws1}";
|
"${modifier}+Shift+1" = "move container to workspace ${ws1}";
|
||||||
"${modifier}+Shift+2" = "move container to workspace ${ws2}";
|
"${modifier}+Shift+2" = "move container to workspace ${ws2}";
|
||||||
"${modifier}+Shift+3" = "move container to workspace ${ws3}";
|
"${modifier}+Shift+3" = "move container to workspace ${ws3}";
|
||||||
"${modifier}+Shift+4" = "move container to workspace ${ws4}";
|
"${modifier}+Shift+4" = "move container to workspace ${ws4}";
|
||||||
"${modifier}+Shift+5" = "move container to workspace ${ws5}";
|
"${modifier}+Shift+5" = "move container to workspace ${ws5}";
|
||||||
"${modifier}+Shift+6" = "move container to workspace ${ws6}";
|
"${modifier}+Shift+6" = "move container to workspace ${ws6}";
|
||||||
"${modifier}+Shift+7" = "move container to workspace ${ws7}";
|
"${modifier}+Shift+7" = "move container to workspace ${ws7}";
|
||||||
"${modifier}+Shift+8" = "move container to workspace ${ws8}";
|
"${modifier}+Shift+8" = "move container to workspace ${ws8}";
|
||||||
"${modifier}+Shift+9" = "move container to workspace ${ws9}";
|
"${modifier}+Shift+9" = "move container to workspace ${ws9}";
|
||||||
"${modifier}+Shift+0" = "move container to workspace ${ws10}";
|
"${modifier}+Shift+0" = "move container to workspace ${ws10}";
|
||||||
|
|
||||||
# Move screens
|
# Move screens
|
||||||
"${modifier}+Control+l" = "move workspace to output right";
|
"${modifier}+Control+l" = "move workspace to output right";
|
||||||
"${modifier}+Control+h" = "move workspace to output left";
|
"${modifier}+Control+h" = "move workspace to output left";
|
||||||
|
|
||||||
# Resizing
|
# Resizing
|
||||||
"${modifier}+r" = ''mode "resize"'';
|
"${modifier}+r" = ''mode "resize"'';
|
||||||
};
|
|
||||||
modes = {
|
|
||||||
resize = {
|
|
||||||
h = "resize shrink 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";
|
|
||||||
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";
|
|
||||||
Return = ''mode "default"'';
|
|
||||||
Caps_Lock = ''mode "default"'';
|
|
||||||
"${modifier}+r" = ''mode "default"'';
|
|
||||||
};
|
};
|
||||||
|
modes = {
|
||||||
|
resize = {
|
||||||
|
h = "resize shrink 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";
|
||||||
|
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";
|
||||||
|
Return = ''mode "default"'';
|
||||||
|
Caps_Lock = ''mode "default"'';
|
||||||
|
"${modifier}+r" = ''mode "default"'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
startup = [
|
||||||
|
{
|
||||||
|
command = "feh --bg-scale $HOME/Downloads/basic-wallpaper.webp";
|
||||||
|
always = true;
|
||||||
|
notification = false;
|
||||||
|
}
|
||||||
|
{
|
||||||
|
command = "~/.config/i3/polybar.sh";
|
||||||
|
always = true;
|
||||||
|
notification = false;
|
||||||
|
}
|
||||||
|
{
|
||||||
|
# Start XDG autostart .desktop files using dex. See also
|
||||||
|
# https://wiki.archlinux.org/index.php/XDG_Autostart
|
||||||
|
command = "dex --autostart --environment i3";
|
||||||
|
always = false;
|
||||||
|
notification = false;
|
||||||
|
}
|
||||||
|
{
|
||||||
|
# xss-lock grabs a logind suspend inhibit lock and will use i3lock to lock the
|
||||||
|
# screen before suspend. Use loginctl lock-session to lock your screen.
|
||||||
|
command = "xss-lock --transfer-sleep-lock -- i3lock --nofork";
|
||||||
|
always = false;
|
||||||
|
notification = false;
|
||||||
|
}
|
||||||
|
{
|
||||||
|
# NetworkManager is the most popular way to manage wireless networks on Linux,
|
||||||
|
# and nm-applet is a desktop environment-independent system tray GUI for it.
|
||||||
|
command = "nm-applet";
|
||||||
|
always = false;
|
||||||
|
notification = false;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
window = {
|
||||||
|
border = 1;
|
||||||
|
hideEdgeBorders = "both";
|
||||||
|
};
|
||||||
|
workspaceAutoBackAndForth = false;
|
||||||
|
workspaceOutputAssign = [ ];
|
||||||
};
|
};
|
||||||
startup = [
|
|
||||||
{
|
|
||||||
command = "feh --bg-scale $HOME/Downloads/basic-wallpaper.webp";
|
|
||||||
always = true;
|
|
||||||
notification = false;
|
|
||||||
}
|
|
||||||
{
|
|
||||||
command = "~/.config/i3/polybar.sh";
|
|
||||||
always = true;
|
|
||||||
notification = false;
|
|
||||||
}
|
|
||||||
{
|
|
||||||
# Start XDG autostart .desktop files using dex. See also
|
|
||||||
# https://wiki.archlinux.org/index.php/XDG_Autostart
|
|
||||||
command = "dex --autostart --environment i3";
|
|
||||||
always = false;
|
|
||||||
notification = false;
|
|
||||||
}
|
|
||||||
{
|
|
||||||
# xss-lock grabs a logind suspend inhibit lock and will use i3lock to lock the
|
|
||||||
# screen before suspend. Use loginctl lock-session to lock your screen.
|
|
||||||
command = "xss-lock --transfer-sleep-lock -- i3lock --nofork";
|
|
||||||
always = false;
|
|
||||||
notification = false;
|
|
||||||
}
|
|
||||||
{
|
|
||||||
# NetworkManager is the most popular way to manage wireless networks on Linux,
|
|
||||||
# and nm-applet is a desktop environment-independent system tray GUI for it.
|
|
||||||
command = "nm-applet";
|
|
||||||
always = false;
|
|
||||||
notification = false;
|
|
||||||
}
|
|
||||||
];
|
|
||||||
window = {
|
|
||||||
border = 1;
|
|
||||||
hideEdgeBorders = "both";
|
|
||||||
};
|
|
||||||
workspaceAutoBackAndForth = false;
|
|
||||||
workspaceOutputAssign = [ ];
|
|
||||||
extraConfig = "";
|
extraConfig = "";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user