Compare commits
49 Commits
main
..
c0212faa5b
| Author | SHA1 | Date | |
|---|---|---|---|
| c0212faa5b | |||
| 98fb9fae46 | |||
| 0e268f0970 | |||
| 0e419faa8e | |||
| c21670e4ec | |||
| 670abe43d6 | |||
| 89e652cdc1 | |||
| 13d4761595 | |||
| 3023e366e4 | |||
| e740f4051e | |||
| 1efeacc92b | |||
| 31d19d5c7d | |||
| 5acdbaaa70 | |||
| 57e2fe7ea7 | |||
| 7d8d0bb269 | |||
| 7f44dbfa7e | |||
| 0772a5baf0 | |||
| 61552efc44 | |||
| 869785d1c5 | |||
| 1b771db0c8 | |||
| 8b0466f49b | |||
| 4f820f94ab | |||
| 1155c43800 | |||
| 4d92882f4e | |||
| f082e5a1d3 | |||
| d708b43395 | |||
| 893030ef66 | |||
| 1c4c5d1be6 | |||
| 1fe42be1b4 | |||
| 4324799e60 | |||
| 82fb86c945 | |||
| 52639559e3 | |||
| 50db8aec2c | |||
| 6a6f2fc67f | |||
| 6696d0a56a | |||
| 9b216cf609 | |||
| c76b681700 | |||
| d55b2ef3d2 | |||
| c7ba15d42a | |||
| 629929b657 | |||
| 92e9b70b04 | |||
| 3c404ce97c | |||
| 93784a1909 | |||
| 158f5a744e | |||
| e4a5dd8061 | |||
| e109b48cf6 | |||
| b5549d2629 | |||
| ffe63a7a0d | |||
| ae221986c7 |
Generated
+45
-45
@@ -38,11 +38,11 @@
|
|||||||
"base16-helix": {
|
"base16-helix": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1776754714,
|
"lastModified": 1760703920,
|
||||||
"narHash": "sha256-E3OAK27smtATTmX45uoTSRsVD+Y+ZiVVfgM/tjpbtYg=",
|
"narHash": "sha256-m82fGUYns4uHd+ZTdoLX2vlHikzwzdu2s2rYM2bNwzw=",
|
||||||
"owner": "tinted-theming",
|
"owner": "tinted-theming",
|
||||||
"repo": "base16-helix",
|
"repo": "base16-helix",
|
||||||
"rev": "4d508123037e7851ad36ebf7d9c48b0e9e1eb581",
|
"rev": "d646af9b7d14bff08824538164af99d0c521b185",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -89,11 +89,11 @@
|
|||||||
"firefox-gnome-theme": {
|
"firefox-gnome-theme": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1776136500,
|
"lastModified": 1775176642,
|
||||||
"narHash": "sha256-r0gN2brVWA351zwMV0Flmlcd6SGMvYqFbvC3DfKFM8Y=",
|
"narHash": "sha256-2veEED0Fg7Fsh81tvVDNYR6SzjqQxa7hbi18Jv4LWpM=",
|
||||||
"owner": "rafaelmardojai",
|
"owner": "rafaelmardojai",
|
||||||
"repo": "firefox-gnome-theme",
|
"repo": "firefox-gnome-theme",
|
||||||
"rev": "0f8ba203d475587f477e7ae12661bd8459e225b7",
|
"rev": "179704030c5286c729b5b0522037d1d51341022c",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -126,11 +126,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1778716662,
|
"lastModified": 1775087534,
|
||||||
"narHash": "sha256-m1Yf0wZ8j1OHjTc2UwHwyQRSnNeSgLJOd7q5Y45hzi4=",
|
"narHash": "sha256-91qqW8lhL7TLwgQWijoGBbiD4t7/q75KTi8NxjVmSmA=",
|
||||||
"owner": "hercules-ci",
|
"owner": "hercules-ci",
|
||||||
"repo": "flake-parts",
|
"repo": "flake-parts",
|
||||||
"rev": "f7c1a2d347e4c52d5fb8d10cb4d94b5884e546fb",
|
"rev": "3107b77cd68437b9a76194f0f7f9c55f2329ca5b",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -256,11 +256,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1779507042,
|
"lastModified": 1775457580,
|
||||||
"narHash": "sha256-7wOwi8B6D0BYsieZCnHZZj2sNUzgJhLoIVSfkwB7lxQ=",
|
"narHash": "sha256-ikws/ssAmG20AGrEwBuwspwPlkubJu34mB+Uz2fJBJs=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "509ed3c603349a9d43de9e2ae6613baea6bd5b34",
|
"rev": "5de7dbd151b0bd65d45785553d4a22d832733ffc",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -277,11 +277,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1778805320,
|
"lastModified": 1774991950,
|
||||||
"narHash": "sha256-nGFJ01m2CTBKD4ABtcY4vLhHrRN91LKr/pn41PcU78A=",
|
"narHash": "sha256-kScKj3qJDIWuN9/6PMmgy5esrTUkYinrO5VvILik/zw=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "9846abe15e7d0d36b8acbd4d05f2b87461744c92",
|
"rev": "f2d3e04e278422c7379e067e323734f3e8c585a7",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -297,11 +297,11 @@
|
|||||||
"nixpkgs": "nixpkgs"
|
"nixpkgs": "nixpkgs"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1779494629,
|
"lastModified": 1775427754,
|
||||||
"narHash": "sha256-VuZJ76qmY90clvY6RQfAPL5JHwhcf1jmyqBfKR7WQ7Q=",
|
"narHash": "sha256-+z5+5Wl63CTjlLzP3KbVBpNdEFndqKcb5IZJLY4FZnM=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "neovim-nightly-overlay",
|
"repo": "neovim-nightly-overlay",
|
||||||
"rev": "9b46852004ed151b36e424de6d529a231c622561",
|
"rev": "df3f935c8c65f43614e01fdce92c332b3c7686c7",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -313,11 +313,11 @@
|
|||||||
"neovim-src": {
|
"neovim-src": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1779493669,
|
"lastModified": 1775340536,
|
||||||
"narHash": "sha256-09xuVobnmU/uZLUZLr/lb3tir2v0lwWEj92gGuJIdKU=",
|
"narHash": "sha256-AAeheDZMLpXuWe7txFp6DfDnwPCEC83Nkc2vLiLz8+4=",
|
||||||
"owner": "neovim",
|
"owner": "neovim",
|
||||||
"repo": "neovim",
|
"repo": "neovim",
|
||||||
"rev": "f53d9ac90b7a5a0eefb22398a8ce4e249a3fc732",
|
"rev": "39335d6a7d8e097798b2e59bd53d25fa54456021",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -350,11 +350,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1779414690,
|
"lastModified": 1775126147,
|
||||||
"narHash": "sha256-gOTcX/9MZVMUE0Xvb4IEcv+0TQJkZFNEnL757ljU360=",
|
"narHash": "sha256-J0dZU4atgcfo4QvM9D92uQ0Oe1eLTxBVXjJzdEMQpD0=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "6dedf69f94d03cbe7bdde106f2d4c23ae2a853bf",
|
"rev": "8d8c1fa5b412c223ffa47410867813290cdedfef",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -366,11 +366,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs_2": {
|
"nixpkgs_2": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1779357205,
|
"lastModified": 1775036866,
|
||||||
"narHash": "sha256-cCO8aTqss5x9Ky8GWkpY0Hy5fyTZEbtifSUV8QjSzic=",
|
"narHash": "sha256-ZojAnPuCdy657PbTq5V0Y+AHKhZAIwSIT2cb8UgAz/U=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "f83fc3c307e74bc5fd5adb7eb6b8b13ffd2a36e1",
|
"rev": "6201e203d09599479a3b3450ed24fa81537ebc4e",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -392,11 +392,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1777598946,
|
"lastModified": 1775228139,
|
||||||
"narHash": "sha256-X239dAGaU1+gfDj8jKH8GzlqKMcxaVfXOio+uzBOkeE=",
|
"narHash": "sha256-ebbeHmg+V7w8050bwQOuhmQHoLOEOfqKzM1KgCTexK4=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "NUR",
|
"repo": "NUR",
|
||||||
"rev": "5d55af01c0f86be583931fe99207fc56c14134b3",
|
"rev": "601971b9c89e0304561977f2c28fa25e73aa7132",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -459,11 +459,11 @@
|
|||||||
"tinted-zed": "tinted-zed"
|
"tinted-zed": "tinted-zed"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1779378391,
|
"lastModified": 1775429060,
|
||||||
"narHash": "sha256-IsDb9erotvx9npI94UDosvMeYQK17p7/vmU2v9batrY=",
|
"narHash": "sha256-wbFF5cRxQOCzL/wHOKYm21t5AHPH2Lfp0mVPCOAvEoc=",
|
||||||
"owner": "danth",
|
"owner": "danth",
|
||||||
"repo": "stylix",
|
"repo": "stylix",
|
||||||
"rev": "c1456cc4ba3c9485e7b4158c909eeca5a752cd59",
|
"rev": "d27951a6539951d87f75cf0a7cda8a3a24016019",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -521,11 +521,11 @@
|
|||||||
"tinted-schemes": {
|
"tinted-schemes": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1777041405,
|
"lastModified": 1772661346,
|
||||||
"narHash": "sha256-BAGZ7ObFV/9Z61OJZun7ifPyhkuHqNuW1QIhQ8LuzCo=",
|
"narHash": "sha256-4eu3LqB9tPqe0Vaqxd4wkZiBbthLbpb7llcoE/p5HT0=",
|
||||||
"owner": "tinted-theming",
|
"owner": "tinted-theming",
|
||||||
"repo": "schemes",
|
"repo": "schemes",
|
||||||
"rev": "5f868b3a338b6904c47f3833b9c411be641983a8",
|
"rev": "13b5b0c299982bb361039601e2d72587d6846294",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -537,11 +537,11 @@
|
|||||||
"tinted-tmux": {
|
"tinted-tmux": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1777169200,
|
"lastModified": 1772934010,
|
||||||
"narHash": "sha256-h7dDbIzP5hDr9v97w9PL6jdAgXawmj6krcH+959rqpU=",
|
"narHash": "sha256-x+6+4UvaG+RBRQ6UaX+o6DjEg28u4eqhVRM9kpgJGjQ=",
|
||||||
"owner": "tinted-theming",
|
"owner": "tinted-theming",
|
||||||
"repo": "tinted-tmux",
|
"repo": "tinted-tmux",
|
||||||
"rev": "f798c2dce44ef815bb6b8f05a82135c7942d35ac",
|
"rev": "c3529673a5ab6e1b6830f618c45d9ce1bcdd829d",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -553,11 +553,11 @@
|
|||||||
"tinted-zed": {
|
"tinted-zed": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1777463218,
|
"lastModified": 1772909925,
|
||||||
"narHash": "sha256-Bhkozqtq3BKLqWTlmKm8uAptfX4aRGI8QX3eEL54Vpc=",
|
"narHash": "sha256-jx/5+pgYR0noHa3hk2esin18VMbnPSvWPL5bBjfTIAU=",
|
||||||
"owner": "tinted-theming",
|
"owner": "tinted-theming",
|
||||||
"repo": "base16-zed",
|
"repo": "base16-zed",
|
||||||
"rev": "5768d08ed2e7944a26a958868cdb073cb8856dae",
|
"rev": "b4d3a1b3bcbd090937ef609a0a3b37237af974df",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -574,11 +574,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1779455631,
|
"lastModified": 1775453133,
|
||||||
"narHash": "sha256-svU6Ro4xiMxMA1KJGwQ/nfKwz3yXE/SONCw2Z1qTXHA=",
|
"narHash": "sha256-VIlMG985ONqVqF+OnPuS5Shbz5k6tqbOWnDL7EH+IT4=",
|
||||||
"owner": "0xc000022070",
|
"owner": "0xc000022070",
|
||||||
"repo": "zen-browser-flake",
|
"repo": "zen-browser-flake",
|
||||||
"rev": "5bcdfcef664bf62831dcb4b947004d9c5fbf7201",
|
"rev": "8d0508ffceba8ad785ae442591dd115080a55142",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|||||||
@@ -45,10 +45,10 @@
|
|||||||
hostName = "february";
|
hostName = "february";
|
||||||
inherit userName;
|
inherit userName;
|
||||||
inherit inputs;
|
inherit inputs;
|
||||||
};
|
|
||||||
|
|
||||||
modules = [ ./host/pc/february/configuration.nix ];
|
modules = [ ./host/pc/february/configuration.nix ];
|
||||||
};
|
};
|
||||||
|
};
|
||||||
|
|
||||||
"march" = inputs.nixpkgs.lib.nixosSystem {
|
"march" = inputs.nixpkgs.lib.nixosSystem {
|
||||||
specialArgs = {
|
specialArgs = {
|
||||||
|
|||||||
+9
-16
@@ -1,11 +1,4 @@
|
|||||||
{ inputs, lib, pkgs, ... }:
|
{ inputs, lib, pkgs, ... }:
|
||||||
let
|
|
||||||
cursorTheme = {
|
|
||||||
name = "Bibata-Modern-Ice";
|
|
||||||
package = pkgs.bibata-cursors;
|
|
||||||
size = 3;
|
|
||||||
};
|
|
||||||
in
|
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
inputs.zen-browser.homeModules.default
|
inputs.zen-browser.homeModules.default
|
||||||
@@ -15,16 +8,12 @@ in
|
|||||||
./clangd.nix
|
./clangd.nix
|
||||||
./packages.nix
|
./packages.nix
|
||||||
./xdg.nix
|
./xdg.nix
|
||||||
|
|
||||||
./river
|
|
||||||
];
|
];
|
||||||
|
|
||||||
home.username = "autumn";
|
home.username = "autumn";
|
||||||
home.homeDirectory = "/home/autumn";
|
home.homeDirectory = "/home/autumn";
|
||||||
home.stateVersion = "26.05";
|
home.stateVersion = "25.05";
|
||||||
|
|
||||||
# programs.ghostty.enable = true;
|
|
||||||
# programs.ghostty.settings.font-size = 24;
|
|
||||||
programs.foot = {
|
programs.foot = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings.main.font = lib.mkForce "Caskaydia Cove Mono:size=24";
|
settings.main.font = lib.mkForce "Caskaydia Cove Mono:size=24";
|
||||||
@@ -44,16 +33,20 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
home.pointerCursor = {
|
home.pointerCursor = {
|
||||||
name = cursorTheme.name;
|
name = "catppuccin-mocha-pink-cursors";
|
||||||
package = cursorTheme.package;
|
package = pkgs.catppuccin-cursors.mochaPink;
|
||||||
size = cursorTheme.size;
|
size = 6;
|
||||||
x11.enable = true;
|
x11.enable = true;
|
||||||
gtk.enable = true;
|
gtk.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
gtk = {
|
gtk = {
|
||||||
enable = true;
|
enable = true;
|
||||||
inherit cursorTheme;
|
cursorTheme = {
|
||||||
|
name = "catppuccin-mocha-pink-cursors";
|
||||||
|
package = pkgs.catppuccin-cursors.mochaPink;
|
||||||
|
size = 6;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
programs.home-manager.enable = true;
|
programs.home-manager.enable = true;
|
||||||
|
|||||||
@@ -20,12 +20,7 @@
|
|||||||
vial
|
vial
|
||||||
vlc
|
vlc
|
||||||
wl-clipboard
|
wl-clipboard
|
||||||
|
|
||||||
xdg-desktop-portal
|
xdg-desktop-portal
|
||||||
xdg-desktop-portal-wlr
|
xdg-desktop-portal-wlr
|
||||||
xdg-desktop-portal-gtk
|
|
||||||
|
|
||||||
libdrm
|
|
||||||
fcft
|
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,19 +1,22 @@
|
|||||||
{...}:
|
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./eww
|
|
||||||
./nvim
|
./nvim
|
||||||
./rofi
|
./rofi
|
||||||
./zen
|
|
||||||
|
|
||||||
./btop.nix
|
./btop.nix
|
||||||
./carapace.nix
|
./carapace.nix
|
||||||
./foot.nix
|
# ./fastfetch.nix
|
||||||
|
./fish.nix
|
||||||
./git.nix
|
./git.nix
|
||||||
|
# ./hyfetch.nix
|
||||||
./mako.nix
|
./mako.nix
|
||||||
./tcsh.nix
|
# ./ncspot.nix
|
||||||
./tmux.nix
|
# ./tmux.nix
|
||||||
./vesktop.nix
|
./vesktop.nix
|
||||||
|
./waybar.nix
|
||||||
|
# ./yazi.nix
|
||||||
./zathura.nix
|
./zathura.nix
|
||||||
|
./zen.nix
|
||||||
|
./zoxide.nix
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,18 +0,0 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
|
||||||
{
|
|
||||||
home.packages = [
|
|
||||||
pkgs.eww
|
|
||||||
pkgs.playerctl
|
|
||||||
pkgs.pamixer
|
|
||||||
pkgs.alsa-utils
|
|
||||||
];
|
|
||||||
|
|
||||||
xdg.configFile."eww/eww.yuck".source = ./eww.yuck;
|
|
||||||
xdg.configFile."eww/eww.scss".source =
|
|
||||||
let
|
|
||||||
colors = with config.lib.stylix.colors; {
|
|
||||||
inherit base00 base01 base02 base03 base04 base05 base06 base07 base08 base09 base0A base0B base0C base0D base0E base0F;
|
|
||||||
};
|
|
||||||
in
|
|
||||||
pkgs.replaceVars ./eww.scss colors;
|
|
||||||
}
|
|
||||||
@@ -1,66 +0,0 @@
|
|||||||
$base00: #@base00@;
|
|
||||||
$base01: #@base01@;
|
|
||||||
$base02: #@base02@;
|
|
||||||
$base03: #@base03@;
|
|
||||||
$base04: #@base04@;
|
|
||||||
$base05: #@base05@;
|
|
||||||
$base06: #@base06@;
|
|
||||||
$base07: #@base07@;
|
|
||||||
$base08: #@base08@;
|
|
||||||
$base09: #@base09@;
|
|
||||||
$base0A: #@base0A@;
|
|
||||||
$base0B: #@base0B@;
|
|
||||||
$base0C: #@base0C@;
|
|
||||||
$base0D: #@base0D@;
|
|
||||||
$base0E: #@base0E@;
|
|
||||||
$base0F: #@base0F@;
|
|
||||||
|
|
||||||
* {
|
|
||||||
all: unset; // Unsets everything so you can style everything from scratch
|
|
||||||
}
|
|
||||||
|
|
||||||
// Global Styles
|
|
||||||
.bar {
|
|
||||||
background-color: $base01;
|
|
||||||
color: $base05;
|
|
||||||
padding: 5px;
|
|
||||||
font-size: large;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Styles on classes (see eww.yuck for more information)
|
|
||||||
|
|
||||||
.sidestuff slider {
|
|
||||||
all: unset;
|
|
||||||
color: $base0D;
|
|
||||||
}
|
|
||||||
|
|
||||||
.metric scale trough highlight {
|
|
||||||
all: unset;
|
|
||||||
background-color: $base0D;
|
|
||||||
border-radius: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.metric scale trough {
|
|
||||||
all: unset;
|
|
||||||
background-color: $base04;
|
|
||||||
border-radius: 50px;
|
|
||||||
min-height: 3px;
|
|
||||||
min-width: 50px;
|
|
||||||
margin-left: 10px;
|
|
||||||
margin-right: 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
tooltip.background {
|
|
||||||
background-color: $base01;
|
|
||||||
font-size: large;
|
|
||||||
border: 2px solid $base0D;
|
|
||||||
}
|
|
||||||
|
|
||||||
.label-ram {
|
|
||||||
font-size: large;
|
|
||||||
}
|
|
||||||
|
|
||||||
.workspaces button:hover {
|
|
||||||
color: $base0D;
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -1,76 +0,0 @@
|
|||||||
; https://github.com/elkowar/eww/blob/master/examples/eww-bar/
|
|
||||||
|
|
||||||
(defwidget bar []
|
|
||||||
(centerbox :orientation "h"
|
|
||||||
(workspaces)
|
|
||||||
(time)
|
|
||||||
(sidestuff)))
|
|
||||||
|
|
||||||
(defwidget sidestuff []
|
|
||||||
(box :class "sidestuff" :orientation "h" :space-evenly false :halign "end"
|
|
||||||
(metric :label " "
|
|
||||||
:tooltip "${volume}% volume"
|
|
||||||
:value {volume}
|
|
||||||
:onchange "wpctl set-volume @DEFAULT_SINK@ {}%")
|
|
||||||
(metric :label ""
|
|
||||||
:tooltip "${round(EWW_RAM.used_mem_perc, 0)}% of RAM used"
|
|
||||||
:value {EWW_RAM.used_mem_perc}
|
|
||||||
:onchange "")
|
|
||||||
(metric :label ""
|
|
||||||
:tooltip "${round(EWW_CPU.avg, 0)}% average CPU usage"
|
|
||||||
:value {round((EWW_CPU.avg), 0)}
|
|
||||||
:onchange "")
|
|
||||||
(metric :label ""
|
|
||||||
:tooltip "${round((EWW_BATTERY["BAT0"].capacity + EWW_BATTERY["BAT1"].capacity) / 2, 0)}% battery life"
|
|
||||||
:value {round((EWW_BATTERY["BAT0"].capacity + EWW_BATTERY["BAT1"].capacity) / 2, 0)}
|
|
||||||
:onchange "")))
|
|
||||||
|
|
||||||
(defwidget workspaces []
|
|
||||||
(box :class "workspaces"
|
|
||||||
:orientation "h"
|
|
||||||
:space-evenly true
|
|
||||||
:halign "start"
|
|
||||||
:spacing 10
|
|
||||||
(button :onclick "riverctl set-focused-tags 1" 1)
|
|
||||||
(button :onclick "riverctl set-focused-tags 2" 2)
|
|
||||||
(button :onclick "riverctl set-focused-tags 4" 3)
|
|
||||||
(button :onclick "riverctl set-focused-tags 8" 4)
|
|
||||||
(button :onclick "riverctl set-focused-tags 16" 5)
|
|
||||||
(button :onclick "riverctl set-focused-tags 32" 6)
|
|
||||||
(button :onclick "riverctl set-focused-tags 64" 7)
|
|
||||||
(button :onclick "riverctl set-focused-tags 128" 8)
|
|
||||||
(button :onclick "riverctl set-focused-tags 256" 9)))
|
|
||||||
|
|
||||||
(defwidget metric [?tooltip label value onchange]
|
|
||||||
(box :orientation "h"
|
|
||||||
:tooltip tooltip
|
|
||||||
:class "metric"
|
|
||||||
:space-evenly false
|
|
||||||
(box :class "label" label)
|
|
||||||
(scale :min 0
|
|
||||||
:max 101
|
|
||||||
:active {onchange != ""}
|
|
||||||
:value value
|
|
||||||
:onchange onchange)))
|
|
||||||
|
|
||||||
(defpoll volume :interval "1s"
|
|
||||||
"wpctl get-volume @DEFAULT_SINK@ | awk -F' ' '{print 100 * $2}'")
|
|
||||||
|
|
||||||
(defwidget time []
|
|
||||||
(label :text time-poll))
|
|
||||||
|
|
||||||
(defpoll time-poll :interval "10s"
|
|
||||||
"date '+%H:%M %b %d, %Y'")
|
|
||||||
|
|
||||||
(defwindow bar
|
|
||||||
:monitor 0
|
|
||||||
:exclusive true
|
|
||||||
:focusable "none"
|
|
||||||
:geometry (geometry :x "0%"
|
|
||||||
:y "0%"
|
|
||||||
:width "100%"
|
|
||||||
:height "10px"
|
|
||||||
:anchor "top center")
|
|
||||||
:reserve (struts :side "top" :distance "4%")
|
|
||||||
(bar))
|
|
||||||
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
{ lib, ... }:
|
|
||||||
{
|
|
||||||
programs.foot = {
|
|
||||||
enable = true;
|
|
||||||
settings.main.font = lib.mkForce "Caskaydia Cove Mono:size=24";
|
|
||||||
settings.main.font-size-adjustment = 1;
|
|
||||||
settings.main.shell = "tcsh";
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -10,29 +10,25 @@ vim.opt.softtabstop = 4
|
|||||||
vim.opt.wildmenu = true
|
vim.opt.wildmenu = true
|
||||||
vim.opt.undofile = true
|
vim.opt.undofile = true
|
||||||
vim.opt.termguicolors = true
|
vim.opt.termguicolors = true
|
||||||
vim.opt.shell = "@shell@"
|
vim.opt.shell = "fish"
|
||||||
vim.opt.splitbelow = true
|
vim.opt.splitbelow = true
|
||||||
vim.opt.splitright = true
|
vim.opt.splitright = true
|
||||||
vim.opt.winborder = "rounded"
|
vim.opt.winborder = "rounded"
|
||||||
|
|
||||||
vim.o.list = true
|
|
||||||
vim.o.listchars = "eol:"
|
|
||||||
|
|
||||||
vim.g.mapleader = " "
|
vim.g.mapleader = " "
|
||||||
vim.keymap.set("n", "<leader>n", "<cmd>e .<cr>", {})
|
vim.keymap.set("n", "<leader>n", "<cmd>e .<cr>", {})
|
||||||
|
|
||||||
-- Per nixvim generated configuration
|
-- Per nixvim generated configuration
|
||||||
vim.diagnostic.config({
|
vim.diagnostic.config({
|
||||||
float = { border = "rounded", source = "always" },
|
float = { border = "rounded", source = "always" },
|
||||||
virtual_lines = false,
|
virtual_lines = { current_line = true },
|
||||||
virtual_text = true,
|
virtual_text = false,
|
||||||
})
|
})
|
||||||
|
|
||||||
vim.keymap.set("n", "<leader>q", function()
|
vim.keymap.set("n", "<leader>q", function()
|
||||||
vim.cmd("hori term")
|
vim.cmd("hori term")
|
||||||
vim.cmd("startinsert")
|
vim.cmd("startinsert")
|
||||||
end, {})
|
end, {})
|
||||||
|
|
||||||
vim.keymap.set("t", "<esc><esc>", "", {})
|
vim.keymap.set("t", "<esc><esc>", "", {})
|
||||||
|
|
||||||
vim.pack.add({
|
vim.pack.add({
|
||||||
@@ -49,32 +45,7 @@ vim.pack.add({
|
|||||||
"https://github.com/ej-shafran/compile-mode.nvim",
|
"https://github.com/ej-shafran/compile-mode.nvim",
|
||||||
"https://github.com/m00qek/baleia.nvim",
|
"https://github.com/m00qek/baleia.nvim",
|
||||||
"https://github.com/nvim-lualine/lualine.nvim",
|
"https://github.com/nvim-lualine/lualine.nvim",
|
||||||
"https://github.com/stevearc/oil.nvim",
|
"https://github.com/stevearc/oil.nvim"
|
||||||
"https://github.com/folke/lazydev.nvim",
|
|
||||||
"https://github.com/RRethy/base16-nvim",
|
|
||||||
})
|
|
||||||
|
|
||||||
require('base16-colorscheme').setup({
|
|
||||||
base00 = '#@base00@',
|
|
||||||
base01 = '#@base01@',
|
|
||||||
base02 = '#@base02@',
|
|
||||||
base03 = '#@base03@',
|
|
||||||
base04 = '#@base04@',
|
|
||||||
base05 = '#@base05@',
|
|
||||||
base06 = '#@base06@',
|
|
||||||
base07 = '#@base07@',
|
|
||||||
base08 = '#@base08@',
|
|
||||||
base09 = '#@base09@',
|
|
||||||
base0A = '#@base0A@',
|
|
||||||
base0B = '#@base0B@',
|
|
||||||
base0C = '#@base0C@',
|
|
||||||
base0D = '#@base0D@',
|
|
||||||
base0E = '#@base0E@',
|
|
||||||
base0F = '#@base0F@',
|
|
||||||
})
|
|
||||||
|
|
||||||
require("lazydev").setup({
|
|
||||||
ft = "lua",
|
|
||||||
})
|
})
|
||||||
|
|
||||||
require("oil").setup({
|
require("oil").setup({
|
||||||
@@ -98,7 +69,7 @@ vim.g.compile_mode = {
|
|||||||
buffer_name = "*compile*",
|
buffer_name = "*compile*",
|
||||||
baleia_setup = true,
|
baleia_setup = true,
|
||||||
}
|
}
|
||||||
vim.keymap.set("n", "<leader>c", "<cmd>Recompile<cr>", { silent = true })
|
vim.keymap.set("n", "<leader>c", "<cmd>Recompile<cr>", {silent = true})
|
||||||
|
|
||||||
local file_types = { "rust", "zig", "haskell", "c", "cpp" }
|
local file_types = { "rust", "zig", "haskell", "c", "cpp" }
|
||||||
require("nvim-treesitter").install(file_types)
|
require("nvim-treesitter").install(file_types)
|
||||||
@@ -143,9 +114,10 @@ cmp.setup({
|
|||||||
},
|
},
|
||||||
sources = {
|
sources = {
|
||||||
{ name = "nvim_lsp" },
|
{ name = "nvim_lsp" },
|
||||||
|
{ name = "emoji" },
|
||||||
{ keywordLength = 3, name = "buffer", option = { get_bufnrs = vim.api.nvim_list_bufs } },
|
{ keywordLength = 3, name = "buffer", option = { get_bufnrs = vim.api.nvim_list_bufs } },
|
||||||
{ keywordLength = 3, name = "path" },
|
{ keywordLength = 3, name = "path" },
|
||||||
{ name = "lazydev" },
|
{ keywordLength = 3, name = "luasnip" },
|
||||||
},
|
},
|
||||||
window = {
|
window = {
|
||||||
completion = cmp.config.window.bordered(),
|
completion = cmp.config.window.bordered(),
|
||||||
@@ -185,269 +157,267 @@ vim.lsp.config("nil_ls", { cmd = { "nil" }, filetypes = { "nix" } })
|
|||||||
vim.lsp.enable("nil_ls")
|
vim.lsp.enable("nil_ls")
|
||||||
vim.lsp.config("nixd", { cmd = { "nixd" }, filetypes = { "nix" } })
|
vim.lsp.config("nixd", { cmd = { "nixd" }, filetypes = { "nix" } })
|
||||||
vim.lsp.enable("nixd")
|
vim.lsp.enable("nixd")
|
||||||
vim.lsp.config("pyright", { cmd = { "pyright-langserver", "--stdio" }, filetypes = { "python" } })
|
vim.lsp.config("pyright", { cmd = { "pyright" }, filetypes = { "python" } })
|
||||||
vim.lsp.enable("pyright")
|
vim.lsp.enable("pyright")
|
||||||
vim.lsp.config("rust-analyzer", { cmd = { "rust-analyzer" }, filetypes = { "rust" } })
|
|
||||||
vim.lsp.enable("rust-analyzer")
|
|
||||||
vim.lsp.config("zls", { cmd = { "zls" }, filetypes = { "zig" } })
|
vim.lsp.config("zls", { cmd = { "zls" }, filetypes = { "zig" } })
|
||||||
vim.lsp.enable("zls")
|
vim.lsp.enable("zls")
|
||||||
|
|
||||||
-- -- https://github.com/catppuccin/nvim/blob/main/lua/catppuccin/palettes/mocha.lua
|
-- https://github.com/catppuccin/nvim/blob/main/lua/catppuccin/palettes/mocha.lua
|
||||||
-- -- https://github.com/Ronxvier/ymir.nvim/blob/main/lua/ymir/palette.lua
|
-- https://github.com/Ronxvier/ymir.nvim/blob/main/lua/ymir/palette.lua
|
||||||
-- local colors = {
|
local colors = {
|
||||||
-- red = "#f38ba8",
|
red = "#f38ba8",
|
||||||
-- orange = "#fab387",
|
orange = "#fab387",
|
||||||
-- green = "#a6e3a1",
|
green = "#a6e3a1",
|
||||||
-- yellow = "#f9e2af",
|
yellow = "#f9e2af",
|
||||||
-- pink = "#f5c2e7",
|
pink = "#f5c2e7",
|
||||||
-- magenta = "#cba6f7",
|
magenta = "#cba6f7",
|
||||||
-- cyan = "#94e2d5",
|
cyan = "#94e2d5",
|
||||||
--
|
|
||||||
-- bg = "#11111b",
|
bg = "#11111b",
|
||||||
-- fg = "#cdd6f4",
|
fg = "#cdd6f4",
|
||||||
-- cursorline = "#181825",
|
cursorline = "#181825",
|
||||||
-- selection = "#313244",
|
selection = "#313244",
|
||||||
-- linenr = "#45475a",
|
linenr = "#45475a",
|
||||||
-- comment = "#585b70",
|
comment = "#585b70",
|
||||||
--
|
|
||||||
-- -- Syntax
|
-- Syntax
|
||||||
-- keyword = "#cba6f7",
|
keyword = "#cba6f7",
|
||||||
-- Function = "#cba6f7",
|
Function = "#cba6f7",
|
||||||
-- string = "#f9e2af",
|
string = "#f9e2af",
|
||||||
-- constant = "#cba6f7",
|
constant = "#cba6f7",
|
||||||
-- type = "#94e2d5",
|
type = "#94e2d5",
|
||||||
-- number = "#fab387",
|
number = "#fab387",
|
||||||
-- boolean = "#fab387",
|
boolean = "#fab387",
|
||||||
-- operator = "#cdd6f4",
|
operator = "#cdd6f4",
|
||||||
-- variable = "#cdd6f4",
|
variable = "#cdd6f4",
|
||||||
--
|
|
||||||
-- -- TODO
|
-- TODO
|
||||||
-- -- UI
|
-- UI
|
||||||
-- cursor = "#f5a97f",
|
cursor = "#f5a97f",
|
||||||
-- visual = "#2e3c55",
|
visual = "#2e3c55",
|
||||||
-- search = "#f5c2e7",
|
search = "#f5c2e7",
|
||||||
-- statusline = "#1e293b",
|
statusline = "#1e293b",
|
||||||
-- menu_bg = "#1a2535",
|
menu_bg = "#1a2535",
|
||||||
-- menu_sel = "#3b4252",
|
menu_sel = "#3b4252",
|
||||||
-- fold = "#3e4a5a",
|
fold = "#3e4a5a",
|
||||||
-- split = "#334155",
|
split = "#334155",
|
||||||
--
|
|
||||||
-- -- TODO
|
-- TODO
|
||||||
-- -- Diagnostics
|
-- Diagnostics
|
||||||
-- diag_error = "#f38ba8",
|
diag_error = "#f38ba8",
|
||||||
-- diag_warn = "#fab387",
|
diag_warn = "#fab387",
|
||||||
-- diag_info = "#89dceb",
|
diag_info = "#89dceb",
|
||||||
-- diag_hint = "#b4befe",
|
diag_hint = "#b4befe",
|
||||||
-- }
|
}
|
||||||
--
|
|
||||||
-- -- https://github.com/Ronxvier/ymir.nvim/blob/main/lua/ymir/groups.lua
|
-- https://github.com/Ronxvier/ymir.nvim/blob/main/lua/ymir/groups.lua
|
||||||
-- local groups = {
|
local groups = {
|
||||||
-- Normal = { fg = colors.fg, bg = colors.bg },
|
Normal = { fg = colors.fg, bg = colors.bg },
|
||||||
-- NormalFloat = { fg = colors.fg, bg = colors.bg },
|
NormalFloat = { fg = colors.fg, bg = colors.bg },
|
||||||
-- Comment = { fg = colors.comment, italic = true },
|
Comment = { fg = colors.comment, italic = true },
|
||||||
-- Constant = { fg = colors.constant },
|
Constant = { fg = colors.constant },
|
||||||
-- String = { fg = colors.string },
|
String = { fg = colors.string },
|
||||||
-- Character = { fg = colors.string },
|
Character = { fg = colors.string },
|
||||||
-- Number = { fg = colors.number },
|
Number = { fg = colors.number },
|
||||||
-- Boolean = { fg = colors.boolean },
|
Boolean = { fg = colors.boolean },
|
||||||
-- Float = { fg = colors.number },
|
Float = { fg = colors.number },
|
||||||
-- FloatBorder = { fg = colors.number },
|
FloatBorder = { fg = colors.number },
|
||||||
-- Operator = { fg = colors.operator },
|
Operator = { fg = colors.operator },
|
||||||
-- Keyword = { fg = colors.keyword },
|
Keyword = { fg = colors.keyword },
|
||||||
-- Keywords = { fg = colors.keyword },
|
Keywords = { fg = colors.keyword },
|
||||||
-- Identifier = { fg = colors.variable },
|
Identifier = { fg = colors.variable },
|
||||||
-- Function = { fg = colors.Function },
|
Function = { fg = colors.Function },
|
||||||
-- Statement = { fg = colors.keyword },
|
Statement = { fg = colors.keyword },
|
||||||
-- Conditional = { fg = colors.keyword },
|
Conditional = { fg = colors.keyword },
|
||||||
-- Repeat = { fg = colors.keyword },
|
Repeat = { fg = colors.keyword },
|
||||||
-- Label = { fg = colors.keyword },
|
Label = { fg = colors.keyword },
|
||||||
-- Exception = { fg = colors.keyword },
|
Exception = { fg = colors.keyword },
|
||||||
-- PreProc = { fg = colors.keyword },
|
PreProc = { fg = colors.keyword },
|
||||||
-- Include = { fg = colors.keyword },
|
Include = { fg = colors.keyword },
|
||||||
-- Define = { fg = colors.keyword },
|
Define = { fg = colors.keyword },
|
||||||
-- Title = { fg = colors.magenta },
|
Title = { fg = colors.magenta },
|
||||||
-- Macro = { fg = colors.keyword },
|
Macro = { fg = colors.keyword },
|
||||||
-- PreCondit = { fg = colors.yellow },
|
PreCondit = { fg = colors.yellow },
|
||||||
-- Type = { fg = colors.type, italic = true },
|
Type = { fg = colors.type, italic = true },
|
||||||
-- StorageClass = { fg = colors.type, italic = true },
|
StorageClass = { fg = colors.type, italic = true },
|
||||||
-- Structure = { fg = colors.type, italic = true },
|
Structure = { fg = colors.type, italic = true },
|
||||||
-- TypeDef = { fg = colors.type, italic = true },
|
TypeDef = { fg = colors.type, italic = true },
|
||||||
-- Special = { fg = colors.keyword, italic = true },
|
Special = { fg = colors.keyword, italic = true },
|
||||||
-- SpecialComment = { fg = colors.comment, italic = true },
|
SpecialComment = { fg = colors.comment, italic = true },
|
||||||
-- Error = { fg = colors.red },
|
Error = { fg = colors.red },
|
||||||
-- Todo = { fg = colors.yellow, bold = true, italic = true },
|
Todo = { fg = colors.yellow, bold = true, italic = true },
|
||||||
-- Underlined = { fg = colors.cyan, underline = true },
|
Underlined = { fg = colors.cyan, underline = true },
|
||||||
--
|
|
||||||
-- Cursor = { fg = colors.cursor },
|
Cursor = { fg = colors.cursor },
|
||||||
-- CursorLineNr = { fg = colors.fg, bold = true },
|
CursorLineNr = { fg = colors.fg, bold = true },
|
||||||
--
|
|
||||||
-- SignColumn = { bg = colors.bg },
|
SignColumn = { bg = colors.bg },
|
||||||
--
|
|
||||||
-- Conceal = { fg = colors.comment },
|
Conceal = { fg = colors.comment },
|
||||||
-- -- CursorColumn = { bg = colors.selection},
|
-- CursorColumn = { bg = colors.selection},
|
||||||
-- CursorLine = { bg = colors.selection },
|
CursorLine = { bg = colors.selection },
|
||||||
-- ColorColumn = { bg = colors.selection },
|
ColorColumn = { bg = colors.selection },
|
||||||
--
|
|
||||||
-- StatusLine = { fg = colors.statusline, bg = colors.black },
|
StatusLine = { fg = colors.statusline, bg = colors.black },
|
||||||
-- StatusLineNC = { fg = colors.comment },
|
StatusLineNC = { fg = colors.comment },
|
||||||
-- StatusLineTerm = { fg = colors.fg, bg = colors.black },
|
StatusLineTerm = { fg = colors.fg, bg = colors.black },
|
||||||
-- StatusLineTermNC = { fg = colors.comment },
|
StatusLineTermNC = { fg = colors.comment },
|
||||||
--
|
|
||||||
-- Directory = { fg = colors.cyan },
|
Directory = { fg = colors.cyan },
|
||||||
-- DiffAdd = { fg = colors.bg, bg = colors.green },
|
DiffAdd = { fg = colors.bg, bg = colors.green },
|
||||||
-- DiffChange = { fg = colors.orange },
|
DiffChange = { fg = colors.orange },
|
||||||
-- DiffDelete = { fg = colors.red },
|
DiffDelete = { fg = colors.red },
|
||||||
-- DiffText = { fg = colors.comment },
|
DiffText = { fg = colors.comment },
|
||||||
--
|
|
||||||
-- ErrorMsg = { fg = colors.red },
|
ErrorMsg = { fg = colors.red },
|
||||||
-- VertSplit = { fg = colors.fg },
|
VertSplit = { fg = colors.fg },
|
||||||
-- WinSeparator = { fg = colors.fg },
|
WinSeparator = { fg = colors.fg },
|
||||||
-- Folded = { fg = colors.comment },
|
Folded = { fg = colors.comment },
|
||||||
-- FoldColumn = {},
|
FoldColumn = {},
|
||||||
-- Search = { fg = colors.fg, bg = colors.selection },
|
Search = { fg = colors.fg, bg = colors.selection },
|
||||||
-- IncSearch = { fg = colors.fg, bg = colors.selection },
|
IncSearch = { fg = colors.fg, bg = colors.selection },
|
||||||
-- LineNr = { fg = colors.comment },
|
LineNr = { fg = colors.comment },
|
||||||
-- MatchParen = { fg = colors.cyan, underline = true },
|
MatchParen = { fg = colors.cyan, underline = true },
|
||||||
-- NonText = { fg = colors.comment },
|
NonText = { fg = colors.comment },
|
||||||
-- Pmenu = { fg = colors.fg, bg = colors.bg },
|
Pmenu = { fg = colors.fg, bg = colors.bg },
|
||||||
-- PmenuSel = { fg = colors.bg, bg = colors.fg },
|
PmenuSel = { fg = colors.bg, bg = colors.fg },
|
||||||
-- PmenuSbar = { bg = colors.bg },
|
PmenuSbar = { bg = colors.bg },
|
||||||
-- PmenuThumb = { bg = colors.bg },
|
PmenuThumb = { bg = colors.bg },
|
||||||
--
|
|
||||||
-- Question = { fg = colors.magenta },
|
Question = { fg = colors.magenta },
|
||||||
-- QuickFixLine = { fg = colors.bg, bg = colors.yellow },
|
QuickFixLine = { fg = colors.bg, bg = colors.yellow },
|
||||||
-- SpecialKey = { fg = colors.comment },
|
SpecialKey = { fg = colors.comment },
|
||||||
--
|
|
||||||
-- SpellBad = { fg = colors.red, underline = true },
|
SpellBad = { fg = colors.red, underline = true },
|
||||||
-- SpellCap = { fg = colors.yellow },
|
SpellCap = { fg = colors.yellow },
|
||||||
-- SpellLocal = { fg = colors.yellow },
|
SpellLocal = { fg = colors.yellow },
|
||||||
-- SpellRare = { fg = colors.yellow },
|
SpellRare = { fg = colors.yellow },
|
||||||
--
|
|
||||||
-- TabLine = { fg = colors.comment },
|
TabLine = { fg = colors.comment },
|
||||||
-- TabLineSel = { fg = colors.fg },
|
TabLineSel = { fg = colors.fg },
|
||||||
-- TabLineFill = { bg = colors.bg },
|
TabLineFill = { bg = colors.bg },
|
||||||
-- Terminal = { fg = colors.fg, bg = colors.black },
|
Terminal = { fg = colors.fg, bg = colors.black },
|
||||||
-- Visual = { bg = colors.visual },
|
Visual = { bg = colors.visual },
|
||||||
-- VisualNOS = { fg = colors.visual },
|
VisualNOS = { fg = colors.visual },
|
||||||
-- WarningMsg = { fg = colors.yellow },
|
WarningMsg = { fg = colors.yellow },
|
||||||
-- WildMenu = { fg = colors.black, bg = colors.white },
|
WildMenu = { fg = colors.black, bg = colors.white },
|
||||||
--
|
|
||||||
-- -- TreeSitter
|
-- TreeSitter
|
||||||
-- ["@comment"] = { fg = colors.comment, italic = true },
|
["@comment"] = { fg = colors.comment, italic = true },
|
||||||
-- ["@error"] = { fg = colors.red },
|
["@error"] = { fg = colors.red },
|
||||||
-- ["@punctuation.delimiter"] = { fg = colors.fg },
|
["@punctuation.delimiter"] = { fg = colors.fg },
|
||||||
-- ["@punctuation.bracket"] = { fg = colors.fg },
|
["@punctuation.bracket"] = { fg = colors.fg },
|
||||||
-- ["@punctuation.special"] = { fg = colors.cyan },
|
["@punctuation.special"] = { fg = colors.cyan },
|
||||||
--
|
|
||||||
-- ["@constant"] = { fg = colors.constant },
|
["@constant"] = { fg = colors.constant },
|
||||||
-- ["@constant.builtin"] = { fg = colors.constant },
|
["@constant.builtin"] = { fg = colors.constant },
|
||||||
-- ["@symbol"] = { fg = colors.operator },
|
["@symbol"] = { fg = colors.operator },
|
||||||
--
|
|
||||||
-- ["@constant.macro"] = { fg = colors.keyword },
|
["@constant.macro"] = { fg = colors.keyword },
|
||||||
-- ["@string.regex"] = { fg = colors.string },
|
["@string.regex"] = { fg = colors.string },
|
||||||
-- ["@string"] = { fg = colors.string },
|
["@string"] = { fg = colors.string },
|
||||||
-- ["@string.escape"] = { fg = colors.green },
|
["@string.escape"] = { fg = colors.green },
|
||||||
-- ["@character"] = { fg = colors.string },
|
["@character"] = { fg = colors.string },
|
||||||
-- ["@number"] = { fg = colors.number },
|
["@number"] = { fg = colors.number },
|
||||||
-- ["@boolean"] = { fg = colors.boolean },
|
["@boolean"] = { fg = colors.boolean },
|
||||||
-- ["@float"] = { fg = colors.number },
|
["@float"] = { fg = colors.number },
|
||||||
-- ["@annotation"] = { fg = colors.yellow },
|
["@annotation"] = { fg = colors.yellow },
|
||||||
-- ["@attribute"] = { fg = colors.cyan },
|
["@attribute"] = { fg = colors.cyan },
|
||||||
-- ["@namespace"] = { fg = colors.cyan },
|
["@namespace"] = { fg = colors.cyan },
|
||||||
--
|
|
||||||
-- ["@function.builtin"] = { fg = colors.Function },
|
["@function.builtin"] = { fg = colors.Function },
|
||||||
-- ["@function"] = { fg = colors.Function },
|
["@function"] = { fg = colors.Function },
|
||||||
-- ["@function.macro"] = { fg = colors.Function },
|
["@function.macro"] = { fg = colors.Function },
|
||||||
-- ["@parameter"] = { fg = colors.number },
|
["@parameter"] = { fg = colors.number },
|
||||||
-- ["@parameter.reference"] = { fg = colors.number },
|
["@parameter.reference"] = { fg = colors.number },
|
||||||
-- ["@method"] = { fg = colors.number },
|
["@method"] = { fg = colors.number },
|
||||||
-- ["@field"] = { fg = colors.number },
|
["@field"] = { fg = colors.number },
|
||||||
-- ["@property"] = { fg = colors.type },
|
["@property"] = { fg = colors.type },
|
||||||
-- ["@constructor"] = { fg = colors.cyan },
|
["@constructor"] = { fg = colors.cyan },
|
||||||
--
|
|
||||||
-- ["@conditional"] = { fg = colors.pink },
|
["@conditional"] = { fg = colors.pink },
|
||||||
-- ["@repeat"] = { fg = colors.pink },
|
["@repeat"] = { fg = colors.pink },
|
||||||
-- ["@label"] = { fg = colors.cyan },
|
["@label"] = { fg = colors.cyan },
|
||||||
--
|
|
||||||
-- ["@keyword"] = { fg = colors.keyword },
|
["@keyword"] = { fg = colors.keyword },
|
||||||
-- ["@keyword.function"] = { fg = colors.Function },
|
["@keyword.function"] = { fg = colors.Function },
|
||||||
-- ["@keyword.function.ruby"] = { fg = colors.Function },
|
["@keyword.function.ruby"] = { fg = colors.Function },
|
||||||
-- --["@keyword.operator"] = { fg = colors.pink },
|
--["@keyword.operator"] = { fg = colors.pink },
|
||||||
-- --["@operator"] = { fg = colors.pink },
|
--["@operator"] = { fg = colors.pink },
|
||||||
-- ["@exception"] = { fg = colors.magenta },
|
["@exception"] = { fg = colors.magenta },
|
||||||
-- ["@type"] = { fg = colors.bright_cyan },
|
["@type"] = { fg = colors.bright_cyan },
|
||||||
-- ["@type.builtin"] = { fg = colors.cyan, italic = true },
|
["@type.builtin"] = { fg = colors.cyan, italic = true },
|
||||||
-- ["@type.qualifier"] = { fg = colors.pink },
|
["@type.qualifier"] = { fg = colors.pink },
|
||||||
-- ["@structure"] = { fg = colors.magenta },
|
["@structure"] = { fg = colors.magenta },
|
||||||
-- ["@include"] = { fg = colors.pink },
|
["@include"] = { fg = colors.pink },
|
||||||
--
|
|
||||||
-- ["@variable"] = { fg = colors.variable },
|
["@variable"] = { fg = colors.variable },
|
||||||
-- ["@variable.builtin"] = { fg = colors.variable },
|
["@variable.builtin"] = { fg = colors.variable },
|
||||||
--
|
|
||||||
-- ["@text"] = { fg = colors.number },
|
["@text"] = { fg = colors.number },
|
||||||
-- ["@text.strong"] = { fg = colors.number, bold = true }, -- bold
|
["@text.strong"] = { fg = colors.number, bold = true }, -- bold
|
||||||
-- ["@text.emphasis"] = { fg = colors.yellow, italic = true }, -- italic
|
["@text.emphasis"] = { fg = colors.yellow, italic = true }, -- italic
|
||||||
-- ["@text.underline"] = { fg = colors.number },
|
["@text.underline"] = { fg = colors.number },
|
||||||
-- ["@text.title"] = { fg = colors.pink, bold = true }, -- title
|
["@text.title"] = { fg = colors.pink, bold = true }, -- title
|
||||||
-- ["@text.literal"] = { fg = colors.number }, -- inline code
|
["@text.literal"] = { fg = colors.number }, -- inline code
|
||||||
-- ["@text.uri"] = { fg = colors.yellow, italic = true, underline = true }, -- urls
|
["@text.uri"] = { fg = colors.yellow, italic = true, underline = true }, -- urls
|
||||||
-- ["@text.reference"] = { fg = colors.number, bold = true },
|
["@text.reference"] = { fg = colors.number, bold = true },
|
||||||
--
|
|
||||||
-- ["@tag"] = { fg = colors.cyan },
|
["@tag"] = { fg = colors.cyan },
|
||||||
-- ["@tag.attribute"] = { fg = colors.number },
|
["@tag.attribute"] = { fg = colors.number },
|
||||||
-- ["@tag.delimiter"] = { fg = colors.pink },
|
["@tag.delimiter"] = { fg = colors.pink },
|
||||||
--
|
|
||||||
-- -- Semantic
|
-- Semantic
|
||||||
-- ["@class"] = { fg = colors.cyan },
|
["@class"] = { fg = colors.cyan },
|
||||||
-- ["@struct"] = { fg = colors.cyan },
|
["@struct"] = { fg = colors.cyan },
|
||||||
-- ["@enum"] = { fg = colors.cyan },
|
["@enum"] = { fg = colors.cyan },
|
||||||
-- ["@enumMember"] = { fg = colors.magenta },
|
["@enumMember"] = { fg = colors.magenta },
|
||||||
-- ["@event"] = { fg = colors.cyan },
|
["@event"] = { fg = colors.cyan },
|
||||||
-- ["@interface"] = { fg = colors.cyan },
|
["@interface"] = { fg = colors.cyan },
|
||||||
-- ["@modifier"] = { fg = colors.cyan },
|
["@modifier"] = { fg = colors.cyan },
|
||||||
-- ["@regexp"] = { fg = colors.yellow },
|
["@regexp"] = { fg = colors.yellow },
|
||||||
-- ["@typeParameter"] = { fg = colors.cyan },
|
["@typeParameter"] = { fg = colors.cyan },
|
||||||
-- ["@decorator"] = { fg = colors.cyan },
|
["@decorator"] = { fg = colors.cyan },
|
||||||
--
|
|
||||||
-- -- LSP Semantic (0.9+)
|
-- LSP Semantic (0.9+)
|
||||||
-- ["@lsp.type.class"] = { fg = colors.type },
|
["@lsp.type.class"] = { fg = colors.type },
|
||||||
-- ["@lsp.type.enum"] = { fg = colors.type },
|
["@lsp.type.enum"] = { fg = colors.type },
|
||||||
-- ["@lsp.type.decorator"] = { fg = colors.number },
|
["@lsp.type.decorator"] = { fg = colors.number },
|
||||||
-- ["@lsp.type.enumMember"] = { fg = colors.type },
|
["@lsp.type.enumMember"] = { fg = colors.type },
|
||||||
-- ["@lsp.type.function"] = { fg = colors.Function },
|
["@lsp.type.function"] = { fg = colors.Function },
|
||||||
-- ["@lsp.type.interface"] = { fg = colors.keyword },
|
["@lsp.type.interface"] = { fg = colors.keyword },
|
||||||
-- ["@lsp.type.macro"] = { fg = colors.keyword },
|
["@lsp.type.macro"] = { fg = colors.keyword },
|
||||||
-- ["@lsp.type.method"] = { fg = colors.keyword },
|
["@lsp.type.method"] = { fg = colors.keyword },
|
||||||
-- ["@lsp.type.namespace"] = { fg = colors.keyword },
|
["@lsp.type.namespace"] = { fg = colors.keyword },
|
||||||
-- ["@lsp.type.parameter"] = { fg = colors.keyword },
|
["@lsp.type.parameter"] = { fg = colors.keyword },
|
||||||
-- ["@lsp.type.property"] = { fg = colors.keyword },
|
["@lsp.type.property"] = { fg = colors.keyword },
|
||||||
-- ["@lsp.type.struct"] = { fg = colors.type },
|
["@lsp.type.struct"] = { fg = colors.type },
|
||||||
-- ["@lsp.type.type"] = { fg = colors.type },
|
["@lsp.type.type"] = { fg = colors.type },
|
||||||
-- ["@lsp.type.variable"] = { fg = colors.variable },
|
["@lsp.type.variable"] = { fg = colors.variable },
|
||||||
--
|
|
||||||
-- -- HTML
|
-- HTML
|
||||||
-- htmlArg = { fg = colors.orange },
|
htmlArg = { fg = colors.orange },
|
||||||
-- htmlBold = { fg = colors.yellow, bold = true },
|
htmlBold = { fg = colors.yellow, bold = true },
|
||||||
-- htmlEndTag = { fg = colors.cyan },
|
htmlEndTag = { fg = colors.cyan },
|
||||||
-- htmlH1 = { fg = colors.pink },
|
htmlH1 = { fg = colors.pink },
|
||||||
-- htmlH2 = { fg = colors.pink },
|
htmlH2 = { fg = colors.pink },
|
||||||
-- htmlH3 = { fg = colors.pink },
|
htmlH3 = { fg = colors.pink },
|
||||||
-- htmlH4 = { fg = colors.pink },
|
htmlH4 = { fg = colors.pink },
|
||||||
-- htmlH5 = { fg = colors.pink },
|
htmlH5 = { fg = colors.pink },
|
||||||
-- htmlH6 = { fg = colors.pink },
|
htmlH6 = { fg = colors.pink },
|
||||||
-- htmlItalic = { fg = colors.magenta, italic = true },
|
htmlItalic = { fg = colors.magenta, italic = true },
|
||||||
-- htmlLink = { fg = colors.magenta, underline = true },
|
htmlLink = { fg = colors.magenta, underline = true },
|
||||||
-- htmlSpecialChar = { fg = colors.yellow },
|
htmlSpecialChar = { fg = colors.yellow },
|
||||||
-- htmlSpecialTagName = { fg = colors.cyan },
|
htmlSpecialTagName = { fg = colors.cyan },
|
||||||
-- htmlTag = { fg = colors.cyan },
|
htmlTag = { fg = colors.cyan },
|
||||||
-- htmlTagN = { fg = colors.cyan },
|
htmlTagN = { fg = colors.cyan },
|
||||||
-- htmlTagName = { fg = colors.cyan },
|
htmlTagName = { fg = colors.cyan },
|
||||||
-- htmlTitle = { fg = colors.white },
|
htmlTitle = { fg = colors.white },
|
||||||
-- }
|
}
|
||||||
--
|
|
||||||
-- for group, setting in pairs(groups) do
|
for group, setting in pairs(groups) do
|
||||||
-- vim.api.nvim_set_hl(0, group, setting)
|
vim.api.nvim_set_hl(0, group, setting)
|
||||||
-- end
|
end
|
||||||
|
|
||||||
-- nixvim stuff
|
-- nixvim stuff
|
||||||
do
|
do
|
||||||
@@ -507,27 +477,27 @@ end
|
|||||||
-- }}
|
-- }}
|
||||||
|
|
||||||
-- https://github.com/nvim-lualine/lualine.nvim/blob/master/examples/bubbles.lua
|
-- https://github.com/nvim-lualine/lualine.nvim/blob/master/examples/bubbles.lua
|
||||||
-- local bubbles_theme = {
|
local bubbles_theme = {
|
||||||
-- normal = {
|
normal = {
|
||||||
-- a = { fg = colors.bg, bg = colors.magenta },
|
a = { fg = colors.bg, bg = colors.magenta },
|
||||||
-- b = { fg = colors.bg, bg = colors.magenta },
|
b = { fg = colors.bg, bg = colors.magenta },
|
||||||
-- c = { fg = colors.bg, bg = colors.bg },
|
c = { fg = colors.bg, bg = colors.bg },
|
||||||
-- },
|
},
|
||||||
--
|
|
||||||
-- insert = { a = { fg = colors.bg, bg = colors.green } },
|
insert = { a = { fg = colors.bg, bg = colors.green } },
|
||||||
-- visual = { a = { fg = colors.bg, bg = colors.cyan } },
|
visual = { a = { fg = colors.bg, bg = colors.cyan } },
|
||||||
-- replace = { a = { fg = colors.bg, bg = colors.red } },
|
replace = { a = { fg = colors.bg, bg = colors.red } },
|
||||||
--
|
|
||||||
-- inactive = {
|
inactive = {
|
||||||
-- a = { fg = colors.fg, bg = colors.bg },
|
a = { fg = colors.fg, bg = colors.bg },
|
||||||
-- b = { fg = colors.fg, bg = colors.bg },
|
b = { fg = colors.fg, bg = colors.bg },
|
||||||
-- c = { fg = colors.fg },
|
c = { fg = colors.fg },
|
||||||
-- },
|
},
|
||||||
-- }
|
}
|
||||||
|
|
||||||
require('lualine').setup {
|
require('lualine').setup {
|
||||||
options = {
|
options = {
|
||||||
-- theme = bubbles_theme,
|
theme = bubbles_theme,
|
||||||
component_separators = '',
|
component_separators = '',
|
||||||
section_separators = { left = '', right = '' },
|
section_separators = { left = '', right = '' },
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1,19 +1,9 @@
|
|||||||
{ config, pkgs, inputs, ... }:
|
{ pkgs, inputs, ... }:
|
||||||
{
|
{
|
||||||
programs.neovim =
|
programs.neovim = {
|
||||||
let
|
|
||||||
# colors = config.stylix.base16Scheme.palette;
|
|
||||||
colors = with config.lib.stylix.colors; {
|
|
||||||
inherit base00 base01 base02 base03 base04 base05 base06 base07 base08 base09 base0A base0B base0C base0D base0E base0F;
|
|
||||||
};
|
|
||||||
in {
|
|
||||||
enable = true;
|
enable = true;
|
||||||
package = inputs.neovim-nightly-overlay.packages.${pkgs.stdenv.hostPlatform.system}.default;
|
package = inputs.neovim-nightly-overlay.packages.${pkgs.stdenv.hostPlatform.system}.default;
|
||||||
initLua = builtins.readFile (
|
extraLuaConfig = builtins.readFile ./config.lua;
|
||||||
pkgs.replaceVars ./config.lua ({
|
|
||||||
shell = "tcsh";
|
|
||||||
} // colors)
|
|
||||||
);
|
|
||||||
defaultEditor = true;
|
defaultEditor = true;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,47 +1,27 @@
|
|||||||
{ config, pkgs, lib, ... }:
|
{ config, pkgs, ... }:
|
||||||
{
|
{
|
||||||
home.packages = [ pkgs.libnotify ];
|
home.packages = [ pkgs.libnotify ];
|
||||||
|
|
||||||
xdg.configFile."rofi/config.rasi".text = ''
|
xdg.configFile."rofi/config.rasi".text = ''
|
||||||
configuration{
|
configuration{
|
||||||
modi: "run";
|
modi: "run,drun,window";
|
||||||
lines: 5;
|
lines: 5;
|
||||||
cycle: false;
|
cycle: false;
|
||||||
font: "CaskaydiaCove Nerd Font 14";
|
font: "${config.stylix.fonts.serif.name} 14";
|
||||||
show-icons: false;
|
show-icons: true;
|
||||||
|
icon-theme: "Papirus-dark";
|
||||||
terminal: "foot";
|
terminal: "foot";
|
||||||
run-display-format: "{name}";
|
drun-display-format: "{icon} {name}";
|
||||||
location: 0;
|
location: 0;
|
||||||
disable-history: true;
|
disable-history: true;
|
||||||
hide-scrollbar: true;
|
hide-scrollbar: true;
|
||||||
|
display-drun: " Apps ";
|
||||||
display-run: " Run ";
|
display-run: " Run ";
|
||||||
|
display-window: " Window ";
|
||||||
|
/* display-Network: " Network"; */
|
||||||
sidebar-mode: true;
|
sidebar-mode: true;
|
||||||
sorting-method: "fzf";
|
sorting-method: "fzf";
|
||||||
}
|
}
|
||||||
|
|
||||||
@theme "theme"
|
@theme "theme"'';
|
||||||
'';
|
|
||||||
|
|
||||||
# xdg.configFile."rofi/config.rasi".text = ''
|
|
||||||
# configuration{
|
|
||||||
# modi: "run,drun,window";
|
|
||||||
# lines: 5;
|
|
||||||
# cycle: false;
|
|
||||||
# font: "${config.stylix.fonts.serif.name} 14";
|
|
||||||
# show-icons: true;
|
|
||||||
# icon-theme: "Papirus-dark";
|
|
||||||
# terminal: "foot";
|
|
||||||
# drun-display-format: "{icon} {name}";
|
|
||||||
# location: 0;
|
|
||||||
# disable-history: true;
|
|
||||||
# hide-scrollbar: true;
|
|
||||||
# display-drun: " Apps ";
|
|
||||||
# display-run: " Run ";
|
|
||||||
# display-window: " Window ";
|
|
||||||
# /* display-Network: " Network"; */
|
|
||||||
# sidebar-mode: true;
|
|
||||||
# sorting-method: "fzf";
|
|
||||||
# }
|
|
||||||
#
|
|
||||||
# @theme "theme"'';
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{ config, ... }:
|
{ config, ... }:
|
||||||
{
|
{
|
||||||
xdg.configFile."rofi/theme.rasi".text = with config.lib.stylix.colors; ''
|
xdg.configFile."rofi/theme.rasi".text = with config.stylix.base16Scheme.palette; ''
|
||||||
* {
|
* {
|
||||||
bg-col: #${base00};
|
bg-col: #${base00};
|
||||||
bg-col-light: #${base01};
|
bg-col-light: #${base01};
|
||||||
|
|||||||
@@ -1,18 +0,0 @@
|
|||||||
{ pkgs, ... }:
|
|
||||||
{
|
|
||||||
home.packages = [ pkgs.tcsh ];
|
|
||||||
home.file.".cshrc".text = ''
|
|
||||||
set noclobber
|
|
||||||
set color
|
|
||||||
set autolist
|
|
||||||
set history = 10000
|
|
||||||
set savehist = (10000 merge)
|
|
||||||
set e="`echo x | tr x '\033'`"
|
|
||||||
set prompt = "%{\e[35m%}[%h] %~ :3%{\e[0m%} "
|
|
||||||
|
|
||||||
alias ls 'ls --color=auto'
|
|
||||||
alias l 'ls -alh --color=auto'
|
|
||||||
|
|
||||||
|
|
||||||
'';
|
|
||||||
}
|
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
{ config, ... }:
|
{ config, ... }:
|
||||||
{
|
{
|
||||||
home.file.".config/vesktop/themes/base16.css".text =
|
home.file.".config/vesktop/themes/base16.css".text =
|
||||||
with config.lib.stylix.colors;
|
with config.stylix.base16Scheme.palette;
|
||||||
with config.stylix.fonts;
|
with config.stylix.fonts;
|
||||||
''
|
''
|
||||||
@import url('https://refact0r.github.io/midnight-discord/build/midnight.css');
|
@import url('https://refact0r.github.io/midnight-discord/build/midnight.css');
|
||||||
|
|||||||
@@ -0,0 +1,137 @@
|
|||||||
|
{ config, ... }:
|
||||||
|
{
|
||||||
|
home.file.".config/waybar/config".text = ''
|
||||||
|
{
|
||||||
|
"position": "top",
|
||||||
|
"spacing": 4,
|
||||||
|
"modules-left": ["custom/icon", "dwl/tags", "tray"],
|
||||||
|
"modules-center": ["clock"],
|
||||||
|
"modules-right": ["pulseaudio", "cpu", "memory", "temperature", "battery"],
|
||||||
|
"custom/icon": {
|
||||||
|
"format": " ",
|
||||||
|
"tooltip": false
|
||||||
|
},
|
||||||
|
"tray": {
|
||||||
|
"spacing": 10
|
||||||
|
},
|
||||||
|
"clock": {
|
||||||
|
"format": "{:%Y/%m/%d - %A - %R}",
|
||||||
|
"tooltip": false
|
||||||
|
},
|
||||||
|
"cpu": {
|
||||||
|
"format": " {usage}%",
|
||||||
|
"tooltip": false
|
||||||
|
},
|
||||||
|
"memory": {
|
||||||
|
"format": " {}%"
|
||||||
|
},
|
||||||
|
"temperature": {
|
||||||
|
"thermal-zone": 2,
|
||||||
|
"critical-threshold": 80,
|
||||||
|
"format-critical": "{icon} {temperatureC}°C",
|
||||||
|
"format": "{icon} {temperatureC}°C",
|
||||||
|
"format-icons": ["", "", ""]
|
||||||
|
},
|
||||||
|
"battery": {
|
||||||
|
"states": {
|
||||||
|
"good": 95,
|
||||||
|
"warning": 30,
|
||||||
|
"critical": 15
|
||||||
|
},
|
||||||
|
"format": "{icon} {capacity}%",
|
||||||
|
"format-charging": " {capacity}%",
|
||||||
|
"format-plugged": " {capacity}%",
|
||||||
|
"format-alt": "{icon} {time}",
|
||||||
|
"format-icons": ["", "", "", "", ""]
|
||||||
|
},
|
||||||
|
"pulseaudio": {
|
||||||
|
"scroll-step": 5, // %, can be a float
|
||||||
|
"format": "{icon} {volume}% {format_source}",
|
||||||
|
"format-bluetooth": " {icon} {volume}% {format_source}",
|
||||||
|
"format-bluetooth-muted": " {icon} {format_source}",
|
||||||
|
"format-muted": " {format_source}",
|
||||||
|
"format-source": " {volume}%",
|
||||||
|
"format-source-muted": "",
|
||||||
|
"format-icons": {
|
||||||
|
"default": ["", "", ""]
|
||||||
|
},
|
||||||
|
"on-click-right": "pavucontrol",
|
||||||
|
},
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
programs.waybar = {
|
||||||
|
enable = true;
|
||||||
|
style = ''
|
||||||
|
* {
|
||||||
|
font-family: "${config.stylix.fonts.serif.name}";
|
||||||
|
font-size: 16px;
|
||||||
|
min-height: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
window#waybar {
|
||||||
|
margin-top: 6px;
|
||||||
|
padding-left: 10px;
|
||||||
|
padding-right: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#custom-icon,
|
||||||
|
#tray,
|
||||||
|
#clock,
|
||||||
|
#pulseaudio,
|
||||||
|
#cpu,
|
||||||
|
#memory,
|
||||||
|
#temperature,
|
||||||
|
#battery {
|
||||||
|
margin-top: 6px;
|
||||||
|
margin-left: 8px;
|
||||||
|
padding-left: 10px;
|
||||||
|
margin-bottom: 0px;
|
||||||
|
padding-right: 10px;
|
||||||
|
color: #${config.stylix.base16Scheme.palette.base05};
|
||||||
|
background: #${config.stylix.base16Scheme.palette.base00};
|
||||||
|
border: 2px solid #${config.stylix.base16Scheme.palette.base0D};
|
||||||
|
}
|
||||||
|
|
||||||
|
#custom-icon {
|
||||||
|
margin-left: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#memory {
|
||||||
|
margin-right: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#battery.critical:not(.charging) {
|
||||||
|
animation-name: blink;
|
||||||
|
animation-duration: 0.5s;
|
||||||
|
animation-timing-function: linear;
|
||||||
|
animation-iteration-count: infinite;
|
||||||
|
animation-direction: alternate;
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes blink {
|
||||||
|
to {
|
||||||
|
background-color: #${config.stylix.base16Scheme.palette.base08};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#tags {
|
||||||
|
margin-top: 6px;
|
||||||
|
margin-left: 8px;
|
||||||
|
padding-left: 10px;
|
||||||
|
margin-bottom: 0px;
|
||||||
|
padding-right: 10px;
|
||||||
|
border: 2px solid #${config.stylix.base16Scheme.palette.base0D};
|
||||||
|
}
|
||||||
|
|
||||||
|
#tags button.occupied {
|
||||||
|
color: #${config.stylix.base16Scheme.palette.base0B};
|
||||||
|
background: #${config.stylix.base16Scheme.palette.base00};
|
||||||
|
}
|
||||||
|
|
||||||
|
#tags button.focused {
|
||||||
|
color: #${config.stylix.base16Scheme.palette.base0D};
|
||||||
|
background: #${config.stylix.base16Scheme.palette.base00};
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
{ pkgs, ... }:
|
|
||||||
{
|
|
||||||
home.packages = [ pkgs.yash ];
|
|
||||||
xdg.configFile."yash/rc".text =
|
|
||||||
"
|
|
||||||
. --autoload --no-alias initialization/common
|
|
||||||
YASH_PS1='\\fm\${PWD} λ \\fD'
|
|
||||||
YASH_PS1R=''
|
|
||||||
bindkey --emacs '\\^L' clear-and-redraw-all
|
|
||||||
bindkey --vi-insert '\\^L' clear-and-redraw-all
|
|
||||||
bindkey --vi-command '\\^L' clear-and-redraw-all
|
|
||||||
";
|
|
||||||
}
|
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
{
|
{
|
||||||
programs.zathura = {
|
programs.zathura = {
|
||||||
enable = true;
|
enable = true;
|
||||||
options = with config.lib.stylix.colors; {
|
options = with config.stylix.base16Scheme.palette; {
|
||||||
font = "${config.stylix.fonts.serif.name} 14";
|
font = "${config.stylix.fonts.serif.name} 14";
|
||||||
|
|
||||||
default-fg = "#${base05}";
|
default-fg = "#${base05}";
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ let
|
|||||||
};
|
};
|
||||||
replaceWithStylixColours =
|
replaceWithStylixColours =
|
||||||
textFile:
|
textFile:
|
||||||
with config.lib.stylix.colors;
|
with config.stylix.base16Scheme.palette;
|
||||||
builtins.replaceStrings
|
builtins.replaceStrings
|
||||||
[
|
[
|
||||||
"1e1e2e"
|
"1e1e2e"
|
||||||
@@ -65,12 +65,10 @@ let
|
|||||||
installation_mode = "force_installed";
|
installation_mode = "force_installed";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
profileName = "6dypj11h.Default Profile";
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
home.file.".zen/${profileName}/chrome/userChrome.css".text = userChromeText;
|
home.file.".zen/default/chrome/userChrome.css".text = userChromeText;
|
||||||
home.file.".zen/${profileName}/chrome/userContent.css".text = userContentText;
|
home.file.".zen/default/chrome/userContent.css".text = userContentText;
|
||||||
programs.zen-browser = {
|
programs.zen-browser = {
|
||||||
enable = true;
|
enable = true;
|
||||||
policies = {
|
policies = {
|
||||||
@@ -120,9 +118,6 @@ in
|
|||||||
|
|
||||||
# Hide shorts for Youtube
|
# Hide shorts for Youtube
|
||||||
"{88ebde3a-4581-4c6b-8019-2a05a9e3e938}"
|
"{88ebde3a-4581-4c6b-8019-2a05a9e3e938}"
|
||||||
|
|
||||||
# Vimium
|
|
||||||
"{d7742d87-e61d-4b78-b8a1-b469842139fa}"
|
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,165 +0,0 @@
|
|||||||
{ config, pkgs, ... }:
|
|
||||||
let
|
|
||||||
betterfox = pkgs.fetchFromGitHub {
|
|
||||||
owner = "yokoffing";
|
|
||||||
repo = "Betterfox";
|
|
||||||
rev = "116.1";
|
|
||||||
hash = "sha256-Ai8Szbrk/4FhGhS4r5gA2DqjALFRfQKo2a/TwWCIA6g=";
|
|
||||||
};
|
|
||||||
|
|
||||||
catppuccinUserChrome = pkgs.fetchFromGitHub {
|
|
||||||
owner = "catppuccin";
|
|
||||||
repo = "zen-browser";
|
|
||||||
rev = "0893393f721facb884365a318111c4a7fce96b45";
|
|
||||||
hash = "sha256-+Nf7TUairZBnhYCFVBqiQW9QodV/xWSOnH6X9o6S7rM=";
|
|
||||||
};
|
|
||||||
replaceWithStylixColours =
|
|
||||||
textFile:
|
|
||||||
with config.lib.stylix.colors;
|
|
||||||
builtins.replaceStrings
|
|
||||||
[
|
|
||||||
"1e1e2e"
|
|
||||||
"181825"
|
|
||||||
"313244"
|
|
||||||
"45475a"
|
|
||||||
"585b70"
|
|
||||||
"cdd6f4"
|
|
||||||
"f5e0dc"
|
|
||||||
"b4befe"
|
|
||||||
"f38ba8"
|
|
||||||
"fab387"
|
|
||||||
"f9e2af"
|
|
||||||
"a6e3a1"
|
|
||||||
"94e2d5"
|
|
||||||
"89b4fa"
|
|
||||||
"cba6f7"
|
|
||||||
"f2cdcd"
|
|
||||||
"rgb(204, 190, 246)"
|
|
||||||
]
|
|
||||||
[
|
|
||||||
base00
|
|
||||||
base01
|
|
||||||
base02
|
|
||||||
base03
|
|
||||||
base04
|
|
||||||
base05
|
|
||||||
base06
|
|
||||||
base07
|
|
||||||
base08
|
|
||||||
base09
|
|
||||||
base0A
|
|
||||||
base0B
|
|
||||||
base0C
|
|
||||||
base0D
|
|
||||||
base0E
|
|
||||||
base0F
|
|
||||||
"#${base0E}"
|
|
||||||
]
|
|
||||||
(builtins.readFile textFile);
|
|
||||||
|
|
||||||
#userChromeText = replaceWithStylixColours "${catppuccinUserChrome}/themes/Mocha/Mauve/userChrome.css";
|
|
||||||
userChromeText = builtins.readFile (
|
|
||||||
with config.lib.stylix.colors;
|
|
||||||
pkgs.replaceVars ./userChrome.css {
|
|
||||||
inherit
|
|
||||||
base00
|
|
||||||
base01
|
|
||||||
base02
|
|
||||||
# base03
|
|
||||||
# base04
|
|
||||||
base05
|
|
||||||
base06
|
|
||||||
# base07
|
|
||||||
base08
|
|
||||||
base09
|
|
||||||
base0A
|
|
||||||
base0B
|
|
||||||
base0C
|
|
||||||
base0D
|
|
||||||
base0E
|
|
||||||
# base0F
|
|
||||||
;
|
|
||||||
}
|
|
||||||
);
|
|
||||||
userContentText = replaceWithStylixColours "${catppuccinUserChrome}/themes/Mocha/Mauve/userContent.css";
|
|
||||||
|
|
||||||
installExtension = name: {
|
|
||||||
inherit name;
|
|
||||||
value = {
|
|
||||||
install_url = "https://addons.mozilla.org/firefox/downloads/latest/${name}/latest.xpi";
|
|
||||||
installation_mode = "force_installed";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
profileName = "tvqbzcy7.Default Profile";
|
|
||||||
in
|
|
||||||
{
|
|
||||||
home.file.".zen/${profileName}/chrome/userChrome.css".text = userChromeText;
|
|
||||||
home.file.".zen/${profileName}/chrome/userContent.css".text = userContentText;
|
|
||||||
programs.zen-browser = {
|
|
||||||
enable = true;
|
|
||||||
policies = {
|
|
||||||
DisableTelemtry = true;
|
|
||||||
DisableFirefoxStudies = true;
|
|
||||||
EnableTrackingProtection = {
|
|
||||||
Value = true;
|
|
||||||
Locked = true;
|
|
||||||
Cryptomining = true;
|
|
||||||
Fingerprinting = true;
|
|
||||||
};
|
|
||||||
DisablePocket = true;
|
|
||||||
DisableFirefoxAccounts = true;
|
|
||||||
DisableAccounts = true;
|
|
||||||
DisableFirefoxScreenshots = true;
|
|
||||||
OverrideFirstRunPage = "";
|
|
||||||
OverridePostUpdatePage = "";
|
|
||||||
DontCheckDefaultBrowser = true;
|
|
||||||
DisplayBookmarksToolbar = "never";
|
|
||||||
DisplayMenuBar = "default-off";
|
|
||||||
SearchBar = "unified";
|
|
||||||
ExtensionSettings = builtins.listToAttrs (
|
|
||||||
builtins.map (name: installExtension name) [
|
|
||||||
# BitWarden
|
|
||||||
"{446900e4-71c2-419f-a6a7-df9c091e268b}"
|
|
||||||
|
|
||||||
# Catppuccin Mocha Mauve
|
|
||||||
"{76aabc99-c1a8-4c1e-832b-d4f2941d5a7a}"
|
|
||||||
|
|
||||||
# Dark Reader
|
|
||||||
"addon@darkreader.org"
|
|
||||||
|
|
||||||
# Language Tool
|
|
||||||
"languagetool-webextension@languagetool.org"
|
|
||||||
|
|
||||||
# Return dislikes to YouTube
|
|
||||||
"{762f9885-5a13-4abd-9c77-433dcd38b8fd}"
|
|
||||||
|
|
||||||
# SponsorBlocker
|
|
||||||
"sponsorBlocker@ajay.app"
|
|
||||||
|
|
||||||
# uBlock Origin:
|
|
||||||
"uBlock0@raymondhill.net"
|
|
||||||
|
|
||||||
# Shinigami Eyes
|
|
||||||
"shinigamieyes@shinigamieyes"
|
|
||||||
|
|
||||||
# Hide shorts for Youtube
|
|
||||||
"{88ebde3a-4581-4c6b-8019-2a05a9e3e938}"
|
|
||||||
|
|
||||||
# Vimium
|
|
||||||
"{d7742d87-e61d-4b78-b8a1-b469842139fa}"
|
|
||||||
]
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
profiles.default = {
|
|
||||||
id = 0;
|
|
||||||
isDefault = true;
|
|
||||||
extraConfig = builtins.concatStringsSep "\n" [
|
|
||||||
(builtins.readFile "${betterfox}/Securefox.js")
|
|
||||||
(builtins.readFile "${betterfox}/Fastfox.js")
|
|
||||||
(builtins.readFile "${betterfox}/Peskyfox.js")
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,128 +0,0 @@
|
|||||||
/* https://github.com/catppuccin/zen-browser/blob/main/themes/Mocha/Pink/userChrome.css */
|
|
||||||
|
|
||||||
:root {
|
|
||||||
--zen-colors-primary: #@base02@ !important;
|
|
||||||
--zen-primary-color: #@base0D@ !important;
|
|
||||||
--zen-colors-secondary: #@base02@ !important;
|
|
||||||
--zen-colors-tertiary: #@base01@ !important;
|
|
||||||
--zen-colors-border: #base0D# !important;
|
|
||||||
--toolbarbutton-icon-fill: #@base0D@ !important;
|
|
||||||
--lwt-text-color: #@base05@ !important;
|
|
||||||
--toolbar-field-color: #@base05@ !important;
|
|
||||||
--tab-selected-textcolor: #@base06@ !important;
|
|
||||||
--toolbar-field-focus-color: #@base05@ !important;
|
|
||||||
--toolbar-color: #@base05@ !important;
|
|
||||||
--newtab-text-primary-color: #@base05@ !important;
|
|
||||||
--arrowpanel-color: #@base05@ !important;
|
|
||||||
--arrowpanel-background: #@base01@ !important;
|
|
||||||
--sidebar-text-color: #@base05@ !important;
|
|
||||||
--lwt-sidebar-text-color: #@base05@ !important;
|
|
||||||
--lwt-sidebar-background-color: #@base00@ !important;
|
|
||||||
--toolbar-bgcolor: #@base02@ !important;
|
|
||||||
--newtab-background-color: #@base01@ !important;
|
|
||||||
--zen-themed-toolbar-bg: #@base01@ !important;
|
|
||||||
--zen-main-browser-background: #@base01@ !important;
|
|
||||||
--toolbox-bgcolor-inactive: #@base01@ !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
#permissions-granted-icon {
|
|
||||||
color: #@base01@ !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.sidebar-placesTree {
|
|
||||||
background-color: #@base01@ !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
#zen-workspaces-button {
|
|
||||||
background-color: #@base01@ !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
#TabsToolbar {
|
|
||||||
background-color: #@base01@ !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.urlbar-background {
|
|
||||||
background-color: #@base01@ !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.content-shortcuts {
|
|
||||||
background-color: #@base01@ !important;
|
|
||||||
border-color: #@base0D@ !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.urlbarView-url {
|
|
||||||
color: #@base0D@ !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
#zenEditBookmarkPanelFaviconContainer {
|
|
||||||
background: #@base00@ !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
#zen-media-controls-toolbar {
|
|
||||||
& #zen-media-progress-bar {
|
|
||||||
&::-moz-range-track {
|
|
||||||
background: #@base02@ !important;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
toolbar .toolbarbutton-1 {
|
|
||||||
&:not([disabled]) {
|
|
||||||
&:is([open], [checked])
|
|
||||||
> :is(
|
|
||||||
.toolbarbutton-icon,
|
|
||||||
.toolbarbutton-text,
|
|
||||||
.toolbarbutton-badge-stack
|
|
||||||
) {
|
|
||||||
fill: #@base00@;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.identity-color-blue {
|
|
||||||
--identity-tab-color: #@base0D@ !important;
|
|
||||||
--identity-icon-color: #@base0D@ !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.identity-color-turquoise {
|
|
||||||
--identity-tab-color: #@base0C@ !important;
|
|
||||||
--identity-icon-color: #@base0C@ !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.identity-color-green {
|
|
||||||
--identity-tab-color: #@base0B@ !important;
|
|
||||||
--identity-icon-color: #@base0B@ !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.identity-color-yellow {
|
|
||||||
--identity-tab-color: #@base0A@ !important;
|
|
||||||
--identity-icon-color: #@base0A@ !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.identity-color-orange {
|
|
||||||
--identity-tab-color: #@base09@ !important;
|
|
||||||
--identity-icon-color: #@base09@ !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.identity-color-red {
|
|
||||||
--identity-tab-color: #@base08@ !important;
|
|
||||||
--identity-icon-color: #@base08@ !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.identity-color-pink {
|
|
||||||
--identity-tab-color: #@base0D@ !important;
|
|
||||||
--identity-icon-color: #@base0D@ !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.identity-color-purple {
|
|
||||||
--identity-tab-color: #@base0E@ !important;
|
|
||||||
--identity-icon-color: #@base0E@ !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
hbox#titlebar {
|
|
||||||
background-color: #@base01@ !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
#zen-appcontent-navbar-container {
|
|
||||||
background-color: #@base01@ !important;
|
|
||||||
}
|
|
||||||
@@ -1,34 +0,0 @@
|
|||||||
{
|
|
||||||
config,
|
|
||||||
hostName,
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
wallpaper,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
let
|
|
||||||
wawa = pkgs.callPackage ./wawa.nix { };
|
|
||||||
in
|
|
||||||
{
|
|
||||||
home.packages = [ pkgs.river-bsp-layout ];
|
|
||||||
|
|
||||||
xdg.configFile."river/init" = {
|
|
||||||
source = pkgs.replaceVars ./init.sh {
|
|
||||||
inherit wallpaper;
|
|
||||||
inherit hostName;
|
|
||||||
inherit wawa;
|
|
||||||
inherit (config.lib.stylix.colors) base0D base02;
|
|
||||||
cursorName = config.home.pointerCursor.name;
|
|
||||||
cursorSize = config.home.pointerCursor.size;
|
|
||||||
};
|
|
||||||
executable = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
home.activation.reinitRiver =
|
|
||||||
with config.lib.stylix.colors;
|
|
||||||
lib.hm.dag.entryAnywhere ''
|
|
||||||
${pkgs.river-classic}/bin/riverctl border-color-focused 0x${base0D}
|
|
||||||
${pkgs.river-classic}/bin/riverctl border-color-unfocused 0x${base02}
|
|
||||||
${wawa}/bin/wawa fill ${wallpaper} &
|
|
||||||
'';
|
|
||||||
}
|
|
||||||
@@ -1,102 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
# https://codeberg.org/river/river-classic/src/branch/main/example/init
|
|
||||||
|
|
||||||
@wawa@/bin/wawa fill @wallpaper@ &
|
|
||||||
|
|
||||||
riverctl map normal Super Q spawn foot
|
|
||||||
riverctl map normal Super B spawn zen-beta
|
|
||||||
|
|
||||||
riverctl map normal Super D spawn "rofi -show run"
|
|
||||||
riverctl map normal Super+Shift P spawn "rofi -show pm -modi pm:rofi-power-menu"
|
|
||||||
riverctl map normal Super+Shift S spawn "gscreenshot -c -s"
|
|
||||||
|
|
||||||
riverctl map normal Super C close
|
|
||||||
riverctl map normal Super+Shift M exit
|
|
||||||
|
|
||||||
riverctl map normal Super Up focus-view up
|
|
||||||
riverctl map normal Super Right focus-view right
|
|
||||||
riverctl map normal Super Left focus-view left
|
|
||||||
riverctl map normal Super Down focus-view down
|
|
||||||
|
|
||||||
riverctl map normal Super k focus-view up
|
|
||||||
riverctl map normal Super l focus-view right
|
|
||||||
riverctl map normal Super h focus-view left
|
|
||||||
riverctl map normal Super j focus-view down
|
|
||||||
|
|
||||||
riverctl map normal Super+Control Up focus-output up
|
|
||||||
riverctl map normal Super+Control Right focus-output right
|
|
||||||
riverctl map normal Super+Control Left focus-output left
|
|
||||||
riverctl map normal Super+Control Down focus-output down
|
|
||||||
|
|
||||||
riverctl map normal Super+Control k focus-output up
|
|
||||||
riverctl map normal Super+Control l focus-output right
|
|
||||||
riverctl map normal Super+Control h focus-output left
|
|
||||||
riverctl map normal Super+Control j focus-output down
|
|
||||||
|
|
||||||
riverctl map normal Super+Shift Up swap up
|
|
||||||
riverctl map normal Super+Shift Right swap right
|
|
||||||
riverctl map normal Super+Shift Left swap left
|
|
||||||
riverctl map normal Super+Shift Down swap down
|
|
||||||
|
|
||||||
riverctl map normal Super+Shift k swap up
|
|
||||||
riverctl map normal Super+Shift l swap right
|
|
||||||
riverctl map normal Super+Shift h swap left
|
|
||||||
riverctl map normal Super+Shift j swap down
|
|
||||||
|
|
||||||
riverctl map normal Super+Shift+Control Up send-to-output up
|
|
||||||
riverctl map normal Super+Shift+Control Right send-to-output right
|
|
||||||
riverctl map normal Super+Shift+Control Left send-to-output left
|
|
||||||
riverctl map normal Super+Shift+Control Down send-to-output down
|
|
||||||
|
|
||||||
riverctl map normal Super+Shift+Control k send-to-output up
|
|
||||||
riverctl map normal Super+Shift+Control l send-to-output right
|
|
||||||
riverctl map normal Super+Shift+Control h send-to-output left
|
|
||||||
riverctl map normal Super+Shift+Control j send-to-output down
|
|
||||||
|
|
||||||
riverctl map-pointer normal Super BTN_RIGHT resize-view
|
|
||||||
|
|
||||||
for i in $(seq 1 9)
|
|
||||||
do
|
|
||||||
tags=$((1 << ($i - 1)))
|
|
||||||
riverctl map normal Super $i set-focused-tags $tags
|
|
||||||
riverctl map normal Super+Shift $i set-view-tags $tags
|
|
||||||
done
|
|
||||||
|
|
||||||
# focus all tags at once
|
|
||||||
riverctl map normal Super A set-focused-tags 511
|
|
||||||
|
|
||||||
riverctl map normal Super F toggle-fullscreen
|
|
||||||
|
|
||||||
riverctl focus-follows-cursor normal
|
|
||||||
riverctl set-cursor-warp on-focus-change
|
|
||||||
|
|
||||||
riverctl border-color-focused 0x@base0D@
|
|
||||||
riverctl border-color-unfocused 0x@base02@
|
|
||||||
riverctl border-width 2
|
|
||||||
|
|
||||||
riverctl xcursor-theme @cursorName@ @cursorSize@
|
|
||||||
|
|
||||||
riverctl set-repeat 30 300
|
|
||||||
|
|
||||||
riverctl default-layout bsp-layout
|
|
||||||
river-bsp-layout --inner-gap 0 --outer-gap 0 --split-perc 0.5 &
|
|
||||||
|
|
||||||
riverctl rule-add ssd
|
|
||||||
riverctl rule-add -app-id "vesktop" output HDMI-A-2
|
|
||||||
|
|
||||||
wlr-randr --output DP-2 --mode 2560x1440@180Hz
|
|
||||||
|
|
||||||
export XDG_CURRENT_DESKTOP=river
|
|
||||||
systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP
|
|
||||||
dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=river
|
|
||||||
systemctl --user restart xdg-desktop-portal
|
|
||||||
|
|
||||||
if [ "@hostName@" = "february" ]; then
|
|
||||||
riverctl keyboard-layout -variant colemak us
|
|
||||||
else
|
|
||||||
vesktop &
|
|
||||||
fi
|
|
||||||
|
|
||||||
eww daemon
|
|
||||||
eww open bar
|
|
||||||
@@ -1,28 +0,0 @@
|
|||||||
{ pkgs, ... }:
|
|
||||||
pkgs.stdenv.mkDerivation {
|
|
||||||
name = "wawa";
|
|
||||||
version = "1.0";
|
|
||||||
src = pkgs.fetchFromCodeberg {
|
|
||||||
owner = "sewn";
|
|
||||||
repo = "wawa";
|
|
||||||
rev = "988c5d10a1535b0243a0191f71d522e9abeea2de";
|
|
||||||
hash = "sha256-nu8BjALjrlcm0AnBcRZxMjn+soozAU58nvqLuiN3UHk=";
|
|
||||||
};
|
|
||||||
buildInputs = with pkgs; [
|
|
||||||
pkg-config
|
|
||||||
wayland
|
|
||||||
wayland-protocols
|
|
||||||
wayland-scanner
|
|
||||||
];
|
|
||||||
makeFlags = [
|
|
||||||
"DESTDIR=$(out)"
|
|
||||||
"PREFIX="
|
|
||||||
];
|
|
||||||
patchPhase = ''
|
|
||||||
runHook prePatch
|
|
||||||
|
|
||||||
sed -i '15s/-Wall/-Wall -Wno-incompatible-pointer-types -D_GNU_SOURCE/' Makefile
|
|
||||||
|
|
||||||
runHook postPatch
|
|
||||||
'';
|
|
||||||
}
|
|
||||||
@@ -1,6 +1,5 @@
|
|||||||
{
|
{
|
||||||
config,
|
config,
|
||||||
lib,
|
|
||||||
inputs,
|
inputs,
|
||||||
hostName,
|
hostName,
|
||||||
pkgs,
|
pkgs,
|
||||||
@@ -15,23 +14,9 @@
|
|||||||
inputs.base16.nixosModule
|
inputs.base16.nixosModule
|
||||||
|
|
||||||
./stylix.nix
|
./stylix.nix
|
||||||
./river.nix
|
./dwl/dwl.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
boot.loader.grub = {
|
|
||||||
enable = true;
|
|
||||||
efiSupport = true;
|
|
||||||
device = "nodev";
|
|
||||||
useOSProber = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
documentation.man = {
|
|
||||||
enable = true;
|
|
||||||
cache = {
|
|
||||||
enable = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
environment.etc."current-system-packages".text =
|
environment.etc."current-system-packages".text =
|
||||||
let
|
let
|
||||||
packages = map (p: "${p.name}") config.environment.systemPackages;
|
packages = map (p: "${p.name}") config.environment.systemPackages;
|
||||||
@@ -40,6 +25,8 @@
|
|||||||
in
|
in
|
||||||
formatted;
|
formatted;
|
||||||
|
|
||||||
|
services.flatpak.enable = true;
|
||||||
|
|
||||||
boot.loader.efi.canTouchEfiVariables = true;
|
boot.loader.efi.canTouchEfiVariables = true;
|
||||||
boot.tmp.cleanOnBoot = true;
|
boot.tmp.cleanOnBoot = true;
|
||||||
|
|
||||||
@@ -62,28 +49,8 @@
|
|||||||
KERNEL=="hidraw*", SUBSYSTEM=="hidraw", MODE="0660", GROUP="users", TAG+="uaccess", TAG+="udev-acl"
|
KERNEL=="hidraw*", SUBSYSTEM=="hidraw", MODE="0660", GROUP="users", TAG+="uaccess", TAG+="udev-acl"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
security.polkit = {
|
|
||||||
enable = true;
|
|
||||||
extraConfig = ''
|
|
||||||
// https://github.com/frasertajima/tailscale_shortcuts/blob/0d1f3992890114c5ea6dfb972fcc782325681e3d/V2_CAUTION/reboot_polkit.md?plain=1#L33
|
|
||||||
polkit.addRule(function(action, subject) {
|
|
||||||
if (subject.isInGroup("wheel") &&
|
|
||||||
(action.id == "org.freedesktop.login1.reboot" ||
|
|
||||||
action.id == "org.freedesktop.login1.suspend" ||
|
|
||||||
action.id == "org.freedesktop.login1.power-off" ||
|
|
||||||
action.id == "org.freedesktop.login1.shutdown")) {
|
|
||||||
return polkit.Result.YES;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
home-manager = {
|
home-manager = {
|
||||||
extraSpecialArgs = {
|
extraSpecialArgs = { inherit inputs; };
|
||||||
inherit inputs;
|
|
||||||
inherit hostName;
|
|
||||||
wallpaper = config.stylix.image;
|
|
||||||
};
|
|
||||||
users = {
|
users = {
|
||||||
${userName} = import (../../.. + "/home/pc/${hostName}/home.nix");
|
${userName} = import (../../.. + "/home/pc/${hostName}/home.nix");
|
||||||
};
|
};
|
||||||
@@ -99,9 +66,10 @@
|
|||||||
|
|
||||||
services.gnome.glib-networking.enable = true;
|
services.gnome.glib-networking.enable = true;
|
||||||
|
|
||||||
services.displayManager.lemurs = {
|
#services.desktopManager.plasma6.enable = true;
|
||||||
|
|
||||||
|
services.displayManager.ly = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings.environment_switcher.include_tty_shell = true;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
programs.steam = {
|
programs.steam = {
|
||||||
@@ -121,14 +89,7 @@
|
|||||||
pkgs.xdg-desktop-portal-wlr
|
pkgs.xdg-desktop-portal-wlr
|
||||||
pkgs.xdg-desktop-portal-gtk
|
pkgs.xdg-desktop-portal-gtk
|
||||||
];
|
];
|
||||||
wlr = {
|
wlr.enable = true;
|
||||||
enable = true;
|
|
||||||
settings.screencast = {
|
|
||||||
max_fps = 180;
|
|
||||||
chooser_type = "simple";
|
|
||||||
chooser_cmd = "${pkgs.slurp}/bin/slurp -f 'Monitor: %o' -or";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
services.blueman.enable = true;
|
services.blueman.enable = true;
|
||||||
@@ -151,87 +112,30 @@
|
|||||||
hardware.bluetooth.enable = true;
|
hardware.bluetooth.enable = true;
|
||||||
hardware.bluetooth.powerOnBoot = true;
|
hardware.bluetooth.powerOnBoot = true;
|
||||||
|
|
||||||
# programs.fish.enable = true;
|
programs.fish.enable = true;
|
||||||
|
|
||||||
users.users.${userName} = {
|
users.users.${userName} = {
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
extraGroups = [
|
extraGroups = [
|
||||||
"networkmanager"
|
"networkmanager"
|
||||||
"wheel"
|
"wheel"
|
||||||
"seat"
|
|
||||||
"audio"
|
|
||||||
];
|
];
|
||||||
packages = [ ];
|
packages = [ ];
|
||||||
shell = pkgs.tcsh;
|
shell = pkgs.fish;
|
||||||
};
|
};
|
||||||
environment.shells = [ pkgs.tcsh ];
|
|
||||||
|
|
||||||
nix.settings.experimental-features = [
|
nix.settings.experimental-features = [
|
||||||
"nix-command"
|
"nix-command"
|
||||||
"flakes"
|
"flakes"
|
||||||
];
|
];
|
||||||
|
|
||||||
environment.etc."csh.cshrc" = {
|
|
||||||
enable = true;
|
|
||||||
text =
|
|
||||||
# https://github.com/NixOS/nixpkgs/blob/736c1381347ac3cbb2031159f4df254f49a619fd/nixos/modules/config/shells-environment.nix
|
|
||||||
let
|
|
||||||
cfg = config.environment;
|
|
||||||
|
|
||||||
absoluteVariables = lib.mapAttrs (n: lib.toList) cfg.variables;
|
|
||||||
|
|
||||||
suffixedVariables = lib.flip lib.mapAttrs cfg.profileRelativeEnvVars (
|
|
||||||
envVar: listSuffixes:
|
|
||||||
lib.concatMap (profile: map (suffix: "${profile}${suffix}") listSuffixes) cfg.profiles
|
|
||||||
);
|
|
||||||
|
|
||||||
allVariables = lib.zipAttrsWith (n: lib.concatLists) [
|
|
||||||
absoluteVariables
|
|
||||||
suffixedVariables
|
|
||||||
];
|
|
||||||
|
|
||||||
exportVariables = lib.mapAttrsToList (
|
|
||||||
n: v: ''set ${n} = "${lib.concatStringsSep ":" v}"''
|
|
||||||
) allVariables;
|
|
||||||
|
|
||||||
exportedEnvVars = lib.concatStringsSep "\n" exportVariables;
|
|
||||||
in
|
|
||||||
''
|
|
||||||
set XDG_CONFIG_HOME = /home/autumn/.config;
|
|
||||||
set XDG_DATA_HOME = /home/autumn/.local/share;
|
|
||||||
set XDG_CACHE_HOME = /home/autumn/.local/cache;
|
|
||||||
set XDG_STATE_HOME = /home/autumn/.local/state;
|
|
||||||
|
|
||||||
# DO NOT EDIT -- this file has been generated automatically.
|
|
||||||
|
|
||||||
# Prevent this file from being sourced by child shells.
|
|
||||||
set __NIXOS_SET_ENVIRONMENT_DONE = 1
|
|
||||||
|
|
||||||
${exportedEnvVars}
|
|
||||||
|
|
||||||
# removed extraInit ; keep that in mind !!
|
|
||||||
|
|
||||||
${lib.optionalString cfg.homeBinInPath ''
|
|
||||||
# ~/bin if it exists overrides other bin directories.
|
|
||||||
set PATH = "$HOME/bin:$PATH"
|
|
||||||
''}
|
|
||||||
|
|
||||||
${lib.optionalString cfg.localBinInPath ''
|
|
||||||
set PATH = "$HOME/.local/bin:$PATH"
|
|
||||||
''}
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
tcsh
|
|
||||||
|
|
||||||
cloudflared
|
cloudflared
|
||||||
gparted
|
gparted
|
||||||
networkmanagerapplet
|
networkmanagerapplet
|
||||||
nh
|
nh
|
||||||
pavucontrol
|
pavucontrol
|
||||||
wget
|
wget
|
||||||
slurp
|
|
||||||
];
|
];
|
||||||
|
|
||||||
fonts = {
|
fonts = {
|
||||||
@@ -256,11 +160,8 @@
|
|||||||
EDITOR = "nvim";
|
EDITOR = "nvim";
|
||||||
SUDO_EDITOR = "nvim";
|
SUDO_EDITOR = "nvim";
|
||||||
BROWSER = "zen";
|
BROWSER = "zen";
|
||||||
SHELL = "tcsh";
|
SHELL = "fish";
|
||||||
TERM = "foot";
|
TERM = "foot";
|
||||||
|
|
||||||
XDG_CURRENT_DESKTOP = "river";
|
|
||||||
LIBSEAT_BACKEND = "seatd";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
system.stateVersion = "24.05";
|
system.stateVersion = "24.05";
|
||||||
|
|||||||
@@ -0,0 +1,255 @@
|
|||||||
|
#define BASE_00 "@base00@"
|
||||||
|
#define BASE_01 "@base01@"
|
||||||
|
#define BASE_02 "@base02@"
|
||||||
|
#define BASE_03 "@base03@"
|
||||||
|
#define BASE_04 "@base04@"
|
||||||
|
#define BASE_05 "@base05@"
|
||||||
|
#define BASE_06 "@base06@"
|
||||||
|
#define BASE_07 "@base07@"
|
||||||
|
#define BASE_08 "@base08@"
|
||||||
|
#define BASE_09 "@base09@"
|
||||||
|
#define BASE_0A "@base0A@"
|
||||||
|
#define BASE_0B "@base0B@"
|
||||||
|
#define BASE_0C "@base0C@"
|
||||||
|
#define BASE_0D "@base0D@"
|
||||||
|
#define BASE_0E "@base0E@"
|
||||||
|
#define BASE_0F "@base0F@"
|
||||||
|
|
||||||
|
#define WALLPAPER "@wallpaper@"
|
||||||
|
|
||||||
|
/* Taken from https://github.com/jt0w/.dotfiles/blob/a6db8ad08ce834bb8ba9d15b999281d6635f5169/modules/nixos/dwl/config.def.h */
|
||||||
|
#define HEX(c) \
|
||||||
|
((c) >= '0' && (c) <= '9' ? (c) - '0' \
|
||||||
|
: (c) >= 'a' && (c) <= 'f' ? (c) - 'a' + 10 \
|
||||||
|
: (c) >= 'A' && (c) <= 'F' ? (c) - 'A' + 10 \
|
||||||
|
: 0)
|
||||||
|
|
||||||
|
#define HEXBYTE(s, i) ((HEX((s)[i]) << 4) | HEX((s)[(i) + 1]))
|
||||||
|
|
||||||
|
#define RGB_HEX_TO_RGBA(s) \
|
||||||
|
((uint32_t)((HEXBYTE(s, 0) << 24) | (HEXBYTE(s, 2) << 16) | \
|
||||||
|
(HEXBYTE(s, 4) << 8) | 0xFF))
|
||||||
|
|
||||||
|
/* Taken from https://github.com/djpohly/dwl/issues/466 */
|
||||||
|
#define COLOR(hex) \
|
||||||
|
{((hex >> 24) & 0xFF) / 255.0f, ((hex >> 16) & 0xFF) / 255.0f, \
|
||||||
|
((hex >> 8) & 0xFF) / 255.0f, (hex & 0xFF) / 255.0f}
|
||||||
|
|
||||||
|
/* appearance */
|
||||||
|
static const int sloppyfocus = 1; /* focus follows mouse */
|
||||||
|
static const int bypass_surface_visibility = 0; /* 1 means idle inhibitors will disable idle tracking even if it's surface isn't visible */
|
||||||
|
static const unsigned int borderpx = 2; /* border pixel of windows */
|
||||||
|
|
||||||
|
static const float rootcolor[] = COLOR(RGB_HEX_TO_RGBA(BASE_00));
|
||||||
|
static const float bordercolor[] = COLOR(RGB_HEX_TO_RGBA(BASE_02));
|
||||||
|
static const float focuscolor[] = COLOR(RGB_HEX_TO_RGBA(BASE_0D));
|
||||||
|
static const float urgentcolor[] = COLOR(RGB_HEX_TO_RGBA(BASE_08));
|
||||||
|
|
||||||
|
// gaps patch
|
||||||
|
static const int smartgaps = 0; /* 1 means no outer gap when there is only one window */
|
||||||
|
static int gaps = 1; /* 1 means gaps between windows are added */
|
||||||
|
static const unsigned int gappx = 10; /* gap pixel between windows */
|
||||||
|
|
||||||
|
/* This conforms to the xdg-protocol. Set the alpha to zero to restore the old behavior */
|
||||||
|
static const float fullscreen_bg[] = {0.1f, 0.1f, 0.1f, 1.0f}; /* You can also use glsl colors */
|
||||||
|
|
||||||
|
enum Direction { DIR_LEFT, DIR_RIGHT, DIR_UP, DIR_DOWN };
|
||||||
|
|
||||||
|
static const float resize_factor = 0.0002f; /* Resize multiplier for mouse resizing, depends on mouse sensivity. */
|
||||||
|
static const uint32_t resize_interval_ms = 16; /* Resize interval depends on framerate and screen refresh rate. */
|
||||||
|
|
||||||
|
/* tagging - TAGCOUNT must be no greater than 31 */
|
||||||
|
#define TAGCOUNT (9)
|
||||||
|
|
||||||
|
/* logging */
|
||||||
|
static int log_level = WLR_ERROR;
|
||||||
|
|
||||||
|
/* NOTE: ALWAYS keep a rule declared even if you don't use rules (e.g leave at least one example) */
|
||||||
|
static const Rule rules[] = {
|
||||||
|
/* app_id title tags mask isfloating monitor */
|
||||||
|
/* examples: */
|
||||||
|
{ "mpv", NULL, 0, 1, 0 },
|
||||||
|
};
|
||||||
|
|
||||||
|
/* layout(s) */
|
||||||
|
static const Layout layouts[] = {
|
||||||
|
/* symbol arrange function */
|
||||||
|
{ "[]=", tile },
|
||||||
|
{ "|w|", btrtile },
|
||||||
|
{ "><>", NULL }, /* no layout function means floating behavior */
|
||||||
|
{ "[M]", monocle },
|
||||||
|
};
|
||||||
|
|
||||||
|
#define CONFIG_BTRTILE_LAYOUT &layouts[1]
|
||||||
|
|
||||||
|
/* monitors */
|
||||||
|
/* (x=-1, y=-1) is reserved as an "autoconfigure" monitor position indicator
|
||||||
|
* WARNING: negative values other than (-1, -1) cause problems with Xwayland clients
|
||||||
|
* https://gitlab.freedesktop.org/xorg/xserver/-/issues/899
|
||||||
|
*/
|
||||||
|
/* NOTE: ALWAYS add a fallback rule, even if you are completely sure it won't be used */
|
||||||
|
static const MonitorRule monrules[] = {
|
||||||
|
/* name mfact nmaster scale layout rotate/reflect x y */
|
||||||
|
/* example of a HiDPI laptop monitor:
|
||||||
|
{ "eDP-1", 0.5f, 1, 2, &layouts[0], WL_OUTPUT_TRANSFORM_NORMAL, -1, -1 },
|
||||||
|
*/
|
||||||
|
/* defaults */
|
||||||
|
|
||||||
|
// https://codeberg.org/dwl/dwl-patches/src/branch/main/patches/monitorconfig/monitorconfig.patch
|
||||||
|
{ "DP-2", 0.55f, 1, 1, CONFIG_BTRTILE_LAYOUT, WL_OUTPUT_TRANSFORM_NORMAL, -1, -1, 2560, 1440, 180.0f, 0, 1},
|
||||||
|
{ "HDMI-A-2", 0.55f, 1, 1, CONFIG_BTRTILE_LAYOUT, WL_OUTPUT_TRANSFORM_NORMAL, -1, -1, 1920, 1080, 60.0f, 0, 1},
|
||||||
|
};
|
||||||
|
|
||||||
|
// https://codeberg.org/dwl/dwl-patches/raw/branch/main/patches/autostart/autostart.patch
|
||||||
|
static const char *const autostart[] = {
|
||||||
|
// Set the resolution
|
||||||
|
"wlr-randr", "--output", "DP-2", "--mode", "2560x1440@180Hz", NULL,
|
||||||
|
// Start the wallpaper daemon
|
||||||
|
"awww-daemon", NULL,
|
||||||
|
// Include the wallpaper
|
||||||
|
"awww", "img", WALLPAPER, "-t", "none", NULL,
|
||||||
|
// Start waybar
|
||||||
|
"waybar", NULL,
|
||||||
|
// Needed for screencasting
|
||||||
|
"dbus-update-activation-environment", "--systemd", "WAYLAND_DISPLAY", "XDG_CURRENT_DESKTOP=sway", NULL,
|
||||||
|
NULL,
|
||||||
|
};
|
||||||
|
|
||||||
|
/* keyboard */
|
||||||
|
static const struct xkb_rule_names xkb_rules = {
|
||||||
|
/* can specify fields: rules, model, layout, variant, options */
|
||||||
|
/* example:
|
||||||
|
.options = "ctrl:nocaps",
|
||||||
|
*/
|
||||||
|
.layout = "us",
|
||||||
|
};
|
||||||
|
|
||||||
|
static const int repeat_rate = 25;
|
||||||
|
static const int repeat_delay = 600;
|
||||||
|
|
||||||
|
/* Trackpad */
|
||||||
|
static const int tap_to_click = 1;
|
||||||
|
static const int tap_and_drag = 1;
|
||||||
|
static const int drag_lock = 1;
|
||||||
|
static const int natural_scrolling = 0;
|
||||||
|
static const int disable_while_typing = 1;
|
||||||
|
static const int left_handed = 0;
|
||||||
|
static const int middle_button_emulation = 0;
|
||||||
|
/* You can choose between:
|
||||||
|
LIBINPUT_CONFIG_SCROLL_NO_SCROLL
|
||||||
|
LIBINPUT_CONFIG_SCROLL_2FG
|
||||||
|
LIBINPUT_CONFIG_SCROLL_EDGE
|
||||||
|
LIBINPUT_CONFIG_SCROLL_ON_BUTTON_DOWN
|
||||||
|
*/
|
||||||
|
static const enum libinput_config_scroll_method scroll_method = LIBINPUT_CONFIG_SCROLL_2FG;
|
||||||
|
|
||||||
|
/* You can choose between:
|
||||||
|
LIBINPUT_CONFIG_CLICK_METHOD_NONE
|
||||||
|
LIBINPUT_CONFIG_CLICK_METHOD_BUTTON_AREAS
|
||||||
|
LIBINPUT_CONFIG_CLICK_METHOD_CLICKFINGER
|
||||||
|
*/
|
||||||
|
static const enum libinput_config_click_method click_method = LIBINPUT_CONFIG_CLICK_METHOD_BUTTON_AREAS;
|
||||||
|
|
||||||
|
/* You can choose between:
|
||||||
|
LIBINPUT_CONFIG_SEND_EVENTS_ENABLED
|
||||||
|
LIBINPUT_CONFIG_SEND_EVENTS_DISABLED
|
||||||
|
LIBINPUT_CONFIG_SEND_EVENTS_DISABLED_ON_EXTERNAL_MOUSE
|
||||||
|
*/
|
||||||
|
static const uint32_t send_events_mode = LIBINPUT_CONFIG_SEND_EVENTS_ENABLED;
|
||||||
|
|
||||||
|
/* You can choose between:
|
||||||
|
LIBINPUT_CONFIG_ACCEL_PROFILE_FLAT
|
||||||
|
LIBINPUT_CONFIG_ACCEL_PROFILE_ADAPTIVE
|
||||||
|
*/
|
||||||
|
static const enum libinput_config_accel_profile accel_profile = LIBINPUT_CONFIG_ACCEL_PROFILE_FLAT;
|
||||||
|
static const double accel_speed = 1.0;
|
||||||
|
|
||||||
|
/* You can choose between:
|
||||||
|
LIBINPUT_CONFIG_TAP_MAP_LRM -- 1/2/3 finger tap maps to left/right/middle
|
||||||
|
LIBINPUT_CONFIG_TAP_MAP_LMR -- 1/2/3 finger tap maps to left/middle/right
|
||||||
|
*/
|
||||||
|
static const enum libinput_config_tap_button_map button_map = LIBINPUT_CONFIG_TAP_MAP_LRM;
|
||||||
|
|
||||||
|
/* If you want to use the windows key for MODKEY, use WLR_MODIFIER_LOGO */
|
||||||
|
#define MODKEY WLR_MODIFIER_LOGO
|
||||||
|
|
||||||
|
#define TAGKEYS(KEY,SKEY,TAG) \
|
||||||
|
{ MODKEY, KEY, view, {.ui = 1 << TAG} }, \
|
||||||
|
{ MODKEY|WLR_MODIFIER_CTRL, KEY, toggleview, {.ui = 1 << TAG} }, \
|
||||||
|
{ MODKEY|WLR_MODIFIER_SHIFT, SKEY, tag, {.ui = 1 << TAG} }, \
|
||||||
|
{ MODKEY|WLR_MODIFIER_CTRL|WLR_MODIFIER_SHIFT,SKEY,toggletag, {.ui = 1 << TAG} }
|
||||||
|
|
||||||
|
/* helper for spawning shell commands in the pre dwm-5.0 fashion */
|
||||||
|
#define SHCMD(cmd) { .v = (const char*[]){ "/bin/sh", "-c", cmd, NULL } }
|
||||||
|
|
||||||
|
/* commands */
|
||||||
|
static const char *termcmd[] = { "foot", NULL };
|
||||||
|
static const char *menucmd[] = { "rofi", "-show", "drun", NULL };
|
||||||
|
static const char *powrcmd[] = { "rofi", "-show", "pm", "-modi", "pm:rofi-power-menu", "--choices", "suspend/reboot/shutdown", NULL };
|
||||||
|
static const char *emjicmd[] = { "rofimoji", "--action", "copy", NULL };
|
||||||
|
static const char *scshcmd[] = { "gscreenshot", "-c", "-s", NULL };
|
||||||
|
static const char *brsrcmd[] = { "zen-beta", NULL };
|
||||||
|
|
||||||
|
static const Key keys[] = {
|
||||||
|
/* Note that Shift changes certain key codes: c -> C, 2 -> at, etc. */
|
||||||
|
/* modifier key function argument */
|
||||||
|
{ MODKEY, XKB_KEY_d, spawn, {.v = menucmd} },
|
||||||
|
{ MODKEY, XKB_KEY_q, spawn, {.v = termcmd} },
|
||||||
|
{ MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_P, spawn, {.v = powrcmd} },
|
||||||
|
{ MODKEY, XKB_KEY_e, spawn, {.v = emjicmd} },
|
||||||
|
{ MODKEY, XKB_KEY_s, spawn, {.v = scshcmd} },
|
||||||
|
{ MODKEY, XKB_KEY_w, spawn, {.v = brsrcmd} },
|
||||||
|
|
||||||
|
{ MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_Up, swapclients, {.i = DIR_UP} },
|
||||||
|
{ MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_Down, swapclients, {.i = DIR_DOWN} },
|
||||||
|
{ MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_Right, swapclients, {.i = DIR_RIGHT} },
|
||||||
|
{ MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_Left, swapclients, {.i = DIR_LEFT} },
|
||||||
|
{ MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_k, swapclients, {.i = DIR_UP} },
|
||||||
|
{ MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_j, swapclients, {.i = DIR_DOWN} },
|
||||||
|
{ MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_h, swapclients, {.i = DIR_RIGHT} },
|
||||||
|
{ MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_l, swapclients, {.i = DIR_LEFT} },
|
||||||
|
|
||||||
|
{ MODKEY|WLR_MODIFIER_CTRL, XKB_KEY_Left, focusmon, {.i = WLR_DIRECTION_LEFT} },
|
||||||
|
{ MODKEY|WLR_MODIFIER_CTRL, XKB_KEY_Right, focusmon, {.i = WLR_DIRECTION_RIGHT} },
|
||||||
|
{ MODKEY|WLR_MODIFIER_CTRL, XKB_KEY_h, focusmon, {.i = WLR_DIRECTION_LEFT} },
|
||||||
|
{ MODKEY|WLR_MODIFIER_CTRL, XKB_KEY_l, focusmon, {.i = WLR_DIRECTION_RIGHT} },
|
||||||
|
|
||||||
|
{ MODKEY, XKB_KEY_Left, focusdir, {.ui = 0} },
|
||||||
|
{ MODKEY, XKB_KEY_Right, focusdir, {.ui = 1} },
|
||||||
|
{ MODKEY, XKB_KEY_Up, focusdir, {.ui = 2} },
|
||||||
|
{ MODKEY, XKB_KEY_Down, focusdir, {.ui = 3} },
|
||||||
|
{ MODKEY, XKB_KEY_h, focusdir, {.ui = 0} },
|
||||||
|
{ MODKEY, XKB_KEY_l, focusdir, {.ui = 1} },
|
||||||
|
{ MODKEY, XKB_KEY_k, focusdir, {.ui = 2} },
|
||||||
|
{ MODKEY, XKB_KEY_j, focusdir, {.ui = 3} },
|
||||||
|
|
||||||
|
{ MODKEY, XKB_KEY_Return, zoom, {0} },
|
||||||
|
{ MODKEY, XKB_KEY_c, killclient, {0} },
|
||||||
|
// { MODKEY, XKB_KEY_t, setlayout, {.v = &layouts[0]} },
|
||||||
|
{ MODKEY, XKB_KEY_v, togglefloating, {0} },
|
||||||
|
{ MODKEY, XKB_KEY_f, togglefullscreen, {0} },
|
||||||
|
TAGKEYS( XKB_KEY_1, XKB_KEY_exclam, 0),
|
||||||
|
TAGKEYS( XKB_KEY_2, XKB_KEY_at, 1),
|
||||||
|
TAGKEYS( XKB_KEY_3, XKB_KEY_numbersign, 2),
|
||||||
|
TAGKEYS( XKB_KEY_4, XKB_KEY_dollar, 3),
|
||||||
|
TAGKEYS( XKB_KEY_5, XKB_KEY_percent, 4),
|
||||||
|
TAGKEYS( XKB_KEY_6, XKB_KEY_asciicircum, 5),
|
||||||
|
TAGKEYS( XKB_KEY_7, XKB_KEY_ampersand, 6),
|
||||||
|
TAGKEYS( XKB_KEY_8, XKB_KEY_asterisk, 7),
|
||||||
|
TAGKEYS( XKB_KEY_9, XKB_KEY_parenleft, 8),
|
||||||
|
{ MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_M, quit, {0} },
|
||||||
|
|
||||||
|
/* Ctrl-Alt-Backspace and Ctrl-Alt-Fx used to be handled by X server */
|
||||||
|
{ WLR_MODIFIER_CTRL|WLR_MODIFIER_ALT,XKB_KEY_Terminate_Server, quit, {0} },
|
||||||
|
/* Ctrl-Alt-Fx is used to switch to another VT, if you don't know what a VT is
|
||||||
|
* do not remove them.
|
||||||
|
*/
|
||||||
|
#define CHVT(n) { WLR_MODIFIER_CTRL|WLR_MODIFIER_ALT,XKB_KEY_XF86Switch_VT_##n, chvt, {.ui = (n)} }
|
||||||
|
CHVT(1), CHVT(2), CHVT(3), CHVT(4), CHVT(5), CHVT(6),
|
||||||
|
CHVT(7), CHVT(8), CHVT(9), CHVT(10), CHVT(11), CHVT(12),
|
||||||
|
};
|
||||||
|
|
||||||
|
static const Button buttons[] = {
|
||||||
|
{ MODKEY, BTN_LEFT, moveresize, {.ui = CurMove} },
|
||||||
|
{ MODKEY, BTN_RIGHT, moveresize, {.ui = CurResize} },
|
||||||
|
};
|
||||||
@@ -0,0 +1,48 @@
|
|||||||
|
{ config, pkgs, ... }:
|
||||||
|
{
|
||||||
|
environment.systemPackages = [
|
||||||
|
pkgs.gscreenshot
|
||||||
|
pkgs.wlr-randr
|
||||||
|
pkgs.awww
|
||||||
|
];
|
||||||
|
programs.dwl = {
|
||||||
|
enable = true;
|
||||||
|
package =
|
||||||
|
(pkgs.dwl.override {
|
||||||
|
configH = pkgs.replaceVars ./config.h {
|
||||||
|
base00 = config.lib.stylix.colors.base00;
|
||||||
|
base01 = config.lib.stylix.colors.base01;
|
||||||
|
base02 = config.lib.stylix.colors.base02;
|
||||||
|
base03 = config.lib.stylix.colors.base03;
|
||||||
|
base04 = config.lib.stylix.colors.base04;
|
||||||
|
base05 = config.lib.stylix.colors.base05;
|
||||||
|
base06 = config.lib.stylix.colors.base06;
|
||||||
|
base07 = config.lib.stylix.colors.base07;
|
||||||
|
base08 = config.lib.stylix.colors.base08;
|
||||||
|
base09 = config.lib.stylix.colors.base09;
|
||||||
|
base0A = config.lib.stylix.colors.base0A;
|
||||||
|
base0B = config.lib.stylix.colors.base0B;
|
||||||
|
base0C = config.lib.stylix.colors.base0C;
|
||||||
|
base0D = config.lib.stylix.colors.base0D;
|
||||||
|
base0E = config.lib.stylix.colors.base0E;
|
||||||
|
base0F = config.lib.stylix.colors.base0F;
|
||||||
|
|
||||||
|
wallpaper = config.stylix.image;
|
||||||
|
};
|
||||||
|
}).overrideAttrs
|
||||||
|
(oldAttrs: {
|
||||||
|
buildInputs = oldAttrs.buildInputs or [ ] ++ [
|
||||||
|
pkgs.libdrm
|
||||||
|
pkgs.fcft
|
||||||
|
];
|
||||||
|
patches = oldAttrs.patches or [ ] ++ [
|
||||||
|
./patches/autostart-0.7.patch
|
||||||
|
./patches/btrtile-v0.7-gaps.patch
|
||||||
|
./patches/focusdir.patch
|
||||||
|
./patches/gaps.patch
|
||||||
|
./patches/ipc.patch
|
||||||
|
./patches/monitorconfig.patch
|
||||||
|
];
|
||||||
|
});
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -0,0 +1,154 @@
|
|||||||
|
From 787f7252d63945996f009828aff3c44afd0f7781 Mon Sep 17 00:00:00 2001
|
||||||
|
From: =?UTF-8?q?Leonardo=20Hern=C3=A1ndez=20Hern=C3=A1ndez?=
|
||||||
|
<leohdz172@proton.me>
|
||||||
|
Date: Sat, 8 Jul 2023 17:11:36 -0600
|
||||||
|
Subject: [PATCH] port autostart patch from dwm
|
||||||
|
MIME-Version: 1.0
|
||||||
|
Content-Type: text/plain; charset=UTF-8
|
||||||
|
Content-Transfer-Encoding: 8bit
|
||||||
|
|
||||||
|
https://dwm.suckless.org/patches/cool_autostart/
|
||||||
|
Signed-off-by: Leonardo Hernández Hernández <leohdz172@proton.me>
|
||||||
|
---
|
||||||
|
config.def.h | 7 +++++++
|
||||||
|
dwl.c | 59 +++++++++++++++++++++++++++++++++++++++++++++++-----
|
||||||
|
2 files changed, 61 insertions(+), 5 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/config.def.h b/config.def.h
|
||||||
|
index 22d2171..8dc6502 100644
|
||||||
|
--- a/config.def.h
|
||||||
|
+++ b/config.def.h
|
||||||
|
@@ -20,6 +20,13 @@ static const float fullscreen_bg[] = {0.1f, 0.1f, 0.1f, 1.0f}; /* You ca
|
||||||
|
/* logging */
|
||||||
|
static int log_level = WLR_ERROR;
|
||||||
|
|
||||||
|
+/* Autostart */
|
||||||
|
+static const char *const autostart[] = {
|
||||||
|
+ "wbg", "/path/to/your/image", NULL,
|
||||||
|
+ NULL /* terminate */
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+
|
||||||
|
/* NOTE: ALWAYS keep a rule declared even if you don't use rules (e.g leave at least one example) */
|
||||||
|
static const Rule rules[] = {
|
||||||
|
/* app_id title tags mask isfloating monitor */
|
||||||
|
diff --git a/dwl.c b/dwl.c
|
||||||
|
index 5bf995e..e8b8727 100644
|
||||||
|
--- a/dwl.c
|
||||||
|
+++ b/dwl.c
|
||||||
|
@@ -249,6 +249,7 @@ static void arrange(Monitor *m);
|
||||||
|
static void arrangelayer(Monitor *m, struct wl_list *list,
|
||||||
|
struct wlr_box *usable_area, int exclusive);
|
||||||
|
static void arrangelayers(Monitor *m);
|
||||||
|
+static void autostartexec(void);
|
||||||
|
static void axisnotify(struct wl_listener *listener, void *data);
|
||||||
|
static void buttonpress(struct wl_listener *listener, void *data);
|
||||||
|
static void chvt(const Arg *arg);
|
||||||
|
@@ -432,6 +433,9 @@ static xcb_atom_t netatom[NetLast];
|
||||||
|
/* attempt to encapsulate suck into one file */
|
||||||
|
#include "client.h"
|
||||||
|
|
||||||
|
+static pid_t *autostart_pids;
|
||||||
|
+static size_t autostart_len;
|
||||||
|
+
|
||||||
|
/* function implementations */
|
||||||
|
void
|
||||||
|
applybounds(Client *c, struct wlr_box *bbox)
|
||||||
|
@@ -580,6 +584,27 @@ arrangelayers(Monitor *m)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
+void
|
||||||
|
+autostartexec(void) {
|
||||||
|
+ const char *const *p;
|
||||||
|
+ size_t i = 0;
|
||||||
|
+
|
||||||
|
+ /* count entries */
|
||||||
|
+ for (p = autostart; *p; autostart_len++, p++)
|
||||||
|
+ while (*++p);
|
||||||
|
+
|
||||||
|
+ autostart_pids = calloc(autostart_len, sizeof(pid_t));
|
||||||
|
+ for (p = autostart; *p; i++, p++) {
|
||||||
|
+ if ((autostart_pids[i] = fork()) == 0) {
|
||||||
|
+ setsid();
|
||||||
|
+ execvp(*p, (char *const *)p);
|
||||||
|
+ die("dwl: execvp %s:", *p);
|
||||||
|
+ }
|
||||||
|
+ /* skip arguments */
|
||||||
|
+ while (*++p);
|
||||||
|
+ }
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
void
|
||||||
|
axisnotify(struct wl_listener *listener, void *data)
|
||||||
|
{
|
||||||
|
@@ -676,11 +701,21 @@ checkidleinhibitor(struct wlr_surface *exclude)
|
||||||
|
void
|
||||||
|
cleanup(void)
|
||||||
|
{
|
||||||
|
+ size_t i;
|
||||||
|
#ifdef XWAYLAND
|
||||||
|
wlr_xwayland_destroy(xwayland);
|
||||||
|
xwayland = NULL;
|
||||||
|
#endif
|
||||||
|
wl_display_destroy_clients(dpy);
|
||||||
|
+
|
||||||
|
+ /* kill child processes */
|
||||||
|
+ for (i = 0; i < autostart_len; i++) {
|
||||||
|
+ if (0 < autostart_pids[i]) {
|
||||||
|
+ kill(autostart_pids[i], SIGTERM);
|
||||||
|
+ waitpid(autostart_pids[i], NULL, 0);
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
if (child_pid > 0) {
|
||||||
|
kill(-child_pid, SIGTERM);
|
||||||
|
waitpid(child_pid, NULL, 0);
|
||||||
|
@@ -1497,18 +1532,31 @@ void
|
||||||
|
handlesig(int signo)
|
||||||
|
{
|
||||||
|
if (signo == SIGCHLD) {
|
||||||
|
-#ifdef XWAYLAND
|
||||||
|
siginfo_t in;
|
||||||
|
/* wlroots expects to reap the XWayland process itself, so we
|
||||||
|
* use WNOWAIT to keep the child waitable until we know it's not
|
||||||
|
* XWayland.
|
||||||
|
*/
|
||||||
|
while (!waitid(P_ALL, 0, &in, WEXITED|WNOHANG|WNOWAIT) && in.si_pid
|
||||||
|
- && (!xwayland || in.si_pid != xwayland->server->pid))
|
||||||
|
- waitpid(in.si_pid, NULL, 0);
|
||||||
|
-#else
|
||||||
|
- while (waitpid(-1, NULL, WNOHANG) > 0);
|
||||||
|
+#ifdef XWAYLAND
|
||||||
|
+ && (!xwayland || in.si_pid != xwayland->server->pid)
|
||||||
|
#endif
|
||||||
|
+ ) {
|
||||||
|
+ pid_t *p, *lim;
|
||||||
|
+ waitpid(in.si_pid, NULL, 0);
|
||||||
|
+ if (in.si_pid == child_pid)
|
||||||
|
+ child_pid = -1;
|
||||||
|
+ if (!(p = autostart_pids))
|
||||||
|
+ continue;
|
||||||
|
+ lim = &p[autostart_len];
|
||||||
|
+
|
||||||
|
+ for (; p < lim; p++) {
|
||||||
|
+ if (*p == in.si_pid) {
|
||||||
|
+ *p = -1;
|
||||||
|
+ break;
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
} else if (signo == SIGINT || signo == SIGTERM) {
|
||||||
|
quit(NULL);
|
||||||
|
}
|
||||||
|
@@ -2224,6 +2272,7 @@ run(char *startup_cmd)
|
||||||
|
die("startup: backend_start");
|
||||||
|
|
||||||
|
/* Now that the socket exists and the backend is started, run the startup command */
|
||||||
|
+ autostartexec();
|
||||||
|
if (startup_cmd) {
|
||||||
|
int piperw[2];
|
||||||
|
if (pipe(piperw) < 0)
|
||||||
|
--
|
||||||
|
2.45.2
|
||||||
|
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,90 @@
|
|||||||
|
From a0e71a687b7fcaebdaf1da80c09bf5563bff46b1 Mon Sep 17 00:00:00 2001
|
||||||
|
From: ldev <ldev@ldev.eu.org>
|
||||||
|
Date: Mon, 12 Feb 2024 21:50:24 +0100
|
||||||
|
Subject: [PATCH] focusdir
|
||||||
|
|
||||||
|
---
|
||||||
|
config.def.h | 4 ++++
|
||||||
|
dwl.c | 45 +++++++++++++++++++++++++++++++++++++++++++++
|
||||||
|
2 files changed, 49 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/config.def.h b/config.def.h
|
||||||
|
index 9009517..2a1a82e 100644
|
||||||
|
--- a/config.def.h
|
||||||
|
+++ b/config.def.h
|
||||||
|
@@ -124,6 +124,10 @@ static const Key keys[] = {
|
||||||
|
{ MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_Return, spawn, {.v = termcmd} },
|
||||||
|
{ MODKEY, XKB_KEY_j, focusstack, {.i = +1} },
|
||||||
|
{ MODKEY, XKB_KEY_k, focusstack, {.i = -1} },
|
||||||
|
+ { MODKEY|WLR_MODIFIER_CTRL, XKB_KEY_h, focusdir, {.ui = 0} },
|
||||||
|
+ { MODKEY|WLR_MODIFIER_CTRL, XKB_KEY_l, focusdir, {.ui = 1} },
|
||||||
|
+ { MODKEY|WLR_MODIFIER_CTRL, XKB_KEY_k, focusdir, {.ui = 2} },
|
||||||
|
+ { MODKEY|WLR_MODIFIER_CTRL, XKB_KEY_j, focusdir, {.ui = 3} },
|
||||||
|
{ MODKEY, XKB_KEY_i, incnmaster, {.i = +1} },
|
||||||
|
{ MODKEY, XKB_KEY_d, incnmaster, {.i = -1} },
|
||||||
|
{ MODKEY, XKB_KEY_h, setmfact, {.f = -0.05f} },
|
||||||
|
diff --git a/dwl.c b/dwl.c
|
||||||
|
index bf02a6d..64d5de7 100644
|
||||||
|
--- a/dwl.c
|
||||||
|
+++ b/dwl.c
|
||||||
|
@@ -268,6 +269,7 @@ static Monitor *dirtomon(enum wlr_direction dir);
|
||||||
|
static void focusclient(Client *c, int lift);
|
||||||
|
static void focusmon(const Arg *arg);
|
||||||
|
static void focusstack(const Arg *arg);
|
||||||
|
+static void focusdir(const Arg *arg);
|
||||||
|
static Client *focustop(Monitor *m);
|
||||||
|
static void fullscreennotify(struct wl_listener *listener, void *data);
|
||||||
|
static void handlesig(int signo);
|
||||||
|
@@ -1271,6 +1273,49 @@ focusstack(const Arg *arg)
|
||||||
|
focusclient(c, 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
+void focusdir(const Arg *arg)
|
||||||
|
+{
|
||||||
|
+ /* Focus the left, right, up, down client relative to the current focused client on selmon */
|
||||||
|
+ Client *c, *sel = focustop(selmon);
|
||||||
|
+ if (!sel || sel->isfullscreen)
|
||||||
|
+ return;
|
||||||
|
+
|
||||||
|
+ int dist=INT_MAX;
|
||||||
|
+ Client *newsel = NULL;
|
||||||
|
+ int newdist=INT_MAX;
|
||||||
|
+ wl_list_for_each(c, &clients, link) {
|
||||||
|
+ if (!VISIBLEON(c, selmon))
|
||||||
|
+ continue; /* skip non visible windows */
|
||||||
|
+
|
||||||
|
+ if (arg->ui == 0 && sel->geom.x <= c->geom.x) {
|
||||||
|
+ /* Client isn't on our left */
|
||||||
|
+ continue;
|
||||||
|
+ }
|
||||||
|
+ if (arg->ui == 1 && sel->geom.x >= c->geom.x) {
|
||||||
|
+ /* Client isn't on our right */
|
||||||
|
+ continue;
|
||||||
|
+ }
|
||||||
|
+ if (arg->ui == 2 && sel->geom.y <= c->geom.y) {
|
||||||
|
+ /* Client isn't above us */
|
||||||
|
+ continue;
|
||||||
|
+ }
|
||||||
|
+ if (arg->ui == 3 && sel->geom.y >= c->geom.y) {
|
||||||
|
+ /* Client isn't below us */
|
||||||
|
+ continue;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ dist=abs(sel->geom.x-c->geom.x)+abs(sel->geom.y-c->geom.y);
|
||||||
|
+ if (dist < newdist){
|
||||||
|
+ newdist = dist;
|
||||||
|
+ newsel=c;
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+ if (newsel != NULL){
|
||||||
|
+ focusclient(newsel, 1);
|
||||||
|
+ }
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+
|
||||||
|
/* We probably should change the name of this, it sounds like
|
||||||
|
* will focus the topmost client of this mon, when actually will
|
||||||
|
* only return that client */
|
||||||
|
--
|
||||||
|
2.43.0
|
||||||
|
|
||||||
@@ -0,0 +1,127 @@
|
|||||||
|
From 50e3dd4746b6cb719efb9f8213b94ac52a5320d9 Mon Sep 17 00:00:00 2001
|
||||||
|
From: peesock <kcormn@gmail.com>
|
||||||
|
Date: Mon, 24 Jun 2024 20:06:42 -0700
|
||||||
|
Subject: [PATCH] gaps!
|
||||||
|
|
||||||
|
Co-authored-by: sewn <sewn@disroot.org>
|
||||||
|
Co-authored-by: serenevoid <ajuph9224@gmail.com>
|
||||||
|
---
|
||||||
|
config.def.h | 4 ++++
|
||||||
|
dwl.c | 34 ++++++++++++++++++++++++++--------
|
||||||
|
2 files changed, 30 insertions(+), 8 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/config.def.h b/config.def.h
|
||||||
|
index 22d2171..b388b4e 100644
|
||||||
|
--- a/config.def.h
|
||||||
|
+++ b/config.def.h
|
||||||
|
@@ -6,6 +6,9 @@
|
||||||
|
/* appearance */
|
||||||
|
static const int sloppyfocus = 1; /* focus follows mouse */
|
||||||
|
static const int bypass_surface_visibility = 0; /* 1 means idle inhibitors will disable idle tracking even if it's surface isn't visible */
|
||||||
|
+static const int smartgaps = 0; /* 1 means no outer gap when there is only one window */
|
||||||
|
+static int gaps = 1; /* 1 means gaps between windows are added */
|
||||||
|
+static const unsigned int gappx = 10; /* gap pixel between windows */
|
||||||
|
static const unsigned int borderpx = 1; /* border pixel of windows */
|
||||||
|
static const float rootcolor[] = COLOR(0x222222ff);
|
||||||
|
static const float bordercolor[] = COLOR(0x444444ff);
|
||||||
|
@@ -135,6 +138,7 @@ static const Key keys[] = {
|
||||||
|
{ MODKEY, XKB_KEY_l, setmfact, {.f = +0.05f} },
|
||||||
|
{ MODKEY, XKB_KEY_Return, zoom, {0} },
|
||||||
|
{ MODKEY, XKB_KEY_Tab, view, {0} },
|
||||||
|
+ { MODKEY, XKB_KEY_g, togglegaps, {0} },
|
||||||
|
{ MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_C, killclient, {0} },
|
||||||
|
{ MODKEY, XKB_KEY_t, setlayout, {.v = &layouts[0]} },
|
||||||
|
{ MODKEY, XKB_KEY_f, setlayout, {.v = &layouts[1]} },
|
||||||
|
diff --git a/dwl.c b/dwl.c
|
||||||
|
index dc0437e..dc851df 100644
|
||||||
|
--- a/dwl.c
|
||||||
|
+++ b/dwl.c
|
||||||
|
@@ -199,6 +199,7 @@ struct Monitor {
|
||||||
|
struct wlr_box w; /* window area, layout-relative */
|
||||||
|
struct wl_list layers[4]; /* LayerSurface.link */
|
||||||
|
const Layout *lt[2];
|
||||||
|
+ int gaps;
|
||||||
|
unsigned int seltags;
|
||||||
|
unsigned int sellt;
|
||||||
|
uint32_t tagset[2];
|
||||||
|
@@ -336,6 +337,7 @@ static void tagmon(const Arg *arg);
|
||||||
|
static void tile(Monitor *m);
|
||||||
|
static void togglefloating(const Arg *arg);
|
||||||
|
static void togglefullscreen(const Arg *arg);
|
||||||
|
+static void togglegaps(const Arg *arg);
|
||||||
|
static void toggletag(const Arg *arg);
|
||||||
|
static void toggleview(const Arg *arg);
|
||||||
|
static void unlocksession(struct wl_listener *listener, void *data);
|
||||||
|
@@ -949,6 +951,8 @@ createmon(struct wl_listener *listener, void *data)
|
||||||
|
|
||||||
|
wlr_output_state_init(&state);
|
||||||
|
/* Initialize monitor state using configured rules */
|
||||||
|
+ m->gaps = gaps;
|
||||||
|
+
|
||||||
|
m->tagset[0] = m->tagset[1] = 1;
|
||||||
|
for (r = monrules; r < END(monrules); r++) {
|
||||||
|
if (!r->name || strstr(wlr_output->name, r->name)) {
|
||||||
|
@@ -2638,7 +2642,7 @@ tagmon(const Arg *arg)
|
||||||
|
void
|
||||||
|
tile(Monitor *m)
|
||||||
|
{
|
||||||
|
- unsigned int mw, my, ty;
|
||||||
|
+ unsigned int h, r, e = m->gaps, mw, my, ty;
|
||||||
|
int i, n = 0;
|
||||||
|
Client *c;
|
||||||
|
|
||||||
|
@@ -2647,23 +2651,30 @@ tile(Monitor *m)
|
||||||
|
n++;
|
||||||
|
if (n == 0)
|
||||||
|
return;
|
||||||
|
+ if (smartgaps == n)
|
||||||
|
+ e = 0;
|
||||||
|
|
||||||
|
if (n > m->nmaster)
|
||||||
|
- mw = m->nmaster ? (int)roundf(m->w.width * m->mfact) : 0;
|
||||||
|
+ mw = m->nmaster ? (int)roundf((m->w.width + gappx*e) * m->mfact) : 0;
|
||||||
|
else
|
||||||
|
mw = m->w.width;
|
||||||
|
- i = my = ty = 0;
|
||||||
|
+ i = 0;
|
||||||
|
+ my = ty = gappx*e;
|
||||||
|
wl_list_for_each(c, &clients, link) {
|
||||||
|
if (!VISIBLEON(c, m) || c->isfloating || c->isfullscreen)
|
||||||
|
continue;
|
||||||
|
if (i < m->nmaster) {
|
||||||
|
- resize(c, (struct wlr_box){.x = m->w.x, .y = m->w.y + my, .width = mw,
|
||||||
|
- .height = (m->w.height - my) / (MIN(n, m->nmaster) - i)}, 0);
|
||||||
|
- my += c->geom.height;
|
||||||
|
+ r = MIN(n, m->nmaster) - i;
|
||||||
|
+ h = (m->w.height - my - gappx*e - gappx*e * (r - 1)) / r;
|
||||||
|
+ resize(c, (struct wlr_box){.x = m->w.x + gappx*e, .y = m->w.y + my,
|
||||||
|
+ .width = mw - 2*gappx*e, .height = h}, 0);
|
||||||
|
+ my += c->geom.height + gappx*e;
|
||||||
|
} else {
|
||||||
|
+ r = n - i;
|
||||||
|
+ h = (m->w.height - ty - gappx*e - gappx*e * (r - 1)) / r;
|
||||||
|
resize(c, (struct wlr_box){.x = m->w.x + mw, .y = m->w.y + ty,
|
||||||
|
- .width = m->w.width - mw, .height = (m->w.height - ty) / (n - i)}, 0);
|
||||||
|
- ty += c->geom.height;
|
||||||
|
+ .width = m->w.width - mw - gappx*e, .height = h}, 0);
|
||||||
|
+ ty += c->geom.height + gappx*e;
|
||||||
|
}
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
@@ -2686,6 +2697,13 @@ togglefullscreen(const Arg *arg)
|
||||||
|
setfullscreen(sel, !sel->isfullscreen);
|
||||||
|
}
|
||||||
|
|
||||||
|
+void
|
||||||
|
+togglegaps(const Arg *arg)
|
||||||
|
+{
|
||||||
|
+ selmon->gaps = !selmon->gaps;
|
||||||
|
+ arrange(selmon);
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
void
|
||||||
|
toggletag(const Arg *arg)
|
||||||
|
{
|
||||||
|
--
|
||||||
|
2.45.2
|
||||||
|
|
||||||
@@ -0,0 +1,601 @@
|
|||||||
|
From 6c6d655b68770ce82a24fde9b58c4d97b672553a Mon Sep 17 00:00:00 2001
|
||||||
|
From: choc <notchoc@proton.me>
|
||||||
|
Date: Mon, 23 Oct 2023 10:35:17 +0800
|
||||||
|
Subject: [PATCH] implement dwl-ipc-unstable-v2
|
||||||
|
https://codeberg.org/dwl/dwl-patches/wiki/ipc
|
||||||
|
|
||||||
|
---
|
||||||
|
Makefile | 14 +-
|
||||||
|
config.def.h | 1 +
|
||||||
|
dwl.c | 261 ++++++++++++++++++++++++++----
|
||||||
|
protocols/dwl-ipc-unstable-v2.xml | 181 +++++++++++++++++++++
|
||||||
|
4 files changed, 419 insertions(+), 38 deletions(-)
|
||||||
|
create mode 100644 protocols/dwl-ipc-unstable-v2.xml
|
||||||
|
|
||||||
|
diff --git a/Makefile b/Makefile
|
||||||
|
index 3358bae..28ed034 100644
|
||||||
|
--- a/Makefile
|
||||||
|
+++ b/Makefile
|
||||||
|
@@ -17,12 +17,14 @@ DWLCFLAGS = `$(PKG_CONFIG) --cflags $(PKGS)` $(DWLCPPFLAGS) $(DWLDEVCFLAGS) $(CF
|
||||||
|
LDLIBS = `$(PKG_CONFIG) --libs $(PKGS)` -lm $(LIBS)
|
||||||
|
|
||||||
|
all: dwl
|
||||||
|
-dwl: dwl.o util.o
|
||||||
|
- $(CC) dwl.o util.o $(DWLCFLAGS) $(LDFLAGS) $(LDLIBS) -o $@
|
||||||
|
+dwl: dwl.o util.o dwl-ipc-unstable-v2-protocol.o
|
||||||
|
+ $(CC) dwl.o util.o dwl-ipc-unstable-v2-protocol.o $(DWLCFLAGS) $(LDFLAGS) $(LDLIBS) -o $@
|
||||||
|
dwl.o: dwl.c client.h config.h config.mk cursor-shape-v1-protocol.h \
|
||||||
|
pointer-constraints-unstable-v1-protocol.h wlr-layer-shell-unstable-v1-protocol.h \
|
||||||
|
- wlr-output-power-management-unstable-v1-protocol.h xdg-shell-protocol.h
|
||||||
|
+ wlr-output-power-management-unstable-v1-protocol.h xdg-shell-protocol.h \
|
||||||
|
+ dwl-ipc-unstable-v2-protocol.h
|
||||||
|
util.o: util.c util.h
|
||||||
|
+dwl-ipc-unstable-v2-protocol.o: dwl-ipc-unstable-v2-protocol.c dwl-ipc-unstable-v2-protocol.h
|
||||||
|
|
||||||
|
# wayland-scanner is a tool which generates C headers and rigging for Wayland
|
||||||
|
# protocols, which are specified in XML. wlroots requires you to rig these up
|
||||||
|
@@ -45,6 +47,12 @@ wlr-output-power-management-unstable-v1-protocol.h:
|
||||||
|
xdg-shell-protocol.h:
|
||||||
|
$(WAYLAND_SCANNER) server-header \
|
||||||
|
$(WAYLAND_PROTOCOLS)/stable/xdg-shell/xdg-shell.xml $@
|
||||||
|
+dwl-ipc-unstable-v2-protocol.h:
|
||||||
|
+ $(WAYLAND_SCANNER) server-header \
|
||||||
|
+ protocols/dwl-ipc-unstable-v2.xml $@
|
||||||
|
+dwl-ipc-unstable-v2-protocol.c:
|
||||||
|
+ $(WAYLAND_SCANNER) private-code \
|
||||||
|
+ protocols/dwl-ipc-unstable-v2.xml $@
|
||||||
|
|
||||||
|
config.h:
|
||||||
|
cp config.def.h $@
|
||||||
|
diff --git a/config.def.h b/config.def.h
|
||||||
|
index 22d2171..1593033 100644
|
||||||
|
--- a/config.def.h
|
||||||
|
+++ b/config.def.h
|
||||||
|
@@ -127,6 +127,7 @@ static const Key keys[] = {
|
||||||
|
/* modifier key function argument */
|
||||||
|
{ MODKEY, XKB_KEY_p, spawn, {.v = menucmd} },
|
||||||
|
{ MODKEY|WLR_MODIFIER_SHIFT, XKB_KEY_Return, spawn, {.v = termcmd} },
|
||||||
|
+ { MODKEY, XKB_KEY_b, togglebar, {0} },
|
||||||
|
{ MODKEY, XKB_KEY_j, focusstack, {.i = +1} },
|
||||||
|
{ MODKEY, XKB_KEY_k, focusstack, {.i = -1} },
|
||||||
|
{ MODKEY, XKB_KEY_i, incnmaster, {.i = +1} },
|
||||||
|
diff --git a/dwl.c b/dwl.c
|
||||||
|
index a2711f6..d9b8bae 100644
|
||||||
|
--- a/dwl.c
|
||||||
|
+++ b/dwl.c
|
||||||
|
@@ -67,6 +67,7 @@
|
||||||
|
#include <xcb/xcb_icccm.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
+#include "dwl-ipc-unstable-v2-protocol.h"
|
||||||
|
#include "util.h"
|
||||||
|
|
||||||
|
/* macros */
|
||||||
|
@@ -143,6 +144,12 @@ typedef struct {
|
||||||
|
uint32_t resize; /* configure serial of a pending resize */
|
||||||
|
} Client;
|
||||||
|
|
||||||
|
+typedef struct {
|
||||||
|
+ struct wl_list link;
|
||||||
|
+ struct wl_resource *resource;
|
||||||
|
+ Monitor *mon;
|
||||||
|
+} DwlIpcOutput;
|
||||||
|
+
|
||||||
|
typedef struct {
|
||||||
|
uint32_t mod;
|
||||||
|
xkb_keysym_t keysym;
|
||||||
|
@@ -188,6 +195,7 @@ typedef struct {
|
||||||
|
|
||||||
|
struct Monitor {
|
||||||
|
struct wl_list link;
|
||||||
|
+ struct wl_list dwl_ipc_outputs;
|
||||||
|
struct wlr_output *wlr_output;
|
||||||
|
struct wlr_scene_output *scene_output;
|
||||||
|
struct wlr_scene_rect *fullscreen_bg; /* See createmon() for info */
|
||||||
|
@@ -285,6 +293,17 @@ static void destroysessionlock(struct wl_listener *listener, void *data);
|
||||||
|
static void destroysessionmgr(struct wl_listener *listener, void *data);
|
||||||
|
static void destroykeyboardgroup(struct wl_listener *listener, void *data);
|
||||||
|
static Monitor *dirtomon(enum wlr_direction dir);
|
||||||
|
+static void dwl_ipc_manager_bind(struct wl_client *client, void *data, uint32_t version, uint32_t id);
|
||||||
|
+static void dwl_ipc_manager_destroy(struct wl_resource *resource);
|
||||||
|
+static void dwl_ipc_manager_get_output(struct wl_client *client, struct wl_resource *resource, uint32_t id, struct wl_resource *output);
|
||||||
|
+static void dwl_ipc_manager_release(struct wl_client *client, struct wl_resource *resource);
|
||||||
|
+static void dwl_ipc_output_destroy(struct wl_resource *resource);
|
||||||
|
+static void dwl_ipc_output_printstatus(Monitor *monitor);
|
||||||
|
+static void dwl_ipc_output_printstatus_to(DwlIpcOutput *ipc_output);
|
||||||
|
+static void dwl_ipc_output_set_client_tags(struct wl_client *client, struct wl_resource *resource, uint32_t and_tags, uint32_t xor_tags);
|
||||||
|
+static void dwl_ipc_output_set_layout(struct wl_client *client, struct wl_resource *resource, uint32_t index);
|
||||||
|
+static void dwl_ipc_output_set_tags(struct wl_client *client, struct wl_resource *resource, uint32_t tagmask, uint32_t toggle_tagset);
|
||||||
|
+static void dwl_ipc_output_release(struct wl_client *client, struct wl_resource *resource);
|
||||||
|
static void focusclient(Client *c, int lift);
|
||||||
|
static void focusmon(const Arg *arg);
|
||||||
|
static void focusstack(const Arg *arg);
|
||||||
|
@@ -338,6 +357,7 @@ static void startdrag(struct wl_listener *listener, void *data);
|
||||||
|
static void tag(const Arg *arg);
|
||||||
|
static void tagmon(const Arg *arg);
|
||||||
|
static void tile(Monitor *m);
|
||||||
|
+static void togglebar(const Arg *arg);
|
||||||
|
static void togglefloating(const Arg *arg);
|
||||||
|
static void togglefullscreen(const Arg *arg);
|
||||||
|
static void toggletag(const Arg *arg);
|
||||||
|
@@ -413,6 +433,9 @@ static struct wlr_box sgeom;
|
||||||
|
static struct wl_list mons;
|
||||||
|
static Monitor *selmon;
|
||||||
|
|
||||||
|
+static struct zdwl_ipc_manager_v2_interface dwl_manager_implementation = {.release = dwl_ipc_manager_release, .get_output = dwl_ipc_manager_get_output};
|
||||||
|
+static struct zdwl_ipc_output_v2_interface dwl_output_implementation = {.release = dwl_ipc_output_release, .set_tags = dwl_ipc_output_set_tags, .set_layout = dwl_ipc_output_set_layout, .set_client_tags = dwl_ipc_output_set_client_tags};
|
||||||
|
+
|
||||||
|
#ifdef XWAYLAND
|
||||||
|
static void activatex11(struct wl_listener *listener, void *data);
|
||||||
|
static void associatex11(struct wl_listener *listener, void *data);
|
||||||
|
@@ -706,6 +729,10 @@ cleanupmon(struct wl_listener *listener, void *data)
|
||||||
|
LayerSurface *l, *tmp;
|
||||||
|
size_t i;
|
||||||
|
|
||||||
|
+ DwlIpcOutput *ipc_output, *ipc_output_tmp;
|
||||||
|
+ wl_list_for_each_safe(ipc_output, ipc_output_tmp, &m->dwl_ipc_outputs, link)
|
||||||
|
+ wl_resource_destroy(ipc_output->resource);
|
||||||
|
+
|
||||||
|
/* m->layers[i] are intentionally not unlinked */
|
||||||
|
for (i = 0; i < LENGTH(m->layers); i++) {
|
||||||
|
wl_list_for_each_safe(l, tmp, &m->layers[i], link)
|
||||||
|
@@ -986,6 +1013,8 @@ createmon(struct wl_listener *listener, void *data)
|
||||||
|
m = wlr_output->data = ecalloc(1, sizeof(*m));
|
||||||
|
m->wlr_output = wlr_output;
|
||||||
|
|
||||||
|
+ wl_list_init(&m->dwl_ipc_outputs);
|
||||||
|
+
|
||||||
|
for (i = 0; i < LENGTH(m->layers); i++)
|
||||||
|
wl_list_init(&m->layers[i]);
|
||||||
|
|
||||||
|
@@ -1336,6 +1365,192 @@ dirtomon(enum wlr_direction dir)
|
||||||
|
return selmon;
|
||||||
|
}
|
||||||
|
|
||||||
|
+void
|
||||||
|
+dwl_ipc_manager_bind(struct wl_client *client, void *data, uint32_t version, uint32_t id)
|
||||||
|
+{
|
||||||
|
+ struct wl_resource *manager_resource = wl_resource_create(client, &zdwl_ipc_manager_v2_interface, version, id);
|
||||||
|
+ if (!manager_resource) {
|
||||||
|
+ wl_client_post_no_memory(client);
|
||||||
|
+ return;
|
||||||
|
+ }
|
||||||
|
+ wl_resource_set_implementation(manager_resource, &dwl_manager_implementation, NULL, dwl_ipc_manager_destroy);
|
||||||
|
+
|
||||||
|
+ zdwl_ipc_manager_v2_send_tags(manager_resource, TAGCOUNT);
|
||||||
|
+
|
||||||
|
+ for (unsigned int i = 0; i < LENGTH(layouts); i++)
|
||||||
|
+ zdwl_ipc_manager_v2_send_layout(manager_resource, layouts[i].symbol);
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+void
|
||||||
|
+dwl_ipc_manager_destroy(struct wl_resource *resource)
|
||||||
|
+{
|
||||||
|
+ /* No state to destroy */
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+void
|
||||||
|
+dwl_ipc_manager_get_output(struct wl_client *client, struct wl_resource *resource, uint32_t id, struct wl_resource *output)
|
||||||
|
+{
|
||||||
|
+ DwlIpcOutput *ipc_output;
|
||||||
|
+ Monitor *monitor = wlr_output_from_resource(output)->data;
|
||||||
|
+ struct wl_resource *output_resource = wl_resource_create(client, &zdwl_ipc_output_v2_interface, wl_resource_get_version(resource), id);
|
||||||
|
+ if (!output_resource)
|
||||||
|
+ return;
|
||||||
|
+
|
||||||
|
+ ipc_output = ecalloc(1, sizeof(*ipc_output));
|
||||||
|
+ ipc_output->resource = output_resource;
|
||||||
|
+ ipc_output->mon = monitor;
|
||||||
|
+ wl_resource_set_implementation(output_resource, &dwl_output_implementation, ipc_output, dwl_ipc_output_destroy);
|
||||||
|
+ wl_list_insert(&monitor->dwl_ipc_outputs, &ipc_output->link);
|
||||||
|
+ dwl_ipc_output_printstatus_to(ipc_output);
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+void
|
||||||
|
+dwl_ipc_manager_release(struct wl_client *client, struct wl_resource *resource)
|
||||||
|
+{
|
||||||
|
+ wl_resource_destroy(resource);
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+static void
|
||||||
|
+dwl_ipc_output_destroy(struct wl_resource *resource)
|
||||||
|
+{
|
||||||
|
+ DwlIpcOutput *ipc_output = wl_resource_get_user_data(resource);
|
||||||
|
+ wl_list_remove(&ipc_output->link);
|
||||||
|
+ free(ipc_output);
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+void
|
||||||
|
+dwl_ipc_output_printstatus(Monitor *monitor)
|
||||||
|
+{
|
||||||
|
+ DwlIpcOutput *ipc_output;
|
||||||
|
+ wl_list_for_each(ipc_output, &monitor->dwl_ipc_outputs, link)
|
||||||
|
+ dwl_ipc_output_printstatus_to(ipc_output);
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+void
|
||||||
|
+dwl_ipc_output_printstatus_to(DwlIpcOutput *ipc_output)
|
||||||
|
+{
|
||||||
|
+ Monitor *monitor = ipc_output->mon;
|
||||||
|
+ Client *c, *focused;
|
||||||
|
+ int tagmask, state, numclients, focused_client, tag;
|
||||||
|
+ const char *title, *appid;
|
||||||
|
+ focused = focustop(monitor);
|
||||||
|
+ zdwl_ipc_output_v2_send_active(ipc_output->resource, monitor == selmon);
|
||||||
|
+
|
||||||
|
+ for (tag = 0 ; tag < TAGCOUNT; tag++) {
|
||||||
|
+ numclients = state = focused_client = 0;
|
||||||
|
+ tagmask = 1 << tag;
|
||||||
|
+ if ((tagmask & monitor->tagset[monitor->seltags]) != 0)
|
||||||
|
+ state |= ZDWL_IPC_OUTPUT_V2_TAG_STATE_ACTIVE;
|
||||||
|
+
|
||||||
|
+ wl_list_for_each(c, &clients, link) {
|
||||||
|
+ if (c->mon != monitor)
|
||||||
|
+ continue;
|
||||||
|
+ if (!(c->tags & tagmask))
|
||||||
|
+ continue;
|
||||||
|
+ if (c == focused)
|
||||||
|
+ focused_client = 1;
|
||||||
|
+ if (c->isurgent)
|
||||||
|
+ state |= ZDWL_IPC_OUTPUT_V2_TAG_STATE_URGENT;
|
||||||
|
+
|
||||||
|
+ numclients++;
|
||||||
|
+ }
|
||||||
|
+ zdwl_ipc_output_v2_send_tag(ipc_output->resource, tag, state, numclients, focused_client);
|
||||||
|
+ }
|
||||||
|
+ title = focused ? client_get_title(focused) : "";
|
||||||
|
+ appid = focused ? client_get_appid(focused) : "";
|
||||||
|
+
|
||||||
|
+ zdwl_ipc_output_v2_send_layout(ipc_output->resource, monitor->lt[monitor->sellt] - layouts);
|
||||||
|
+ zdwl_ipc_output_v2_send_title(ipc_output->resource, title);
|
||||||
|
+ zdwl_ipc_output_v2_send_appid(ipc_output->resource, appid);
|
||||||
|
+ zdwl_ipc_output_v2_send_layout_symbol(ipc_output->resource, monitor->ltsymbol);
|
||||||
|
+ if (wl_resource_get_version(ipc_output->resource) >= ZDWL_IPC_OUTPUT_V2_FULLSCREEN_SINCE_VERSION) {
|
||||||
|
+ zdwl_ipc_output_v2_send_fullscreen(ipc_output->resource, focused ? focused->isfullscreen : 0);
|
||||||
|
+ }
|
||||||
|
+ if (wl_resource_get_version(ipc_output->resource) >= ZDWL_IPC_OUTPUT_V2_FLOATING_SINCE_VERSION) {
|
||||||
|
+ zdwl_ipc_output_v2_send_floating(ipc_output->resource, focused ? focused->isfloating : 0);
|
||||||
|
+ }
|
||||||
|
+ zdwl_ipc_output_v2_send_frame(ipc_output->resource);
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+void
|
||||||
|
+dwl_ipc_output_set_client_tags(struct wl_client *client, struct wl_resource *resource, uint32_t and_tags, uint32_t xor_tags)
|
||||||
|
+{
|
||||||
|
+ DwlIpcOutput *ipc_output;
|
||||||
|
+ Monitor *monitor;
|
||||||
|
+ Client *selected_client;
|
||||||
|
+ unsigned int newtags = 0;
|
||||||
|
+
|
||||||
|
+ ipc_output = wl_resource_get_user_data(resource);
|
||||||
|
+ if (!ipc_output)
|
||||||
|
+ return;
|
||||||
|
+
|
||||||
|
+ monitor = ipc_output->mon;
|
||||||
|
+ selected_client = focustop(monitor);
|
||||||
|
+ if (!selected_client)
|
||||||
|
+ return;
|
||||||
|
+
|
||||||
|
+ newtags = (selected_client->tags & and_tags) ^ xor_tags;
|
||||||
|
+ if (!newtags)
|
||||||
|
+ return;
|
||||||
|
+
|
||||||
|
+ selected_client->tags = newtags;
|
||||||
|
+ if (selmon == monitor)
|
||||||
|
+ focusclient(focustop(monitor), 1);
|
||||||
|
+ arrange(selmon);
|
||||||
|
+ printstatus();
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+void
|
||||||
|
+dwl_ipc_output_set_layout(struct wl_client *client, struct wl_resource *resource, uint32_t index)
|
||||||
|
+{
|
||||||
|
+ DwlIpcOutput *ipc_output;
|
||||||
|
+ Monitor *monitor;
|
||||||
|
+
|
||||||
|
+ ipc_output = wl_resource_get_user_data(resource);
|
||||||
|
+ if (!ipc_output)
|
||||||
|
+ return;
|
||||||
|
+
|
||||||
|
+ monitor = ipc_output->mon;
|
||||||
|
+ if (index >= LENGTH(layouts))
|
||||||
|
+ return;
|
||||||
|
+ if (index != monitor->lt[monitor->sellt] - layouts)
|
||||||
|
+ monitor->sellt ^= 1;
|
||||||
|
+
|
||||||
|
+ monitor->lt[monitor->sellt] = &layouts[index];
|
||||||
|
+ arrange(monitor);
|
||||||
|
+ printstatus();
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+void
|
||||||
|
+dwl_ipc_output_set_tags(struct wl_client *client, struct wl_resource *resource, uint32_t tagmask, uint32_t toggle_tagset)
|
||||||
|
+{
|
||||||
|
+ DwlIpcOutput *ipc_output;
|
||||||
|
+ Monitor *monitor;
|
||||||
|
+ unsigned int newtags = tagmask & TAGMASK;
|
||||||
|
+
|
||||||
|
+ ipc_output = wl_resource_get_user_data(resource);
|
||||||
|
+ if (!ipc_output)
|
||||||
|
+ return;
|
||||||
|
+ monitor = ipc_output->mon;
|
||||||
|
+
|
||||||
|
+ if (!newtags || newtags == monitor->tagset[monitor->seltags])
|
||||||
|
+ return;
|
||||||
|
+ if (toggle_tagset)
|
||||||
|
+ monitor->seltags ^= 1;
|
||||||
|
+
|
||||||
|
+ monitor->tagset[monitor->seltags] = newtags;
|
||||||
|
+ if (selmon == monitor)
|
||||||
|
+ focusclient(focustop(monitor), 1);
|
||||||
|
+ arrange(monitor);
|
||||||
|
+ printstatus();
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+void
|
||||||
|
+dwl_ipc_output_release(struct wl_client *client, struct wl_resource *resource)
|
||||||
|
+{
|
||||||
|
+ wl_resource_destroy(resource);
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
void
|
||||||
|
focusclient(Client *c, int lift)
|
||||||
|
{
|
||||||
|
@@ -2036,41 +2251,8 @@ void
|
||||||
|
printstatus(void)
|
||||||
|
{
|
||||||
|
Monitor *m = NULL;
|
||||||
|
- Client *c;
|
||||||
|
- uint32_t occ, urg, sel;
|
||||||
|
- const char *appid, *title;
|
||||||
|
-
|
||||||
|
- wl_list_for_each(m, &mons, link) {
|
||||||
|
- occ = urg = 0;
|
||||||
|
- wl_list_for_each(c, &clients, link) {
|
||||||
|
- if (c->mon != m)
|
||||||
|
- continue;
|
||||||
|
- occ |= c->tags;
|
||||||
|
- if (c->isurgent)
|
||||||
|
- urg |= c->tags;
|
||||||
|
- }
|
||||||
|
- if ((c = focustop(m))) {
|
||||||
|
- title = client_get_title(c);
|
||||||
|
- appid = client_get_appid(c);
|
||||||
|
- printf("%s title %s\n", m->wlr_output->name, title ? title : broken);
|
||||||
|
- printf("%s appid %s\n", m->wlr_output->name, appid ? appid : broken);
|
||||||
|
- printf("%s fullscreen %d\n", m->wlr_output->name, c->isfullscreen);
|
||||||
|
- printf("%s floating %d\n", m->wlr_output->name, c->isfloating);
|
||||||
|
- sel = c->tags;
|
||||||
|
- } else {
|
||||||
|
- printf("%s title \n", m->wlr_output->name);
|
||||||
|
- printf("%s appid \n", m->wlr_output->name);
|
||||||
|
- printf("%s fullscreen \n", m->wlr_output->name);
|
||||||
|
- printf("%s floating \n", m->wlr_output->name);
|
||||||
|
- sel = 0;
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
- printf("%s selmon %u\n", m->wlr_output->name, m == selmon);
|
||||||
|
- printf("%s tags %"PRIu32" %"PRIu32" %"PRIu32" %"PRIu32"\n",
|
||||||
|
- m->wlr_output->name, occ, m->tagset[m->seltags], sel, urg);
|
||||||
|
- printf("%s layout %s\n", m->wlr_output->name, m->ltsymbol);
|
||||||
|
- }
|
||||||
|
- fflush(stdout);
|
||||||
|
+ wl_list_for_each(m, &mons, link)
|
||||||
|
+ dwl_ipc_output_printstatus(m);
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
@@ -2625,6 +2807,8 @@ setup(void)
|
||||||
|
LISTEN_STATIC(&output_mgr->events.apply, outputmgrapply);
|
||||||
|
LISTEN_STATIC(&output_mgr->events.test, outputmgrtest);
|
||||||
|
|
||||||
|
+ wl_global_create(dpy, &zdwl_ipc_manager_v2_interface, 2, NULL, dwl_ipc_manager_bind);
|
||||||
|
+
|
||||||
|
/* Make sure XWayland clients don't connect to the parent X server,
|
||||||
|
* e.g when running in the x11 backend or the wayland backend and the
|
||||||
|
* compositor has Xwayland support */
|
||||||
|
@@ -2722,6 +2906,13 @@ tile(Monitor *m)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
+void
|
||||||
|
+togglebar(const Arg *arg) {
|
||||||
|
+ DwlIpcOutput *ipc_output;
|
||||||
|
+ wl_list_for_each(ipc_output, &selmon->dwl_ipc_outputs, link)
|
||||||
|
+ zdwl_ipc_output_v2_send_toggle_visibility(ipc_output->resource);
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
void
|
||||||
|
togglefloating(const Arg *arg)
|
||||||
|
{
|
||||||
|
diff --git a/protocols/dwl-ipc-unstable-v2.xml b/protocols/dwl-ipc-unstable-v2.xml
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000..0a6e7e5
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/protocols/dwl-ipc-unstable-v2.xml
|
||||||
|
@@ -0,0 +1,181 @@
|
||||||
|
+<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
+<!--
|
||||||
|
+This is largely ripped from somebar's ipc patchset; just with some personal modifications.
|
||||||
|
+I would probably just submit raphi's patchset but I don't think that would be polite.
|
||||||
|
+-->
|
||||||
|
+<protocol name="dwl_ipc_unstable_v2">
|
||||||
|
+ <description summary="inter-proccess-communication about dwl's state">
|
||||||
|
+ This protocol allows clients to update and get updates from dwl.
|
||||||
|
+
|
||||||
|
+ Warning! The protocol described in this file is experimental and
|
||||||
|
+ backward incompatible changes may be made. Backward compatible
|
||||||
|
+ changes may be added together with the corresponding interface
|
||||||
|
+ version bump.
|
||||||
|
+ Backward incompatible changes are done by bumping the version
|
||||||
|
+ number in the protocol and interface names and resetting the
|
||||||
|
+ interface version. Once the protocol is to be declared stable,
|
||||||
|
+ the 'z' prefix and the version number in the protocol and
|
||||||
|
+ interface names are removed and the interface version number is
|
||||||
|
+ reset.
|
||||||
|
+ </description>
|
||||||
|
+
|
||||||
|
+ <interface name="zdwl_ipc_manager_v2" version="2">
|
||||||
|
+ <description summary="manage dwl state">
|
||||||
|
+ This interface is exposed as a global in wl_registry.
|
||||||
|
+
|
||||||
|
+ Clients can use this interface to get a dwl_ipc_output.
|
||||||
|
+ After binding the client will recieve the dwl_ipc_manager.tags and dwl_ipc_manager.layout events.
|
||||||
|
+ The dwl_ipc_manager.tags and dwl_ipc_manager.layout events expose tags and layouts to the client.
|
||||||
|
+ </description>
|
||||||
|
+
|
||||||
|
+ <request name="release" type="destructor">
|
||||||
|
+ <description summary="release dwl_ipc_manager">
|
||||||
|
+ Indicates that the client will not the dwl_ipc_manager object anymore.
|
||||||
|
+ Objects created through this instance are not affected.
|
||||||
|
+ </description>
|
||||||
|
+ </request>
|
||||||
|
+
|
||||||
|
+ <request name="get_output">
|
||||||
|
+ <description summary="get a dwl_ipc_outout for a wl_output">
|
||||||
|
+ Get a dwl_ipc_outout for the specified wl_output.
|
||||||
|
+ </description>
|
||||||
|
+ <arg name="id" type="new_id" interface="zdwl_ipc_output_v2"/>
|
||||||
|
+ <arg name="output" type="object" interface="wl_output"/>
|
||||||
|
+ </request>
|
||||||
|
+
|
||||||
|
+ <event name="tags">
|
||||||
|
+ <description summary="Announces tag amount">
|
||||||
|
+ This event is sent after binding.
|
||||||
|
+ A roundtrip after binding guarantees the client recieved all tags.
|
||||||
|
+ </description>
|
||||||
|
+ <arg name="amount" type="uint"/>
|
||||||
|
+ </event>
|
||||||
|
+
|
||||||
|
+ <event name="layout">
|
||||||
|
+ <description summary="Announces a layout">
|
||||||
|
+ This event is sent after binding.
|
||||||
|
+ A roundtrip after binding guarantees the client recieved all layouts.
|
||||||
|
+ </description>
|
||||||
|
+ <arg name="name" type="string"/>
|
||||||
|
+ </event>
|
||||||
|
+ </interface>
|
||||||
|
+
|
||||||
|
+ <interface name="zdwl_ipc_output_v2" version="2">
|
||||||
|
+ <description summary="control dwl output">
|
||||||
|
+ Observe and control a dwl output.
|
||||||
|
+
|
||||||
|
+ Events are double-buffered:
|
||||||
|
+ Clients should cache events and redraw when a dwl_ipc_output.frame event is sent.
|
||||||
|
+
|
||||||
|
+ Request are not double-buffered:
|
||||||
|
+ The compositor will update immediately upon request.
|
||||||
|
+ </description>
|
||||||
|
+
|
||||||
|
+ <enum name="tag_state">
|
||||||
|
+ <entry name="none" value="0" summary="no state"/>
|
||||||
|
+ <entry name="active" value="1" summary="tag is active"/>
|
||||||
|
+ <entry name="urgent" value="2" summary="tag has at least one urgent client"/>
|
||||||
|
+ </enum>
|
||||||
|
+
|
||||||
|
+ <request name="release" type="destructor">
|
||||||
|
+ <description summary="release dwl_ipc_outout">
|
||||||
|
+ Indicates to that the client no longer needs this dwl_ipc_output.
|
||||||
|
+ </description>
|
||||||
|
+ </request>
|
||||||
|
+
|
||||||
|
+ <event name="toggle_visibility">
|
||||||
|
+ <description summary="Toggle client visibilty">
|
||||||
|
+ Indicates the client should hide or show themselves.
|
||||||
|
+ If the client is visible then hide, if hidden then show.
|
||||||
|
+ </description>
|
||||||
|
+ </event>
|
||||||
|
+
|
||||||
|
+ <event name="active">
|
||||||
|
+ <description summary="Update the selected output.">
|
||||||
|
+ Indicates if the output is active. Zero is invalid, nonzero is valid.
|
||||||
|
+ </description>
|
||||||
|
+ <arg name="active" type="uint"/>
|
||||||
|
+ </event>
|
||||||
|
+
|
||||||
|
+ <event name="tag">
|
||||||
|
+ <description summary="Update the state of a tag.">
|
||||||
|
+ Indicates that a tag has been updated.
|
||||||
|
+ </description>
|
||||||
|
+ <arg name="tag" type="uint" summary="Index of the tag"/>
|
||||||
|
+ <arg name="state" type="uint" enum="tag_state" summary="The state of the tag."/>
|
||||||
|
+ <arg name="clients" type="uint" summary="The number of clients in the tag."/>
|
||||||
|
+ <arg name="focused" type="uint" summary="If there is a focused client. Nonzero being valid, zero being invalid."/>
|
||||||
|
+ </event>
|
||||||
|
+
|
||||||
|
+ <event name="layout">
|
||||||
|
+ <description summary="Update the layout.">
|
||||||
|
+ Indicates a new layout is selected.
|
||||||
|
+ </description>
|
||||||
|
+ <arg name="layout" type="uint" summary="Index of the layout."/>
|
||||||
|
+ </event>
|
||||||
|
+
|
||||||
|
+ <event name="title">
|
||||||
|
+ <description summary="Update the title.">
|
||||||
|
+ Indicates the title has changed.
|
||||||
|
+ </description>
|
||||||
|
+ <arg name="title" type="string" summary="The new title name."/>
|
||||||
|
+ </event>
|
||||||
|
+
|
||||||
|
+ <event name="appid" since="1">
|
||||||
|
+ <description summary="Update the appid.">
|
||||||
|
+ Indicates the appid has changed.
|
||||||
|
+ </description>
|
||||||
|
+ <arg name="appid" type="string" summary="The new appid."/>
|
||||||
|
+ </event>
|
||||||
|
+
|
||||||
|
+ <event name="layout_symbol" since="1">
|
||||||
|
+ <description summary="Update the current layout symbol">
|
||||||
|
+ Indicates the layout has changed. Since layout symbols are dynamic.
|
||||||
|
+ As opposed to the zdwl_ipc_manager.layout event, this should take precendence when displaying.
|
||||||
|
+ You can ignore the zdwl_ipc_output.layout event.
|
||||||
|
+ </description>
|
||||||
|
+ <arg name="layout" type="string" summary="The new layout"/>
|
||||||
|
+ </event>
|
||||||
|
+
|
||||||
|
+ <event name="frame">
|
||||||
|
+ <description summary="The update sequence is done.">
|
||||||
|
+ Indicates that a sequence of status updates have finished and the client should redraw.
|
||||||
|
+ </description>
|
||||||
|
+ </event>
|
||||||
|
+
|
||||||
|
+ <request name="set_tags">
|
||||||
|
+ <description summary="Set the active tags of this output"/>
|
||||||
|
+ <arg name="tagmask" type="uint" summary="bitmask of the tags that should be set."/>
|
||||||
|
+ <arg name="toggle_tagset" type="uint" summary="toggle the selected tagset, zero for invalid, nonzero for valid."/>
|
||||||
|
+ </request>
|
||||||
|
+
|
||||||
|
+ <request name="set_client_tags">
|
||||||
|
+ <description summary="Set the tags of the focused client.">
|
||||||
|
+ The tags are updated as follows:
|
||||||
|
+ new_tags = (current_tags AND and_tags) XOR xor_tags
|
||||||
|
+ </description>
|
||||||
|
+ <arg name="and_tags" type="uint"/>
|
||||||
|
+ <arg name="xor_tags" type="uint"/>
|
||||||
|
+ </request>
|
||||||
|
+
|
||||||
|
+ <request name="set_layout">
|
||||||
|
+ <description summary="Set the layout of this output"/>
|
||||||
|
+ <arg name="index" type="uint" summary="index of a layout recieved by dwl_ipc_manager.layout"/>
|
||||||
|
+ </request>
|
||||||
|
+
|
||||||
|
+ <!-- Version 2 -->
|
||||||
|
+ <event name="fullscreen" since="2">
|
||||||
|
+ <description summary="Update fullscreen status">
|
||||||
|
+ Indicates if the selected client on this output is fullscreen.
|
||||||
|
+ </description>
|
||||||
|
+ <arg name="is_fullscreen" type="uint" summary="If the selected client is fullscreen. Nonzero is valid, zero invalid"/>
|
||||||
|
+ </event>
|
||||||
|
+
|
||||||
|
+ <event name="floating" since="2">
|
||||||
|
+ <description summary="Update the floating status">
|
||||||
|
+ Indicates if the selected client on this output is floating.
|
||||||
|
+ </description>
|
||||||
|
+ <arg name="is_floating" type="uint" summary="If the selected client is floating. Nonzero is valid, zero invalid"/>
|
||||||
|
+ </event>
|
||||||
|
+ </interface>
|
||||||
|
+</protocol>
|
||||||
|
--
|
||||||
|
2.51.2
|
||||||
|
|
||||||
|
|
||||||
@@ -0,0 +1,95 @@
|
|||||||
|
From 73f70cd9d817a307030f360f6c8a2500046b8b76 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Palanix <palanixyt@gmail.com>
|
||||||
|
Date: Mon, 4 Apr 2022 16:08:29 +0200
|
||||||
|
Subject: [PATCH] Updated patch now allowing setting x and y
|
||||||
|
MIME-Version: 1.0
|
||||||
|
Content-Type: text/plain; charset=UTF-8
|
||||||
|
Content-Transfer-Encoding: 8bit
|
||||||
|
|
||||||
|
Co-authored-by: Leonardo Hernández Hernández <leohdz172@proton.me>
|
||||||
|
---
|
||||||
|
config.def.h | 11 +++++++----
|
||||||
|
dwl.c | 25 +++++++++++++++++++------
|
||||||
|
2 files changed, 26 insertions(+), 10 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/config.def.h b/config.def.h
|
||||||
|
index 8f498d2..4ccacd2 100644
|
||||||
|
--- a/config.def.h
|
||||||
|
+++ b/config.def.h
|
||||||
|
@@ -38,12 +38,15 @@ static const Layout layouts[] = {
|
||||||
|
/* monitors */
|
||||||
|
/* NOTE: ALWAYS add a fallback rule, even if you are completely sure it won't be used */
|
||||||
|
static const MonitorRule monrules[] = {
|
||||||
|
- /* name mfact nmaster scale layout rotate/reflect x y */
|
||||||
|
- /* example of a HiDPI laptop monitor:
|
||||||
|
- { "eDP-1", 0.5f, 1, 2, &layouts[0], WL_OUTPUT_TRANSFORM_NORMAL, -1, -1 },
|
||||||
|
+ /* name mfact nmaster scale layout rotate/reflect x y resx resy rate mode adaptive*/
|
||||||
|
+ /* example of a HiDPI laptop monitor at 120Hz:
|
||||||
|
+ { "eDP-1", 0.5f, 1, 2, &layouts[0], WL_OUTPUT_TRANSFORM_NORMAL, 0, 0, 0, 0, 120.000f, 1, 1},
|
||||||
|
+ * mode let's the user decide on how dwl should implement the modes:
|
||||||
|
+ * -1 Sets a custom mode following the users choice
|
||||||
|
+ * All other number's set the mode at the index n, 0 is the standard mode; see wlr-randr
|
||||||
|
*/
|
||||||
|
/* defaults */
|
||||||
|
- { NULL, 0.55f, 1, 1, &layouts[0], WL_OUTPUT_TRANSFORM_NORMAL, -1, -1 },
|
||||||
|
+ { NULL, 0.55f, 1, 1, &layouts[0], WL_OUTPUT_TRANSFORM_NORMAL, -1, -1, 0, 0, 0.0f, 0 ,1},
|
||||||
|
};
|
||||||
|
|
||||||
|
/* keyboard */
|
||||||
|
diff --git a/dwl.c b/dwl.c
|
||||||
|
index 52bfbc8..9609b6d 100644
|
||||||
|
--- a/dwl.c
|
||||||
|
+++ b/dwl.c
|
||||||
|
@@ -215,6 +215,11 @@ typedef struct {
|
||||||
|
const Layout *lt;
|
||||||
|
enum wl_output_transform rr;
|
||||||
|
int x, y;
|
||||||
|
+ int resx;
|
||||||
|
+ int resy;
|
||||||
|
+ float rate;
|
||||||
|
+ int mode;
|
||||||
|
+ int adaptive;
|
||||||
|
} MonitorRule;
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
@@ -865,6 +870,7 @@ createmon(struct wl_listener *listener, void *data)
|
||||||
|
/* This event is raised by the backend when a new output (aka a display or
|
||||||
|
* monitor) becomes available. */
|
||||||
|
struct wlr_output *wlr_output = data;
|
||||||
|
+ struct wlr_output_mode *mode = wl_container_of(wlr_output->modes.next, mode, link);
|
||||||
|
const MonitorRule *r;
|
||||||
|
size_t i;
|
||||||
|
struct wlr_output_state state;
|
||||||
|
@@ -893,16 +899,23 @@ createmon(struct wl_listener *listener, void *data)
|
||||||
|
strncpy(m->ltsymbol, m->lt[m->sellt]->symbol, LENGTH(m->ltsymbol));
|
||||||
|
wlr_output_state_set_scale(&state, r->scale);
|
||||||
|
wlr_output_state_set_transform(&state, r->rr);
|
||||||
|
+
|
||||||
|
+ wlr_output_state_set_adaptive_sync_enabled(&state, r->adaptive);
|
||||||
|
+
|
||||||
|
+ if(r->mode == -1)
|
||||||
|
+ wlr_output_state_set_custom_mode(&state, r->resx, r->resy,
|
||||||
|
+ (int) (r->rate > 0 ? r->rate * 1000 : 0));
|
||||||
|
+ else if (!wl_list_empty(&wlr_output->modes)) {
|
||||||
|
+ for (int j = 0; j < r->mode; j++) {
|
||||||
|
+ mode = wl_container_of(mode->link.next, mode, link);
|
||||||
|
+ }
|
||||||
|
+ wlr_output_state_set_mode(&state, mode);
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
- /* The mode is a tuple of (width, height, refresh rate), and each
|
||||||
|
- * monitor supports only a specific set of modes. We just pick the
|
||||||
|
- * monitor's preferred mode; a more sophisticated compositor would let
|
||||||
|
- * the user configure it. */
|
||||||
|
- wlr_output_state_set_mode(&state, wlr_output_preferred_mode(wlr_output));
|
||||||
|
-
|
||||||
|
/* Set up event listeners */
|
||||||
|
LISTEN(&wlr_output->events.frame, &m->frame, rendermon);
|
||||||
|
LISTEN(&wlr_output->events.destroy, &m->destroy, cleanupmon);
|
||||||
|
--
|
||||||
|
2.45.1
|
||||||
|
|
||||||
@@ -0,0 +1,102 @@
|
|||||||
|
From 5c75c67fe49e5ab89e4a61dfb2fe74c768477b90 Mon Sep 17 00:00:00 2001
|
||||||
|
From: wochap <gean.marroquin@gmail.com>
|
||||||
|
Date: Fri, 5 Jul 2024 11:13:53 -0500
|
||||||
|
Subject: [PATCH] implement relative-muse-resize
|
||||||
|
|
||||||
|
---
|
||||||
|
dwl.c | 66 ++++++++++++++++++++++++++++++++++++++++++++++++++++-------
|
||||||
|
1 file changed, 59 insertions(+), 7 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/dwl.c b/dwl.c
|
||||||
|
index dc0437e..ebf9ef1 100644
|
||||||
|
--- a/dwl.c
|
||||||
|
+++ b/dwl.c
|
||||||
|
@@ -401,7 +401,8 @@ static struct wlr_seat *seat;
|
||||||
|
static KeyboardGroup *kb_group;
|
||||||
|
static unsigned int cursor_mode;
|
||||||
|
static Client *grabc;
|
||||||
|
-static int grabcx, grabcy; /* client-relative */
|
||||||
|
+static Client initial_grabc;
|
||||||
|
+static int grabcx, grabcy, grabx, graby, grabcenterx, grabcentery; /* client-relative */
|
||||||
|
|
||||||
|
static struct wlr_output_layout *output_layout;
|
||||||
|
static struct wlr_box sgeom;
|
||||||
|
@@ -1821,8 +1822,27 @@ motionnotify(uint32_t time, struct wlr_input_device *device, double dx, double d
|
||||||
|
.width = grabc->geom.width, .height = grabc->geom.height}, 1);
|
||||||
|
return;
|
||||||
|
} else if (cursor_mode == CurResize) {
|
||||||
|
- resize(grabc, (struct wlr_box){.x = grabc->geom.x, .y = grabc->geom.y,
|
||||||
|
- .width = (int)round(cursor->x) - grabc->geom.x, .height = (int)round(cursor->y) - grabc->geom.y}, 1);
|
||||||
|
+ if (grabcenterx < grabx) {
|
||||||
|
+ if (grabcentery < graby) {
|
||||||
|
+ /* bottom-right */
|
||||||
|
+ resize(grabc, (struct wlr_box){.x = initial_grabc.geom.x, .y = initial_grabc.geom.y,
|
||||||
|
+ .width = (int)round(cursor->x) - initial_grabc.geom.x, .height = (int)round(cursor->y) - initial_grabc.geom.y}, 1);
|
||||||
|
+ } else {
|
||||||
|
+ /* top-right */
|
||||||
|
+ resize(grabc, (struct wlr_box){.x = initial_grabc.geom.x, .y = (int)round(cursor->y),
|
||||||
|
+ .width = (int)round(cursor->x) - initial_grabc.geom.x, .height = initial_grabc.geom.y + initial_grabc.geom.height - (int)round(cursor->y)}, 1);
|
||||||
|
+ }
|
||||||
|
+ } else {
|
||||||
|
+ if (grabcentery < graby) {
|
||||||
|
+ /* bottom-left */
|
||||||
|
+ resize(grabc, (struct wlr_box){.x = (int)round(cursor->x), .y = initial_grabc.geom.y,
|
||||||
|
+ .width = initial_grabc.geom.x + initial_grabc.geom.width - (int)round(cursor->x), .height = (int)round(cursor->y) - initial_grabc.geom.y}, 1);
|
||||||
|
+ } else {
|
||||||
|
+ /* top-left */
|
||||||
|
+ resize(grabc, (struct wlr_box){.x = (int)round(cursor->x), .y = (int)round(cursor->y),
|
||||||
|
+ .width = initial_grabc.geom.x + initial_grabc.geom.width - (int)round(cursor->x), .height = initial_grabc.geom.y + initial_grabc.geom.height - (int)round(cursor->y)}, 1);
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -1870,10 +1890,42 @@ moveresize(const Arg *arg)
|
||||||
|
case CurResize:
|
||||||
|
/* Doesn't work for X11 output - the next absolute motion event
|
||||||
|
* returns the cursor to where it started */
|
||||||
|
- wlr_cursor_warp_closest(cursor, NULL,
|
||||||
|
- grabc->geom.x + grabc->geom.width,
|
||||||
|
- grabc->geom.y + grabc->geom.height);
|
||||||
|
- wlr_cursor_set_xcursor(cursor, cursor_mgr, "se-resize");
|
||||||
|
+ initial_grabc = *grabc;
|
||||||
|
+ grabx = (int)round(cursor->x);
|
||||||
|
+ graby = (int)round(cursor->y);
|
||||||
|
+ grabcx = (int)round(cursor->x) - grabc->geom.x;
|
||||||
|
+ grabcy = (int)round(cursor->y) - grabc->geom.y;
|
||||||
|
+ grabcenterx = grabc->geom.width / 2 + grabc->geom.x;
|
||||||
|
+ grabcentery = grabc->geom.height / 2 + grabc->geom.y;
|
||||||
|
+ if (grabcenterx < grabx) {
|
||||||
|
+ if (grabcentery < graby) {
|
||||||
|
+ /* bottom-right */
|
||||||
|
+ wlr_cursor_warp_closest(cursor, NULL,
|
||||||
|
+ grabc->geom.x + grabc->geom.width,
|
||||||
|
+ grabc->geom.y + grabc->geom.height);
|
||||||
|
+ wlr_cursor_set_xcursor(cursor, cursor_mgr, "se-resize");
|
||||||
|
+ } else {
|
||||||
|
+ /* top-right */
|
||||||
|
+ wlr_cursor_warp_closest(cursor, NULL,
|
||||||
|
+ grabc->geom.x + grabc->geom.width,
|
||||||
|
+ grabc->geom.y);
|
||||||
|
+ wlr_cursor_set_xcursor(cursor, cursor_mgr, "ne-resize");
|
||||||
|
+ }
|
||||||
|
+ } else {
|
||||||
|
+ if (grabcentery < graby) {
|
||||||
|
+ /* bottom-left */
|
||||||
|
+ wlr_cursor_warp_closest(cursor, NULL,
|
||||||
|
+ grabc->geom.x,
|
||||||
|
+ grabc->geom.y + grabc->geom.height);
|
||||||
|
+ wlr_cursor_set_xcursor(cursor, cursor_mgr, "sw-resize");
|
||||||
|
+ } else {
|
||||||
|
+ /* top-left */
|
||||||
|
+ wlr_cursor_warp_closest(cursor, NULL,
|
||||||
|
+ grabc->geom.x,
|
||||||
|
+ grabc->geom.y);
|
||||||
|
+ wlr_cursor_set_xcursor(cursor, cursor_mgr, "nw-resize");
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
--
|
||||||
|
2.45.1
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
{ pkgs, ... }:
|
|
||||||
{
|
|
||||||
environment.systemPackages = with pkgs; [
|
|
||||||
gscreenshot
|
|
||||||
wlr-randr
|
|
||||||
awww
|
|
||||||
];
|
|
||||||
|
|
||||||
programs.river-classic = {
|
|
||||||
enable = true;
|
|
||||||
xwayland.enable = true;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
+50
-34
@@ -6,22 +6,22 @@
|
|||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
makeScheme =
|
jsonSchemes = pkgs.stdenv.mkDerivation {
|
||||||
scheme:
|
|
||||||
(builtins.fromJSON (
|
|
||||||
builtins.readFile "${
|
|
||||||
pkgs.stdenv.mkDerivation {
|
|
||||||
name = "fromYAML";
|
name = "fromYAML";
|
||||||
phases = "buildPhase";
|
phases = "buildPhase";
|
||||||
buildPhase = ''
|
buildPhase = ''
|
||||||
mkdir -p $out/
|
mkdir -p $out/
|
||||||
FILE=${pkgs.base16-schemes}/share/themes/${scheme}.yaml
|
#for FILE in ${pkgs.base16-schemes}/share/themes/*; do
|
||||||
|
FILE=${pkgs.base16-schemes}/share/themes/catppuccin-mocha.yaml
|
||||||
FILEBASENAME="$(basename $FILE .yaml).json"
|
FILEBASENAME="$(basename $FILE .yaml).json"
|
||||||
cat $FILE | ${pkgs.yaml2json}/bin/yaml2json | sed s/#//g > $out/$FILEBASENAME
|
cat $FILE | ${pkgs.yaml2json}/bin/yaml2json | sed s/#//g > $out/$FILEBASENAME
|
||||||
|
#done
|
||||||
|
ls -l $out/
|
||||||
'';
|
'';
|
||||||
}
|
};
|
||||||
}/${scheme}.json"
|
|
||||||
)).palette;
|
json2Palette =
|
||||||
|
jsonScheme: (builtins.fromJSON (builtins.readFile "${jsonSchemes}/${jsonScheme}.json")).palette;
|
||||||
|
|
||||||
font = {
|
font = {
|
||||||
package = pkgs.nerd-fonts.caskaydia-cove;
|
package = pkgs.nerd-fonts.caskaydia-cove;
|
||||||
@@ -33,12 +33,10 @@ let
|
|||||||
name = "DejaVu Sans Mono";
|
name = "DejaVu Sans Mono";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
makeTheme =
|
makeTheme =
|
||||||
scheme: polarity:
|
jsonScheme: polarity:
|
||||||
let
|
let
|
||||||
palette = makeScheme scheme;
|
palette = json2Palette jsonScheme;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
enable = true;
|
enable = true;
|
||||||
@@ -70,32 +68,43 @@ let
|
|||||||
"${wallpaper}/share/wallpapers/nixos-wallpaper.png";
|
"${wallpaper}/share/wallpapers/nixos-wallpaper.png";
|
||||||
};
|
};
|
||||||
|
|
||||||
palette = {
|
|
||||||
base00 = "1C2023";
|
|
||||||
base01 = "393F45";
|
|
||||||
base02 = "565E65";
|
|
||||||
base03 = "747C84";
|
|
||||||
base04 = "ADB3BA";
|
|
||||||
base05 = "C7CCD1";
|
|
||||||
base06 = "DFE2E5";
|
|
||||||
base07 = "F3F4F5";
|
|
||||||
base08 = "C7AE95";
|
|
||||||
base09 = "C7C795";
|
|
||||||
base0A = "AEC795";
|
|
||||||
base0B = "95C7AE";
|
|
||||||
base0C = "95AEC7";
|
|
||||||
base0D = "AE95C7";
|
|
||||||
base0E = "C795AE";
|
|
||||||
base0F = "C79595";
|
|
||||||
};
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
# stylix = makeTheme "ashen" "dark";
|
#stylix = makeTheme "catppuccin-mocha" "dark";
|
||||||
|
|
||||||
stylix = {
|
#specialisation = {
|
||||||
|
# catppuccin-mocha.configuration.stylix = lib.mkForce (makeTheme "catppuccin-mocha" "dark");
|
||||||
|
# catppuccin-latte.configuration.stylix = lib.mkForce (makeTheme "catppuccin-latte" "light");
|
||||||
|
# gruvbox-dark-hard.configuration.stylix = lib.mkForce (makeTheme "gruvbox-dark-hard" "dark");
|
||||||
|
# heetch.configuration.stylix = lib.mkForce (makeTheme "heetch" "dark");
|
||||||
|
#};
|
||||||
|
|
||||||
|
stylix =
|
||||||
|
let
|
||||||
|
palette = {
|
||||||
|
base00 = "11111a"; # #11111a
|
||||||
|
base01 = "181825"; # #181825
|
||||||
|
base02 = "313244"; # #313244
|
||||||
|
base03 = "45475a"; # #45475a
|
||||||
|
base04 = "585b70"; # #585b70
|
||||||
|
base05 = "cdd6f4"; # #cdd6f4
|
||||||
|
base06 = "f5e0dc"; # #f5e0dc
|
||||||
|
base07 = "b4befe"; # #b4befe
|
||||||
|
base08 = "f38ba8"; # #f38ba8
|
||||||
|
base09 = "fab387"; # #fab387
|
||||||
|
base0A = "f9e2af"; # #f9e2af
|
||||||
|
base0B = "a6e3a1"; # #a6e3a1
|
||||||
|
base0C = "94e2d5"; # #94e2d5
|
||||||
|
base0D = "f5c2e7"; # #f5c2e7
|
||||||
|
base0E = "cba6f7"; # #cba6f7
|
||||||
|
base0F = "f2cdcd"; # #f2cdcd
|
||||||
|
};
|
||||||
|
polarity = "dark";
|
||||||
|
in
|
||||||
|
{
|
||||||
enable = true;
|
enable = true;
|
||||||
base16Scheme.palette = palette;
|
base16Scheme.palette = palette;
|
||||||
polarity = "dark";
|
inherit polarity;
|
||||||
fonts = {
|
fonts = {
|
||||||
emoji = emojiFont;
|
emoji = emojiFont;
|
||||||
monospace = font;
|
monospace = font;
|
||||||
@@ -121,4 +130,11 @@ in
|
|||||||
in
|
in
|
||||||
"${wallpaper}/share/wallpapers/nixos-wallpaper.png";
|
"${wallpaper}/share/wallpapers/nixos-wallpaper.png";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#security.sudo.extraConfig = ''
|
||||||
|
# ${userName} ALL = (root) NOPASSWD: /nix/var/nix/profiles/system/specialisation/catppuccin-mocha/bin/switch-to-configuration
|
||||||
|
# ${userName} ALL = (root) NOPASSWD: /nix/var/nix/profiles/system/specialisation/catppuccin-latte/bin/switch-to-configuration
|
||||||
|
# ${userName} ALL = (root) NOPASSWD: /nix/var/nix/profiles/system/specialisation/gruvbox-dark-hard/bin/switch-to-configuration
|
||||||
|
# ${userName} ALL = (root) NOPASSWD: /nix/var/nix/profiles/system/specialisation/heetch/bin/switch-to-configuration
|
||||||
|
#'';
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,4 +4,11 @@
|
|||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
../common/configuration.nix
|
../common/configuration.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
|
boot.loader.grub = {
|
||||||
|
enable = true;
|
||||||
|
efiSupport = true;
|
||||||
|
device = "nodev";
|
||||||
|
useOSProber = true;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,18 +14,26 @@
|
|||||||
boot.extraModulePackages = [ ];
|
boot.extraModulePackages = [ ];
|
||||||
|
|
||||||
fileSystems."/" =
|
fileSystems."/" =
|
||||||
{ device = "/dev/disk/by-label/NIXROOT";
|
{ device = "/dev/disk/by-uuid/90aaba2e-42f2-4b98-8df6-bd4a72f6d688";
|
||||||
fsType = "ext4";
|
fsType = "ext4";
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/boot" =
|
fileSystems."/boot" =
|
||||||
{ device = "/dev/disk/by-label/NIXBOOT";
|
{ device = "/dev/disk/by-uuid/F8E0-7E32";
|
||||||
fsType = "vfat";
|
fsType = "vfat";
|
||||||
options = [ "fmask=0077" "dmask=0077" ];
|
options = [ "fmask=0077" "dmask=0077" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
swapDevices = [ ];
|
swapDevices = [ ];
|
||||||
|
|
||||||
|
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||||
|
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||||
|
# still possible to use this option, but it's recommended to use it in conjunction
|
||||||
|
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
||||||
|
networking.useDHCP = lib.mkDefault true;
|
||||||
|
# networking.interfaces.enp10s0.useDHCP = lib.mkDefault true;
|
||||||
|
# networking.interfaces.enp18s0f4u1.useDHCP = lib.mkDefault true;
|
||||||
|
|
||||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||||
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||||
}
|
}
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 469 KiB After Width: | Height: | Size: 190 KiB |
Reference in New Issue
Block a user