feat: rework i3 config to nix HM

This commit is contained in:
winston 2023-02-12 16:35:19 +01:00
parent 59cdfdde06
commit fb4887fb90
Signed by: winston
GPG key ID: 3786770EDBC2B481
12 changed files with 321 additions and 390 deletions

View file

@ -116,11 +116,11 @@
"xdph": "xdph" "xdph": "xdph"
}, },
"locked": { "locked": {
"lastModified": 1676066608, "lastModified": 1676198317,
"narHash": "sha256-wUfFD5kZ4+MSX92Zruy/W64m7E5CzORfiVdLOuyJ15o=", "narHash": "sha256-i5Er/KA5E9CNxs4XFdwJEOsiCyXS3X3KKuu04gRSJD4=",
"owner": "hyprwm", "owner": "hyprwm",
"repo": "Hyprland", "repo": "Hyprland",
"rev": "bda8208aaa3d7eb9f14d49691b919f8f2e9f5594", "rev": "7d914cd427b36d5ec8acb06e415cdf2b846f1648",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -184,11 +184,11 @@
}, },
"nixpkgs-stable_2": { "nixpkgs-stable_2": {
"locked": { "locked": {
"lastModified": 1675556398, "lastModified": 1676162277,
"narHash": "sha256-5Gf5KlmFXfIGVQb2hmiiE7FQHoLd4UtEhIolLQvNB/A=", "narHash": "sha256-GK3cnvKNo1l0skGYXXiLJ/TLqdKyIYXd7jOlo0gN+Qw=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "e32c33811815ca4a535a16faf1c83eeb4493145b", "rev": "d863ca850a06d91365c01620dcac342574ecf46f",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -200,11 +200,11 @@
}, },
"nixpkgs-unstable": { "nixpkgs-unstable": {
"locked": { "locked": {
"lastModified": 1675758091, "lastModified": 1675940568,
"narHash": "sha256-7gFSQbSVAFUHtGCNHPF7mPc5CcqDk9M2+inlVPZSneg=", "narHash": "sha256-epG6pOT9V0kS+FUqd7R6/CWkgnZx2DMT5Veqo+y6G3c=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "747927516efcb5e31ba03b7ff32f61f6d47e7d87", "rev": "6ccc4a59c3f1b56d039d93da52696633e641bc71",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -216,11 +216,11 @@
}, },
"nixpkgs_2": { "nixpkgs_2": {
"locked": { "locked": {
"lastModified": 1675918889, "lastModified": 1676094287,
"narHash": "sha256-hy7re4F9AEQqwZxubct7jBRos6md26bmxnCjxf5utJA=", "narHash": "sha256-z2gc84Hs9JmzmSmQ/n3Ano/uhYPS4uF8jZPcgKDTfb8=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "49efda9011e8cdcd6c1aad30384cb1dc230c82fe", "rev": "103fe0800b9d739c279997561c9da9d242d5b6b8",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -248,11 +248,11 @@
}, },
"nixpkgs_4": { "nixpkgs_4": {
"locked": { "locked": {
"lastModified": 1675523619, "lastModified": 1675940568,
"narHash": "sha256-jHvkAwkbAj1s0O5riHMghSDHh9iz8AwLTbXQuVQKQcg=", "narHash": "sha256-epG6pOT9V0kS+FUqd7R6/CWkgnZx2DMT5Veqo+y6G3c=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "5a211d5e8d18b20b5a2b22157266cc00f8c4f3b9", "rev": "6ccc4a59c3f1b56d039d93da52696633e641bc71",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -264,11 +264,11 @@
}, },
"nur": { "nur": {
"locked": { "locked": {
"lastModified": 1676087160, "lastModified": 1676202295,
"narHash": "sha256-el2tNbWUhpz0IBoORS144xjMTi9WIqbQWRBmrsF4M64=", "narHash": "sha256-pK1zMjK4ZjIIeJxAety+WqTBHQd7GGLpQcIq892W2H8=",
"owner": "nix-community", "owner": "nix-community",
"repo": "NUR", "repo": "NUR",
"rev": "1ddd5cf5cc7215ea63f1dee09016b53cc79034e5", "rev": "56b003d44a26603aedcaa3c28b0da17797d0df1c",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -318,11 +318,11 @@
"nixpkgs-stable": "nixpkgs-stable_2" "nixpkgs-stable": "nixpkgs-stable_2"
}, },
"locked": { "locked": {
"lastModified": 1675872570, "lastModified": 1676171095,
"narHash": "sha256-RPH3CeTv7ixC2WcYiKyhmIgoH/9tur4Kr+3Vg/pleQk=", "narHash": "sha256-2laeSjBAAJ9e/C3uTIPb287iX8qeVLtWiilw1uxqG+A=",
"owner": "Mic92", "owner": "Mic92",
"repo": "sops-nix", "repo": "sops-nix",
"rev": "8fec29b009c19538e68d5d814ec74e04f662fbd1", "rev": "c5dab21d8706afc7ceb05c23d4244dcb48d6aade",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -27,7 +27,6 @@
in { in {
nix.settings.experimental-features = ["nix-command" "flakes"]; nix.settings.experimental-features = ["nix-command" "flakes"];
nixpkgs.config.allowUnfree = true; nixpkgs.config.allowUnfree = true;
programs.nix-ld.enable = true;
imports = [./hardware.nix]; imports = [./hardware.nix];
environment.systemPackages = with pkgs; [xarchiver]; environment.systemPackages = with pkgs; [xarchiver];
@ -66,6 +65,8 @@ in {
programs = { programs = {
dconf.enable = true; dconf.enable = true;
nix-ld.enable = true;
noisetorch.enable = true;
steam.enable = true; steam.enable = true;
thunar = { thunar = {
enable = true; enable = true;
@ -116,19 +117,12 @@ in {
desktopManager.xterm.enable = false; desktopManager.xterm.enable = false;
displayManager = { displayManager = {
defaultSession = "none+i3"; defaultSession = "none+i3";
gdm.enable = true; lightdm.enable = true;
lightdm.background = "#000000";
}; };
libinput.enable = true; libinput.enable = true;
windowManager.i3 = { windowManager.i3.enable = true;
enable = true; windowManager.i3.package = pkgs.unstable.i3;
package = pkgs.unstable.i3;
extraPackages = with pkgs; [
dmenu
pavucontrol
xclip
xdotool
];
};
xkbOptions = "caps:ctrl_modifier"; xkbOptions = "caps:ctrl_modifier";
}; };
}; };

View file

@ -11,9 +11,26 @@
in { in {
home.shellAliases = lib.mkIf isLinux { home.shellAliases = lib.mkIf isLinux {
"Hyprland" = "${nvidiaPrefix} ${waylandPrefix} Hyprland"; "Hyprland" = "${nvidiaPrefix} ${waylandPrefix} Hyprland";
"sway" = "${nvidiaPrefix} ${waylandPrefix} sway";
}; };
wayland = lib.mkIf isLinux { wayland = lib.mkIf isLinux {
windowManager.hyprland = { windowManager = {
sway = {
enable = true;
extraOptions = ["--unsupported-gpu"];
config = {
modifier = "Mod4";
keybindings = let
modifier = config.wayland.windowManager.sway.config.modifier;
in
lib.mkOptionDefault {
"${modifier}+Shift+Return" = "exec ${lib.getExe pkgs.wezterm}-gui";
"${modifier}+Shift+q" = "kill";
"${modifier}+space" = "exec ${lib.getExe pkgs.rofi-wayland} -show drun";
};
};
};
hyprland = {
enable = true; enable = true;
nvidiaPatches = true; nvidiaPatches = true;
xwayland = { xwayland = {
@ -22,6 +39,7 @@ in {
}; };
}; };
}; };
};
xdg = lib.mkIf isLinux { xdg = lib.mkIf isLinux {
configFile."hypr/hyprland.conf".source = config.lib.file.mkOutOfStoreSymlink "${flakePath}/modules/hyprland/hyprland.conf"; configFile."hypr/hyprland.conf".source = config.lib.file.mkOutOfStoreSymlink "${flakePath}/modules/hyprland/hyprland.conf";
}; };

View file

@ -3,20 +3,16 @@ monitor = ,5120x2160@72,0x0,1.5
input:follow_mouse = 1 input:follow_mouse = 1
general { general {
sensitivity = 1.0 # for mouse cursor gaps_in = 0
gaps_out = 0
gaps_in = 5
gaps_out = 10
border_size = 2 border_size = 2
no_cursor_warps = true no_cursor_warps = true
col.active_border = 0xfff5c2e7 col.active_border = 0xfff5c2e7
col.inactive_border = 0x80cba6f7 col.inactive_border = 0x80cba6f7
apply_sens_to_raw = 0 # whether to apply the sensitivity to raw input (e.g. used by games where you aim using your mouse)
} }
decoration { decoration {
rounding = 10 rounding = 0
blur = 0 blur = 0
} }
@ -30,7 +26,6 @@ misc {
disable_splash_rendering = true disable_splash_rendering = true
} }
# example binds
bind = SUPER_SHIFT,return,exec,wezterm bind = SUPER_SHIFT,return,exec,wezterm
bind = SUPER_SHIFT,q,killactive, bind = SUPER_SHIFT,q,killactive,
bind = SUPER_SHIFT,M,exit, bind = SUPER_SHIFT,M,exit,

View file

@ -12,8 +12,9 @@ in {
arandr arandr
blueberry blueberry
libnotify libnotify
noisetorch
pavucontrol pavucontrol
xclip
xdotool
]; ];
}; };
@ -122,22 +123,270 @@ in {
}; };
# https://github.com/nix-community/home-manager/issues/2064 # https://github.com/nix-community/home-manager/issues/2064
systemd = lib.mkIf isLinux { # systemd = lib.mkIf isLinux {
user.targets.tray.Unit = { # user.targets.tray.Unit = {
Description = "Home Manager System Tray"; # Description = "Home Manager System Tray";
Requires = ["graphical-session-pre.target"]; # Requires = ["graphical-session-pre.target"];
# };
# };
xsession = lib.mkIf isLinux {
enable = true;
windowManager.i3 = {
enable = true;
config = {
modifier = "Mod4";
focus.wrapping = "no";
startup = [
{
command = "${lib.getExe pkgs.autotiling}";
notification = false;
}
{
command = "${lib.getExe pkgs._1password-gui} --silent";
notification = false;
}
];
workspaceAutoBackAndForth = true;
terminal = "${lib.getExe pkgs.unstable.wezterm} start --always-new-process";
menu = "";
keybindings = let
mod = config.xsession.windowManager.i3.config.modifier;
modMove = "${mod}+Shift";
modFocus = "${mod}+Ctrl";
hyper = "Mod4+Mod1+Shift+Ctrl";
in {
"${mod}+Shift+b" = "border none";
"${mod}+b" = "border pixel 2";
"${mod}+n" = "border normal";
# reload the configuration file
"${mod}+Shift+c" = "reload";
# restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
"${mod}+Shift+r" = "restart";
# kill focused window
"${mod}+Shift+q" = "kill";
# Start Applications
"${mod}+Shift+Return" = "exec ${config.xsession.windowManager.i3.config.terminal}";
"${mod}+e" = "exec --no-startup-id $fileman";
"${mod}+Ctrl+x" = "exec --no-startup-id ${lib.getExe pkgs.xorg.xkill}";
"${hyper}+p" = "--release exec --no-startup-id ${lib.getExe pkgs.flameshot} gui";
# TODO: yeah no
# "${hyper}+space" = "exec --no-startup-id gopass ls --flat | rofi -dmenu -dpi $dpi | xargs --no-run-if-empty gopass show -o | xdotool type --clearmodifiers --file -";
# change focus
"${modFocus}+h" = "focus left";
"${modFocus}+j" = "focus down";
"${modFocus}+k" = "focus up";
"${modFocus}+l" = "focus right";
"${modFocus}+Left" = "focus left";
"${modFocus}+Down" = "focus down";
"${modFocus}+Up" = "focus up";
"${modFocus}+Right" = "focus right";
# move focus
"${modMove}+h" = "move left";
"${modMove}+j" = "move down";
"${modMove}+k" = "move up";
"${modMove}+l" = "move right";
"${modMove}+Left" = "move left";
"${modMove}+Down" = "move down";
"${modMove}+Up" = "move up";
"${modMove}+Right" = "move right";
# move workspaces across monitors
"${modMove}+greater" = "move workspace to output right";
"${modMove}+less" = "move workspace to output left";
# split orientation
"${mod}+q" = "split toggle";
# toggle fullscreen mode for the focused container
"${mod}+f" = "fullscreen toggle";
# change container layout (stacked, tabbed, toggle split)
"${mod}+s" = "layout toggle";
# toggle tiling / floating
"${mod}+Shift+d" = "floating toggle";
# change focus between tiling / floating windows
"${mod}+d" = "focus mode_toggle";
# toggle sticky
"${mod}+Shift+s" = "sticky toggle";
# focus the parent container
"${mod}+a" = "focus parent";
# move the currently focused window to the scratchpad
"${mod}+Shift+Tab" = "move scratchpad";
# Show the next scratchpad window or hide the focused scratchpad window.
# If there are multiple scratchpad windows, this command cycles through them.
"${mod}+Tab" = "scratchpad show";
"${mod}+m" = "[class=\"discord\"] scratchpad show";
# switch to workspace
"${modFocus}+1" = "workspace $ws1";
"${modFocus}+2" = "workspace $ws2";
"${modFocus}+3" = "workspace $ws3";
"${modFocus}+4" = "workspace $ws4";
"${modFocus}+5" = "workspace $ws5";
"${modFocus}+6" = "workspace $ws6";
"${modFocus}+7" = "workspace $ws7";
"${modFocus}+8" = "workspace $ws8";
"${modFocus}+9" = "workspace $ws9";
"${modFocus}+0" = "workspace $ws10";
# Move to workspace with focused container
"${modMove}+1" = "move container to workspace $ws1; workspace $ws1";
"${modMove}+2" = "move container to workspace $ws2; workspace $ws2";
"${modMove}+3" = "move container to workspace $ws3; workspace $ws3";
"${modMove}+4" = "move container to workspace $ws4; workspace $ws4";
"${modMove}+5" = "move container to workspace $ws5; workspace $ws5";
"${modMove}+6" = "move container to workspace $ws6; workspace $ws6";
"${modMove}+7" = "move container to workspace $ws7; workspace $ws7";
"${modMove}+8" = "move container to workspace $ws8; workspace $ws8";
"${modMove}+9" = "move container to workspace $ws9; workspace $ws9";
"${modMove}+0" = "move container to workspace $ws10; workspace $ws10";
# rofi instead of drun
"${mod}+space" = "exec --no-startup-id ${lib.getExe pkgs.rofi-wayland} -show drun -dpi $dpi";
# 1password
"${mod}+Shift+space" = "exec ${lib.getExe pkgs._1password-gui} --quick-access";
# audio
"XF86AudioRaiseVolume" = "--no-startup-id pactl set-sink-volume 0 +5%";
"XF86AudioLowerVolume" = "--no-startup-id pactl set-sink-volume 0 -5%";
"XF86AudioMute" = "exec --no-startup-id pactl set-sink-mute 0 toggle";
"XF86AudioNext" = "exec --no-startup-id playerctl next";
"XF86AudioPrev" = "exec --no-startup-id playerctl previous";
"XF86AudioPause" = "exec --no-startup-id playerctl play-pause";
# modes
"${mod}+r" = "mode \"resize\"";
"${mod}+p" = "mode \"system\"";
}; };
user.services.autotiling = { modes = {
Unit.Description = "Autotiling for i3"; system = {
Service.ExecStart = "${lib.getExe pkgs.autotiling}"; "l" = "exec --no-startup-id i3exit lock, mode \"default\"";
Install.WantedBy = ["default.target"]; "s" = "exec --no-startup-id i3exit suspend, mode \"default\"";
"u" = "exec --no-startup-id i3exit switch_user, mode \"default\"";
"e" = "exec --no-startup-id i3exit logout, mode \"default\"";
"h" = "exec --no-startup-id i3exit hibernate, mode \"default\"";
"r" = "exec --no-startup-id i3exit reboot, mode \"default\"";
"Shift+s" = "exec --no-startup-id i3exit shutdown, mode \"default\"";
Escape = "mode default";
Return = "mode default";
};
resize = {
Escape = "mode default";
Return = "mode default";
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";
R = "resize set 50 ppt 50 ppt";
};
};
fonts = {
names = ["Berkeley Mono"];
size = 16.0;
};
bars = [
{
mode = "hide";
hiddenState = "hide";
statusCommand = "${pkgs.i3status-rust}/bin/i3status-rs ${config.xdg.configHome}/i3status-rust/config-default.toml";
position = "top";
colors = {
background = "#000000";
};
}
];
colors = let
unfocused = {
background = "#000000";
border = "#CBA6F7";
childBorder = "#CBA6F7";
text = "#CDD6F4";
indicator = "#CBA6F7";
};
in {
focused = {
background = "#000000";
border = "#F5C2E7";
childBorder = "#F5C2E7";
text = "#CDD6F4";
indicator = "#F5C2E7";
};
urgent = {
background = "#000000";
border = "#F38BA8";
childBorder = "#F38BA8";
text = "#CDD6F4";
indicator = "#F38BA8";
};
focusedInactive = unfocused;
unfocused = unfocused;
placeholder = unfocused;
};
window = {
titlebar = false;
hideEdgeBorders = "none";
border = 2;
};
};
extraConfig = ''
set_from_resource $dpi Xft.dpi 140
title_align center
set $ws1 1:
set $ws2 2:
set $ws3 3:
set $ws4 4:
set $ws5 5:
set $ws6 6:
set $ws7 7:
set $ws8 8:
set $ws9 9:
set $ws10 10:
# manage window rules
for_window [urgent=latest] focus
# floating sticky
for_window [class="Lxappearance"] floating enable sticky enable border normal
for_window [class="Qtconfig-qt4"] floating enable sticky enable border normal
for_window [class="qt5ct"] floating enable sticky enable border normal
for_window [class="1Password"] floating enable sticky enable border pixel 1
for_window [title="Blender Render"] floating enable border pixel 1
for_window [title="(?i)SteamTinkerLaunch"] floating enable border pixel 1
# floating with normal border (titled)
for_window [class="(?i)virtualbox"] floating enable border normal
for_window [class="GParted"] floating enable border normal
# floating without special settings
# general WM role settings
for_window [window_role="pop-up"] floating enable
for_window [window_role="task_dialog"] floating enable
for_window [title="splash"] floating enable
# apps
for_window [class="Lightdm-settings"] floating enable
for_window [class="Pavucontrol"] floating enable
for_window [title="File Transfer*"] floating enable
for_window [title="Steam Guard*"] floating enable
for_window [class="Yad" title="Authentication"] floating enable
for_window [class="jetbrains*" title="Welcome*"] floating enable
# keep apps in scratchpad
for_window [class="discord"] move scratchpad
'';
}; };
}; };
xdg = lib.mkIf isLinux { # xdg = lib.mkIf isLinux {
configFile."i3" = { # configFile."i3" = {
source = config.lib.file.mkOutOfStoreSymlink "${flakePath}/modules/i3"; # source = config.lib.file.mkOutOfStoreSymlink "${flakePath}/modules/i3";
recursive = true; # recursive = true;
}; # };
}; # };
} }

View file

@ -1,27 +0,0 @@
# vim:ft=i3config
bar {
status_command i3status-rs ~/.config/i3status-rust/config-default.toml
tray_output primary
tray_padding 2
position top
workspace_min_width 20
mode hide
hidden_state hide
modifier $mod
strip_workspace_numbers yes
strip_workspace_name no
colors {
separator #A6ADC8
background #000000
statusline #1E1E2E
focused_workspace #F5C2E7 #F5C2E7 #11111B
active_workspace #CBA6F7 #CBA6F7 #11111B
inactive_workspace #11111B #11111B #CDD6F4
urgent_workspace #F38BA8 #F38BA8 #11111B
}
}

View file

@ -1,61 +0,0 @@
# vim:ft=i3config:fdm=marker
# reference: http://i3wm.org/docs/userguide.html
# main mod key
set $mod Mod4
# modFocus is set to Mod+Ctrl for macOS compatibility
set $modFocus Mod4+Ctrl
set $modMove Mod4+Shift
# hyper - CMD+Shift+Control+Alt
set $hyper Mod4+Mod1+Shift+Ctrl
# programs to easily switch
set $browser firefox
set $fileman pcmanfm
set $terminal wezterm-gui start
set $pwman 1password --quick-access
# Set DPI value
set_from_resource $dpi Xft.dpi 140
# Use Mouse+$mod to drag floating windows
floating_modifier $mod
# Configure border style <normal|1pixel|pixel xx|none|pixel>
default_border pixel 2
default_floating_border pixel 2
default_orientation auto
workspace_layout default
workspace_auto_back_and_forth yes
# font for window titles. also used by the bar unless a font is set in bar {}
font pango:Berkeley Mono, Symbols Nerd Font Mono 16
title_align center
# Workspace names
set $ws1 1:
set $ws2 2:Ⅱ
set $ws3 3:Ⅲ
set $ws4 4:Ⅳ
set $ws5 5:
set $ws6 6:Ⅵ
set $ws7 7:Ⅶ
set $ws8 8:Ⅷ
set $ws9 9:Ⅸ
set $ws10 10:
# Autostart applications
exec --no-startup-id 1password --silent
# Theme colors
# class title bg text indic. border
client.focused #F5C2E7 #000000 #CDD6F4 #F5E0DC #F5C2E7
client.focused_inactive #CBA6F7 #000000 #9399B2 #F5E0DC #CBA6F7
client.unfocused #CBA6F7 #000000 #9399B2 #F5E0DC #CBA6F7
client.urgent #F38BA8 #000000 #F38BA8 #313244 #F38BA8
client.placeholder #313244 #000000 #CDD6F4 #313244 #313244
client.background #000000
include bar
include config.d/*

View file

@ -1,51 +0,0 @@
# vim:ft=i3config:fdm=marker
# Set inner/outer gaps
gaps inner 1
gaps outer 1
# Smart gaps (gaps used if only more than one container on the workspace)
smart_gaps on
# Smart borders (draw borders around container only if it is not the only container on this workspace)
# on|no_gaps (on=always activate and no_gaps=only activate if the gap size to the edge of the screen is 0)
smart_borders no_gaps
# Press $mod+Shift+g to enter the gap mode. Choose o or i for modifying outer/inner gaps. Press one of + / - (in-/decrement for current workspace) or 0 (remove gaps for current workspace). If you also press Shift with these keys, the change will be global for all workspaces.
set $mode_gaps Gaps: (o) outer, (i) inner
set $mode_gaps_outer Outer Gaps: +|-|0 (local), Shift + +|-|0 (global)
set $mode_gaps_inner Inner Gaps: +|-|0 (local), Shift + +|-|0 (global)
bindsym $mod+Shift+g mode "$mode_gaps"
mode "$mode_gaps" {
bindsym o mode "$mode_gaps_outer"
bindsym i mode "$mode_gaps_inner"
bindsym Return mode "default"
bindsym Escape mode "default"
}
mode "$mode_gaps_inner" {
bindsym plus gaps inner current plus 5
bindsym minus gaps inner current minus 5
bindsym 0 gaps inner current set 0
bindsym Shift+plus gaps inner all plus 5
bindsym Shift+minus gaps inner all minus 5
bindsym Shift+0 gaps inner all set 0
bindsym Return mode "default"
bindsym Escape mode "default"
}
mode "$mode_gaps_outer" {
bindsym plus gaps outer current plus 5
bindsym minus gaps outer current minus 5
bindsym 0 gaps outer current set 0
bindsym Shift+plus gaps outer all plus 5
bindsym Shift+minus gaps outer all minus 5
bindsym Shift+0 gaps outer all set 0
bindsym Return mode "default"
bindsym Escape mode "default"
}

View file

@ -1,11 +0,0 @@
# vim:ft=i3config
workspace $ws1 output HDMI-0
workspace $ws2 output HDMI-0
workspace $ws3 output HDMI-0
workspace $ws4 output HDMI-0
workspace $ws5 output HDMI-0
workspace $ws6 output HDMI-1
workspace $ws7 output HDMI-1
workspace $ws8 output HDMI-1
workspace $ws9 output HDMI-1
workspace $ws10 output HDMI-1

View file

@ -1,141 +0,0 @@
# vim:ft=i3config:fdm=marker
# change borders
bindsym $mod+Shift+b border none
bindsym $mod+b border pixel 2
bindsym $mod+n border normal
# reload the configuration file
bindsym $mod+Shift+c reload
# restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
bindsym $mod+Shift+r restart
# kill focused window
bindsym $mod+Shift+q kill
# Start Applications
bindsym $mod+Shift+Return exec $terminal
bindsym $mod+e exec --no-startup-id $fileman
bindsym $mod+t exec --no-startup-id pkill picom
bindsym $mod+Ctrl+t exec --no-startup-id picom -b
bindsym $mod+Ctrl+x exec --no-startup-id xkill
bindsym $hyper+p --release exec --no-startup-id flameshot gui
bindsym $hyper+space exec --no-startup-id gopass ls --flat | rofi -dmenu -dpi $dpi | xargs --no-run-if-empty gopass show -o | xdotool type --clearmodifiers --file -
# change focus
bindsym $modFocus+h focus left
bindsym $modFocus+j focus down
bindsym $modFocus+k focus up
bindsym $modFocus+l focus right
bindsym $modFocus+Left focus left
bindsym $modFocus+Down focus down
bindsym $modFocus+Up focus up
bindsym $modFocus+Right focus right
# move focused window
bindsym $modMove+h move left
bindsym $modMove+j move down
bindsym $modMove+k move up
bindsym $modMove+l move right
bindsym $modMove+Left move left
bindsym $modMove+Down move down
bindsym $modMove+Up move up
bindsym $modMove+Right move right
# move workspaces across monitors
bindsym $modMove+greater move workspace to output right
bindsym $modMove+less move workspace to output left
# split orientation
bindsym $mod+q split toggle
# toggle fullscreen mode for the focused container
bindsym $mod+f fullscreen toggle
# change container layout (stacked, tabbed, toggle split)
bindsym $mod+s layout toggle
# toggle tiling / floating
bindsym $mod+Shift+d floating toggle
# change focus between tiling / floating windows
bindsym $mod+d focus mode_toggle
# toggle sticky
bindsym $mod+Shift+s sticky toggle
# focus the parent container
bindsym $mod+a focus parent
# move the currently focused window to the scratchpad
bindsym $mod+Shift+Tab move scratchpad
# Show the next scratchpad window or hide the focused scratchpad window.
# If there are multiple scratchpad windows, this command cycles through them.
bindsym $mod+Tab scratchpad show
bindsym $mod+m [class="discord"] scratchpad show
# switch to workspace
bindsym $modFocus+1 workspace $ws1
bindsym $modFocus+2 workspace $ws2
bindsym $modFocus+3 workspace $ws3
bindsym $modFocus+4 workspace $ws4
bindsym $modFocus+5 workspace $ws5
bindsym $modFocus+6 workspace $ws6
bindsym $modFocus+7 workspace $ws7
bindsym $modFocus+8 workspace $ws8
bindsym $modFocus+9 workspace $ws9
bindsym $modFocus+0 workspace $ws10
# Move to workspace with focused container
bindsym $modMove+1 move container to workspace $ws1; workspace $ws1
bindsym $modMove+2 move container to workspace $ws2; workspace $ws2
bindsym $modMove+3 move container to workspace $ws3; workspace $ws3
bindsym $modMove+4 move container to workspace $ws4; workspace $ws4
bindsym $modMove+5 move container to workspace $ws5; workspace $ws5
bindsym $modMove+6 move container to workspace $ws6; workspace $ws6
bindsym $modMove+7 move container to workspace $ws7; workspace $ws7
bindsym $modMove+8 move container to workspace $ws8; workspace $ws8
bindsym $modMove+9 move container to workspace $ws9; workspace $ws9
bindsym $modMove+0 move container to workspace $ws10; workspace $ws10
# Set shut down, restart and locking features
bindsym $mod+p mode "$mode_system"
set $mode_system (l)ock, (e)xit, switch_(u)ser, (s)uspend, (h)ibernate, (r)eboot, (Shift+s)hutdown
mode "$mode_system" {
bindsym l exec --no-startup-id i3exit lock, mode "default"
bindsym s exec --no-startup-id i3exit suspend, mode "default"
bindsym u exec --no-startup-id i3exit switch_user, mode "default"
bindsym e exec --no-startup-id i3exit logout, mode "default"
bindsym h exec --no-startup-id i3exit hibernate, mode "default"
bindsym r exec --no-startup-id i3exit reboot, mode "default"
bindsym Shift+s exec --no-startup-id i3exit shutdown, mode "default"
# exit system mode: "Enter" or "Escape"
bindsym Return mode "default"
bindsym Escape mode "default"
}
# Resize window (you can also use the mouse for that)
bindsym $mod+r mode "resize"
mode "resize" {
bindsym h resize shrink width 5 px or 5 ppt
bindsym j resize grow height 5 px or 5 ppt
bindsym k resize shrink height 5 px or 5 ppt
bindsym l resize grow width 5 px or 5 ppt
bindsym Left resize shrink width 10 px or 10 ppt
bindsym Down resize grow height 10 px or 10 ppt
bindsym Up resize shrink height 10 px or 10 ppt
bindsym Right resize grow width 10 px or 10 ppt
bindsym R resize set 50 ppt 50 ppt
bindsym Return mode "default"
bindsym Escape mode "default"
}
# volume & media
bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume 0 +5%
bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume 0 -5%
bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute 0 toggle
bindsym XF86AudioNext exec --no-startup-id playerctl next
bindsym XF86AudioPrev exec --no-startup-id playerctl previous
bindsym XF86AudioPause exec --no-startup-id playerctl play-pause
# rofi instead of drun
bindsym $mod+space exec --no-startup-id rofi -show drun -dpi $dpi
# 1password
bindsym $mod+Shift+space exec --no-startup-id $pwman

View file

@ -1,35 +0,0 @@
# vim:ft=i3config
# switch to workspace with urgent window automatically
for_window [urgent=latest] focus
# floating sticky
for_window [class="Lxappearance"] floating enable sticky enable border normal
for_window [class="Qtconfig-qt4"] floating enable sticky enable border normal
for_window [class="qt5ct"] floating enable sticky enable border normal
for_window [class="1Password"] floating enable sticky enable border pixel 1
for_window [title="Blender Render"] floating enable border pixel 1
for_window [title="(?i)SteamTinkerLaunch"] floating enable border pixel 1
# floating with normal border (titled)
for_window [class="(?i)virtualbox"] floating enable border normal
for_window [class="GParted"] floating enable border normal
# floating without special settings
# general WM role settings
for_window [window_role="pop-up"] floating enable
for_window [window_role="task_dialog"] floating enable
for_window [title="splash"] floating enable
# apps
for_window [class="Lightdm-settings"] floating enable
for_window [class="Pavucontrol"] floating enable
for_window [title="File Transfer*"] floating enable
for_window [title="Steam Guard*"] floating enable
for_window [class="Yad" title="Authentication"] floating enable
for_window [class="jetbrains*" title="Welcome*"] floating enable
# keep apps in scratchpad
for_window [class="discord"] move scratchpad

View file

@ -10,11 +10,12 @@ final: prev: {
catppuccin-catwalk = prev.callPackage ./python3Packages/catppuccin-catwalk {}; catppuccin-catwalk = prev.callPackage ./python3Packages/catppuccin-catwalk {};
discover-overlay = prev.callPackage ./python3Packages/discover-overlay {}; discover-overlay = prev.callPackage ./python3Packages/discover-overlay {};
picom = prev.picom.overrideAttrs (old: { picom = prev.picom.overrideAttrs (old: {
version = "unstable-2022-02-06";
src = prev.fetchFromGitHub { src = prev.fetchFromGitHub {
owner = "FT-Labs"; owner = "FT-Labs";
repo = "picom"; repo = "picom";
sha256 = "sha256-MRCffxU0X5a368zJGwzcv25P2ZYyAI31EOBhgiyR71A="; sha256 = "sha256-uH0OuM36xnvGC6TMJ7r7nlx8ZUGgL8N6ia/6KzFksVY=";
rev = "c9aee893d2ab0acc4e997dc4186e7b1ef344ac0f"; rev = "bb2b4801f7aef81f0739a50bf272431f7d7d9549";
}; };
nativeBuildInputs = old.nativeBuildInputs ++ [prev.pcre2]; nativeBuildInputs = old.nativeBuildInputs ++ [prev.pcre2];
}); });