Skip to content

Commit

Permalink
feat: update niri config
Browse files Browse the repository at this point in the history
  • Loading branch information
sioodmy committed May 30, 2024
1 parent bc1af01 commit cf536b8
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 14 deletions.
4 changes: 1 addition & 3 deletions home/rice/foot.nix
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,12 @@
title = "foot";
locked-title = "no";
term = "xterm-256color";
font = "monospace:size=10.5";
font = "monospace:size=9";
vertical-letter-offset = "-0.75";
pad = "12x21 center";
resize-delay-ms = 100;
notify = "notify-send -a \${app-id} -i \${app-id} \${title} \${body}";
selection-target = "primary";
# box-drawings-uses-font-glyphs = "yes";
dpi-aware = "yes";
bold-text-in-bright = "no";
word-delimiters = ",│`|:\"'()[]{}<>";
Expand Down Expand Up @@ -89,7 +88,6 @@
select-extend-character-wise = "Control+BTN_RIGHT";
select-word = "BTN_LEFT-2";
select-word-whitespace = "Control+BTN_LEFT-2";
#select-row = "BTN_LEFT-3";
};
};
};
Expand Down
11 changes: 7 additions & 4 deletions home/rice/niri/binds.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,21 @@
pkgs,
lib,
...
}: {
}: let
inherit (lib) getExe;
in{
programs.niri.settings.binds = with config.lib.niri.actions; let
sh = spawn "sh" "-c";
run = x: spawn "run-as-service" (builtins.toString (getExe x));
in
{
"Mod+Return" = {
action = spawn "${pkgs.foot}/bin/foot";
action = run config.programs.foot.package;
cooldown-ms = 500;
};
"Mod+Space".action = spawn "${pkgs.fuzzel}/bin/fuzzel";
"Mod+Space".action = run config.programs.fuzzel.package;
"Mod+V".action = sh "${pkgs.cliphist}/bin/cliphist list | fuzzel --dmenu | cliphist decode | wl-copy";
"Mod+Shift+Period".action = spawn "emoji";
"Mod+semicolon".action = spawn "emoji";
"Mod+Shift+L".action = sh "niri msg action power-off-monitors; gtklock";

"XF86AudioRaiseVolume".action = spawn "pamixer" "-i" "5";
Expand Down
29 changes: 23 additions & 6 deletions home/rice/niri/config.nix
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
{
theme,
...
}:
{theme, pkgs, ...}:
with theme.colors; {
imports = [ ./binds.nix ];
imports = [./binds.nix];
programs.niri.settings = {
spawn-at-startup = [
{
Expand All @@ -12,6 +9,26 @@ with theme.colors; {
"waybar"
];
}
{
command = [
"${pkgs.dbus}/bin/dbus-update-activation-environment"
"--systemd"
"DISPLAY"
"WAYLAND_DISPLAY"
"SWAYSOCK"
"XDG_CURRENT_DESKTOP"
"XDG_SESSION_TYPE"
"NIXOS_OZONE_WL"
"XCURSOR_THEME"
"XCURSOR_SIZE"
"XDG_DATA_DIRS"
];
}
{
command = [
"/usr/libexec/polkit-gnome-authentication-agent-1"
];
}
];
outputs."eDP-1".position = {
x = 0;
Expand Down Expand Up @@ -102,9 +119,9 @@ with theme.colors; {
}
];


prefer-no-csd = true;
hotkey-overlay.skip-at-startup = true;
screenshot-path = "~/pics/ss/ss%Y-%m-%d %H-%M-%S.png";
};

}
2 changes: 1 addition & 1 deletion system/wayland/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
DIRENV_LOG_FORMAT = "";
WLR_DRM_NO_ATOMIC = "1";
QT_AUTO_SCREEN_SCALE_FACTOR = "1";
QT_QPA_PLATFORM = "wayland;xcb";
QT_QPA_PLATFORM = "wayland";
DISABLE_QT_COMPAT = "0";
QT_WAYLAND_DISABLE_WINDOWDECORATION = "1";
MOZ_ENABLE_WAYLAND = "1";
Expand Down

0 comments on commit cf536b8

Please sign in to comment.