feat: add cliphist

This commit is contained in:
Nydragon 2024-06-09 00:57:42 +09:00
parent c926deb63a
commit efa4b4d824
No known key found for this signature in database
GPG key ID: 14AA30A865EA1209
2 changed files with 19 additions and 25 deletions

View file

@ -4,7 +4,8 @@
let
conf = "${config.home.homeDirectory}/.config/rofi";
in
{
rec {
package = pkgs.rofi-wayland.override { inherit plugins; };
enable = true;
plugins = [ pkgs.rofi-calc ];
theme = "${conf}/themes/rounded-gray-dark.rasi";
@ -16,8 +17,11 @@
"ssh"
"drun"
"run"
"calc"
"obsidian:rofi-obsidian"
# WARNING: ABI version mismatch
# "calc"
# TODO: Update to use nixpkgs version of cliphist
"clipboard:cliphist-rofi-img"
"obsidian:${pkgs.rofi-obsidian}/bin/rofi-obsidian"
];
matching = "fuzzy";
sort = true;
@ -29,9 +33,6 @@
combi-modes = [
"window"
"drun"
"filebrowser"
"ssh"
"calc"
"obsidian"
];
};

View file

@ -63,7 +63,8 @@
mod = config.wayland.windowManager.sway.config.modifier;
in
lib.mkOptionDefault {
"${mod}+p" = "exec ${pkgs.swaylock}/bin/swaylock";
# TODO: Update to use nixpkgs version of cliphist
"${mod}+p" = "exec cliphist wipe & ${pkgs.swaylock}/bin/swaylock";
"${mod}+Shift+p" = "exec ${pkgs.rofi}/bin/rofi -show p -modi p:rofi-power-menu";
# Reload the config file
"${mod}+Shift+c" = "reload";
@ -73,6 +74,7 @@
"${mod}+f" = "fullscreen";
# Start launcher
"${mod}+d" = "exec rofi -config ${homeDirectory}/.config/rofi/config.rasi -show combi -automatic-save-to-history | xargs swaymsg exec --";
"${mod}+s" = "exec rofi -show clipboard -show-icons";
# Toggle the current focus between tiling and floating mode
"${mod}+Shift+space" = "floating toggle";
"${mod}+Return" = "exec ${term}";
@ -93,7 +95,7 @@
"--locked XF86AudioPrev" = "exec ${pkgs.playerctl}/bin/playerctl previous";
"Print" = "exec ${screenshot}/bin/screenshot";
"${mod}+u" = "exec ${screenshot}/bin/screenshot";
#: {{{
#: Workspace movement {{{
"--input-device=${inputs.kb.builtin} ${mod}+ampersand" = "workspace number 1";
"--input-device=${inputs.kb.builtin} ${mod}+eacute" = "workspace number 2";
"--input-device=${inputs.kb.builtin} ${mod}+quotedbl" = "workspace number 3";
@ -120,23 +122,10 @@
#: Startup {{{
startup = [
{ command = "${pkgs.swayidle}/bin/swayidle -C ${homeDirectory}/.config/swayidle/config"; }
{
command = "${pkgs.swaynotificationcenter}/bin/swaync";
}
{
command = ''[ -z "$(pidof nextcloud)" ] && ${pkgs.nextcloud-client}/bin/nextcloud --background'';
}
{
command = ''
[ -z "$(pidof kdeconnect-indicator)" ] && ${pkgs.kdeconnect}/bin/kdeconnect-indicator
'';
}
{
command = ''
[ -z "$(pidof protonmail-bridge)" ] && ${pkgs.protonmail-bridge-gui}/bin/protonmail-bridge
'';
}
{ command = "${pkgs.swaynotificationcenter}/bin/swaync"; }
{ command = "${pkgs.nextcloud-client}/bin/nextcloud --background"; }
{ command = "${pkgs.kdeconnect}/bin/kdeconnect-indicator"; }
{ command = "${pkgs.protonmail-bridge-gui}/bin/protonmail-bridge"; }
{
command = "${set-background}/bin/set-background -f ${wallpaper}";
always = true;
@ -145,6 +134,10 @@
command = "${pkgs.swaynotificationcenter}/bin/swaync-client --reload-config --reload-css";
always = true;
}
{
# Copy all copied values into the cliphist store
command = "${pkgs.wl-clipboard}/bin/wl-paste --watch ${pkgs.cliphist}/bin/cliphist store -max-items 10";
}
];
#: }}}
assigns = {