Compare commits

..

2 commits

Author SHA1 Message Date
Bruno BELANYI 86aa156fc0 home: tmux: fix 'hasGui' logic
All checks were successful
continuous-integration/drone/push Build is passing
Take advantage of this fix to make the code more extensible.
2023-02-20 11:19:20 +00:00
Bruno BELANYI 54f335d984 home: tmux: always use tmux-yank
This plugin does have some useful binds.

Since it still sends the OSC52 escape sequence when copying, I don't
have a problem with remote hosts.
2023-02-20 11:19:13 +00:00

View file

@ -1,7 +1,10 @@
{ config, lib, pkgs, ... }: { config, lib, pkgs, ... }:
let let
cfg = config.my.home.tmux; cfg = config.my.home.tmux;
hasGUI = config.my.home.x.enable || (config.my.home.wm != null); hasGUI = lib.any lib.id [
config.my.home.x.enable
(config.my.home.wm.windowManager != null)
];
in in
{ {
options.my.home.tmux = with lib.my; { options.my.home.tmux = with lib.my; {
@ -24,7 +27,7 @@ in
pain-control pain-control
# Better session management # Better session management
sessionist sessionist
(lib.optionalAttrs hasGUI { {
# X clipboard integration # X clipboard integration
plugin = yank; plugin = yank;
extraConfig = '' extraConfig = ''
@ -33,7 +36,7 @@ in
# Stay in copy mode after yanking # Stay in copy mode after yanking
set -g @yank_action 'copy-pipe' set -g @yank_action 'copy-pipe'
''; '';
}) }
{ {
# Show when prefix has been pressed # Show when prefix has been pressed
plugin = prefix-highlight; plugin = prefix-highlight;