From 481e682fbfee7f2d907c7a166d34b4f4fb43f2f1 Mon Sep 17 00:00:00 2001 From: atagen Date: Thu, 10 Aug 2023 14:50:31 +1000 Subject: [PATCH] sway on nvidia + ironbar --- flake.lock | 557 ++++++++------------- flake.nix | 18 +- home/dots/ironbar.corn | 58 +++ home/dots/ironbar.css | 201 ++++++++ home/home.nix | 392 ++++++++++----- home/overlay.nix | 1 - home/programs/eww/default.nix | 18 +- home/programs/eww/modules/current_win.yuck | 2 +- home/programs/eww/scripts/current_win | 19 +- home/programs/eww/scripts/workspaces | 61 +-- op.pal | 7 +- overlay.nix | 9 +- pal.conf | 13 +- rice.nix | 16 +- system/configuration.nix | 97 +--- system/quiver.nix | 16 +- 16 files changed, 830 insertions(+), 655 deletions(-) create mode 100644 home/dots/ironbar.corn create mode 100644 home/dots/ironbar.css diff --git a/flake.lock b/flake.lock index 9cadff5..b4f908f 100644 --- a/flake.lock +++ b/flake.lock @@ -1,160 +1,67 @@ { "nodes": { "crane": { - "flake": false, - "locked": { - "lastModified": 1681175776, - "narHash": "sha256-7SsUy9114fryHAZ8p1L6G6YSu7jjz55FddEwa2U8XZc=", - "owner": "ipetkov", - "repo": "crane", - "rev": "445a3d222947632b5593112bb817850e8a9cf737", - "type": "github" - }, - "original": { - "owner": "ipetkov", - "ref": "v0.12.1", - "repo": "crane", - "type": "github" - } - }, - "dream2nix": { - "inputs": { - "all-cabal-json": [ - "helix", - "nci" - ], - "crane": "crane", - "devshell": [ - "helix", - "nci" - ], - "drv-parts": "drv-parts", - "flake-compat": "flake-compat_2", - "flake-parts": [ - "helix", - "nci", - "parts" - ], - "flake-utils-pre-commit": [ - "helix", - "nci" - ], - "ghc-utils": [ - "helix", - "nci" - ], - "gomod2nix": [ - "helix", - "nci" - ], - "mach-nix": [ - "helix", - "nci" - ], - "nix-pypi-fetcher": [ - "helix", - "nci" - ], - "nixpkgs": [ - "helix", - "nci", - "nixpkgs" - ], - "nixpkgsV1": "nixpkgsV1", - "poetry2nix": [ - "helix", - "nci" - ], - "pre-commit-hooks": [ - "helix", - "nci" - ], - "pruned-racket-catalog": [ - "helix", - "nci" - ] - }, - "locked": { - "lastModified": 1683212002, - "narHash": "sha256-EObtqyQsv9v+inieRY5cvyCMCUI5zuU5qu+1axlJCPM=", - "owner": "nix-community", - "repo": "dream2nix", - "rev": "fbfb09d2ab5ff761d822dd40b4a1def81651d096", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "dream2nix", - "type": "github" - } - }, - "drv-parts": { - "inputs": { - "flake-compat": [ - "helix", - "nci", - "dream2nix", - "flake-compat" - ], - "flake-parts": [ - "helix", - "nci", - "dream2nix", - "flake-parts" - ], - "nixpkgs": [ - "helix", - "nci", - "dream2nix", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1680698112, - "narHash": "sha256-FgnobN/DvCjEsc0UAZEAdPLkL4IZi2ZMnu2K2bUaElc=", - "owner": "davhau", - "repo": "drv-parts", - "rev": "e8c2ec1157dc1edb002989669a0dbd935f430201", - "type": "github" - }, - "original": { - "owner": "davhau", - "repo": "drv-parts", - "type": "github" - } - }, - "eww": { "inputs": { "flake-compat": "flake-compat", + "flake-utils": [ + "helix", + "flake-utils" + ], "nixpkgs": [ + "helix", "nixpkgs" ], "rust-overlay": [ + "helix", "rust-overlay" ] }, "locked": { - "lastModified": 1686423460, - "narHash": "sha256-8e6gHSg6FDp6nU5v89D44Tqb1lR5aQpS0lXOVqzoUS4=", - "owner": "elkowar", - "repo": "eww", - "rev": "25e50eda46379bccd8a7887c18ee35833e0460e8", + "lastModified": 1688772518, + "narHash": "sha256-ol7gZxwvgLnxNSZwFTDJJ49xVY5teaSvF7lzlo3YQfM=", + "owner": "ipetkov", + "repo": "crane", + "rev": "8b08e96c9af8c6e3a2b69af5a7fa168750fcf88e", "type": "github" }, "original": { - "owner": "elkowar", - "repo": "eww", + "owner": "ipetkov", + "repo": "crane", + "type": "github" + } + }, + "crane_2": { + "inputs": { + "flake-compat": "flake-compat_2", + "flake-utils": "flake-utils_3", + "nixpkgs": [ + "ironbar", + "nixpkgs" + ], + "rust-overlay": "rust-overlay_2" + }, + "locked": { + "lastModified": 1688772518, + "narHash": "sha256-ol7gZxwvgLnxNSZwFTDJJ49xVY5teaSvF7lzlo3YQfM=", + "owner": "ipetkov", + "repo": "crane", + "rev": "8b08e96c9af8c6e3a2b69af5a7fa168750fcf88e", + "type": "github" + }, + "original": { + "owner": "ipetkov", + "repo": "crane", "type": "github" } }, "flake-compat": { "flake": false, "locked": { - "lastModified": 1650374568, - "narHash": "sha256-Z+s0J8/r907g149rllvwhb4pKi8Wam5ij0st8PwAh+E=", + "lastModified": 1673956053, + "narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=", "owner": "edolstra", "repo": "flake-compat", - "rev": "b4a34015c698c7793d592d66adbab377907a2be8", + "rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9", "type": "github" }, "original": { @@ -211,26 +118,6 @@ "type": "github" } }, - "flake-parts": { - "inputs": { - "nixpkgs-lib": [ - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1688466019, - "narHash": "sha256-VeM2akYrBYMsb4W/MmBo1zmaMfgbL4cH3Pu8PGyIwJ0=", - "owner": "hercules-ci", - "repo": "flake-parts", - "rev": "8e8d955c22df93dbe24f19ea04f47a74adbdc5ec", - "type": "github" - }, - "original": { - "owner": "hercules-ci", - "repo": "flake-parts", - "type": "github" - } - }, "flake-utils": { "inputs": { "systems": "systems" @@ -253,6 +140,42 @@ "inputs": { "systems": "systems_2" }, + "locked": { + "lastModified": 1689068808, + "narHash": "sha256-6ixXo3wt24N/melDWjq70UuHQLxGV8jZvooRanIHXw0=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "919d646de7be200f3bf08cb76ae1f09402b6f9b4", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "flake-utils_3": { + "inputs": { + "systems": "systems_3" + }, + "locked": { + "lastModified": 1687709756, + "narHash": "sha256-Y5wKlQSkgEK2weWdOu4J3riRd+kV/VCgHsqLNTTWQ/0=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "dbabf0ca0c0c4bce6ea5eaf65af5cb694d2082c7", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "flake-utils_4": { + "inputs": { + "systems": "systems_4" + }, "locked": { "lastModified": 1681202837, "narHash": "sha256-H+Rh19JDwRtpVPAWp64F+rlEtxUWBAQW28eAi3SRSzg=", @@ -267,9 +190,9 @@ "type": "github" } }, - "flake-utils_3": { + "flake-utils_5": { "inputs": { - "systems": "systems_3" + "systems": "systems_5" }, "locked": { "lastModified": 1681202837, @@ -309,21 +232,19 @@ }, "helix": { "inputs": { - "nci": "nci", + "crane": "crane", + "flake-utils": "flake-utils_2", "nixpkgs": [ "nixpkgs" ], - "parts": [ - "flake-parts" - ], "rust-overlay": "rust-overlay" }, "locked": { - "lastModified": 1689978081, - "narHash": "sha256-CnnUYz6pRxjf4yB7sU+WYykTmb+V0ZH9YYfFyMLuKcE=", + "lastModified": 1691582550, + "narHash": "sha256-h8eWTciQiAoJecxaXC79YqOq0mlp1nrFEX7+qbpgJuU=", "owner": "helix-editor", "repo": "helix", - "rev": "5c41f22c2a20a1b8a91ddd6397686bd752591ffc", + "rev": "cb9b08d6507d37fd1b11ab5b40a2f17e21846210", "type": "github" }, "original": { @@ -339,11 +260,11 @@ ] }, "locked": { - "lastModified": 1689891262, - "narHash": "sha256-Pc4wDczbdgd6QXKJIXprgxe7L9AVDsoAkMnvm5vmpUU=", + "lastModified": 1691506824, + "narHash": "sha256-Z2Ms7036CCEAfCmDBDy+sFauO6/7fx2UN3aoPCpp4tA=", "owner": "nix-community", "repo": "home-manager", - "rev": "ee5673246de0254186e469935909e821b8f4ec15", + "rev": "7b8d43fbaf8450c30caaed5eab876897d0af891b", "type": "github" }, "original": { @@ -352,45 +273,24 @@ "type": "github" } }, - "hyprland": { + "ironbar": { "inputs": { - "hyprland-protocols": "hyprland-protocols", - "nixpkgs": "nixpkgs", - "wlroots": "wlroots", - "xdph": "xdph" + "crane": "crane_2", + "naersk": "naersk", + "nixpkgs": "nixpkgs_2", + "rust-overlay": "rust-overlay_3" }, "locked": { - "lastModified": 1689959100, - "narHash": "sha256-pTK3YtZN32oLm0Zkm6SySX/wv/GGM49/yd7bFKdDSCM=", - "owner": "hyprwm", - "repo": "Hyprland", - "rev": "27dd07f1b8f89dcf6fe29fec75fdd5c8e9bc9ec4", + "lastModified": 1691611150, + "narHash": "sha256-0Jx7RQ236n6O9NIx8iUvGFVo3JRuiypWU5JIUh9Mj/M=", + "owner": "JakeStanger", + "repo": "ironbar", + "rev": "b649525a2cb43fdd673f04e0dee879d22925a821", "type": "github" }, "original": { - "owner": "hyprwm", - "repo": "Hyprland", - "type": "github" - } - }, - "hyprland-protocols": { - "inputs": { - "nixpkgs": [ - "hyprland", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1684265364, - "narHash": "sha256-AxNnWbthsuNx73HDQr0eBxrcE3+yfl/WsaXZqUFmkpQ=", - "owner": "hyprwm", - "repo": "hyprland-protocols", - "rev": "8c279b9fb0f2b031427dc5ef4eab53f2ed835530", - "type": "github" - }, - "original": { - "owner": "hyprwm", - "repo": "hyprland-protocols", + "owner": "JakeStanger", + "repo": "ironbar", "type": "github" } }, @@ -410,47 +310,21 @@ "type": "github" } }, - "mk-naked-shell": { - "flake": false, - "locked": { - "lastModified": 1681286841, - "narHash": "sha256-3XlJrwlR0nBiREnuogoa5i1b4+w/XPe0z8bbrJASw0g=", - "owner": "yusdacra", - "repo": "mk-naked-shell", - "rev": "7612f828dd6f22b7fb332cc69440e839d7ffe6bd", - "type": "github" - }, - "original": { - "owner": "yusdacra", - "repo": "mk-naked-shell", - "type": "github" - } - }, - "nci": { + "naersk": { "inputs": { - "dream2nix": "dream2nix", - "mk-naked-shell": "mk-naked-shell", - "nixpkgs": [ - "helix", - "nixpkgs" - ], - "parts": "parts", - "rust-overlay": [ - "helix", - "rust-overlay" - ] + "nixpkgs": "nixpkgs" }, "locked": { - "lastModified": 1683699050, - "narHash": "sha256-UWKQpzVcSshB+sU2O8CCHjOSTQrNS7Kk9V3+UeBsJpg=", - "owner": "yusdacra", - "repo": "nix-cargo-integration", - "rev": "ed27173cd1b223f598343ea3c15aacb1d140feac", + "lastModified": 1690373729, + "narHash": "sha256-e136hTT7LqQ2QjOTZQMW+jnsevWwBpMj78u6FRUsH9I=", + "owner": "nix-community", + "repo": "naersk", + "rev": "d9a33d69a9c421d64c8d925428864e93be895dcc", "type": "github" }, "original": { - "owner": "yusdacra", - "repo": "nix-cargo-integration", + "owner": "nix-community", + "repo": "naersk", "type": "github" } }, @@ -461,11 +335,11 @@ ] }, "locked": { - "lastModified": 1689479461, - "narHash": "sha256-Ak+PTYdmfOQEmcOsOEnrwqdP0HP20PLraRwpjSAzSeE=", + "lastModified": 1691292840, + "narHash": "sha256-NA+o/NoOOQhzAQwB2JpeKoG+iYQ6yn/XXVxaGd5HSQI=", "owner": "Mic92", "repo": "nix-index-database", - "rev": "22fa44b7f14684d184733fb26a628f3878ff7aaf", + "rev": "6c626d54d0414d34c771c0f6f9d771bc8aaaa3c4", "type": "github" }, "original": { @@ -477,7 +351,7 @@ "nix-rice": { "inputs": { "flake-compat": "flake-compat_3", - "flake-utils": "flake-utils_3", + "flake-utils": "flake-utils_5", "kitty-themes-src": "kitty-themes-src", "nixpkgs-lib": "nixpkgs-lib", "pre-commit-hooks": "pre-commit-hooks" @@ -513,18 +387,16 @@ }, "nixpkgs": { "locked": { - "lastModified": 1688500189, - "narHash": "sha256-djYYiY4lzJOlXOnTHytH6BUugrxHDZjuGxTSrU4gt4M=", + "lastModified": 1690833316, + "narHash": "sha256-+YU+/pTJmVKNW12R07/SJiTn7PQk90xwCI4D2PfLRPs=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "78419edadf0fabbe5618643bd850b2f2198ed060", + "rev": "9418167277f665de6f4a29f414d438cf39c55b9e", "type": "github" }, "original": { - "owner": "NixOS", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" + "id": "nixpkgs", + "type": "indirect" } }, "nixpkgs-lib": { @@ -560,11 +432,11 @@ }, "nixpkgs-stable_2": { "locked": { - "lastModified": 1689885880, - "narHash": "sha256-2ikAcvHKkKh8J/eUrwMA+wy1poscC+oL1RkN1V3RmT8=", + "lastModified": 1691421349, + "narHash": "sha256-RRJyX0CUrs4uW4gMhd/X4rcDG8PTgaaCQM5rXEJOx6g=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "fa793b06f56896b7d1909e4b69977c7bf842b2f0", + "rev": "011567f35433879aae5024fc6ec53f2a0568a6c4", "type": "github" }, "original": { @@ -574,22 +446,23 @@ "type": "github" } }, - "nixpkgsV1": { + "nixpkgs_2": { "locked": { - "lastModified": 1678500271, - "narHash": "sha256-tRBLElf6f02HJGG0ZR7znMNFv/Uf7b2fFInpTHiHaSE=", - "owner": "NixOS", + "lastModified": 1690789960, + "narHash": "sha256-3K+2HuyGTiJUSZNJxXXvc0qj4xFx1FHC/ItYtEa7/Xs=", + "owner": "nixos", "repo": "nixpkgs", - "rev": "5eb98948b66de29f899c7fe27ae112a47964baf8", + "rev": "fb942492b7accdee4e6d17f5447091c65897dde4", "type": "github" }, "original": { - "id": "nixpkgs", - "ref": "nixos-22.11", - "type": "indirect" + "owner": "nixos", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" } }, - "nixpkgs_2": { + "nixpkgs_3": { "locked": { "lastModified": 1681303793, "narHash": "sha256-JEdQHsYuCfRL2PICHlOiH/2ue3DwoxUX7DJ6zZxZXFk=", @@ -605,13 +478,13 @@ "type": "github" } }, - "nixpkgs_3": { + "nixpkgs_4": { "locked": { - "lastModified": 1689940971, - "narHash": "sha256-397xShPnFqPC59Bmpo3lS+/Aw0yoDRMACGo1+h2VJMo=", + "lastModified": 1691472822, + "narHash": "sha256-XVfYZ2oB3lNPVq6sHCY9WkdQ8lHoIDzzbpg8bB6oBxA=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "9ca785644d067445a4aa749902b29ccef61f7476", + "rev": "41c7605718399dcfa53dd7083793b6ae3bc969ff", "type": "github" }, "original": { @@ -623,11 +496,11 @@ }, "nur": { "locked": { - "lastModified": 1689990870, - "narHash": "sha256-1vnciLjQPHqyDpLF7bT0/8QSzbJVSvJUKLEGggNC3iQ=", + "lastModified": 1691573523, + "narHash": "sha256-kKWUdrOaPeRhxs7HKcSUOMlod8p04gUEPDxpJFo4AD8=", "owner": "nix-community", "repo": "NUR", - "rev": "37ed05c6953e388784580a9bd6405d5d845524db", + "rev": "e6dbae536ff9479c7277965043763df455124fa7", "type": "github" }, "original": { @@ -636,28 +509,6 @@ "type": "github" } }, - "parts": { - "inputs": { - "nixpkgs-lib": [ - "helix", - "nci", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1683560683, - "narHash": "sha256-XAygPMN5Xnk/W2c1aW0jyEa6lfMDZWlQgiNtmHXytPc=", - "owner": "hercules-ci", - "repo": "flake-parts", - "rev": "006c75898cf814ef9497252b022e91c946ba8e17", - "type": "github" - }, - "original": { - "owner": "hercules-ci", - "repo": "flake-parts", - "type": "github" - } - }, "pre-commit-hooks": { "inputs": { "flake-compat": "flake-compat_4", @@ -666,7 +517,7 @@ "flake-utils" ], "gitignore": "gitignore", - "nixpkgs": "nixpkgs_2", + "nixpkgs": "nixpkgs_3", "nixpkgs-stable": "nixpkgs-stable" }, "locked": { @@ -685,35 +536,36 @@ }, "root": { "inputs": { - "eww": "eww", - "flake-parts": "flake-parts", "flake-utils": "flake-utils", "helix": "helix", "home-manager": "home-manager", - "hyprland": "hyprland", + "ironbar": "ironbar", "nix-index-database": "nix-index-database", "nix-rice": "nix-rice", "nix-std": "nix-std", - "nixpkgs": "nixpkgs_3", + "nixpkgs": "nixpkgs_4", "nixpkgs-stable": "nixpkgs-stable_2", "nur": "nur", - "rust-overlay": "rust-overlay_2" + "rust-overlay": "rust-overlay_4" } }, "rust-overlay": { "inputs": { - "flake-utils": "flake-utils_2", + "flake-utils": [ + "helix", + "flake-utils" + ], "nixpkgs": [ "helix", "nixpkgs" ] }, "locked": { - "lastModified": 1683771545, - "narHash": "sha256-we0GYcKTo2jRQGmUGrzQ9VH0OYAUsJMCsK8UkF+vZUA=", + "lastModified": 1690424156, + "narHash": "sha256-Bpml+L280tHTQpwpC5/BJbU4HSvEzMvW8IZ4gAXimhE=", "owner": "oxalica", "repo": "rust-overlay", - "rev": "c57e210faf68e5d5386f18f1b17ad8365d25e4ed", + "rev": "f335a0213504c7e6481c359dc1009be9cf34432c", "type": "github" }, "original": { @@ -723,6 +575,55 @@ } }, "rust-overlay_2": { + "inputs": { + "flake-utils": [ + "ironbar", + "crane", + "flake-utils" + ], + "nixpkgs": [ + "ironbar", + "crane", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1688351637, + "narHash": "sha256-CLTufJ29VxNOIZ8UTg0lepsn3X03AmopmaLTTeHDCL4=", + "owner": "oxalica", + "repo": "rust-overlay", + "rev": "f9b92316727af9e6c7fee4a761242f7f46880329", + "type": "github" + }, + "original": { + "owner": "oxalica", + "repo": "rust-overlay", + "type": "github" + } + }, + "rust-overlay_3": { + "inputs": { + "flake-utils": "flake-utils_4", + "nixpkgs": [ + "ironbar", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1690683485, + "narHash": "sha256-Sp/QpbMg86v12xhCsa6q0yTH8LYaJIcxzbf9LO1zFzM=", + "owner": "oxalica", + "repo": "rust-overlay", + "rev": "05d480a7aef1aae1bfb67a39134dcf48c5322528", + "type": "github" + }, + "original": { + "owner": "oxalica", + "repo": "rust-overlay", + "type": "github" + } + }, + "rust-overlay_4": { "inputs": { "flake-utils": [ "flake-utils" @@ -732,11 +633,11 @@ ] }, "locked": { - "lastModified": 1689992383, - "narHash": "sha256-x/MSjx2aA9aJqQA3fUHxiH0l8uG+1vxnkRNkqAZHQ2U=", + "lastModified": 1691547503, + "narHash": "sha256-l0AIKJucygbDFc2vuAkxmFMjNNJImDd7jYahA88/E+o=", "owner": "oxalica", "repo": "rust-overlay", - "rev": "97fcdd4793778cf8e4f9007079cb9d2b836d7ea9", + "rev": "3380f16b39457b49c8186d5e20e7a68ccf4fc96e", "type": "github" }, "original": { @@ -790,47 +691,33 @@ "type": "github" } }, - "wlroots": { - "flake": false, + "systems_4": { "locked": { - "host": "gitlab.freedesktop.org", - "lastModified": 1689611045, - "narHash": "sha256-3RTOlQabkNetQ4O4UzSf57JPco9VGVHhSU1ls5uKBeE=", - "owner": "wlroots", - "repo": "wlroots", - "rev": "7791ffe0584c4ac13c170e1661ce33bdbd4a9b9e", - "type": "gitlab" - }, - "original": { - "host": "gitlab.freedesktop.org", - "owner": "wlroots", - "repo": "wlroots", - "rev": "7791ffe0584c4ac13c170e1661ce33bdbd4a9b9e", - "type": "gitlab" - } - }, - "xdph": { - "inputs": { - "hyprland-protocols": [ - "hyprland", - "hyprland-protocols" - ], - "nixpkgs": [ - "hyprland", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1685385764, - "narHash": "sha256-r+XMyOoRXq+hlfjayb+fyi9kq2JK48TrwuNIAXqlj7U=", - "owner": "hyprwm", - "repo": "xdg-desktop-portal-hyprland", - "rev": "4d9ff0c17716936e0b5ca577a39e263633901ed1", + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", "type": "github" }, "original": { - "owner": "hyprwm", - "repo": "xdg-desktop-portal-hyprland", + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "systems_5": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", "type": "github" } } diff --git a/flake.nix b/flake.nix index efe4975..5c88540 100644 --- a/flake.nix +++ b/flake.nix @@ -5,20 +5,11 @@ nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; nixpkgs-stable.url = "github:NixOS/nixpkgs/nixos-23.05"; - flake-parts = { - url = "github:hercules-ci/flake-parts"; - inputs.nixpkgs-lib.follows = "nixpkgs"; - }; - nur.url = "github:/nix-community/NUR"; nix-std.url = "github:chessai/nix-std"; - eww = { - url = "github:elkowar/eww"; - inputs.nixpkgs.follows = "nixpkgs"; - inputs.rust-overlay.follows = "rust-overlay"; - }; + ironbar.url = "github:JakeStanger/ironbar"; rust-overlay = { url = "github:oxalica/rust-overlay"; @@ -31,7 +22,6 @@ helix = { url = "github:helix-editor/helix"; inputs.nixpkgs.follows = "nixpkgs"; - inputs.parts.follows = "flake-parts"; }; home-manager = { @@ -39,14 +29,11 @@ inputs.nixpkgs.follows = "nixpkgs"; }; - hyprland.url = "github:hyprwm/Hyprland"; - nix-index-database = { url = "github:Mic92/nix-index-database"; inputs.nixpkgs.follows = "nixpkgs"; }; - # declarative-cachix.url = "github:jonascarpay/declarative-cachix"; nix-rice.url = "github:bertof/nix-rice"; }; @@ -56,9 +43,8 @@ nixpkgs-stable, home-manager, nur, - eww, + ironbar, helix, - hyprland, nix-index-database, nix-rice, nix-std, diff --git a/home/dots/ironbar.corn b/home/dots/ironbar.corn new file mode 100644 index 0000000..2eb7bd2 --- /dev/null +++ b/home/dots/ironbar.corn @@ -0,0 +1,58 @@ +let { + $workspaces = { + type = "workspaces" + all_monitors = false + } + + $focused = { type = "focused" } + + $mpris = { + type = "music" + player_type = "mpris" + + on_click_middle = "playerctl play-pause" + on_scroll_up = "playerctl volume +5" + on_scroll_down = "playerctl volume -5" + + } + + $sys_info = { + type = "sys_info" + + interval.memory = 30 + interval.cpu = 1 + interval.temps = 5 + interval.disks = 300 + interval.networks = 3 + + format = [ + " {cpu_percent}% | {temp_c:k10temp_Tccd1}°C" + " {memory_used} / {memory_total} GB ({memory_percent}%)" + "| {swap_used} / {swap_total} GB ({swap_percent}%)" + " {disk_used:/} / {disk_total:/} GB ({disk_percent:/}%)" + "李 {net_down:enp39s0} / {net_up:enp3s0} Mbps" + "猪 {load_average:1} | {load_average:5} | {load_average:15}" + " {uptime}" + ] + } + + $tray = { type = "tray" } + + $clock = { type = "clock" } + + $button = { type = "button" name="power-btn" label = "" on_click = "!wlogout" } + + $left = [ $workspaces ] + $center = [ $focused ] + $right = [ $mpris $sys_info $button $clock ] +} +in { + anchor_to_edges = true + position = "top" + height = 16 + icon_theme = "Papirus-Dark" + + start = $left + center = $center + end = $right +} diff --git a/home/dots/ironbar.css b/home/dots/ironbar.css new file mode 100644 index 0000000..cd7f38c --- /dev/null +++ b/home/dots/ironbar.css @@ -0,0 +1,201 @@ +@define-color color_bg #BG; +@define-color color_bg_dark #DARKBG; +@define-color color_border #BORDER; +@define-color color_border_active #ACTIVEBORDER; +@define-color color_text #TEXT; +@define-color color_urgent #URGENT; + +/* -- base styles -- */ + +* { + font-family: #FONT, sans-serif; + font-size: #SZFONTpx; + border: none; + border-radius: 0; +} + +box, menubar, button { + background-color: @color_bg; + background-image: none; +} + +button, label { + color: @color_text; +} + +button:hover { + background-color: @color_bg_dark; +} + +#bar { + border-top: 1px solid @color_border; +} + +.popup { + border: 1px solid @color_border; + padding: 1em; +} + + +/* -- clipboard -- */ + +.clipboard { + margin-left: 5px; + font-size: 1.1em; +} + +.popup-clipboard .item { + padding-bottom: 0.3em; + border-bottom: 1px solid @color_border; +} + + +/* -- clock -- */ + +.clock { + font-weight: bold; + margin-left: 5px; +} + +.popup-clock .calendar-clock { + color: @color_text; + font-size: 2.5em; + padding-bottom: 0.1em; +} + +.popup-clock .calendar { + background-color: @color_bg; + color: @color_text; +} + +.popup-clock .calendar .header { + padding-top: 1em; + border-top: 1px solid @color_border; + font-size: 1.5em; +} + +.popup-clock .calendar:selected { + background-color: @color_border_active; +} + + +/* -- launcher -- */ + +.launcher .item { + margin-right: 4px; +} + +.launcher .item:not(.focused):hover { + background-color: @color_bg_dark; +} + +.launcher .open { + border-bottom: 1px solid @color_text; +} + +.launcher .focused { + border-bottom: 2px solid @color_border_active; +} + +.launcher .urgent { + border-bottom-color: @color_urgent; +} + +.popup-launcher { + padding: 0; +} + +.popup-launcher .popup-item:not(:first-child) { + border-top: 1px solid @color_border; +} + + +/* -- music -- */ + +.music:hover * { + background-color: @color_bg_dark; +} + +.popup-music .album-art { + margin-right: 1em; +} + +.popup-music .icon-box { + margin-right: 0.4em; +} + +.popup-music .title .icon, .popup-music .title .label { + font-size: 1.7em; +} + +.popup-music .controls *:disabled { + color: @color_border; +} + +.popup-music .volume .slider slider { + border-radius: 100%; +} + +.popup-music .volume .icon { + margin-left: 4px; +} + +.popup-music .progress .slider slider { + border-radius: 100%; +} + +/* -- script -- */ + +.script { + padding-left: 10px; +} + + +/* -- sys_info -- */ + +.sysinfo { + margin-left: 10px; +} + +.sysinfo .item { + margin-left: 5px; +} + + +/* -- tray -- */ + +.tray { + margin-left: 10px; +} + + +/* -- workspaces -- */ + +.workspaces .item.focused { + box-shadow: inset 0 -3px; + background-color: @color_bg_dark; +} + +.workspaces .item:hover { + box-shadow: inset 0 -3px; +} + + +/* -- custom: power menu -- */ + +.popup-power-menu #header { + font-size: 1.4em; + padding-bottom: 0.4em; + margin-bottom: 0.6em; + border-bottom: 1px solid @color_border; +} + +.popup-power-menu .power-btn { + border: 1px solid @color_border; + padding: 0.6em 1em; +} + +.popup-power-menu #buttons > *:nth-child(1) .power-btn { + margin-right: 1em; +} + diff --git a/home/home.nix b/home/home.nix index b33d0b7..9763c36 100644 --- a/home/home.nix +++ b/home/home.nix @@ -10,17 +10,17 @@ palette-hex = pkgs.lib.nix-rice.palette.toRgbHex pkgs.rice.palette; palette-shex = pkgs.lib.nix-rice.palette.toRGBShortHex pkgs.rice.palette; in { - imports = [ - inputs.hyprland.homeManagerModules.default - ./programs/eww/default.nix - ]; - home.stateVersion = "22.11"; + imports = [ + inputs.ironbar.homeManagerModules.default + # ./programs/eww/default.nix + ]; + home.packages = with pkgs; [ thunderbird - clementine + strawberry inkscape xfce.thunar feh @@ -40,7 +40,6 @@ in { slurp swaybg wlogout - wf-recorder libnotify xorg.xrdb swayidle @@ -51,17 +50,14 @@ in { kooha nyxt - xplr culr swayosd fuzzel kdeconnect - # syncthing keepassxc git-credential-keepassxc - direnv mpv @@ -88,43 +84,229 @@ in { services.udiskie.enable = true; - wayland.windowManager.hyprland = { + programs.ironbar = with pkgs.rice; { enable = true; - systemdIntegration = true; - nvidiaPatches = true; - xwayland = { - enable = true; - hidpi = false; + config = { + anchor_to_edges = true; + position = "top"; + height = fonts.sans.size; + icon_theme = icons.name; + + start = [ + { type = "workspaces"; all_monitors = true; } + { type = "sys_info"; + interval.memory = 30; + interval.cpu = 1; + format = [ + " {cpu_percent}%" + " {memory_used} / {memory_total} GB" + ]; + } + ]; + center = [ + { type = "focused"; icon_size = 12; } + ]; + end = [ + { type = "music"; + player_type = "mpris"; + + on_click_middle = "playerctl play-pause"; + on_scroll_up = "playerctl volume +5"; + on_scroll_down = "playerctl volume -5"; + } + { type = "clock"; } + ]; }; - recommendedEnvironment = true; - extraConfig = with pkgs.rice; (builtins.replaceStrings + style = with palette-hex; (builtins.replaceStrings [ - "#BGIMAGE" - "#GTKTHEME" - "#FONT" - "#ICONTHEME" - "#ACTIVEBORDER" + "#BG" + "#DARKBG" "#BORDER" - "#THICK" - "#ROUND" - "#GAPSIN" - "#GAPSOUT" + "#ACTIVEBORDER" + "#TEXT" + "#URGENT" + "#FONT" + "#SZFONT" ] [ - "${bg.image}" - gtk-theme.name + util.bg + normal.black + normal.yellow + bright.yellow + util.fg + normal.red fonts.sans.name - icons.name - palette-shex.bright.yellow - palette-shex.util.bg - (builtins.toString borders.thickness) - (builtins.toString borders.rounding) - (builtins.toString borders.gaps_in) - (builtins.toString borders.gaps_out) + (builtins.toString fonts.sans.size) ] - (builtins.readFile dots/hyprland/hyprland.conf)); + (builtins.readFile dots/ironbar.css)); }; + wayland.windowManager.sway = { + enable = true; + package = pkgs.sway; + config = with pkgs.rice; { + bars = []; + # reintroduces flicker + # output = { + # "*" = { + # adaptive_sync = "on"; + # }; + # }; + focus = { + mouseWarping = "container"; + wrapping = "no"; + }; + fonts = with fonts; { + names = [sans.name emoji.name]; + size = 10.0; + }; + gaps = { + inner = borders.gaps_in; + outer = borders.gaps_out; + smartGaps = true; + smartBorders = "no_gaps"; + }; + window = { + border = borders.thickness; + hideEdgeBorders = "smart"; + titlebar = false; + }; + workspaceAutoBackAndForth = false; + input = { + "*" = { + accel_profile = "flat"; + pointer_accel = "0.0"; + xkb_options = "caps:escape"; + }; + }; + startup = [ + {command = "mullvad connect";} + {command = "swaybg -i $HOME/.nix/wallpaper.png -m fill";} + {command = "ckb-next -c -b";} + {command = "xrdb -l ~/.Xresources";} + {command = "swayosd --max-volume 100";} + {command = "keepassxc";} + {command = "swaync";} + ]; + terminal = "kitty"; + modifier = "Mod4"; + keybindings = { + "Mod4+Return" = "exec kitty"; + "Mod4+d" = "exec fuzzel"; + "Mod4+e" = "exec thunar"; + "Mod4+f" = "exec firefox"; + "Mod4+Shift+e" = "exec wlogout"; + "Mod4+n" = "exec swaync-client -t"; + "Mod4+Space" = "floating toggle; move absolute position center"; + "Mod4+c" = "focus floating; move absolute position center"; + "Mod4+Shift+Space" = "fullscreen toggle"; + "Mod4+a" = "focus parent"; + "Mod4+Shift+a" = "focus child"; + "Mod4+h" = "focus left"; + "Mod4+j" = "focus down"; + "Mod4+k" = "focus up"; + "Mod4+l" = "focus right"; + "Mod4+Shift+h" = "move left"; + "Mod4+Shift+j" = "move down"; + "Mod4+Shift+k" = "move up"; + "Mod4+Shift+l" = "move right"; + "Mod4+1" = "workspace 1"; + "Mod4+Shift+1" = "move container to workspace 1"; + "Mod4+2" = "workspace 2"; + "Mod4+Shift+2" = "move container to workspace 2"; + "Mod4+3" = "workspace 3"; + "Mod4+Shift+3" = "move container to workspace 3"; + "Mod4+4" = "workspace 4"; + "Mod4+Shift+4" = "move container to workspace 4"; + "Mod4+r" = "mode resize"; + "Mod4+Shift+minus" = "move scratchpad"; + "Mod4+minus" = "scratchpad show"; + "Mod4+Shift+q" = "kill"; + "Mod4+Shift+v" = "split horizontal"; + "Mod4+v" = "split vertical"; + "XF86AudioMute" = "exec swayosd --output-volume mute-toggle"; + "XF86AudioRaiseVolume" = "exec swayosd --output-volume raise"; + "XF86AudioLowerVolume" = "exec swayosd --output-volume lower"; + "XF86AudioStop" = "exec playerctl stop"; + "XF86AudioPlay" = "exec playerctl play-pause"; + "XF86AudioPrev" = "exec playerctl previous"; + "XF86AudioNext" = "exec playerctl next"; + }; + menu = "fuzzel"; + colors = with palette-hex; { + background = util.bg; + focused = { + background = util.bg; + border = bright.yellow; + childBorder = bright.yellow; + indicator = normal.blue; + text = util.fg; + }; + focusedInactive = { + background = normal.black; + border = normal.yellow; + childBorder = normal.yellow; + indicator = normal.blue; + text = normal.white; + }; + placeholder = { + background = util.bg; + border = bright.green; + childBorder = bright.green; + indicator = normal.blue; + text = util.fg; + }; + unfocused = { + background = normal.black; + border = util.bg; + childBorder = util.bg; + indicator = normal.blue; + text = normal.white; + }; + urgent = { + background = normal.red; + border = normal.red; + childBorder = normal.red; + indicator = normal.red; + text = normal.blue; + }; + }; + }; + systemd.enable = true; + wrapperFeatures = { + base = true; + gtk = true; + }; + xwayland = true; + }; + + # extraConfig = with pkgs.rice; (builtins.replaceStrings + # [ + # "#BGIMAGE" + # "#GTKTHEME" + # "#FONT" + # "#ICONTHEME" + # "#ACTIVEBORDER" + # "#BORDER" + # "#THICK" + # "#ROUND" + # "#GAPSIN" + # "#GAPSOUT" + # ] + # [ + # "${bg.image}" + # gtk-theme.name + # fonts.sans.name + # icons.name + # palette-shex.bright.yellow + # palette-shex.util.bg + # (builtins.toString borders.thickness) + # (builtins.toString borders.rounding) + # (builtins.toString borders.gaps_in) + # (builtins.toString borders.gaps_out) + # ] + # (builtins.readFile dots/hyprland/hyprland.conf)); + programs.starship = { enable = true; settings = { @@ -135,65 +317,54 @@ in { }; }; - programs.eww-hyprland = { - enable = true; - package = pkgs.eww-git; - colors = with palette-hex; (builtins.replaceStrings - [ - "#BLACK" - "#BLCKA" - "#RED" - "#RDA" - "#GREEN" - "#GRNA" - "#YELLOW" - "#YLWA" - "#BLUE" - "#BLUA" - "#MAGENTA" - "#MGNA" - "#CYAN" - "#CYNA" - "#WHITE" - "#WHTA" - "#FG" - "#BG" - ] - [ - normal.black - bright.black - normal.red - bright.red - normal.green - bright.green - normal.yellow - bright.yellow - normal.blue - bright.blue - normal.magenta - bright.magenta - normal.cyan - bright.cyan - normal.white - bright.white - util.fg - util.bg - ] (builtins.readFile dots/eww/colors.scss)); - }; + + # programs.eww-custom = { + # enable = true; + # package = pkgs.eww-wayland; + # colors = with palette-hex; (builtins.replaceStrings + # [ + # "#BLACK" + # "#BLCKA" + # "#RED" + # "#RDA" + # "#GREEN" + # "#GRNA" + # "#YELLOW" + # "#YLWA" + # "#BLUE" + # "#BLUA" + # "#MAGENTA" + # "#MGNA" + # "#CYAN" + # "#CYNA" + # "#WHITE" + # "#WHTA" + # "#FG" + # "#BG" + # ] + # [ + # normal.black + # bright.black + # normal.red + # bright.red + # normal.green + # bright.green + # normal.yellow + # bright.yellow + # normal.blue + # bright.blue + # normal.magenta + # bright.magenta + # normal.cyan + # bright.cyan + # normal.white + # bright.white + # util.fg + # util.bg + # ] (builtins.readFile dots/eww/colors.scss)); + # }; systemd.user.startServices = "sd-switch"; - systemd.user.services."hyprland-system76" = { - Unit = { - Description = "the hyprland process scheduler hook"; - Requires = ["dbus.service"]; - }; - Install = { - WantedBy = ["graphical-session.target" "default.target"]; - }; - Service = { - ExecStart = ''${pkgs.hyprland-system76-scheduler-integration}/bin/hyprland-system76-scheduler-hook.sh''; - }; - }; xdg.enable = true; xresources.properties = with palette-hex; { @@ -263,9 +434,6 @@ in { "${pkgs.gsettings-desktop-schemas}/share/gsettings-schemas/${pkgs.gsettings-desktop-schemas.name}" ]; - # home.sessionVariables = { - # GTK_THEME = pkgs.rice.gtk.name; - # }; programs.wlogout = { enable = true; layout = builtins.fromJSON (builtins.readFile dots/wlogout/layout); @@ -556,24 +724,24 @@ in { editor.lsp.display-messages = true; }; languages = { - - language = [{ - name = "rust"; - config = { - cargo = { - buildScripts = { + language = [ + { + name = "rust"; + config = { + cargo = { + buildScripts = { + enable = true; + }; + }; + procMacro = { enable = true; }; + check = { + command = "clippy"; # as i walk through the valley of the sha + }; }; - procMacro = { - enable = true; - }; - check = { - command = "clippy"; # as i walk through the valley of the sha - }; - }; - }]; - + } + ]; }; }; diff --git a/home/overlay.nix b/home/overlay.nix index 9663466..c734e09 100644 --- a/home/overlay.nix +++ b/home/overlay.nix @@ -1,5 +1,4 @@ inputs: _: prev: { - hyprland-s76 = prev.callPackage ./hyprland-system76-scheduler-integration.nix {}; wlogout_style_base = dots/wlogout/style.css; wlogout_style = prev.runCommandLocal "wlogout_style_base" {wlogpath = lib.strings.escape ["/"] "${pkgs.wlogout}";} '' cp ${wlogout_style_base} $out diff --git a/home/programs/eww/default.nix b/home/programs/eww/default.nix index c3c0a44..23c5383 100644 --- a/home/programs/eww/default.nix +++ b/home/programs/eww/default.nix @@ -5,15 +5,11 @@ ... }: let dependencies = with pkgs; [ - config.wayland.windowManager.hyprland.package cfg.package bash bc - blueberry - bluez coreutils dbus - dunst findutils gawk gnome.gnome-control-center @@ -23,7 +19,6 @@ jaq light networkmanager - pavucontrol playerctl procps pulseaudio @@ -35,7 +30,6 @@ wget wireplumber wlogout - fuzzel swaynotificationcenter ]; @@ -49,10 +43,10 @@ done ''; - cfg = config.programs.eww-hyprland; + cfg = config.programs.eww-custom; in { - options.programs.eww-hyprland = { - enable = lib.mkEnableOption "eww Hyprland config"; + options.programs.eww-custom = { + enable = lib.mkEnableOption "eww config"; package = lib.mkOption { type = with lib.types; nullOr package; @@ -63,7 +57,7 @@ in { autoReload = lib.mkOption { type = lib.types.bool; - default = false; + default = true; defaultText = lib.literalExpression "false"; description = "Whether to restart the eww daemon and windows on change."; }; @@ -73,10 +67,8 @@ in { default = null; defaultText = lib.literalExpression "null"; description = '' - SCSS file with colors defined in the same way as Catppuccin colors are, + SCSS file with colors defined in the same arbitrary and stupid way as Cringepuccin colors are, to be used by eww. - - Defaults to Catppuccin Mocha. ''; }; }; diff --git a/home/programs/eww/modules/current_win.yuck b/home/programs/eww/modules/current_win.yuck index a4142d7..de858af 100644 --- a/home/programs/eww/modules/current_win.yuck +++ b/home/programs/eww/modules/current_win.yuck @@ -2,7 +2,7 @@ (box (button :class "module" - {current_win.title} + "${current_win.title}"" ) ) ) diff --git a/home/programs/eww/scripts/current_win b/home/programs/eww/scripts/current_win index 0ac57b6..cdf50e8 100755 --- a/home/programs/eww/scripts/current_win +++ b/home/programs/eww/scripts/current_win @@ -1,18 +1,7 @@ #!/usr/bin/env bash limit=128 -socat -u UNIX-CLIENT:/tmp/hypr/$HYPRLAND_INSTANCE_SIGNATURE/.socket2.sock STDOUT | -while read line; do - if [[ "$line" == activewindow\>\>* ]]; then - windowtitle="$(echo $line | cut -d',' -f 2)" - apptitle="$(echo $line | cut -d',' -f 1 | cut -d'>' -f 3 | rev | cut -d'.' -f -1 | rev)" - combined="$windowtitle - $apptitle" - if [[ "${#combined}" -lt $limit ]]; then - echo '{"title": "'$combined'"}' - else - clipto=$((limit-${#apptitle})) - echo '{"title": "'"${windowtitle:0:$clipto} - $apptitle"'"}' - fi - fi -done - +swaymsg -m -t subscribe '[ "window" ]' | while read line; do + title=$(printf $line | gojq -r ."container.name" | cut -c -$limit) + echo '{ "title": "'$title'" }' +done \ No newline at end of file diff --git a/home/programs/eww/scripts/workspaces b/home/programs/eww/scripts/workspaces index ac83a48..53b5886 100755 --- a/home/programs/eww/scripts/workspaces +++ b/home/programs/eww/scripts/workspaces @@ -8,17 +8,14 @@ dimmed=("#f5c2e7" "#f9e2af" "#94e2d5" "#b4befe") empty="#313244" # get initial focused workspace -focusedws=$(hyprctl -j monitors | jaq -r '.[] | select(.focused == true) | .activeWorkspace.id') +# whatever +# focusedws=$(swaymsg -t get_workspaces -r | ) declare -A o=([1]=0 [2]=0 [3]=0 [4]=0) -declare -A monitormap -declare -A workspaces # set color for each workspace status() { if [ "${o[$1]}" -eq 1 ]; then - mon=${monitormap[${workspaces[$1]}]} - if [ "$focusedws" -eq "$1" ]; then echo -n "#ffd292" # echo -n "${colors[$mon]}" @@ -32,67 +29,31 @@ status() { fi } -# handle workspace create/destroy -workspace_event() { - o[$1]=$2 - while read -r k v; do workspaces[$k]="$v"; done < <(hyprctl -j workspaces | gojq -r '.[]|"\(.id) \(.monitor)"') -} -# handle monitor (dis)connects -monitor_event() { - while read -r k v; do monitormap["$k"]=$v; done < <(hyprctl -j monitors | gojq -r '.[]|"\(.name) \(.id) "') -} - -# get all apps titles in a workspace -applist() { - ws="$1" - - apps=$(hyprctl -j clients | jaq -jr '.[] | select(.workspace.id == '"$ws"') | .title + "\\n"') - echo -En "${apps%"\n"}" -} - # generate the json for eww generate() { echo -n '[' for i in {1..4}; do - echo -n ''"$([ "$i" -eq 1 ] || echo ,)" '{ "number": "'"$i"'", "color": "'"$(status "$i")"'" }' #, "tooltip": "'$(applist "$i")'" }' + echo -n ''"$([ "$i" -eq 1 ] || echo ,)" '{ "number": "'"$i"'", "color": "'"$(status "$i")"'" }' done echo ']' } -# setup - -# add monitors -monitor_event - -# add workspaces -while read -r k v; do workspaces[$k]="$v"; done < <(hyprctl -j workspaces | gojq -r '.[]|"\(.id) \(.monitor)"') - -# check occupied workspaces -for num in "${!workspaces[@]}"; do - o[$num]=1 -done # generate initial widget generate # main loop -socat -u UNIX-CONNECT:/tmp/hypr/"$HYPRLAND_INSTANCE_SIGNATURE"/.socket2.sock - | rg --line-buffered "workspace|mon(itor)?" | while read -r line; do - case ${line%>>*} in - "workspace") - focusedws=${line#*>>} +swaymsg -m -t subscribe '[ "workspace" ]' | jq -r '.change+" "+.current.name' | while read -r line; do + case ${line%' '*} in + "focus") + focusedws=${line#*' '} ;; - "focusedmon") - focusedws=${line#*,} + "init") + workspace_event "${line#*' '}" 1 ;; - "createworkspace") - workspace_event "${line#*>>}" 1 - ;; - "destroyworkspace") - workspace_event "${line#*>>}" 0 - ;; - "monitor"*) - monitor_event + "empty") + workspace_event "${line#*' '}" 0 ;; esac generate diff --git a/op.pal b/op.pal index efd2041..a9d6670 100644 --- a/op.pal +++ b/op.pal @@ -1,4 +1,4 @@ -background #3d3d42 +background #232326 foreground #f7eff1 color0 #434447 @@ -6,9 +6,10 @@ color8 #95988a color1 #ac383d color9 #d45f68 color2 #709c4c -color10 #c3e643 +color10 #8baf6f + color3 #c09875 -color11 #c3e643 +color11 #eda25c color4 #5b97de color12 #b8e3ff color5 #494286 diff --git a/overlay.nix b/overlay.nix index eff326e..85fb39c 100644 --- a/overlay.nix +++ b/overlay.nix @@ -1,6 +1,6 @@ {inputs, ...}: { additions = final: _prev: import ./pkgs {pkgs = final;}; - pkg-sets = final: _prev: { + pkg-sets = final: prev: { unstable = import inputs.nixpkgs { system = final.system; config.allowUnfree = true; @@ -12,4 +12,11 @@ }; rice = import ./rice.nix; podman-stable = final: prev: {podman-stable = final.stable.podman;}; + wlroots = final: prev: { + wlroots = final.unstable.wlroots_0_16.overrideAttrs (wfinal: wprev: { + postPatch = wprev.postPatch + ''substituteInPlace render/gles2/renderer.c --replace "glFlush();" "glFinish();"''; + }); + }; + sway-unwrapped = final: prev: {sway-unwrapped = final.unstable.sway-unwrapped.override {wlroots = final.wlroots;};}; + sway = final: prev: {sway = final.unstable.sway.override {sway-unwrapped = final.sway-unwrapped;};}; } diff --git a/pal.conf b/pal.conf index f02d86f..9535d73 100644 --- a/pal.conf +++ b/pal.conf @@ -1,20 +1,27 @@ -background #272a2a +background #1b2021 foreground #cecbca -color0 #1b2021 +color0 #272a2a color8 #202e2f + color1 #c43325 color9 #c46056 + color2 #8cc992 color10 #c2dab0 + color3 #ffb852 -color11 #ffd292 +color11 #ffab5b + color4 #5299ff color12 #92beff + color5 #645ac9 color13 #928cc9 + color6 #5abfc9 color14 #8cc4c9 + color7 #b0c2da color15 #caccce diff --git a/rice.nix b/rice.nix index 9329ce9..379e9df 100644 --- a/rice.nix +++ b/rice.nix @@ -1,7 +1,7 @@ final: prev: with prev.lib.nix-rice; let - theme = kitty-themes.parseTheme ./op.pal; - # theme = kitty-themes.parseTheme ./pal.conf; + # theme = kitty-themes.parseTheme ./op.pal; + theme = kitty-themes.parseTheme ./pal.conf; # theme = kitty-themes.getThemeByName "everforest_dark_hard"; in rec { rice = { @@ -87,15 +87,13 @@ in rec { gtk-theme = { name = "nix-rice"; package = prev.callPackage ./gtk-theme.nix {} {palette = palette.toRGBShortHex final.rice.palette;}; - # name = "Everforest-Dark"; - # package = final.everforest-theme; }; borders = { - thickness = 1; + thickness = 2; rounding = 0; - gaps_in = 0; - gaps_out = 0; + gaps_in = 4; + gaps_out = 12; }; bg = { @@ -104,10 +102,6 @@ in rec { path = ./wallpaper.png; sha256 = "8d944e1ca6c3769060b715467a0dbe0f83ee99ff8b59aac80c2cacb7e838b7f9"; }; - # image = prev.fetchurl { - # url = "https://github.com/Apeiros-46B/everforest-walls/blob/main/close_up/circuit_1.png?raw=true"; - # sha256 = "sha256-5V9XlJtC8n3zZueg5y/pWW1Oz75YPcEydLU/E/+z+2k="; - # }; }; }; # /rice } diff --git a/system/configuration.nix b/system/configuration.nix index df76ea4..f045b9a 100644 --- a/system/configuration.nix +++ b/system/configuration.nix @@ -13,9 +13,13 @@ inputs.nur.overlay outputs.overlays.additions outputs.overlays.pkg-sets - outputs.overlays.podman-stable + outputs.overlays.wlroots + outputs.overlays.sway-unwrapped + outputs.overlays.sway inputs.nix-rice.overlays.default outputs.overlays.rice + inputs.helix.overlays.default + # inputs.eww.overlays.default ]; config = { allowUnfree = true; @@ -26,28 +30,19 @@ nix = { registry = lib.mapAttrs (_: value: {flake = value;}) inputs; settings = { - substituters = ["https://hyprland.cachix.org"]; - trusted-public-keys = ["hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="]; experimental-features = "nix-command flakes"; }; }; imports = [ - inputs.hyprland.nixosModules.default - # inputs.declarative-cachix.nixosModules.declarative-cachix - # inputs.helix ]; - # cachix = [ - # "nix-community" - # ]; - nix.extraOptions = '' keep-outputs = true keep-derivations = true ''; - systemd.services.NetworkManager-wait-online.enable = true; # for some reason nm doesn't enable without this lel + systemd.services.NetworkManager-wait-online.enable = true; # for some reason nm doesn't enable without this environment.pathsToLink = ["/share/zsh"]; @@ -81,52 +76,14 @@ services.xserver.xkbOptions = "caps:escape"; services.xserver.layout = "us"; services.xserver.libinput.enable = true; - services.xserver.displayManager.lightdm.enable = false; # gets installed by default.. services.udisks2.enable = true; - - programs.hyprland = { - enable = true; - xwayland = { - enable = true; - hidpi = false; - }; - nvidiaPatches = true; - }; - - environment.etc = { - "hyprland_login" = with pkgs.rice; { - enable = true; - text = '' - misc { - disable_hyprland_logo=true - disable_splash_rendering=true - } - monitor=,highrr,auto,1 - windowrule=fullscreen,^(gtkgreet)$ - windowrule=dimaround,^(gtkgreet)$ - bind=SUPER,Return,exec,${lib.getExe pkgs.greetd.gtkgreet} - bind=,Escape,exec,wlogout - bind=SUPER_SHIFT,e,exec,wlogout - env = GTK_THEME,nix-rice - exec = swaybg -i ${bg.image} -m fill - exec = ${pkgs.dbus}/bin/dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY - exec = gsettings set org.gnome.desktop.interface gtk-theme '${gtk-theme.name}' - exec = gsettings set org.gnome.desktop.interface font-name '${fonts.sans.name}' - exec = gsettings set org.gnome.desktop.interface icon-theme '${icons.name}' - exec = ${lib.getExe pkgs.greetd.gtkgreet} -l -c "dbus-run-session Hyprland" -s "${gtk-theme.package}/share/themes/nix-rice/gtk-3.0/gtk.css" - ''; - }; - }; - services.greetd = { enable = true; settings = { default_session = { - command = "${lib.getExe pkgs.greetd.tuigreet} -r -g \"what's good\" --time --sessions ${config.services.xserver.displayManager.sessionData.desktops}/share/wayland-sessions"; - # command = "${lib.getExe pkgs.hyprland} -c /etc/hyprland_login"; - # command = "${pkgs.dbus}/bin/dbus-run-session ${lib.getExe pkgs.hyprland} -c /etc/hyprland_login"; + command = "${lib.getExe pkgs.greetd.tuigreet} -r -g \"what's good\" --time --sessions ${pkgs.sway}/share/wayland-sessions -c 'sway --unsupported-gpu'"; user = "greeter"; }; }; @@ -165,19 +122,6 @@ qt.style = "gtk2"; programs.zsh.enable = true; - programs.xonsh = { - enable = true; - config = - builtins.replaceStrings - ["#NEWPATHS"] - [ - '' - '${pkgs.xonsh}/lib/python3.10/site-packages', - '${pkgs.python310Packages.pip}/lib/python3.10/site-packages' - '' - ] - (builtins.readFile ../home/dots/xonshrc); - }; users.defaultUserShell = pkgs.zsh; services.tumbler.enable = true; # thumbnailer for thunar @@ -219,24 +163,19 @@ programs.nix-index.enableZshIntegration = false; programs.nix-index.enableBashIntegration = false; - # services.mullvad-vpn.enable = true; - - networking.wg-quick.interfaces = { - mullvad = { - address = ["10.67.227.64/32"]; - dns = ["10.64.0.1"]; - privateKey = "OOPAlePjy7x2DVpg6d7BoBqpST3lDJSYght185tSUl8="; - peers = [ - { - publicKey = "LXuRwa9JRTt2/UtldklKGlj/IVLORITqgET4II4DRkU="; - allowedIPs = ["0.0.0.0/0"]; - endpoint = "146.70.200.194:51820"; - persistentKeepalive = 25; - } - ]; + programs.sway = { + # to use home-manager + package = null; + enable = true; + wrapperFeatures = { + base = true; + gtk = true; }; + # extraPackages = with pkgs; [swaylock swayidle foot dmenu vulkan-validation-layers]; }; + services.mullvad-vpn.enable = true; + networking.firewall.enable = true; networking.firewall = { trustedInterfaces = ["tailscale0"]; @@ -260,5 +199,5 @@ ''; }; - system.stateVersion = "23.05"; # Did you read the comment? # lol no + system.stateVersion = "22.11"; # Did you read the comment? } diff --git a/system/quiver.nix b/system/quiver.nix index b95c629..63d378c 100644 --- a/system/quiver.nix +++ b/system/quiver.nix @@ -15,7 +15,6 @@ boot.initrd.availableKernelModules = ["xhci_pci" "ahci" "usbcore" "sd_mod"]; boot.initrd.kernelModules = []; boot.kernelModules = ["kvm-amd" "i2c-dev"]; - boot.extraModulePackages = [pkgs.linuxPackages_xanmod_latest.system76-scheduler]; boot.kernelParams = [ "nvidia_drm.modeset=1" "mitigations=off" @@ -45,6 +44,7 @@ environment.sessionVariables = rec { ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE = "fg=5"; WLR_NO_HARDWARE_CURSORS = "1"; + # WLR_RENDERER = "vulkan"; GBM_BACKEND = "nvidia-drm"; NVD_BACKEND = "direct"; __GLX_VENDOR_LIBRARY_NAME = "nvidia"; @@ -56,7 +56,6 @@ virtualisation = { podman = { - # package = pkgs.podman-stable; enable = true; dockerCompat = true; defaultNetwork.settings.dns_enabled = true; @@ -87,18 +86,6 @@ }; }; - services.dbus.packages = [ - pkgs.linuxPackages_xanmod_latest.system76-scheduler - ]; - - systemd.packages = [ - pkgs.linuxPackages_xanmod_latest.system76-scheduler - ]; - - environment.etc = { - "system76-scheduler".source = "${pkgs.linuxPackages_xanmod_latest.system76-scheduler}/etc/system76-scheduler"; - }; - services.hardware.openrgb = { enable = true; motherboard = "amd"; @@ -112,7 +99,6 @@ wl-clipboard wl-clipboard-x11 xclip - # system76-scheduler ]; networking.hostName = "quiver"; # Define your hostname.