1
1
Fork 0

Compare commits

...

7 commits

Author SHA1 Message Date
ef1f0b0513
swaync: lower control center height
Signed-off-by: Myned <dev@bjork.tech>
2025-01-28 15:30:06 -06:00
c67fe3587f
pkgs: add wev and xev
Signed-off-by: Myned <dev@bjork.tech>
2025-01-28 15:29:47 -06:00
ae1ec3a572
keyd: fix conflicting binds and add package to env
Signed-off-by: Myned <dev@bjork.tech>
2025-01-28 15:29:36 -06:00
cdbcb7bca2
1password: add background service instead of spawn-at-startup
Signed-off-by: Myned <dev@bjork.tech>
2025-01-28 15:29:19 -06:00
c35f995fed
clipnotify: initial service
Signed-off-by: Myned <dev@bjork.tech>
2025-01-28 15:29:01 -06:00
36f5b8c15f
niri: add window rules for 1password quick access
Signed-off-by: Myned <dev@bjork.tech>
2025-01-28 15:28:44 -06:00
138eed12d3
niri: add 1password quick access bind
Signed-off-by: Myned <dev@bjork.tech>
2025-01-28 15:28:12 -06:00
9 changed files with 96 additions and 5 deletions

View file

@ -135,6 +135,7 @@ in {
(key "O" "Mod" (spawn [loupe "/tmp/wallpaper.png"]))
(key "P" "Ctrl+Alt" (spawn [pkill "1password"]))
(key "P" "Mod" (spawn _1password))
(key "P" "Mod+Shift" (spawn [_1password "--quick-access"]))
(key "Q" "Mod" close-window)
(key "R" "Mod" focus-window-or-workspace-down)
(key "R" "Mod+Shift" move-window-down-or-to-workspace-down)

View file

@ -35,8 +35,13 @@ in {
};
};
# Enable rootless Xwayland
services.xwayland-satellite.enable = cfg.xwayland;
services = {
# Enable rootless Xwayland
xwayland-satellite.enable = cfg.xwayland;
# Enable X11/Wayland clipboard sync
clipsync.enable = true;
};
};
# https://github.com/YaLTeR/niri

View file

@ -53,7 +53,6 @@ in {
home = hm.home.homeDirectory;
in
[
{command = [_1password "--silent"];} # Launch password manager in background
{command = [audio "--init"];} # Enforce audio profile state
{command = [rm "${home}/.cache/walker/clipboard.gob"];} # Clear clipboard history
{command = [sway-audio-idle-inhibit];} # Inhibit while audio is playing

View file

@ -203,6 +203,21 @@ in {
}
### Overrides
# TODO: Remove when switching 1Password to Wayland
(let
height = builtins.floor (config.custom.height / config.custom.scale * 0.4); # 40%
in {
matches = [
{
app-id = "^1Password";
title = "^Quick Access 1Password$";
}
];
max-height = height;
min-height = height;
open-floating = true;
})
];
};
}

View file

@ -6,11 +6,14 @@
}:
with lib; let
cfg = config.custom.programs._1password;
_1password = getExe config.programs._1password-gui.package;
in {
options.custom.programs._1password = {
enable = mkOption {default = false;};
agent = mkOption {default = true;};
browser = mkOption {default = null;};
service = mkOption {default = true;};
};
config = mkIf cfg.enable {
@ -38,6 +41,26 @@ in {
};
};
systemd.user.services."1password" = mkIf cfg.service {
enable = true;
wantedBy = ["graphical-session.target"];
unitConfig = {
Description = "Launch 1Password in the background";
After =
["graphical-session.target"]
++ optionals config.custom.services.xwayland-satellite.enable ["xwayland-satellite.service"];
};
serviceConfig = {
Type = "simple";
# FIXME: 1password clipboard does not work in wayland
ExecStart = "${_1password} --silent --ozone-platform=x11";
};
};
home-manager.users.${config.custom.username} = {
programs.ssh.extraConfig = mkIf cfg.agent ''
Host *

View file

@ -0,0 +1,43 @@
{
config,
lib,
pkgs,
...
}:
with lib; let
cfg = config.custom.services.clipsync;
clipnotify = getExe pkgs.clipnotify;
wl-copy = getExe' pkgs.wl-clipboard "wl-copy";
xclip = getExe pkgs.xclip;
in {
options.custom.services.clipsync = {
enable = mkOption {default = false;};
};
config = mkIf cfg.enable {
# https://github.com/cdown/clipnotify
systemd.user.services.clipsync = {
enable = true;
wantedBy = ["graphical-session.target"];
unitConfig = {
Description = "Sync clipboard between Wayland and X11";
After =
["graphical-session.target"]
++ optionals config.custom.services.xwayland-satellite.enable ["xwayland-satellite.service"];
};
serviceConfig = {
Type = "simple";
ExecStart = pkgs.writeShellScript "clipsync" ''
while ${clipnotify}; do
${xclip} -selection clipboard -out | ${wl-copy}
done
'';
};
};
};
}

View file

@ -1,6 +1,7 @@
{
config,
lib,
pkgs,
...
}:
with lib; let
@ -24,7 +25,7 @@ in {
control.esc = "toggle(qwerty)"; # Control+Esc toggles qwerty
shift.shift = "capslock"; # Both Shifts toggle Capslock
meta = {
"meta+control+shift" = {
# Mouse repeat macro
"," = "macro2(300, 100, leftmouse)";
"." = "macro2(300, 100, rightmouse)";
@ -132,5 +133,7 @@ in {
};
};
};
environment.systemPackages = [pkgs.keyd];
};
}

View file

@ -40,7 +40,7 @@ in {
# https://github.com/ErikReider/SwayNotificationCenter/blob/main/src/configSchema.json
settings = {
control-center-height = builtins.floor (config.custom.height * 0.75); # 75%
control-center-height = builtins.floor (config.custom.height * 0.5); # 50%
control-center-positionY = "bottom";
control-center-width = 750;
fit-to-screen = false;

View file

@ -38,8 +38,10 @@ in {
testdisk # Data recovery tool
trashy # CLI trash
waypipe # Wayland proxy
wev # Wayland keysym tester
wl-clipboard # Wayland clipboard
xclip # X11 clipboard
xorg.xev # X11 keysym tester
### Dependencies
man-pages