feat(i3): common config with sway
This commit is contained in:
parent
38f7f6779d
commit
3d542d150e
9 changed files with 399 additions and 625 deletions
152
flake.lock
152
flake.lock
|
@ -95,11 +95,11 @@
|
||||||
"utils": "utils"
|
"utils": "utils"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1678464939,
|
"lastModified": 1678571066,
|
||||||
"narHash": "sha256-pRMlwOUkO1OwSi7qF6XR/zcocWy/ZYxXgbYWvnZQO9k=",
|
"narHash": "sha256-MrlMr2A3tK1MY/JUGWMVzMwois8+mHWXm/1yYdwQSIc=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "7224d7c54c5fc74cdf60b208af6148ed3295aa32",
|
"rev": "bf5712c5865e543fb3f4796511d4cf51efd841b1",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -108,48 +108,6 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"hyprland": {
|
|
||||||
"inputs": {
|
|
||||||
"hyprland-protocols": "hyprland-protocols",
|
|
||||||
"nixpkgs": "nixpkgs",
|
|
||||||
"wlroots": "wlroots",
|
|
||||||
"xdph": "xdph"
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1678557514,
|
|
||||||
"narHash": "sha256-yNrik47cr8qPgl6zTMNJSfoC2zKZJaNUQAMWFYTajcE=",
|
|
||||||
"owner": "hyprwm",
|
|
||||||
"repo": "Hyprland",
|
|
||||||
"rev": "71ef1bde7e45f94ceaab925ae065f32f91510890",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "hyprwm",
|
|
||||||
"repo": "Hyprland",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"hyprland-protocols": {
|
|
||||||
"inputs": {
|
|
||||||
"nixpkgs": [
|
|
||||||
"hyprland",
|
|
||||||
"nixpkgs"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1671839510,
|
|
||||||
"narHash": "sha256-+PY1qqJfmZzzROgcIY4I7AkCwpnC+qBIYk2eFoA9RWc=",
|
|
||||||
"owner": "hyprwm",
|
|
||||||
"repo": "hyprland-protocols",
|
|
||||||
"rev": "b8f55e02a328c47ed373133c52483bbfa20a1b75",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "hyprwm",
|
|
||||||
"repo": "hyprland-protocols",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nekowinston-nur": {
|
"nekowinston-nur": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
|
@ -172,16 +130,16 @@
|
||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1677676435,
|
"lastModified": 1678500271,
|
||||||
"narHash": "sha256-6FxdcmQr5JeZqsQvfinIMr0XcTyTuR7EXX0H3ANShpQ=",
|
"narHash": "sha256-tRBLElf6f02HJGG0ZR7znMNFv/Uf7b2fFInpTHiHaSE=",
|
||||||
"owner": "NixOS",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "a08d6979dd7c82c4cef0dcc6ac45ab16051c1169",
|
"rev": "5eb98948b66de29f899c7fe27ae112a47964baf8",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "NixOS",
|
"owner": "nixos",
|
||||||
"ref": "nixos-unstable",
|
"ref": "nixos-22.11",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
|
@ -204,11 +162,11 @@
|
||||||
},
|
},
|
||||||
"nixpkgs-stable_2": {
|
"nixpkgs-stable_2": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1677948530,
|
"lastModified": 1678582009,
|
||||||
"narHash": "sha256-BkQjq8AGHD55RJe4PUnrWRZZ8jS64p/k0bGDck5wKwY=",
|
"narHash": "sha256-J8QzUOOv3/y97q19pGOz28gLC3lAUy1c4bWpsi5D460=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "d51554151a91cd4543a7620843cc378e3cbc767e",
|
"rev": "c34fc09c77172c4189df4594a0749e25a23cdd9b",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -235,22 +193,6 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs_2": {
|
"nixpkgs_2": {
|
||||||
"locked": {
|
|
||||||
"lastModified": 1678426640,
|
|
||||||
"narHash": "sha256-3Q4KN0XAXQT7YE3A8n3LzLtRNUCo0U++W3gl+5NhKHs=",
|
|
||||||
"owner": "nixos",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"rev": "824f886682fc893e6dbf27114e5001ebf2770ea1",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "nixos",
|
|
||||||
"ref": "nixos-22.11",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nixpkgs_3": {
|
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1671271357,
|
"lastModified": 1671271357,
|
||||||
"narHash": "sha256-xRJdLbWK4v2SewmSStYrcLa0YGJpleufl44A19XSW8k=",
|
"narHash": "sha256-xRJdLbWK4v2SewmSStYrcLa0YGJpleufl44A19XSW8k=",
|
||||||
|
@ -266,13 +208,13 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs_4": {
|
"nixpkgs_3": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1677852945,
|
"lastModified": 1678500213,
|
||||||
"narHash": "sha256-liiVJjkBTuBTAkRW3hrI8MbPD2ImYzwUpa7kvteiKhM=",
|
"narHash": "sha256-A5s2rXawJ+dCThkMXoMuYW8dgyUmkElcyfVJUot/Vr0=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "f5ffd5787786dde3a8bf648c7a1b5f78c4e01abb",
|
"rev": "2ce9b9842b5e63884dfc3dea6689769e2a1ea309",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -284,11 +226,11 @@
|
||||||
},
|
},
|
||||||
"nur": {
|
"nur": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1678565873,
|
"lastModified": 1678614282,
|
||||||
"narHash": "sha256-bN2/lJ52A1bkNgu8ZPIQ6T2wjDWGa5ABqko1Flgi3Fs=",
|
"narHash": "sha256-xOdcIyqjSabQu16+kRDaetbRI2U9+HUhf2pbMIT9NZs=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "NUR",
|
"repo": "NUR",
|
||||||
"rev": "ac1c05d68b2d3733845d3caafb272c15f2874653",
|
"rev": "e1452cb657eafdcc699c30bd85383f2488de8eb9",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -302,7 +244,7 @@
|
||||||
"flake-compat": "flake-compat",
|
"flake-compat": "flake-compat",
|
||||||
"flake-utils": "flake-utils_2",
|
"flake-utils": "flake-utils_2",
|
||||||
"gitignore": "gitignore",
|
"gitignore": "gitignore",
|
||||||
"nixpkgs": "nixpkgs_3",
|
"nixpkgs": "nixpkgs_2",
|
||||||
"nixpkgs-stable": "nixpkgs-stable"
|
"nixpkgs-stable": "nixpkgs-stable"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
|
@ -324,9 +266,8 @@
|
||||||
"darwin": "darwin",
|
"darwin": "darwin",
|
||||||
"flake-utils": "flake-utils",
|
"flake-utils": "flake-utils",
|
||||||
"home-manager": "home-manager",
|
"home-manager": "home-manager",
|
||||||
"hyprland": "hyprland",
|
|
||||||
"nekowinston-nur": "nekowinston-nur",
|
"nekowinston-nur": "nekowinston-nur",
|
||||||
"nixpkgs": "nixpkgs_2",
|
"nixpkgs": "nixpkgs",
|
||||||
"nixpkgs-unstable": "nixpkgs-unstable",
|
"nixpkgs-unstable": "nixpkgs-unstable",
|
||||||
"nur": "nur",
|
"nur": "nur",
|
||||||
"pre-commit-hooks": "pre-commit-hooks",
|
"pre-commit-hooks": "pre-commit-hooks",
|
||||||
|
@ -335,15 +276,15 @@
|
||||||
},
|
},
|
||||||
"sops": {
|
"sops": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": "nixpkgs_4",
|
"nixpkgs": "nixpkgs_3",
|
||||||
"nixpkgs-stable": "nixpkgs-stable_2"
|
"nixpkgs-stable": "nixpkgs-stable_2"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1678440572,
|
"lastModified": 1678590185,
|
||||||
"narHash": "sha256-zfL09Yy6H7QQwfacCPL0gOfWpVkTbE5jXJh5oZmGf8g=",
|
"narHash": "sha256-scvu8HegWwbcvPKjh6M1DnpPYAv4EnP1krsRPItoQ+E=",
|
||||||
"owner": "Mic92",
|
"owner": "Mic92",
|
||||||
"repo": "sops-nix",
|
"repo": "sops-nix",
|
||||||
"rev": "1568702de0d2488c1e77011a9044de7fadec80c4",
|
"rev": "9e98f7a442b0e318de9cce757675c2ab922bdf2b",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -366,49 +307,6 @@
|
||||||
"repo": "flake-utils",
|
"repo": "flake-utils",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
|
||||||
"wlroots": {
|
|
||||||
"flake": false,
|
|
||||||
"locked": {
|
|
||||||
"host": "gitlab.freedesktop.org",
|
|
||||||
"lastModified": 1677789111,
|
|
||||||
"narHash": "sha256-dWrk+Q3bLdtFe5rkyaAKWCQJCeE/KFNllcu1DvBC38c=",
|
|
||||||
"owner": "wlroots",
|
|
||||||
"repo": "wlroots",
|
|
||||||
"rev": "5ae17de23f5fd9bb252a698f3771c840280e2c05",
|
|
||||||
"type": "gitlab"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"host": "gitlab.freedesktop.org",
|
|
||||||
"owner": "wlroots",
|
|
||||||
"repo": "wlroots",
|
|
||||||
"type": "gitlab"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"xdph": {
|
|
||||||
"inputs": {
|
|
||||||
"hyprland-protocols": [
|
|
||||||
"hyprland",
|
|
||||||
"hyprland-protocols"
|
|
||||||
],
|
|
||||||
"nixpkgs": [
|
|
||||||
"hyprland",
|
|
||||||
"nixpkgs"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1673116118,
|
|
||||||
"narHash": "sha256-eR0yDSkR2XYMesfdRWJs25kAdXET2mbNNHu5t+KUcKA=",
|
|
||||||
"owner": "hyprwm",
|
|
||||||
"repo": "xdg-desktop-portal-hyprland",
|
|
||||||
"rev": "d479c846531fd0e1d2357c9588b8310a2b859ef2",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "hyprwm",
|
|
||||||
"repo": "xdg-desktop-portal-hyprland",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"root": "root",
|
"root": "root",
|
||||||
|
|
|
@ -18,7 +18,6 @@
|
||||||
nekowinston-nur.url = "github:nekowinston/nur";
|
nekowinston-nur.url = "github:nekowinston/nur";
|
||||||
nekowinston-nur.inputs.nixpkgs.follows = "nixpkgs-unstable";
|
nekowinston-nur.inputs.nixpkgs.follows = "nixpkgs-unstable";
|
||||||
sops.url = "github:Mic92/sops-nix";
|
sops.url = "github:Mic92/sops-nix";
|
||||||
hyprland.url = "github:hyprwm/Hyprland";
|
|
||||||
|
|
||||||
# dev
|
# dev
|
||||||
pre-commit-hooks.url = "github:cachix/pre-commit-hooks.nix";
|
pre-commit-hooks.url = "github:cachix/pre-commit-hooks.nix";
|
||||||
|
@ -30,7 +29,6 @@
|
||||||
darwin,
|
darwin,
|
||||||
flake-utils,
|
flake-utils,
|
||||||
home-manager,
|
home-manager,
|
||||||
hyprland,
|
|
||||||
nekowinston-nur,
|
nekowinston-nur,
|
||||||
nixpkgs,
|
nixpkgs,
|
||||||
nixpkgs-unstable,
|
nixpkgs-unstable,
|
||||||
|
@ -61,13 +59,12 @@
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
modules = [
|
modules = [
|
||||||
home-manager.nixosModules.home-manager
|
home-manager.nixosModules.home-manager
|
||||||
hyprland.nixosModules.default
|
|
||||||
./machines/common
|
./machines/common
|
||||||
./machines/futomaki
|
./machines/futomaki
|
||||||
|
|
||||||
({config, ...}: {
|
({config, ...}: {
|
||||||
config = {
|
config = {
|
||||||
nixpkgs.overlays = [overlays hyprland.outputs.overlays.default];
|
nixpkgs.overlays = [overlays];
|
||||||
home-manager = {
|
home-manager = {
|
||||||
useGlobalPkgs = true;
|
useGlobalPkgs = true;
|
||||||
sharedModules = [sops.homeManagerModules.sops];
|
sharedModules = [sops.homeManagerModules.sops];
|
||||||
|
@ -90,7 +87,7 @@
|
||||||
|
|
||||||
({config, ...}: {
|
({config, ...}: {
|
||||||
config = {
|
config = {
|
||||||
nixpkgs.overlays = [overlays hyprland.outputs.overlays.default];
|
nixpkgs.overlays = [overlays];
|
||||||
home-manager = {
|
home-manager = {
|
||||||
useGlobalPkgs = true;
|
useGlobalPkgs = true;
|
||||||
sharedModules = [sops.homeManagerModules.sops];
|
sharedModules = [sops.homeManagerModules.sops];
|
||||||
|
|
551
home/apps/i3.nix
551
home/apps/i3.nix
|
@ -10,6 +10,276 @@
|
||||||
names = ["IBM Plex Sans" "Symbols Nerd Font"];
|
names = ["IBM Plex Sans" "Symbols Nerd Font"];
|
||||||
size = 16.0;
|
size = 16.0;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
commonConfig = {wayland ? false}: rec {
|
||||||
|
modifier = "Mod4";
|
||||||
|
focus.wrapping = "no";
|
||||||
|
startup = [
|
||||||
|
{
|
||||||
|
command = "${lib.getExe pkgs.autotiling} -l2";
|
||||||
|
always = true;
|
||||||
|
}
|
||||||
|
{
|
||||||
|
command = "${lib.getExe pkgs._1password-gui} --silent";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
workspaceAutoBackAndForth = true;
|
||||||
|
terminal = "wezterm start --always-new-process";
|
||||||
|
menu = "";
|
||||||
|
keybindings = let
|
||||||
|
mod = modifier;
|
||||||
|
modMove = "${mod}+Shift";
|
||||||
|
modFocus = "${mod}+Ctrl";
|
||||||
|
hyper = "Mod4+Mod1+Shift+Ctrl";
|
||||||
|
|
||||||
|
gopass = lib.getExe pkgs.unstable.gopass;
|
||||||
|
rofi = lib.getExe config.programs.rofi.package;
|
||||||
|
thunar = lib.getExe pkgs.xfce.thunar;
|
||||||
|
xargs = "${lib.getExe pkgs.findutils}/bin/xargs";
|
||||||
|
xdotool = lib.getExe pkgs.xdotool;
|
||||||
|
screenshot =
|
||||||
|
if wayland
|
||||||
|
then "${lib.getExe pkgs.sway-contrib.grimshot} copy area"
|
||||||
|
else "${lib.getExe pkgs.flameshot} gui";
|
||||||
|
playerctl = lib.getExe pkgs.playerctl;
|
||||||
|
wpctl = pkgs.wireplumber + "/bin/wpctl";
|
||||||
|
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 ${terminal}";
|
||||||
|
"${mod}+e" = "exec --no-startup-id ${thunar}";
|
||||||
|
"${mod}+Ctrl+x" = "exec --no-startup-id ${lib.getExe pkgs.xorg.xkill}";
|
||||||
|
# TODO: replace xdotool with wayland equivalent
|
||||||
|
"${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 -";
|
||||||
|
"${hyper}+p" = "--release exec --no-startup-id ${screenshot}";
|
||||||
|
|
||||||
|
# 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 ${rofi} -show drun -dpi $dpi";
|
||||||
|
# 1password
|
||||||
|
"${mod}+Shift+space" = "exec ${lib.getExe pkgs._1password-gui} --quick-access";
|
||||||
|
|
||||||
|
# audio
|
||||||
|
"XF86AudioRaiseVolume" = "exec --no-startup-id ${wpctl} set-volume @DEFAULT_AUDIO_SINK@ 5%+ -l 1.0";
|
||||||
|
"XF86AudioLowerVolume" = "exec --no-startup-id ${wpctl} set-volume @DEFAULT_AUDIO_SINK@ 5%- -l 1.0";
|
||||||
|
"XF86AudioMute" = "exec --no-startup-id ${wpctl} set-mute @DEFAULT_AUDIO_SINK@ 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\"";
|
||||||
|
};
|
||||||
|
modes = {
|
||||||
|
system = {
|
||||||
|
"l" = "exec --no-startup-id i3exit lock, mode \"default\"";
|
||||||
|
"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";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
inherit fonts;
|
||||||
|
bars = [
|
||||||
|
{
|
||||||
|
mode = "hide";
|
||||||
|
hiddenState = "hide";
|
||||||
|
# use waybar if wayland
|
||||||
|
command = lib.mkIf wayland "${lib.getExe config.programs.waybar.package}";
|
||||||
|
# otherwise use i3status-rust
|
||||||
|
statusCommand = lib.mkIf (!wayland) "${lib.getExe config.programs.i3status-rust.package} ${config.xdg.configHome}/i3status-rust/config-default.toml";
|
||||||
|
position = "top";
|
||||||
|
workspaceNumbers = false;
|
||||||
|
inherit fonts;
|
||||||
|
colors = {
|
||||||
|
background = "#000000";
|
||||||
|
focusedWorkspace = {
|
||||||
|
background = "#F5C2E7";
|
||||||
|
text = "#000000";
|
||||||
|
border = "#F5C2E7";
|
||||||
|
};
|
||||||
|
activeWorkspace = {
|
||||||
|
background = "#CBA6F7";
|
||||||
|
text = "#000000";
|
||||||
|
border = "#CBA6F7";
|
||||||
|
};
|
||||||
|
inactiveWorkspace = {
|
||||||
|
background = "#000000";
|
||||||
|
text = "#CDD6F4";
|
||||||
|
border = "#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;
|
||||||
|
};
|
||||||
|
gaps = {
|
||||||
|
inner = 5;
|
||||||
|
outer = 5;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
commonExtraConfig = ''
|
||||||
|
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:Ⅹ
|
||||||
|
|
||||||
|
# floating sticky
|
||||||
|
for_window [class="1Password"] floating enable sticky enable border pixel 1
|
||||||
|
for_window [window_role="PictureInPicture"] floating enable sticky enable border pixel 1
|
||||||
|
|
||||||
|
# floating
|
||||||
|
for_window [class="GParted"] floating enable
|
||||||
|
for_window [title="(?i)SteamTinkerLaunch"] floating enable
|
||||||
|
for_window [title="Blender Render"] floating enable
|
||||||
|
|
||||||
|
# general WM role settings
|
||||||
|
for_window [title="splash"] floating enable
|
||||||
|
for_window [urgent=latest] focus
|
||||||
|
for_window [window_role="pop-up"] floating enable
|
||||||
|
for_window [window_role="task_dialog"] floating enable
|
||||||
|
|
||||||
|
# apps
|
||||||
|
for_window [class="Lightdm-settings"] floating enable
|
||||||
|
for_window [class="Pavucontrol"] floating enable
|
||||||
|
for_window [class="Yad" title="Authentication"] floating enable
|
||||||
|
for_window [class="jetbrains*" title="Welcome*"] floating enable
|
||||||
|
for_window [title="File Transfer*"] floating enable
|
||||||
|
for_window [title="Steam Guard*"] floating enable
|
||||||
|
|
||||||
|
# keep apps in scratchpad
|
||||||
|
for_window [class="discord"] move scratchpad sticky
|
||||||
|
'';
|
||||||
in {
|
in {
|
||||||
fonts.fontconfig.enable = true;
|
fonts.fontconfig.enable = true;
|
||||||
|
|
||||||
|
@ -142,267 +412,32 @@ in {
|
||||||
scriptPath = "${config.xdg.cacheHome}/X11/xsession";
|
scriptPath = "${config.xdg.cacheHome}/X11/xsession";
|
||||||
windowManager.i3 = {
|
windowManager.i3 = {
|
||||||
enable = true;
|
enable = true;
|
||||||
config = {
|
package = pkgs.unstable.i3;
|
||||||
modifier = "Mod4";
|
config = commonConfig {wayland = false;};
|
||||||
focus.wrapping = "no";
|
|
||||||
startup = [
|
|
||||||
{
|
|
||||||
command = "${lib.getExe pkgs.autotiling} -l2";
|
|
||||||
notification = false;
|
|
||||||
always = true;
|
|
||||||
}
|
|
||||||
{
|
|
||||||
command = "${lib.getExe pkgs._1password-gui} --silent";
|
|
||||||
notification = false;
|
|
||||||
}
|
|
||||||
];
|
|
||||||
workspaceAutoBackAndForth = true;
|
|
||||||
terminal = "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";
|
|
||||||
|
|
||||||
gopass = lib.getExe pkgs.unstable.gopass;
|
|
||||||
rofi = lib.getExe config.programs.rofi.package;
|
|
||||||
thunar = lib.getExe pkgs.xfce.thunar;
|
|
||||||
xargs = "${lib.getExe pkgs.findutils}/bin/xargs";
|
|
||||||
xdotool = lib.getExe pkgs.xdotool;
|
|
||||||
flameshot = lib.getExe pkgs.flameshot;
|
|
||||||
playerctl = lib.getExe pkgs.playerctl;
|
|
||||||
wpctl = pkgs.wireplumber + "/bin/wpctl";
|
|
||||||
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 ${thunar}";
|
|
||||||
"${mod}+Ctrl+x" = "exec --no-startup-id ${lib.getExe pkgs.xorg.xkill}";
|
|
||||||
"${hyper}+p" = "--release exec --no-startup-id ${lib.getExe pkgs.flameshot} gui";
|
|
||||||
"${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 ${rofi} -show drun -dpi $dpi";
|
|
||||||
# 1password
|
|
||||||
"${mod}+Shift+space" = "exec ${lib.getExe pkgs._1password-gui} --quick-access";
|
|
||||||
|
|
||||||
# audio
|
|
||||||
"XF86AudioRaiseVolume" = "exec --no-startup-id ${wpctl} set-volume @DEFAULT_AUDIO_SINK@ 5%+ -l 1.0";
|
|
||||||
"XF86AudioLowerVolume" = "exec --no-startup-id ${wpctl} set-volume @DEFAULT_AUDIO_SINK@ 5%- -l 1.0";
|
|
||||||
"XF86AudioMute" = "exec --no-startup-id ${wpctl} set-mute @DEFAULT_AUDIO_SINK@ 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\"";
|
|
||||||
};
|
|
||||||
modes = {
|
|
||||||
system = {
|
|
||||||
"l" = "exec --no-startup-id i3exit lock, mode \"default\"";
|
|
||||||
"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";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
inherit fonts;
|
|
||||||
bars = [
|
|
||||||
{
|
|
||||||
mode = "hide";
|
|
||||||
hiddenState = "hide";
|
|
||||||
statusCommand = "${pkgs.i3status-rust}/bin/i3status-rs ${config.xdg.configHome}/i3status-rust/config-default.toml";
|
|
||||||
position = "top";
|
|
||||||
workspaceNumbers = false;
|
|
||||||
inherit fonts;
|
|
||||||
colors = {
|
|
||||||
background = "#000000";
|
|
||||||
focusedWorkspace = {
|
|
||||||
background = "#F5C2E7";
|
|
||||||
text = "#000000";
|
|
||||||
border = "#F5C2E7";
|
|
||||||
};
|
|
||||||
activeWorkspace = {
|
|
||||||
background = "#CBA6F7";
|
|
||||||
text = "#000000";
|
|
||||||
border = "#CBA6F7";
|
|
||||||
};
|
|
||||||
inactiveWorkspace = {
|
|
||||||
background = "#000000";
|
|
||||||
text = "#CDD6F4";
|
|
||||||
border = "#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 = ''
|
extraConfig = ''
|
||||||
set_from_resource $dpi Xft.dpi 140
|
set_from_resource $dpi Xft.dpi 140
|
||||||
title_align center
|
${commonExtraConfig}
|
||||||
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:Ⅹ
|
|
||||||
|
|
||||||
# floating sticky
|
|
||||||
for_window [class="1Password"] floating enable sticky enable border pixel 1
|
|
||||||
for_window [window_role="PictureInPicture"] floating enable sticky enable border pixel 1
|
|
||||||
|
|
||||||
# floating
|
|
||||||
for_window [class="GParted"] floating enable
|
|
||||||
for_window [title="(?i)SteamTinkerLaunch"] floating enable
|
|
||||||
for_window [title="Blender Render"] floating enable
|
|
||||||
|
|
||||||
# general WM role settings
|
|
||||||
for_window [title="splash"] floating enable
|
|
||||||
for_window [urgent=latest] focus
|
|
||||||
for_window [window_role="pop-up"] floating enable
|
|
||||||
for_window [window_role="task_dialog"] floating enable
|
|
||||||
|
|
||||||
# apps
|
|
||||||
for_window [class="Lightdm-settings"] floating enable
|
|
||||||
for_window [class="Pavucontrol"] floating enable
|
|
||||||
for_window [class="Yad" title="Authentication"] floating enable
|
|
||||||
for_window [class="jetbrains*" title="Welcome*"] floating enable
|
|
||||||
for_window [title="File Transfer*"] floating enable
|
|
||||||
for_window [title="Steam Guard*"] floating enable
|
|
||||||
|
|
||||||
# keep apps in scratchpad
|
|
||||||
for_window [class="discord"] move scratchpad sticky
|
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
wayland.windowManager.sway = {
|
||||||
|
enable = true;
|
||||||
|
config =
|
||||||
|
commonConfig {wayland = true;}
|
||||||
|
// {
|
||||||
|
output = {"*" = {scale = "2";};};
|
||||||
|
startup = [
|
||||||
|
{
|
||||||
|
command = "${lib.getExe pkgs.nur.repos.nekowinston.swww} init";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
extraConfig = commonExtraConfig;
|
||||||
|
systemdIntegration = true;
|
||||||
|
wrapperFeatures = {
|
||||||
|
base = true;
|
||||||
|
gtk = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,53 +0,0 @@
|
||||||
// vim:ft=jsonc
|
|
||||||
{
|
|
||||||
"layer": "top",
|
|
||||||
"position": "top",
|
|
||||||
"spacing": 4,
|
|
||||||
"margin-top": 5,
|
|
||||||
"margin-left": 5,
|
|
||||||
"margin-right": 5,
|
|
||||||
"modules-left": ["wlr/workspaces"],
|
|
||||||
"modules-center": [
|
|
||||||
"hyprland/window"
|
|
||||||
],
|
|
||||||
"modules-right": [
|
|
||||||
"tray",
|
|
||||||
"idle_inhibitor",
|
|
||||||
"pulseaudio",
|
|
||||||
"clock"
|
|
||||||
],
|
|
||||||
"wlr/workspaces": {
|
|
||||||
"format": "{icon}",
|
|
||||||
"on-click": "activate",
|
|
||||||
"format-icons": {
|
|
||||||
"1": "Ⅰ",
|
|
||||||
"2": "Ⅱ",
|
|
||||||
"3": "Ⅲ",
|
|
||||||
"4": "Ⅳ",
|
|
||||||
"5": "Ⅴ",
|
|
||||||
"6": "Ⅵ",
|
|
||||||
"7": "Ⅶ",
|
|
||||||
"8": "Ⅷ",
|
|
||||||
"9": "Ⅸ",
|
|
||||||
"10": "Ⅹ"
|
|
||||||
},
|
|
||||||
"sort-by-number": true
|
|
||||||
},
|
|
||||||
"idle_inhibitor": {
|
|
||||||
"format": "{icon}",
|
|
||||||
"format-icons": {
|
|
||||||
"activated": "",
|
|
||||||
"deactivated": "鈴"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"tray": {
|
|
||||||
"spacing": 10
|
|
||||||
},
|
|
||||||
"pulseaudio": {
|
|
||||||
"format": "{icon} {volume}%",
|
|
||||||
"format-icons": {
|
|
||||||
"default": ["", "", ""]
|
|
||||||
},
|
|
||||||
"on-click": "pavucontrol"
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,63 +0,0 @@
|
||||||
@define-color red #f38ba8;
|
|
||||||
@define-color pink #f5c2e7;
|
|
||||||
@define-color crust #11111c;
|
|
||||||
@define-color base #1e1e2e;
|
|
||||||
@define-color text #cdd6f4;
|
|
||||||
@define-color surface0 #313244;
|
|
||||||
@define-color surface2 #585b70;
|
|
||||||
|
|
||||||
* {
|
|
||||||
font-family: Symbols Nerd Font, IBM Plex Sans;
|
|
||||||
font-size: 16px;
|
|
||||||
color: @text;
|
|
||||||
}
|
|
||||||
|
|
||||||
window#waybar {
|
|
||||||
background-color: @base;
|
|
||||||
border: 2px solid @crust;
|
|
||||||
border-radius: 5px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#workspaces button:first-child {
|
|
||||||
padding: 0 5px;
|
|
||||||
border-radius: 5px 0 0 5px;
|
|
||||||
border-left: 2px solid @crust;
|
|
||||||
}
|
|
||||||
#workspaces button.active:first-child {
|
|
||||||
padding: 0 5px;
|
|
||||||
box-shadow: unset;
|
|
||||||
border-radius: 5px 0 0 5px;
|
|
||||||
border-left: 2px solid @pink;
|
|
||||||
border-top: 2px solid @pink;
|
|
||||||
border-bottom: 2px solid @pink;
|
|
||||||
}
|
|
||||||
|
|
||||||
#workspaces button {
|
|
||||||
padding: 0 5px;
|
|
||||||
border-radius: 0;
|
|
||||||
border-top: 2px solid @crust;
|
|
||||||
border-bottom: 2px solid @crust;
|
|
||||||
}
|
|
||||||
|
|
||||||
#workspaces button:hover {
|
|
||||||
background: @surface2;
|
|
||||||
}
|
|
||||||
|
|
||||||
#workspaces button.active {
|
|
||||||
color: @pink;
|
|
||||||
background: @surface0;
|
|
||||||
border-top: 2px solid @pink;
|
|
||||||
border-bottom: 2px solid @pink;
|
|
||||||
}
|
|
||||||
|
|
||||||
#workspaces button.urgent {
|
|
||||||
background-color: @red;
|
|
||||||
}
|
|
||||||
|
|
||||||
#clock,
|
|
||||||
#network,
|
|
||||||
#pulseaudio,
|
|
||||||
#tray,
|
|
||||||
#idle_inhibitor {
|
|
||||||
padding: 0 10px;
|
|
||||||
}
|
|
|
@ -1,30 +1,10 @@
|
||||||
{
|
{
|
||||||
config,
|
|
||||||
flakePath,
|
|
||||||
inputs,
|
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
inherit (pkgs.stdenv.hostPlatform) isLinux;
|
inherit (pkgs.stdenv.hostPlatform) isLinux;
|
||||||
waybarLauncher = pkgs.writeShellScriptBin "waybar-launcher" (let
|
|
||||||
killall = lib.getExe pkgs.killall;
|
|
||||||
inotifywait = pkgs.inotify-tools + "/bin/inotifywait";
|
|
||||||
in ''
|
|
||||||
#!/bin/sh
|
|
||||||
trap "${killall} .waybar-wrapped" EXIT
|
|
||||||
while true; do
|
|
||||||
waybar &
|
|
||||||
${inotifywait} -e create,modify "$HOME/.config/waybar/config" "$HOME/.config/waybar/style.css"
|
|
||||||
${killall} .waybar-wrapped
|
|
||||||
done
|
|
||||||
'');
|
|
||||||
in {
|
in {
|
||||||
programs.waybar = lib.mkIf isLinux {
|
|
||||||
enable = true;
|
|
||||||
package = pkgs.waybar-hyprland;
|
|
||||||
};
|
|
||||||
|
|
||||||
home.packages = lib.mkIf isLinux (with pkgs; [
|
home.packages = lib.mkIf isLinux (with pkgs; [
|
||||||
cliphist
|
cliphist
|
||||||
grim
|
grim
|
||||||
|
@ -33,103 +13,97 @@ in {
|
||||||
nur.repos.nekowinston.swww
|
nur.repos.nekowinston.swww
|
||||||
]);
|
]);
|
||||||
|
|
||||||
xdg = lib.mkIf isLinux {
|
programs.waybar = lib.mkIf isLinux {
|
||||||
configFile."waybar" = {
|
enable = true;
|
||||||
source = config.lib.file.mkOutOfStoreSymlink "${flakePath}/home/apps/waybar";
|
package = pkgs.unstable.waybar;
|
||||||
recursive = true;
|
settings = [
|
||||||
};
|
{
|
||||||
|
layer = "top";
|
||||||
|
position = "top";
|
||||||
|
margin-left = 5;
|
||||||
|
margin-right = 5;
|
||||||
|
margin-top = 5;
|
||||||
|
modules-left = ["sway/workspaces" "mpd"];
|
||||||
|
modules-center = [];
|
||||||
|
modules-right = ["tray" "cpu" "memory" "clock"];
|
||||||
|
"sway/workspaces" = {
|
||||||
|
disable-scroll = true;
|
||||||
|
format = "{name}";
|
||||||
|
};
|
||||||
|
mpd = {
|
||||||
|
format = "{artist} - {title}";
|
||||||
|
format-disconnected = "";
|
||||||
|
format-paused = "";
|
||||||
|
format-stopped = "";
|
||||||
|
interval = 10;
|
||||||
|
};
|
||||||
|
tray = {
|
||||||
|
reverse-direction = true;
|
||||||
|
spacing = 5;
|
||||||
|
};
|
||||||
|
cpu = {
|
||||||
|
format = " {usage:2}%";
|
||||||
|
interval = 1;
|
||||||
|
};
|
||||||
|
memory = {
|
||||||
|
format = " {percentage:2}%";
|
||||||
|
interval = 1;
|
||||||
|
};
|
||||||
|
spacing = 4;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
style = ''
|
||||||
|
@define-color red #f38ba8;
|
||||||
|
@define-color mauve #cba6f7;
|
||||||
|
@define-color pink #f5c2e7;
|
||||||
|
@define-color crust #11111c;
|
||||||
|
@define-color base #1e1e2e;
|
||||||
|
@define-color text #cdd6f4;
|
||||||
|
|
||||||
configFile."hypr/hyprland.conf".text = let
|
* {
|
||||||
playerctl = lib.getExe pkgs.playerctl;
|
font-family: IBM Plex Sans;
|
||||||
wpctl = pkgs.wireplumber + "/bin/wpctl";
|
font-size: 16px;
|
||||||
in ''
|
|
||||||
monitor = ,5120x2160@72,0x0,2.0
|
|
||||||
|
|
||||||
input:follow_mouse = 1
|
|
||||||
|
|
||||||
general {
|
|
||||||
gaps_in = 2
|
|
||||||
gaps_out = 5
|
|
||||||
border_size = 2
|
|
||||||
col.active_border = 0xfff5c2e7
|
|
||||||
col.inactive_border = 0x80cba6f7
|
|
||||||
}
|
}
|
||||||
|
|
||||||
decoration {
|
window#waybar {
|
||||||
rounding = 5
|
background-color: @base;
|
||||||
blur = true
|
border: 2px solid @crust;
|
||||||
|
border-radius: 5px;
|
||||||
|
color: @text;
|
||||||
}
|
}
|
||||||
|
|
||||||
animations {
|
#workspaces button {
|
||||||
enabled = true
|
padding: 0 5px;
|
||||||
animation = workspaces,1,1,default,slide
|
color: alpha(@mauve, 0.5);
|
||||||
}
|
}
|
||||||
|
|
||||||
misc {
|
#workspaces button.focused {
|
||||||
disable_hyprland_logo = true
|
color: @pink;
|
||||||
disable_splash_rendering = true
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bind = SUPER_SHIFT,return,exec,wezterm
|
#workspaces button.urgent {
|
||||||
bind = SUPER_SHIFT,q,killactive,
|
background-color: @red;
|
||||||
bind = SUPER_SHIFT,M,exit,
|
}
|
||||||
bind = SUPER_SHIFT,d,togglefloating,
|
|
||||||
bind = SUPER,space,exec,rofi -show drun
|
|
||||||
|
|
||||||
bind = SUPER_CTRL,h,movefocus,l
|
#clock,
|
||||||
bind = SUPER_CTRL,j,movefocus,d
|
#cpu,
|
||||||
bind = SUPER_CTRL,k,movefocus,u
|
#idle_inhibitor,
|
||||||
bind = SUPER_CTRL,l,movefocus,r
|
#memory,
|
||||||
bind = SUPER_SHIFT,h,movewindow,l
|
#mpd,
|
||||||
bind = SUPER_SHIFT,j,movewindow,u
|
#pulseaudio,
|
||||||
bind = SUPER_SHIFT,k,movewindow,d
|
#tray {
|
||||||
bind = SUPER_SHIFT,l,movewindow,r
|
padding: 0 5px;
|
||||||
|
}
|
||||||
|
|
||||||
bind = SUPER_CTRL,1,workspace,1
|
#mpd {
|
||||||
bind = SUPER_CTRL,2,workspace,2
|
font-family: Symbols Nerd Font, Victor Mono;
|
||||||
bind = SUPER_CTRL,3,workspace,3
|
font-style: italic;
|
||||||
bind = SUPER_CTRL,4,workspace,4
|
}
|
||||||
bind = SUPER_CTRL,5,workspace,5
|
|
||||||
bind = SUPER_CTRL,6,workspace,6
|
|
||||||
bind = SUPER_CTRL,7,workspace,7
|
|
||||||
bind = SUPER_CTRL,8,workspace,8
|
|
||||||
bind = SUPER_CTRL,9,workspace,9
|
|
||||||
bind = SUPER_CTRL,0,workspace,10
|
|
||||||
|
|
||||||
bind = SUPER_SHIFT,1,movetoworkspace,1
|
#cpu,
|
||||||
bind = SUPER_SHIFT,2,movetoworkspace,2
|
#memory {
|
||||||
bind = SUPER_SHIFT,3,movetoworkspace,3
|
font-family: Berkeley Mono;
|
||||||
bind = SUPER_SHIFT,4,movetoworkspace,4
|
}
|
||||||
bind = SUPER_SHIFT,5,movetoworkspace,5
|
|
||||||
bind = SUPER_SHIFT,6,movetoworkspace,6
|
|
||||||
bind = SUPER_SHIFT,7,movetoworkspace,7
|
|
||||||
bind = SUPER_SHIFT,8,movetoworkspace,8
|
|
||||||
bind = SUPER_SHIFT,9,movetoworkspace,9
|
|
||||||
bind = SUPER_SHIFT,0,movetoworkspace,10
|
|
||||||
|
|
||||||
bindm = SUPER,mouse:272,movewindow
|
|
||||||
bindm = SUPER,mouse:273,resizewindow
|
|
||||||
|
|
||||||
binde = ,XF86AudioRaiseVolume,exec,${wpctl} set-volume @DEFAULT_AUDIO_SINK@ 5%+ -l 1.0
|
|
||||||
binde = ,XF86AudioLowerVolume,exec,${wpctl} set-volume @DEFAULT_AUDIO_SINK@ 5%- -l 1.0
|
|
||||||
bind = ,XF86AudioMute,exec,${wpctl} set-mute @DEFAULT_AUDIO_SINK@ toggle
|
|
||||||
bind = ,XF86AudioNext,exec,${playerctl} next
|
|
||||||
bind = ,XF86AudioPrev,exec,${playerctl} previous
|
|
||||||
bind = ,XF86AudioPause,exec,${playerctl} play-pause
|
|
||||||
exec-once = ${waybarLauncher}/bin/waybar-launcher
|
|
||||||
|
|
||||||
# sets xwayland scale
|
|
||||||
exec-once=xprop -root -f _XWAYLAND_GLOBAL_OUTPUT_SCALE 32c -set _XWAYLAND_GLOBAL_OUTPUT_SCALE 2
|
|
||||||
|
|
||||||
# toolkit-specific scale
|
|
||||||
env = GDK_SCALE,2
|
|
||||||
env = XCURSOR_SIZE,32
|
|
||||||
|
|
||||||
# cliphist
|
|
||||||
exec-once = wl-paste --type text --watch cliphist store
|
|
||||||
exec-once = wl-paste --type image --watch cliphist store
|
|
||||||
exec-once = swww-daemon
|
|
||||||
bind = SUPER, V, exec, cliphist list | rofi -dmenu | cliphist decode | wl-copy
|
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,7 +11,6 @@
|
||||||
auto-optimise-store = true;
|
auto-optimise-store = true;
|
||||||
substituters = [
|
substituters = [
|
||||||
"https://catppuccin.cachix.org"
|
"https://catppuccin.cachix.org"
|
||||||
"https://hyprland.cachix.org"
|
|
||||||
"https://mic92.cachix.org"
|
"https://mic92.cachix.org"
|
||||||
"https://nekowinston.cachix.org"
|
"https://nekowinston.cachix.org"
|
||||||
"https://nix-community.cachix.org"
|
"https://nix-community.cachix.org"
|
||||||
|
@ -20,7 +19,6 @@
|
||||||
# configuration.nix
|
# configuration.nix
|
||||||
trusted-public-keys = [
|
trusted-public-keys = [
|
||||||
"catppuccin.cachix.org-1:noG/4HkbhJb+lUAdKrph6LaozJvAeEEZj4N732IysmU="
|
"catppuccin.cachix.org-1:noG/4HkbhJb+lUAdKrph6LaozJvAeEEZj4N732IysmU="
|
||||||
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
|
|
||||||
"mic92.cachix.org-1:gi8IhgiT3CYZnJsaW7fxznzTkMUOn1RY4GmXdT/nXYQ="
|
"mic92.cachix.org-1:gi8IhgiT3CYZnJsaW7fxznzTkMUOn1RY4GmXdT/nXYQ="
|
||||||
"nekowinston.cachix.org-1:lucpmaO+JwtoZj16HCO1p1fOv68s/RL1gumpVzRHRDs="
|
"nekowinston.cachix.org-1:lucpmaO+JwtoZj16HCO1p1fOv68s/RL1gumpVzRHRDs="
|
||||||
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
||||||
|
|
|
@ -1,11 +0,0 @@
|
||||||
{
|
|
||||||
programs.hyprland = {
|
|
||||||
enable = true;
|
|
||||||
xwayland = {
|
|
||||||
enable = true;
|
|
||||||
hidpi = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
xdg.portal.enable = true;
|
|
||||||
xdg.portal.wlr.enable = true;
|
|
||||||
}
|
|
|
@ -8,7 +8,6 @@ in {
|
||||||
imports = [
|
imports = [
|
||||||
./hardware.nix
|
./hardware.nix
|
||||||
../common/linux
|
../common/linux
|
||||||
../common/hyprland.nix
|
|
||||||
];
|
];
|
||||||
|
|
||||||
boot = {
|
boot = {
|
||||||
|
|
Loading…
Reference in a new issue