From 11bbb2a99fb6a8741522830d8d3e9c2d90d4e5d5 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Thu, 23 Jan 2025 14:37:58 +0100 Subject: ... --- accounts/gkleen@sif/default.nix | 5 +++++ accounts/gkleen@sif/niri/default.nix | 33 +++++++++++++++++++++++++++++++-- accounts/gkleen@sif/niri/mako.nix | 1 + accounts/gkleen@sif/systemd.nix | 30 +++++++++++++++++++++++------- 4 files changed, 60 insertions(+), 9 deletions(-) (limited to 'accounts/gkleen@sif') diff --git a/accounts/gkleen@sif/default.nix b/accounts/gkleen@sif/default.nix index 10180eca..7f4879f4 100644 --- a/accounts/gkleen@sif/default.nix +++ b/accounts/gkleen@sif/default.nix @@ -427,6 +427,7 @@ in { pynitrokey gtklock wlrctl remmina openscad spice-record libguestfs-with-appliance nerd-fonts.fira-mono nerd-fonts.symbols-only nerd-fonts.fira-code powerline-fonts + swtpm ]; file = { @@ -492,6 +493,10 @@ in { }; }; "emacs/init.el".source = ./emacs.el; + "systemd/user/xdg-desktop-portal.service.d/after-graphical-session.conf".text = '' + [Unit] + After=graphical-session.target + ''; }; xdg.dataFile = { diff --git a/accounts/gkleen@sif/niri/default.nix b/accounts/gkleen@sif/niri/default.nix index 165eb5fa..71870aa4 100644 --- a/accounts/gkleen@sif/niri/default.nix +++ b/accounts/gkleen@sif/niri/default.nix @@ -200,6 +200,8 @@ in { DISPLAY = ":0"; }; + debug.render-drm-device = "/dev/dri/by-path/pci-0000:00:02.0-render"; + layout = { gaps = 8; struts = { left = 0; right = 0; top = 0; bottom = 0; }; @@ -239,6 +241,14 @@ in { cursor.hide-when-typing = true; + input = { + touchpad.enable = false; + trackball = { + scroll-method = "on-button-down"; + scroll-button = 278; + }; + }; + workspaces = { "001" = { name = "pwctl"; open-on-output = "eDP-1"; }; "002" = { name = "kpxc"; open-on-output = "eDP-1"; }; @@ -250,6 +260,7 @@ in { # "104".name = "read"; # "105".name = "mon"; "110".name = "vid"; + "120".name = "bmr"; }; window-rules = [ @@ -356,6 +367,22 @@ in { # ]; # open-on-workspace = "mon"; # } + { + matches = [ { app-id = "^pdfpc$"; } ]; + default-column-width.proportion = 1.; + } + { + matches = [ { app-id = "^pdfpc$"; title = "^pdfpc - presentation"; } ]; + open-on-workspace = "bmr"; + open-fullscreen = true; + } + { + matches = [ + { app-id = "^Gimp-"; title = "^Quit GIMP$"; } + { app-id = "^org\.kde\.polkit-kde-authentication-agent-1$"; } + ]; + open-floating = true; + } ]; layer-rules = [ { matches = [ @@ -414,12 +441,14 @@ in { fi [[ -n "$QALC_RES" ]] || exit 1 EXISTING=false - set +e + set +o pipefail grep -Fxrl "$QALC_RES" "$RESULTS_DIR" | xargs -r touch [[ ''${PIPESTATUS[0]} -eq 0 ]] && EXISTING=true - set -e + set -o pipefail if [[ $QALC_RET -eq 0 ]] && ! $EXISTING; then + set +o pipefail RES_FILE="$RESULTS_DIR"/$(date -uIs).$(tr -Cd 'a-zA-Z0-9' "$RES_FILE" <<<"$QALC_RES" fi [[ "$QALC_RES" =~ .*\ =\ (.*) ]] && QALC_RES="''${BASH_REMATCH[1]}" diff --git a/accounts/gkleen@sif/niri/mako.nix b/accounts/gkleen@sif/niri/mako.nix index 8abf14d8..901ed022 100644 --- a/accounts/gkleen@sif/niri/mako.nix +++ b/accounts/gkleen@sif/niri/mako.nix @@ -13,6 +13,7 @@ extraConfig = '' outer-margin=1 max-history=100 + max-icon-size=48 [grouped] format=(%g) %s\n%b diff --git a/accounts/gkleen@sif/systemd.nix b/accounts/gkleen@sif/systemd.nix index 34f52172..bce2f4cd 100644 --- a/accounts/gkleen@sif/systemd.nix +++ b/accounts/gkleen@sif/systemd.nix @@ -123,7 +123,8 @@ in { }; emacs = { Unit = { - After = ["graphical-session-pre.target"]; + After = [ "graphical-session.target" ]; + BindsTo = [ "graphical-session.target" ]; }; }; keepassxc = { @@ -135,8 +136,8 @@ in { Environment = [ "QT_QPA_PLATFORM=wayland" ]; }; Unit = { - Requires = ["graphical-session-pre.target"]; - After = ["graphical-session-pre.target"]; + After = [ "graphical-session.target" ]; + BindsTo = [ "graphical-session.target" ]; }; }; mpris-proxy = { @@ -184,8 +185,8 @@ in { WantedBy = ["graphical-session.target"]; }; Unit = { - Requires = ["graphical-session-pre.target"]; - After = ["graphical-session-pre.target"]; + After = [ "graphical-session.target" ]; + PartOf = [ "graphical-session.target" ]; }; Service = { ExecStart = lib.getExe pkgs.psi-notify; @@ -198,6 +199,7 @@ in { gtklock = { Unit = { Requisite = ["graphical-session.target"]; + After = [ "graphical-session.target" ]; PartOf = ["graphical-session.target"]; }; Service = { @@ -304,8 +306,8 @@ in { WantedBy = ["graphical-session.target"]; }; Unit = { - BindsTo = ["graphical-session-pre.target"]; - After = ["graphical-session-pre.target"]; + After = [ "graphical-session.target" ]; + PartOf = [ "graphical-session.target" ]; }; Service = { ExecStart = lib.getExe cfg.programs.wpaperd.package; @@ -314,6 +316,17 @@ in { RestartSec = "2s"; }; }; + xembed-sni-proxy = { + Unit = { + BindsTo = ["xwayland-satellite.service"]; + After = ["xwayland-satellite.service"]; + }; + }; + poweralertd = { + Unit = { + After = ["graphical-session.target"]; + }; + }; } // listToAttrs (map ({host, port}: nameValuePair "proxy-to-autossh-socks@${toString port}" { Unit = { Requires = ["autossh-socks@${host}:${toString (port + 1)}.service" "proxy-to-autossh-socks@${toString port}.socket"]; @@ -364,6 +377,9 @@ in { }; tray = { Unit = { + PartOf = [ "graphical-session.target" ]; + Requires = [ "waybar.service" ]; + After = [ "graphical-session.target" "waybar.service" ]; Wants = ["blueman-applet.service" "udiskie.service" "network-manager-applet.service"]; }; }; -- cgit v1.2.3