Skip to content

Commit 1390216

Browse files
authoredJan 24, 2025··
feat(cli): Add rofi-cliphist (#311)
1 parent ac9dc62 commit 1390216

File tree

4 files changed

+184
-38
lines changed

4 files changed

+184
-38
lines changed
 

‎flake.lock

+170-31
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎flake.nix

+7
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,13 @@
2828
};
2929
};
3030

31+
rofi-tools = {
32+
url = "github:szaffarano/rofi-tools";
33+
inputs = {
34+
nixpkgs.follows = "nixpkgs";
35+
};
36+
};
37+
3138
zig.url = "github:mitchellh/zig-overlay";
3239

3340
neovim-nightly = {

‎modules/home-manager/desktop/tools/cliphist/default.nix

+3-6
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,7 @@ in
2525

2626
config = let
2727
watchCmd = lib.getExe clipboardWatch;
28-
wofiCmd = lib.getExe pkgs.cliphist-to-wofi;
29-
clipCmd = lib.getExe pkgs.cliphist;
28+
rofiCmd = lib.getExe pkgs.inputs.rofi-tools.rofi-cliphist;
3029
in
3130
mkIf cfg.enable {
3231
home.packages = with pkgs; [
@@ -37,17 +36,15 @@ in
3736
wayland.windowManager.sway.config = lib.mkIf config.desktop.wayland.compositors.sway.enable {
3837
startup = [{command = watchCmd;}];
3938
keybindings = {
40-
"Ctrl+Alt+v" = "${wofiCmd} | ${clipCmd} decode | ${pkgs.wl-clipboard}/bin/wl-copy";
41-
"Ctrl+Alt+Shift+V" = "${wofiCmd} | ${clipCmd} delete";
39+
"Ctrl+Alt+v" = "${rofiCmd}";
4240
};
4341
};
4442

4543
wayland.windowManager.hyprland.settings =
4644
lib.mkIf config.desktop.wayland.compositors.hyprland.enable
4745
{
4846
bind = [
49-
"CTRL_ALT,v,exec,${wofiCmd} | ${clipCmd} decode | ${pkgs.wl-clipboard}/bin/wl-copy"
50-
"CTRL_ALT_SHIFT,v,exec,${wofiCmd} 'Delete clip' | ${clipCmd} delete"
47+
"CTRL_ALT,v,exec,${rofiCmd}"
5148
];
5249
exec-once = [watchCmd];
5350
};

‎modules/home-manager/desktop/wayland/rofi/default.nix

+4-1
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,10 @@ in
168168
}
169169
'';
170170

171-
home.packages = [pkgs.rofi-power-menu];
171+
home.packages = [
172+
pkgs.rofi-power-menu
173+
pkgs.inputs.rofi-tools.rofi-cliphist
174+
];
172175

173176
wayland.windowManager.sway.config = lib.mkIf config.desktop.wayland.compositors.sway.enable {
174177
keybindings = {

0 commit comments

Comments
 (0)
Please sign in to comment.