From 37bb80067e678fd653265058ac194d4325a49a8e Mon Sep 17 00:00:00 2001 From: James Patrick Date: Thu, 28 Apr 2022 22:10:00 -0400 Subject: [PATCH] More i3 configuration --- modules/applications/i3/default.nix | 2 +- modules/applications/i3/i3.nix | 15 ++++++++++++++- modules/applications/i3/picom.nix | 21 +++++++++++++++++++++ 3 files changed, 36 insertions(+), 2 deletions(-) create mode 100644 modules/applications/i3/picom.nix diff --git a/modules/applications/i3/default.nix b/modules/applications/i3/default.nix index b291e8d..b454ea2 100644 --- a/modules/applications/i3/default.nix +++ b/modules/applications/i3/default.nix @@ -1 +1 @@ -{ config, pkgs, ... }: { imports = [ ./i3.nix ]; } +{ config, pkgs, ... }: { imports = [ ./i3.nix ./picom.nix ]; } diff --git a/modules/applications/i3/i3.nix b/modules/applications/i3/i3.nix index 1a09cdb..fbf31f8 100644 --- a/modules/applications/i3/i3.nix +++ b/modules/applications/i3/i3.nix @@ -19,6 +19,7 @@ in with lib; { config = mkIf cfg.enable { programs.dconf.enable = true; + programs.light.enable = true; services.xserver = { enable = true; @@ -39,7 +40,8 @@ in with lib; { package = pkgs.i3-gaps; extraPackages = with pkgs; [ feh - nitrogen + xdotool + playerctl dmenu # application launcher most people use i3status # gives you the default i3 status bar i3lock # default i3 screen locker @@ -95,7 +97,18 @@ in with lib; { }; terminal = "${pkgs.kitty}/bin/kitty"; keybindings = mkOptionDefault { + "${modifier}+l" = "focus left"; + "${modifier}+k" = "focus up"; + "${modifier}+j" = "focus down"; + "${modifier}+h" = "focus right"; + "${modifier}+shift+l" = "move left"; + "${modifier}+shift+k" = "move up"; + "${modifier}+shift+j" = "move down"; + "${modifier}+shift+h" = "move right"; + + "${modifier}+s" = "split h"; "${modifier}+q" = "kill"; + "${modifier}+alt+s" = "layout stacking"; "${modifier}+d" = "focus mode_toggle"; "${modifier}+a" = "focus parent"; "${modifier}+shift+s" = "sticky toggle"; diff --git a/modules/applications/i3/picom.nix b/modules/applications/i3/picom.nix new file mode 100644 index 0000000..16928f8 --- /dev/null +++ b/modules/applications/i3/picom.nix @@ -0,0 +1,21 @@ +{ config, lib, pkgs, ... }: +let + cfg = config.this.application.picom; + i3 = config.this.application.i3; + +in with lib; { + options = { + this.application.picom.enable = mkOption { + default = i3.enable; + type = with types; bool; + }; + }; + + config = mkIf cfg.enable { + services.picom = { + enable = true; + backend = "glx"; + vSync = true; + }; + }; +}