Merge remote-tracking branch 'origin/nixos' into nixos-work

This commit is contained in:
Moritz Böhme 2023-08-22 09:43:38 +02:00
commit 77cfaa05db
13 changed files with 282 additions and 170 deletions

188
flake.lock generated
View file

@ -9,11 +9,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1689334118, "lastModified": 1690228878,
"narHash": "sha256-djk5AZv1yU84xlKFaVHqFWvH73U7kIRstXwUAnDJPsk=", "narHash": "sha256-9Xe7JV0krp4RJC9W9W9WutZVlw6BlHTFMiUP/k48LQY=",
"owner": "ryantm", "owner": "ryantm",
"repo": "agenix", "repo": "agenix",
"rev": "0d8c5325fc81daf00532e3e26c6752f7bcde1143", "rev": "d8c973fd228949736dedf61b7f8cc1ece3236792",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -25,11 +25,11 @@
"arkenfox-userjs": { "arkenfox-userjs": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1689799111, "lastModified": 1691983650,
"narHash": "sha256-JGucBOBTSYBapMrI7GCMAqTFaT1O7Kqw0S3uBtFawIo=", "narHash": "sha256-oA1bIpPc27Kk89n3JGpni7RkcIDRVAsTjUfjRHbKS24=",
"owner": "arkenfox", "owner": "arkenfox",
"repo": "user.js", "repo": "user.js",
"rev": "6151d664acced94364e7e3a075e6ac3ca555ef48", "rev": "915f39959c7e077f00477e6ce34a0f9f9e3e7c6b",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -133,11 +133,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1688466019, "lastModified": 1690933134,
"narHash": "sha256-VeM2akYrBYMsb4W/MmBo1zmaMfgbL4cH3Pu8PGyIwJ0=", "narHash": "sha256-ab989mN63fQZBFrkk4Q8bYxQCktuHmBIBqUG1jl6/FQ=",
"owner": "hercules-ci", "owner": "hercules-ci",
"repo": "flake-parts", "repo": "flake-parts",
"rev": "8e8d955c22df93dbe24f19ea04f47a74adbdc5ec", "rev": "59cf3f1447cfc75087e7273b04b31e689a8599fb",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -206,7 +206,7 @@
}, },
"flake-utils_2": { "flake-utils_2": {
"inputs": { "inputs": {
"systems": "systems_2" "systems": "systems_3"
}, },
"locked": { "locked": {
"lastModified": 1685518550, "lastModified": 1685518550,
@ -224,7 +224,7 @@
}, },
"flake-utils_3": { "flake-utils_3": {
"inputs": { "inputs": {
"systems": "systems_3" "systems": "systems_4"
}, },
"locked": { "locked": {
"lastModified": 1685518550, "lastModified": 1685518550,
@ -363,11 +363,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1689875525, "lastModified": 1692131549,
"narHash": "sha256-fgUrFH3bMZ6R7qgBTfuTRGlkZXIkdyjndl6ZbExbjE8=", "narHash": "sha256-MFjI8NL63/6HjMZpvJgnB/Pgg2dht22t45jOYtipZig=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "1443abd2696ec6bd6fb9701e6c26b277a27b4a3e", "rev": "75cfe974e2ca05a61b66768674032b4c079e55d4",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -381,11 +381,11 @@
"nixpkgs": "nixpkgs" "nixpkgs": "nixpkgs"
}, },
"locked": { "locked": {
"lastModified": 1688849364, "lastModified": 1690635289,
"narHash": "sha256-gW4x5YiCWFlckFiaLZo+RWJa1IyQ2Cx4jTrJzNy1OzQ=", "narHash": "sha256-ec77Yf7mqusmGkxrmYXEG4D0DqEcNRA3vFextWVQOVA=",
"owner": "hyprwm", "owner": "hyprwm",
"repo": "contrib", "repo": "contrib",
"rev": "3126196e7ed609e7c427a39dc126ea067de62a65", "rev": "bef073cff65917ba2d888aa4dc39bd9868e2b0a4",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -398,15 +398,16 @@
"inputs": { "inputs": {
"hyprland-protocols": "hyprland-protocols", "hyprland-protocols": "hyprland-protocols",
"nixpkgs": "nixpkgs_2", "nixpkgs": "nixpkgs_2",
"systems": "systems_2",
"wlroots": "wlroots", "wlroots": "wlroots",
"xdph": "xdph" "xdph": "xdph"
}, },
"locked": { "locked": {
"lastModified": 1689879667, "lastModified": 1692182360,
"narHash": "sha256-g6XQ1slkxXw1kddaUKBwvYktIPJczSbZVoe4EzjNjD8=", "narHash": "sha256-FSJEeAQj0viz52+GE774GiOOtU0X2B2KgXnRCgogSaU=",
"owner": "hyprwm", "owner": "hyprwm",
"repo": "Hyprland", "repo": "Hyprland",
"rev": "f864b15427b363443e767eb5e78f5dc9603c49f3", "rev": "78fa8adadc146a7efeebf63438c1140662484fba",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -420,14 +421,18 @@
"nixpkgs": [ "nixpkgs": [
"hyprland", "hyprland",
"nixpkgs" "nixpkgs"
],
"systems": [
"hyprland",
"systems"
] ]
}, },
"locked": { "locked": {
"lastModified": 1684265364, "lastModified": 1691753796,
"narHash": "sha256-AxNnWbthsuNx73HDQr0eBxrcE3+yfl/WsaXZqUFmkpQ=", "narHash": "sha256-zOEwiWoXk3j3+EoF3ySUJmberFewWlagvewDRuWYAso=",
"owner": "hyprwm", "owner": "hyprwm",
"repo": "hyprland-protocols", "repo": "hyprland-protocols",
"rev": "8c279b9fb0f2b031427dc5ef4eab53f2ed835530", "rev": "0c2ce70625cb30aef199cb388f99e19a61a6ce03",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -441,11 +446,11 @@
"nixpkgs": "nixpkgs_3" "nixpkgs": "nixpkgs_3"
}, },
"locked": { "locked": {
"lastModified": 1689547456, "lastModified": 1691060455,
"narHash": "sha256-jZQ377LqcazitvH2fVXKiL8kvmpGT3fuqev+yQqvuRw=", "narHash": "sha256-V5ulB9CkGh1ghiC4BKvRdoYKZzpaiOKzAOUmJIFkgM0=",
"owner": "hyprwm", "owner": "hyprwm",
"repo": "hyprpaper", "repo": "hyprpaper",
"rev": "ac5f7b038d5ac589d32f5ae18f9745bfe5200618", "rev": "e498c438b1e16dcf32ecb3030b20b83f7ed9ff6d",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -472,11 +477,11 @@
}, },
"master": { "master": {
"locked": { "locked": {
"lastModified": 1689880801, "lastModified": 1692198797,
"narHash": "sha256-jWeQSVczGNRNs48DWiAwb6ojKXb+woqoXoVsA1KwdUM=", "narHash": "sha256-4MwKoXIBfNI85zZ/tHyLT+M7sF2Zb0XoyhdXtlM6g2c=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "ebaae879a74f772ecc827d264e37960087a4b182", "rev": "c85be71df497312de66b65df8d7ad7b5c0c81d04",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -514,11 +519,11 @@
}, },
"locked": { "locked": {
"dir": "contrib", "dir": "contrib",
"lastModified": 1689785735, "lastModified": 1692141167,
"narHash": "sha256-QdjWbe4oNjIazmOrbJ9u5GadaqTV44RiYbiZoLgNKC8=", "narHash": "sha256-1My5JBKfHupN9D86eeX8JFr2Wk03qWJObk73NC1/x2s=",
"owner": "neovim", "owner": "neovim",
"repo": "neovim", "repo": "neovim",
"rev": "86ce3878d662c1dbfec61a5ad8e7c16c4283ed5c", "rev": "f92bda1dad462de81ec92134dfa9ba637edc7bb7",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -537,11 +542,11 @@
"nixpkgs": "nixpkgs_5" "nixpkgs": "nixpkgs_5"
}, },
"locked": { "locked": {
"lastModified": 1689811489, "lastModified": 1692144319,
"narHash": "sha256-rQ1gnq+ApoowEic21nIYIeQ0Qibb3IEEtwv0LgNIYDc=", "narHash": "sha256-sJ7KT+dfLEQbsNI2G+ZLKQ0tIS72roMv+xjC+0bTS9k=",
"owner": "nix-community", "owner": "nix-community",
"repo": "neovim-nightly-overlay", "repo": "neovim-nightly-overlay",
"rev": "65f2e8da89ba400e7bbad6fe2f51af0ed9f7e968", "rev": "3632032784ed4a7f761a61a3337f2e1d61210eae",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -561,11 +566,11 @@
"rust-overlay": "rust-overlay" "rust-overlay": "rust-overlay"
}, },
"locked": { "locked": {
"lastModified": 1689759503, "lastModified": 1691372739,
"narHash": "sha256-wFrcae6V58hIlDW+7NDoUXzXBmsU7W/k3V1KIePcwRA=", "narHash": "sha256-fZ8KfBMcIFO/R7xaWtB85SFeuUjb9SCH8fxYBnY8068=",
"owner": "oxalica", "owner": "oxalica",
"repo": "nil", "repo": "nil",
"rev": "59bcad0b13b5d77668c0c125fef71d7b41406d7a", "rev": "97abe7d3d48721d4e0fcc1876eea83bb4247825b",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -665,11 +670,11 @@
}, },
"nixpkgs_2": { "nixpkgs_2": {
"locked": { "locked": {
"lastModified": 1688500189, "lastModified": 1691654369,
"narHash": "sha256-djYYiY4lzJOlXOnTHytH6BUugrxHDZjuGxTSrU4gt4M=", "narHash": "sha256-gSILTEx1jRaJjwZxRlnu3ZwMn1FVNk80qlwiCX8kmpo=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "78419edadf0fabbe5618643bd850b2f2198ed060", "rev": "ce5e4a6ef2e59d89a971bc434ca8ca222b9c7f5e",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -713,11 +718,11 @@
}, },
"nixpkgs_5": { "nixpkgs_5": {
"locked": { "locked": {
"lastModified": 1689752456, "lastModified": 1692067901,
"narHash": "sha256-VOChdECcEI8ixz8QY+YC4JaNEFwQd1V8bA0G4B28Ki0=", "narHash": "sha256-kq8Pf/nmlXECDWMkQSRGQkjWsA6G0pjzZkfUEaTmXJE=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "7f256d7da238cb627ef189d56ed590739f42f13b", "rev": "ea95c0917609e5c48023cc7c6141bea2fdf13970",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -729,11 +734,11 @@
}, },
"nixpkgs_6": { "nixpkgs_6": {
"locked": { "locked": {
"lastModified": 1689752456, "lastModified": 1692128808,
"narHash": "sha256-VOChdECcEI8ixz8QY+YC4JaNEFwQd1V8bA0G4B28Ki0=", "narHash": "sha256-Di1Zm/P042NuwThMiZNrtmaAjd4Tm2qBOKHX7xUOfMk=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "7f256d7da238cb627ef189d56ed590739f42f13b", "rev": "4ed9856be002a730234a1a1ed9dcd9dd10cbdb40",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -791,11 +796,11 @@
"nvim-treesitter-textsubjects": { "nvim-treesitter-textsubjects": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1676144693, "lastModified": 1691029837,
"narHash": "sha256-4jb9v0xpO17wp85dzojKUQ6hUdNBx3T2tB4fSWoANus=", "narHash": "sha256-O57pMYtDR713ItAeUfdkcl2IfBLQcLEa2sb+AXhaqDs=",
"owner": "RRethy", "owner": "RRethy",
"repo": "nvim-treesitter-textsubjects", "repo": "nvim-treesitter-textsubjects",
"rev": "b913508f503527ff540f7fe2dcf1bf1d1f259887", "rev": "df75fcec548014f158cda6498ac38c4622c221e1",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -813,11 +818,11 @@
"nixpkgs-stable": "nixpkgs-stable" "nixpkgs-stable": "nixpkgs-stable"
}, },
"locked": { "locked": {
"lastModified": 1689668210, "lastModified": 1691747570,
"narHash": "sha256-XAATwDkaUxH958yXLs1lcEOmU6pSEIkatY3qjqk8X0E=", "narHash": "sha256-J3fnIwJtHVQ0tK2JMBv4oAmII+1mCdXdpeCxtIsrL2A=",
"owner": "cachix", "owner": "cachix",
"repo": "pre-commit-hooks.nix", "repo": "pre-commit-hooks.nix",
"rev": "eb433bff05b285258be76513add6f6c57b441775", "rev": "c5ac3aa3324bd8aebe8622a3fc92eeb3975d317a",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -829,11 +834,11 @@
"rofi-wayland": { "rofi-wayland": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1679493688, "lastModified": 1690115482,
"narHash": "sha256-8Hu9k84LNi+Gz8zJNE7AxYxmv8XXQz3cG7CFhv31fz4=", "narHash": "sha256-fUneGsSWpi8zYrTbF14e/fuf0vaXF8ckOo4OhL1tInM=",
"owner": "lbonn", "owner": "lbonn",
"repo": "rofi", "repo": "rofi",
"rev": "d06095b5ed40e5d28236b7b7b575ca867696d847", "rev": "ff2338c38fbf6e7049563acf55f9055bcf882a4e",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -896,11 +901,11 @@
"smartcolumn-nvim": { "smartcolumn-nvim": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1679417638, "lastModified": 1692020684,
"narHash": "sha256-DjPWBOLbzdfOQAx+6xgV1CD5NKuP1N6An2lmHNHd39Q=", "narHash": "sha256-lNEsAkKRpMgdO6Og0odpTn/t4qkzO7EuTjC5ABJhvXc=",
"owner": "m4xshen", "owner": "m4xshen",
"repo": "smartcolumn.nvim", "repo": "smartcolumn.nvim",
"rev": "0c572e3eae48874f25b74394a486f38cadb5c958", "rev": "4aa00ad766f3c0f0e2561e0eb42df3ea3743c135",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -911,11 +916,11 @@
}, },
"stable": { "stable": {
"locked": { "locked": {
"lastModified": 1689680872, "lastModified": 1692134936,
"narHash": "sha256-brNix2+ihJSzCiKwLafbyejrHJZUP0Fy6z5+xMOC27M=", "narHash": "sha256-Z68O969cioC6I3k/AFBxsuEwpJwt4l9fzwuAMUhCCs0=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "08700de174bc6235043cb4263b643b721d936bdb", "rev": "bfd953b2c6de4f550f75461bcc5768b6f966be10",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -942,16 +947,16 @@
}, },
"systems_2": { "systems_2": {
"locked": { "locked": {
"lastModified": 1681028828, "lastModified": 1689347949,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", "narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=",
"owner": "nix-systems", "owner": "nix-systems",
"repo": "default", "repo": "default-linux",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", "rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "nix-systems", "owner": "nix-systems",
"repo": "default", "repo": "default-linux",
"type": "github" "type": "github"
} }
}, },
@ -985,14 +990,29 @@
"type": "github" "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"
}
},
"telekasten-nvim": { "telekasten-nvim": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1689074017, "lastModified": 1691743763,
"narHash": "sha256-yBw0Ja9xBhHcEdzvKvg6LCDzmIgW9kg0XaXS7hcr958=", "narHash": "sha256-zYBMUzanFtjnsUrwxjHLvhRODLj1uwGi18wMUWnrqRA=",
"owner": "renerocksai", "owner": "renerocksai",
"repo": "telekasten.nvim", "repo": "telekasten.nvim",
"rev": "4a5e57eee9c5154ed77423bb7fa6619fdb0784cd", "rev": "584783fdbdd13bb691a435f86ed10a3717fa9e9a",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -1008,11 +1028,11 @@
"utils": "utils" "utils": "utils"
}, },
"locked": { "locked": {
"lastModified": 1690749969, "lastModified": 1692198673,
"narHash": "sha256-legyKOJljfuNrY74jsgA641E3q6hle4G6qz8YD55CgI=", "narHash": "sha256-kLhdmJ4uI248caVxQhYSq+IA+xQHDcp5in4eI8sJphk=",
"ref": "refs/heads/main", "ref": "refs/heads/main",
"rev": "e3fd65e98be42b367aef019812375e418ef77448", "rev": "37dc5c727a3d73778d6ee9d63c1468357cf0ed72",
"revCount": 18, "revCount": 20,
"type": "git", "type": "git",
"url": "https://gitea.moritzboeh.me/moritz/timers.git" "url": "https://gitea.moritzboeh.me/moritz/timers.git"
}, },
@ -1023,7 +1043,7 @@
}, },
"utils": { "utils": {
"inputs": { "inputs": {
"systems": "systems_4" "systems": "systems_5"
}, },
"locked": { "locked": {
"lastModified": 1687171271, "lastModified": 1687171271,
@ -1043,18 +1063,18 @@
"flake": false, "flake": false,
"locked": { "locked": {
"host": "gitlab.freedesktop.org", "host": "gitlab.freedesktop.org",
"lastModified": 1689611045, "lastModified": 1691073628,
"narHash": "sha256-3RTOlQabkNetQ4O4UzSf57JPco9VGVHhSU1ls5uKBeE=", "narHash": "sha256-LlxE3o3UzRY7APYVLGNKM30DBMcDifCRIQiMVSbYLIc=",
"owner": "wlroots", "owner": "wlroots",
"repo": "wlroots", "repo": "wlroots",
"rev": "7791ffe0584c4ac13c170e1661ce33bdbd4a9b9e", "rev": "c74f89d4f84bfed0284d3908aee5d207698c70c5",
"type": "gitlab" "type": "gitlab"
}, },
"original": { "original": {
"host": "gitlab.freedesktop.org", "host": "gitlab.freedesktop.org",
"owner": "wlroots", "owner": "wlroots",
"repo": "wlroots", "repo": "wlroots",
"rev": "7791ffe0584c4ac13c170e1661ce33bdbd4a9b9e", "rev": "c74f89d4f84bfed0284d3908aee5d207698c70c5",
"type": "gitlab" "type": "gitlab"
} }
}, },
@ -1067,14 +1087,18 @@
"nixpkgs": [ "nixpkgs": [
"hyprland", "hyprland",
"nixpkgs" "nixpkgs"
],
"systems": [
"hyprland",
"systems"
] ]
}, },
"locked": { "locked": {
"lastModified": 1685385764, "lastModified": 1691841170,
"narHash": "sha256-r+XMyOoRXq+hlfjayb+fyi9kq2JK48TrwuNIAXqlj7U=", "narHash": "sha256-RCTm1/MVWYPnReMgyp7tr2ogGYo/pvw38jZaFwemgPU=",
"owner": "hyprwm", "owner": "hyprwm",
"repo": "xdg-desktop-portal-hyprland", "repo": "xdg-desktop-portal-hyprland",
"rev": "4d9ff0c17716936e0b5ca577a39e263633901ed1", "rev": "57a3a41ba6b358109e4fc25c6a4706b5f7d93c6b",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -130,7 +130,7 @@ in
f f
]; ];
fonts.fonts = with pkgs; [ fonts.packages = with pkgs; [
(nerdfonts.override { (nerdfonts.override {
fonts = [ "FiraCode" ]; fonts = [ "FiraCode" ];
}) })

View file

@ -7,8 +7,6 @@ with lib;
let let
cfg = config.my.programs.hyprland; cfg = config.my.programs.hyprland;
boolToYesNo = bool: if bool then "yes" else "no";
mkRule = rule: windowRegexes: "windowrulev2 = ${rule},${concatStringsSep "," windowRegexes}"; mkRule = rule: windowRegexes: "windowrulev2 = ${rule},${concatStringsSep "," windowRegexes}";
mkRules = rules: windowRegexes: concatStringsSep "\n" (map (flip mkRule windowRegexes) rules); mkRules = rules: windowRegexes: concatStringsSep "\n" (map (flip mkRule windowRegexes) rules);
in in
@ -58,12 +56,14 @@ in
# See https://wiki.hyprland.org/Configuring/Variables/ for more # See https://wiki.hyprland.org/Configuring/Variables/ for more
rounding = 3 rounding = 3
blur = ${boolToYesNo cfg.blur} blur {
blur_size = 3 enabled = ${boolToString cfg.blur}
blur_passes = 3 size = 3
blur_new_optimizations = on passes = 3
new_optimizations = on
}
drop_shadow = ${boolToYesNo cfg.shadows} drop_shadow = ${boolToString cfg.shadows}
shadow_range = 10 shadow_range = 10
shadow_render_power = 2 shadow_render_power = 2
@ -73,7 +73,7 @@ in
animations { animations {
enabled = yes enabled = yes
# Some default Lanimations, see https://wiki.hyprland.org/Configuring/Animations/ for more # see https://wiki.hyprland.org/Configuring/Animations/ for more
bezier = sine, 0.445, 0.05, 0.55, 0.95 bezier = sine, 0.445, 0.05, 0.55, 0.95
bezier = quad, 0.455, 0.03, 0.515, 0.955 bezier = quad, 0.455, 0.03, 0.515, 0.955
@ -120,16 +120,6 @@ in
# windowrulev2 = float,class:^(kitty)$,title:^(kitty)$ # windowrulev2 = float,class:^(kitty)$,title:^(kitty)$
# See https://wiki.hyprland.org/Configuring/Window-Rules/ for more # See https://wiki.hyprland.org/Configuring/Window-Rules/ for more
${optionalString cfg.blur ''
# Kitty
windowrulev2 = opacity 0.95 0.95, class:^kitty$
# Rofi
${mkRules ["float" "opacity 0.85 0.85" "noborder"] ["class:^([rR]ofi)$"]}
windowrulev2 = opacity 0.85 0.85, floating:1
''}
# Firefox Sharing Indicator # Firefox Sharing Indicator
${mkRules ["float" "move 49% 40" "noborder" "nofullscreenrequest"] ["title:^(.*Sharing Indicator)$"]} ${mkRules ["float" "move 49% 40" "noborder" "nofullscreenrequest"] ["title:^(.*Sharing Indicator)$"]}

View file

@ -9,7 +9,7 @@ with lib;
let let
cfg = config.my.programs.hyprland; cfg = config.my.programs.hyprland;
hyprland = pkgs.hyprland.override { nvidiaPatches = cfg.nvidiaSupport; }; hyprland = pkgs.hyprland.override { enableNvidiaPatches = cfg.nvidiaSupport; };
in in
{ {
options.my.programs.hyprland = { options.my.programs.hyprland = {

View file

@ -21,6 +21,7 @@ in
cursor_shape = "underline"; cursor_shape = "underline";
window_padding_width = 3; window_padding_width = 3;
confirm_os_window_close = 0; confirm_os_window_close = 0;
background_opacity = "0.92";
}; };
keybindings = { keybindings = {
"ctrl+plus" = "change_font_size all +2.0"; "ctrl+plus" = "change_font_size all +2.0";

View file

@ -1,3 +1,6 @@
vim.g.coq_settings = { vim.g.coq_settings = {
auto_start = "shut-up", auto_start = "shut-up",
keymap = {
jump_to_mark = "<c-n>",
},
} }

View file

@ -111,7 +111,7 @@ with builtins;
} }
{ {
plugin = nvim-lspconfig; plugin = nvim-lspconfig;
event = [ "BufReadPre" "BufNewFile" ]; event = [ "BufRead" "BufNewFile" ];
conf = readFile ./nvim-lspconfig.lua; conf = readFile ./nvim-lspconfig.lua;
dependencies = [ dependencies = [
{ {
@ -126,25 +126,35 @@ with builtins;
{ plugin = lsp_lines-nvim; } { plugin = lsp_lines-nvim; }
{ {
plugin = nvim-ufo; plugin = nvim-ufo;
conf = readFile ./nvim-ufo.lua;
dependencies = [ dependencies = [
{ plugin = promise-async; } { plugin = promise-async; }
]; ];
} }
{ {
plugin = neodev-nvim; plugin = neodev-nvim;
conf = readFile ./neodev-nvim.lua;
}
{
plugin = inc-rename-nvim;
conf = /* lua */ '' conf = /* lua */ ''
require("neodev").setup({ require("inc_rename").setup {
override = function(root_dir, library) input_buffer_type = "dressing",
if root_dir:find("/home/moritz/.dotfiles/", 1, true) == 1 then }
library.enabled = true
library.plugins = true
end
end,
})
''; '';
dependencies = [
{
plugin = dressing-nvim;
} }
]; ];
} }
];
}
{
plugin = statuscol-nvim;
event = [ "VeryLazy" ];
conf = readFile ./statuscol-nvim.lua;
}
{ {
plugin = vim-fugitive; plugin = vim-fugitive;
event = [ "VeryLazy" ]; event = [ "VeryLazy" ];
@ -191,8 +201,6 @@ with builtins;
{ key = "<leader>sk"; cmd = "<cmd>Telescope keymaps<cr>"; desc = "Keymaps"; } { key = "<leader>sk"; cmd = "<cmd>Telescope keymaps<cr>"; desc = "Keymaps"; }
{ key = "<leader>ss"; cmd = "<cmd>Telescope lsp_document_symbols<cr>"; desc = "Symbols (Document)"; } { key = "<leader>ss"; cmd = "<cmd>Telescope lsp_document_symbols<cr>"; desc = "Symbols (Document)"; }
{ key = "<leader>sS"; cmd = "<cmd>Telescope lsp_workspace_symbols<cr>"; desc = "Symbols (Workspace)"; } { key = "<leader>sS"; cmd = "<cmd>Telescope lsp_workspace_symbols<cr>"; desc = "Symbols (Workspace)"; }
{ key = "<leader>gc"; cmd = "<cmd>Telescope git_commits<cr>"; desc = "Commits"; }
{ key = "<leader>gs"; cmd = "<cmd>Telescope git_status<cr>"; desc = "Status"; }
]; ];
dependencies = [ dependencies = [
{ plugin = plenary-nvim; } { plugin = plenary-nvim; }
@ -274,5 +282,14 @@ with builtins;
plugin = hmts-nvim; plugin = hmts-nvim;
ft = [ "nix" ]; ft = [ "nix" ];
} }
{
plugin = zen-mode-nvim;
keys = [
{ key = "<leader>tz"; cmd = "<cmd>ZenMode<cr>"; desc = "Zen mode"; }
];
dependencies = [
{ plugin = twilight-nvim; }
];
}
]; ];
} }

View file

@ -1,22 +1,15 @@
require("gitsigns").setup() require("gitsigns").setup()
require("which-key").register({ require("which-key").register({
["["] = { ["[h"] = { "<cmd>Gitsigns prev_hunk<cr>", "Previous hunk" },
h = { "<cmd>Gitsigns prev_hunk<cr>", "Previous hunk" }, ["]h"] = { "<cmd>Gitsigns next_hunk<cr>", "Next hunk" },
}, ["<leader>g"] = {
["]"] = {
h = { "<cmd>Gitsigns next_hunk<cr>", "Next hunk" },
},
})
require("which-key").register({
h = {
name = "hunk",
s = { "<cmd>Gitsigns stage_hunk<cr>", "Stage hunk", mode = { "n", "v" } }, s = { "<cmd>Gitsigns stage_hunk<cr>", "Stage hunk", mode = { "n", "v" } },
r = { "<cmd>Gitsigns reset_hunk<cr>", "Reset hunk", mode = { "n", "v" } }, r = { "<cmd>Gitsigns reset_hunk<cr>", "Reset hunk", mode = { "n", "v" } },
S = { "<cmd>Gitsigns stage_buffer<cr>", "Stage buffer" }, S = { "<cmd>Gitsigns stage_buffer<cr>", "Stage buffer" },
R = { "<cmd>Gitsigns reset_buffer<cr>", "Reset buffer" }, R = { "<cmd>Gitsigns reset_buffer<cr>", "Reset buffer" },
u = { "<cmd>Gitsigns undo_stage_hunk<cr>", "Undo stage hunk" }, u = { "<cmd>Gitsigns undo_stage_hunk<cr>", "Undo stage hunk" },
p = { "<cmd>Gitsigns preview_hunk_inline<cr>", "Preview hunk (inline)" },
P = { "<cmd>Gitsigns preview_hunk<cr>", "Preview hunk (float)" },
}, },
}, { prefix = "<leader>g" }) ["ih"] = { ":<C-U>Gitsigns select_hunk<cr>", "gitsigns hunk", mode = { "o", "x" } },
require("which-key").register({ })
h = { ":<C-U>Gitsigns select_hunk<cr>", "Gitsigns select hunk" },
}, { prefix = "i", mode = { "o", "x" } })

View file

@ -0,0 +1,8 @@
require("neodev").setup({
override = function(root_dir, library)
if root_dir:find("/home/moritz/.dotfiles/", 1, true) == 1 then
library.enabled = true
library.plugins = true
end
end,
})

View file

@ -5,63 +5,43 @@ vim.diagnostic.config({
virtual_text = false, virtual_text = false,
}) })
vim.o.foldcolumn = "1" -- '0' is not bad
vim.o.foldlevel = 99 -- Using ufo provider need a large value, feel free to decrease the value
vim.o.foldlevelstart = 99
vim.o.foldenable = true
vim.o.fillchars = [[eob: ,fold: ,foldopen:,foldsep: ,foldclose:]]
vim.o.statuscolumn = "%= "
-- FIXME: figure out how to put on the other side without having to do a lot of shifting
.. "%s" -- sign column
.. "%{%" -- evaluate this, and then evaluate what it returns
.. "&number ?"
.. "(v:relnum ?"
-- when showing relative numbers, make sure to pad so things don't shift as you move the cursor
.. 'printf("%"..len(line("$")).."s", v:relnum)'
.. ":"
.. "v:lnum"
.. ")"
.. ":"
.. '""'
.. " " -- space between lines and fold
.. "%}"
.. "%= "
.. "%#FoldColumn#" -- highlight group for fold
.. "%{" -- expression for showing fold expand/colapse
.. "foldlevel(v:lnum) > foldlevel(v:lnum - 1)" -- any folds?
.. "? (foldclosed(v:lnum) == -1" -- currently open?
.. '? ""' -- point down
.. ': ""' -- point to right
.. ")"
.. ': " "' -- blank for no fold, or inside fold
.. "}"
.. "%= " -- spacing between end of column and start of text
-- Using ufo provider need remap `zR` and `zM`. If Neovim is 0.6.1, remap yourself
require("which-key").register({
z = {
R = { require("ufo").openAllFolds, "Open all folds" },
M = { require("ufo").closeAllFolds, "Close all folds" },
},
})
local capabilities = vim.lsp.protocol.make_client_capabilities() local capabilities = vim.lsp.protocol.make_client_capabilities()
-- NOTE for nvim-ufo
-- Tell the server the capability of foldingRange, -- Tell the server the capability of foldingRange,
-- Neovim hasn't added foldingRange to default capabilities, users must add it manually -- Neovim hasn't added foldingRange to default capabilities, users must add it manually
capabilities.textDocument.foldingRange = { capabilities.textDocument.foldingRange = {
dynamicRegistration = false, dynamicRegistration = false,
lineFoldingOnly = true, lineFoldingOnly = true,
} }
require("ufo").setup() -- NOTE https://github.com/neovim/neovim/pull/22405
capabilities.didChangeWatchedFiles = {
dynamicRegistration = true,
}
local lspconfig = require("lspconfig") local lspconfig = require("lspconfig")
local on_attach_def = function(client, bufnr) local on_attach_def = function(client, bufnr)
require("which-key").register({ require("which-key").register({
K = { vim.lsp.buf.hover, "Hover" }, K = {
function()
local winid = require("ufo").peekFoldedLinesUnderCursor()
if not winid then
vim.lsp.buf.hover()
end
end,
"Hover",
},
["<leader>"] = { ["<leader>"] = {
l = { l = {
name = "lsp",
d = { vim.diagnostic.open_float, "Open diagnostic window" }, d = { vim.diagnostic.open_float, "Open diagnostic window" },
c = { vim.lsp.buf.code_action, "Code action" }, c = { vim.lsp.buf.code_action, "Code action" },
r = { vim.lsp.buf.rename, "Rename" }, r = {
function()
return ":IncRename " .. vim.fn.expand("<cword>")
end,
"Rename",
expr = true,
},
f = { f = {
function() function()
vim.lsp.buf.format({ async = true }) vim.lsp.buf.format({ async = true })

View file

@ -0,0 +1,74 @@
vim.o.foldcolumn = "1" -- '0' is not bad
vim.o.foldlevel = 99 -- Using ufo provider need a large value, feel free to decrease the value
vim.o.foldlevelstart = 99
vim.o.foldenable = true
local ftMap = {
vim = "indent",
python = { "indent" },
git = "",
}
---@param bufnr number
---@return Promise
local function customizeSelector(bufnr)
local function handleFallbackException(err, providerName)
if type(err) == "string" and err:match("UfoFallbackException") then
return require("ufo").getFolds(bufnr, providerName)
else
return require("promise").reject(err)
end
end
return require("ufo")
.getFolds(bufnr, "lsp")
:catch(function(err)
return handleFallbackException(err, "treesitter")
end)
:catch(function(err)
return handleFallbackException(err, "indent")
end)
end
local handler = function(virtText, lnum, endLnum, width, truncate)
local newVirtText = {}
local suffix = (" 󰁂 %d "):format(endLnum - lnum)
local sufWidth = vim.fn.strdisplaywidth(suffix)
local targetWidth = width - sufWidth
local curWidth = 0
for _, chunk in ipairs(virtText) do
local chunkText = chunk[1]
local chunkWidth = vim.fn.strdisplaywidth(chunkText)
if targetWidth > curWidth + chunkWidth then
table.insert(newVirtText, chunk)
else
chunkText = truncate(chunkText, targetWidth - curWidth)
local hlGroup = chunk[2]
table.insert(newVirtText, { chunkText, hlGroup })
chunkWidth = vim.fn.strdisplaywidth(chunkText)
-- str width returned from truncate() may less than 2nd argument, need padding
if curWidth + chunkWidth < targetWidth then
suffix = suffix .. (" "):rep(targetWidth - curWidth - chunkWidth)
end
break
end
curWidth = curWidth + chunkWidth
end
table.insert(newVirtText, { suffix, "MoreMsg" })
return newVirtText
end
require("ufo").setup({
provider_selector = function(_, filetype, _)
return ftMap[filetype] or customizeSelector
end,
fold_virt_text_handler = handler,
})
-- Using ufo provider need remap `zR` and `zM`. If Neovim is 0.6.1, remap yourself
require("which-key").register({
z = {
R = { require("ufo").openAllFolds, "Open all folds" },
M = { require("ufo").closeAllFolds, "Close all folds" },
},
})

View file

@ -1,4 +1,4 @@
require("oil").setup() require("oil").setup()
require("which-key").register({ require("which-key").register({
d = { require("oil").toggle_float, "directory (oil)" }, d = { require("oil").toggle_float, "Directory (oil)" },
}, { prefix = "<leader>t" }) }, { prefix = "<leader>t" })

View file

@ -0,0 +1,22 @@
vim.o.fillchars = [[eob: ,fold: ,foldopen:,foldsep: ,foldclose:]]
local builtin = require("statuscol.builtin")
require("statuscol").setup({
segments = {
{
sign = { name = { ".*" }, auto = true },
click = "v:lua.ScSa",
},
{
text = { builtin.lnumfunc },
click = "v:lua.ScLa",
},
{
sign = { name = { "GitSigns" }, auto = true },
click = "v:lua.ScSa",
},
{
text = { builtin.foldfunc, "" },
click = "v:lua.ScFa",
},
},
})