wl-clipedit
This commit is contained in:
parent
e240fbdc46
commit
b74916095a
3 changed files with 21 additions and 1 deletions
18
custom/wl-clipedit/default.nix
Normal file
18
custom/wl-clipedit/default.nix
Normal file
|
|
@ -0,0 +1,18 @@
|
||||||
|
{ writeShellScriptBin
|
||||||
|
, lib
|
||||||
|
, wl-clipboard
|
||||||
|
, coreutils
|
||||||
|
, terminal-command ? "kitty -e"
|
||||||
|
}:
|
||||||
|
# 64 │ function clipcopy() { xclip -in -selection clipboard < "${1:-/dev/stdin}"; }
|
||||||
|
# 65 │ function clippaste() { xclip -out -selection clipboard; } clip
|
||||||
|
writeShellScriptBin "wl-clipedit" ''
|
||||||
|
PATH=$PATH:"${lib.makeBinPath [ coreutils wl-clipboard ]}"
|
||||||
|
tmp_file=$(mktemp)
|
||||||
|
wl-paste -pn > $tmp_file
|
||||||
|
${terminal-command} $VISUAL $tmp_file || ${terminal-command} $EDITOR $tmp_file
|
||||||
|
wl-copy -pn < $tmp_file
|
||||||
|
rm $tmp_file
|
||||||
|
''
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -41,6 +41,7 @@
|
||||||
# Flakes packages
|
# Flakes packages
|
||||||
(self: super: {
|
(self: super: {
|
||||||
clipedit = self.callPackage ./custom/clipedit { };
|
clipedit = self.callPackage ./custom/clipedit { };
|
||||||
|
wl-clipedit = self.callPackage ./custom/wl-clipedit { };
|
||||||
update-background = self.callPackage ./custom/update-background { backgrounds_directory = "$HOME/Immagini/Sfondi/1080+/1440+"; };
|
update-background = self.callPackage ./custom/update-background { backgrounds_directory = "$HOME/Immagini/Sfondi/1080+/1440+"; };
|
||||||
lockscreen = self.callPackage ./custom/lockscreen { palette = self.rice.colorPalette; font = self.rice.font.normal; };
|
lockscreen = self.callPackage ./custom/lockscreen { palette = self.rice.colorPalette; font = self.rice.font.normal; };
|
||||||
way-lockscreen = self.callPackage ./custom/way-lockscreen { palette = self.rice.colorPalette; font = self.rice.font.normal; };
|
way-lockscreen = self.callPackage ./custom/way-lockscreen { palette = self.rice.colorPalette; font = self.rice.font.normal; };
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@
|
||||||
./yazi.nix
|
./yazi.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
home.packages = builtins.attrValues { inherit (pkgs) blueman brillo networkmanagerapplet pamixer playerctl swaylock swww way-lockscreen waybar wlogout wofi wofi-emoji; };
|
home.packages = builtins.attrValues { inherit (pkgs) blueman brillo networkmanagerapplet pamixer playerctl swaylock swww way-lockscreen waybar wl-clipboard wl-clipedit wlogout wofi wofi-emoji; };
|
||||||
|
|
||||||
# wayland.windowManager.hyprland = { };
|
# wayland.windowManager.hyprland = { };
|
||||||
|
|
||||||
|
|
@ -169,6 +169,7 @@
|
||||||
bind = SUPER, P, pseudo, # dwindle
|
bind = SUPER, P, pseudo, # dwindle
|
||||||
bind = SUPER, J, togglesplit, # dwindle
|
bind = SUPER, J, togglesplit, # dwindle
|
||||||
bind = SUPER ALT, E, exec, wofi-emoji
|
bind = SUPER ALT, E, exec, wofi-emoji
|
||||||
|
bind = SUPER ALT, P, exec, wl-clipedit
|
||||||
|
|
||||||
# Move focus to relative position
|
# Move focus to relative position
|
||||||
bind = SUPER, left, movefocus, l
|
bind = SUPER, left, movefocus, l
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue