Skip to content

Commit

Permalink
make i3 keybindings work. Yay
Browse files Browse the repository at this point in the history
  • Loading branch information
user committed Sep 4, 2023
1 parent d10acb2 commit 2e6abc7
Show file tree
Hide file tree
Showing 3 changed files with 99 additions and 3 deletions.
90 changes: 89 additions & 1 deletion home-manager/home.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,95 @@

let
ideaUltimateModified = import ./apps/jetbrains-idea-ultimate-override-neo2.nix { inherit pkgs; };
mod = "Mod4";

in
{

# todo move to own file
xsession.windowManager.i3 = {
enable = true;
config = {
modifier = mod;
keybindings = {
# Focus
"${mod}+n" = "focus left";
"${mod}+g" = "focus down";
"${mod}+r" = "focus up";
"${mod}+t" = "focus right";

"${mod}+Left" = "focus left";
"${mod}+Down" = "focus down";
"${mod}+Up" = "focus up";
"${mod}+Right" = "focus right";

# Move
"${mod}+Shift+n" = "move left";
"${mod}+Shift+g" = "move down";
"${mod}+Shift+r" = "move up";
"${mod}+Shift+t" = "move right";
"${mod}+Shift+Left" = "move left";
"${mod}+Shift+Down" = "move down";
"${mod}+Shift+Up" = "move up";
"${mod}+Shift+Right" = "move right";


# workspaces:
"${mod}+1" = "workspace 1";
"${mod}+2" = "workspace 2";
"${mod}+3" = "workspace 3";
"${mod}+4" = "workspace 4";
"${mod}+5" = "workspace 5";
"${mod}+6" = "workspace 6";
"${mod}+7" = "workspace 7";
"${mod}+8" = "workspace 8";
"${mod}+9" = "workspace 9";
"${mod}+0" = "workspace 10";


"${mod}+Shift+1" = "move container to workspace 1";
"${mod}+Shift+2" = "move container to workspace 2";
"${mod}+Shift+3" = "move container to workspace 3";
"${mod}+Shift+4" = "move container to workspace 4";
"${mod}+Shift+5" = "move container to workspace 5";
"${mod}+Shift+6" = "move container to workspace 6";
"${mod}+Shift+7" = "move container to workspace 7";
"${mod}+Shift+8" = "move container to workspace 8";
"${mod}+Shift+9" = "move container to workspace 9";
"${mod}+Shift+0" = "move container to workspace 10";

# Arbeitsbereich nach rechts/links wechseln
"${mod}+f" = "workspace next";
"${mod}+h" = "workspace prev";

"${mod}+shift+q" = "kill";



"${mod}+Shift+c" = "restart";
"${mod}+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'\"";

"${mod}+u" = "exec --no-startup-id dmenu_run";

# TODO
"${mod}+s" = "split h";
"${mod}+y" = "split v";
"${mod}+m" = "fullscreen";


"${mod}+Shift+s" = "layout splith";
"${mod}+Shift+y" = "layout splitv";
"${mod}+Shift+b" = "layout stacking";
"${mod}+Shift+comma" = "layout tabbed";
"${mod}+space" = "floating toggle";
"${mod}+Shift+space" = "focus mode_toggle";



};
};
};

imports = [
./apps/neovim.nix
./modules/protonmail-bridge.nix
Expand Down Expand Up @@ -90,9 +176,11 @@ in
# if you don't want to manage your shell through Home Manager.
home.sessionVariables = {
# EDITOR = "emacs";
MOZ_ENABLE_WAYLAND = "1";
TERMINAL = "konsole";
};



# Let Home Manager install and manage itself.
programs.home-manager.enable = true;
}
6 changes: 6 additions & 0 deletions nixos/configuration.nix
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,12 @@

environment.systemPackages = with pkgs; [
virt-manager
pkgs.killall
pkgs.xbindkeys
pkgs.xdotool
pkgs.xorg.xmodmap
pkgs.xorg.xev

# config.nur.repos.mic92.hello-nur
];

Expand Down
6 changes: 4 additions & 2 deletions nixos/xfce.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@

# reference:
# https://git.sr.ht/~wrmilling/nixos-configuration/tree/30f603e2954c07b743037cdb9f2b30bc073091cc/item/hosts/common/modules/i3wm.nix

let
mod = "Mod4";
in
{
services.xserver = {
enable = true;
Expand All @@ -26,4 +28,4 @@
};

services.autorandr.enable = true;
}
}

0 comments on commit 2e6abc7

Please sign in to comment.