enable i3; switch desko to i3
This commit is contained in:
parent
4300cbbf8a
commit
6df3ccd81f
16
helpers/gui/i3.nix
Normal file
16
helpers/gui/i3.nix
Normal file
|
@ -0,0 +1,16 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
environment.pathsToLink = [ "/libexec" ]; # patch for i3blocks to work
|
||||
services.xserver.enable = true;
|
||||
services.xserver.displayManager.defaultSession = "none+i3";
|
||||
services.xserver.windowManager.i3 = {
|
||||
enable = true;
|
||||
extraPackages = with pkgs; [
|
||||
dmenu
|
||||
i3status
|
||||
i3lock
|
||||
i3blocks
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
@ -92,7 +92,7 @@
|
|||
};
|
||||
|
||||
# obtain these by running `dconf dump /` after manually customizing gnome
|
||||
dconf.settings = lib.mkIf (gui == "gnome" || gui == "phosh") ({
|
||||
dconf.settings = lib.mkIf (gui == "gnome") {
|
||||
gnome = {
|
||||
# control alt-tab behavior
|
||||
"org/gnome/desktop/wm/keybindings" = {
|
||||
|
@ -128,17 +128,49 @@
|
|||
automount-open = false;
|
||||
};
|
||||
};
|
||||
phosh = {
|
||||
# phosh handles scaling via /etc/phosh/phoc.ini
|
||||
# "org/gnome/desktop/interface" = {
|
||||
# # text-scaling-factor = 1.5;
|
||||
# scaling-factor = 1.5;
|
||||
# };
|
||||
# "org/gnome/mutter" = {
|
||||
# experimental-features [ "scale-monitor-framebuffer" ];
|
||||
# };
|
||||
};
|
||||
|
||||
# taken from https://github.com/srid/nix-config/blob/705a70c094da53aa50cf560179b973529617eb31/nix/home/i3.nix
|
||||
xsession.windowManager.i3 = lib.mkIf (gui == "i3") (
|
||||
let
|
||||
mod = "Mod4";
|
||||
in {
|
||||
enable = true;
|
||||
config = {
|
||||
modifier = mod;
|
||||
|
||||
# fonts = ["DejaVu Sans Mono, FontAwesome 6"];
|
||||
|
||||
keybindings = lib.mkOptionDefault {
|
||||
"${mod}+p" = "exec ${pkgs.dmenu}/bin/dmenu_run";
|
||||
"${mod}+x" = "exec sh -c '${pkgs.maim}/bin/maim -s | xclip -selection clipboard -t image/png'";
|
||||
"${mod}+Shift+x" = "exec sh -c '${pkgs.i3lock}/bin/i3lock -c 222222 & sleep 5 && xset dpms force of'";
|
||||
|
||||
# Focus
|
||||
"${mod}+j" = "focus left";
|
||||
"${mod}+k" = "focus down";
|
||||
"${mod}+l" = "focus up";
|
||||
"${mod}+semicolon" = "focus right";
|
||||
|
||||
# Move
|
||||
"${mod}+Shift+j" = "move left";
|
||||
"${mod}+Shift+k" = "move down";
|
||||
"${mod}+Shift+l" = "move up";
|
||||
"${mod}+Shift+semicolon" = "move right";
|
||||
|
||||
# multi monitor setup
|
||||
# "${mod}+m" = "move workspace to output DP-2";
|
||||
# "${mod}+Shift+m" = "move workspace to output DP-5";
|
||||
};
|
||||
|
||||
# bars = [
|
||||
# {
|
||||
# position = "bottom";
|
||||
# statusCommand = "${pkgs.i3status-rust}/bin/i3status-rs ${./i3status-rust.toml}";
|
||||
# }
|
||||
# ];
|
||||
};
|
||||
}).${gui};
|
||||
});
|
||||
|
||||
programs.firefox = lib.mkIf (gui != null) {
|
||||
enable = true;
|
||||
|
|
|
@ -3,14 +3,16 @@
|
|||
imports = [
|
||||
./../../helpers/universal
|
||||
./../../helpers/hardware-x86_64.nix
|
||||
./../../helpers/gui/gnome.nix
|
||||
# ./../../helpers/gui/gnome.nix
|
||||
./../../helpers/gui/i3.nix
|
||||
./fs.nix
|
||||
];
|
||||
|
||||
home-manager.users.colin = import ./../../helpers/home-manager-gen-colin.nix {
|
||||
inherit pkgs lib;
|
||||
system = "x86_64-linux";
|
||||
gui = "gnome";
|
||||
# gui = "gnome";
|
||||
gui = "i3";
|
||||
extraPackages = [
|
||||
pkgs.electrum
|
||||
];
|
||||
|
|
Loading…
Reference in New Issue
Block a user