Updated emacs

This commit is contained in:
Aleksandr Lebedev 2025-07-22 10:11:56 +02:00
parent 1029a939d2
commit 2b43758b3e
2 changed files with 40 additions and 37 deletions

60
flake.lock generated
View file

@ -311,11 +311,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1752718651, "lastModified": 1753140376,
"narHash": "sha256-PkaR0qmyP9q/MDN3uYa+RLeBA0PjvEQiM0rTDDBXkL8=", "narHash": "sha256-7lrVrE0jSvZHrxEzvnfHFE/Wkk9DDqb+mYCodI5uuB8=",
"owner": "nix-community", "owner": "nix-community",
"repo": "disko", "repo": "disko",
"rev": "d5ad4485e6f2edcc06751df65c5e16572877db88", "rev": "545aba02960caa78a31bd9a8709a0ad4b6320a5c",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -333,11 +333,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1753043075, "lastModified": 1753171812,
"narHash": "sha256-rYGySjlQ434LzA/XDsv1YZale3PhS1PNlYxWRFCxhOI=", "narHash": "sha256-esO31iW4109r6bPcwHtm/SeTsNE8nVsNgjYAfDrovOU=",
"owner": "kylekrein", "owner": "kylekrein",
"repo": "emacs-config", "repo": "emacs-config",
"rev": "50ffb2dafff291a6dc816a9ccda274fa2ca26f8a", "rev": "eb495b139b46147b490d91c33b1158b5b8bfc72e",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -721,11 +721,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1752780124, "lastModified": 1753055804,
"narHash": "sha256-5dn97vIYxn6VozKePOQSDxVCsrl38nDdMJXx86KIJH0=", "narHash": "sha256-KerePGJYX47ex6OY3CWsid4AltO2gDtQROunYJ0eCEE=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "c718918222bdb104397762dea67e6b397a7927fe", "rev": "adf195f021a8cbb0c317f75b52e96c82616526f9",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -857,11 +857,11 @@
"xwayland-satellite-unstable": "xwayland-satellite-unstable" "xwayland-satellite-unstable": "xwayland-satellite-unstable"
}, },
"locked": { "locked": {
"lastModified": 1752989871, "lastModified": 1753132162,
"narHash": "sha256-FbkQ9hZcfDU/j839hhOYPjx7yHoBpwhjnRZj9M2bIMk=", "narHash": "sha256-ycK2rB1kltXcrz5+dpldPngiYMukgaT2atwxhTjkIZQ=",
"owner": "sodiboo", "owner": "sodiboo",
"repo": "niri-flake", "repo": "niri-flake",
"rev": "e84276a7f2d13c147c889a119b9a227e14113621", "rev": "f7cc80e3ad7e34ac523ba401ece49c4151fc19ca",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -1028,11 +1028,11 @@
"nixpkgs": "nixpkgs_10" "nixpkgs": "nixpkgs_10"
}, },
"locked": { "locked": {
"lastModified": 1752977425, "lastModified": 1753150084,
"narHash": "sha256-Ae7I3Q5Odds6hvWY0+ZCnlvngq7MVWJD4TV/NUGyiZw=", "narHash": "sha256-RuC74MBCivhlQJAWgXllT5Mym55HkR46sxR3kHgKsqA=",
"owner": "fufexan", "owner": "fufexan",
"repo": "nix-gaming", "repo": "nix-gaming",
"rev": "b8fad5f070ed53a72dbcc6c60bce04be943887fe", "rev": "465fa426242404f8abfc2f6c8526a6b84a45609d",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -1077,11 +1077,11 @@
"nmd": "nmd_2" "nmd": "nmd_2"
}, },
"locked": { "locked": {
"lastModified": 1747382160, "lastModified": 1753100895,
"narHash": "sha256-nlHPjA5GH4wdwnAoOzCt7BVLUKtIAAW2ClNGz2OxTrs=", "narHash": "sha256-nEuGlpIT7q4c/otPu00pGhb5Y12FtQm00pH3MXOJpfw=",
"owner": "nix-community", "owner": "nix-community",
"repo": "nix-on-droid", "repo": "nix-on-droid",
"rev": "40b8c7465f78887279a0a3c743094fa6ea671ab1", "rev": "27696cac81d4444319bb9158037b0da45e213f5e",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -1122,11 +1122,11 @@
}, },
"nixos-hardware": { "nixos-hardware": {
"locked": { "locked": {
"lastModified": 1752666637, "lastModified": 1753122741,
"narHash": "sha256-P8J72psdc/rWliIvp8jUpoQ6qRDlVzgSDDlgkaXQ0Fw=", "narHash": "sha256-nFxE8lk9JvGelxClCmwuJYftbHqwnc01dRN4DVLUroM=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixos-hardware", "repo": "nixos-hardware",
"rev": "d1bfa8f6ccfb5c383e1eba609c1eb67ca24ed153", "rev": "cc66fddc6cb04ab479a1bb062f4d4da27c936a22",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -1233,11 +1233,11 @@
}, },
"nixpkgs-master": { "nixpkgs-master": {
"locked": { "locked": {
"lastModified": 1753042929, "lastModified": 1753171778,
"narHash": "sha256-uspC/eXsKahWcyP/D0zVwfmS0YKl3ulvPkaRXL3YW4k=", "narHash": "sha256-fFg9W0kNCPvw2socpBdN7G4x6R+2uVzaWZ0auUb4l+4=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "b5f0f7f552175d801bafff55d34461dc01e6585d", "rev": "40b6690a796e85ef1dbb365104c7d439666705dc",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -1489,11 +1489,11 @@
}, },
"nixpkgs_9": { "nixpkgs_9": {
"locked": { "locked": {
"lastModified": 1752687322, "lastModified": 1752950548,
"narHash": "sha256-RKwfXA4OZROjBTQAl9WOZQFm7L8Bo93FQwSJpAiSRvo=", "narHash": "sha256-NS6BLD0lxOrnCiEOcvQCDVPXafX1/ek1dfJHX1nUIzc=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "6e987485eb2c77e5dcc5af4e3c70843711ef9251", "rev": "c87b95e25065c028d31a94f06a62927d18763fdf",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -3818,11 +3818,11 @@
"tinted-zed": "tinted-zed" "tinted-zed": "tinted-zed"
}, },
"locked": { "locked": {
"lastModified": 1753010600, "lastModified": 1753118965,
"narHash": "sha256-CysacPUVbpw+ozuZm5eC6W1DFBYuy4fT+lfmA23sfAw=", "narHash": "sha256-RHZNeVbXnr4rt9Wvbmg8nSpVlYV5QQBSnRIz3jURJQI=",
"owner": "danth", "owner": "danth",
"repo": "stylix", "repo": "stylix",
"rev": "038afaca5520fe7e7bb75a44d7d0c55b0b789afe", "rev": "d0951c8aefde767adb8bbc8bf75898a67048f360",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -1,7 +1,7 @@
#https://github.com/sodiboo/niri-flake/blob/main/default-config.kdl.nix #https://github.com/sodiboo/niri-flake/blob/main/default-config.kdl.nix
#https://github.com/sodiboo/niri-flake/blob/main/docs.md #https://github.com/sodiboo/niri-flake/blob/main/docs.md
#https://github.com/sodiboo/system/blob/main/niri.mod.nix #https://github.com/sodiboo/system/blob/main/niri.mod.nix
{config, pkgs, lib, inputs, hwconfig, ...}: {config, pkgs, lib, inputs, hwconfig, username, ...}:
{ {
programs.fuzzel = { programs.fuzzel = {
enable = true; enable = true;
@ -99,19 +99,23 @@
]; ];
layout = { layout = {
preset-column-widths = [ preset-column-widths = [
{proportion = 1.0 / 3.0;} {proportion = 1.0 / 2.0;}
{proportion = 1.0;} {proportion = 1.0;}
{proportion = 2.0 / 3.0;} {proportion = 2.0 / 3.0;}
{proportion = 1.0 / 2.0;} {proportion = 1.0 / 3.0;}
]; ];
default-column-width = {proportion = 1.0 / 3.0;}; default-column-width = {proportion = 1.0 / 2.0;};
}; };
binds = with config.lib.niri.actions; binds = with config.lib.niri.actions;
let let
sh = spawn "sh" "-c"; sh = spawn "sh" "-c";
emacs = action: sh "emacsclient -c --eval \"${action}\"";
homedir = "/home/${username}/";
screenshot-annotate = sh ''${lib.getExe pkgs.grim} -g "$(${lib.getExe pkgs.slurp} -w 0)" -t ppm - | ${lib.getExe pkgs.satty} --early-exit --copy-command 'wl-copy' --filename '-' --initial-tool brush'';
in { in {
"Mod+E".action = sh "emacsclient -c"; "Mod+E".action = sh "emacsclient -c";
"Mod+C".action = sh "dolphin"; "Mod+Shift+C".action = sh "dolphin";
"Mod+C".action = emacs ''(dirvish \"${homedir}\")'';
"Mod+T".action = spawn "kitty"; "Mod+T".action = spawn "kitty";
"Mod+D".action = spawn "fuzzel"; "Mod+D".action = spawn "fuzzel";
"Mod+B".action = spawn "librewolf"; "Mod+B".action = spawn "librewolf";
@ -119,8 +123,7 @@
"Mod+F".action = fullscreen-window; "Mod+F".action = fullscreen-window;
"Mod+R".action = switch-preset-column-width; "Mod+R".action = switch-preset-column-width;
"Mod+Q".action = close-window; "Mod+Q".action = close-window;
#"Mod+Q".action = ; "Mod+Shift+S".action = screenshot-annotate;
"Mod+Shift+S".action = screenshot;
"Mod+1".action = focus-workspace 1; "Mod+1".action = focus-workspace 1;
"Mod+2".action = focus-workspace 2; "Mod+2".action = focus-workspace 2;
"Mod+3".action = focus-workspace 3; "Mod+3".action = focus-workspace 3;