diff --git a/nixos/modules/programs/urxvt.nix b/nixos/modules/programs/urxvt.nix index d4be7b9..6a22b04 100644 --- a/nixos/modules/programs/urxvt.nix +++ b/nixos/modules/programs/urxvt.nix @@ -43,7 +43,7 @@ in "X11/Xresource.d/urxvt".source = pkgs.writeText "Xresource-urxvt" '' !! Perl extensions !! --------------- - URxvt.perl-ext-common: default,matcher + URxvt.perl-ext-common: default,matcher,selection-to-clipboard ! Urgency URxvt.urgentOnBell: true @@ -65,6 +65,10 @@ in !! do not graded out unselected shells !! ----------------------------------- URxvt.fading: 0 + + !! copy on select + !! -------------- + URxvt.clipboard.autocopy: true ''; "X11/Xresource.d/urxvt-font".source = @@ -80,9 +84,7 @@ in "xft:TerminessTTF Nerd Font:pixelsize=${toString fontSize}"; fontCommand = key: fontSize: '' - URxvt.keysym.M-${key}: command:\033]710;${normalFont fontSize},${ - backupFont fontSize - }\007\033]711;${boldFont fontSize},${backupFont fontSize}\007 + URxvt.keysym.M-${key}: command:\033]710;${normalFont fontSize},${backupFont fontSize}\007\033]711;${boldFont fontSize},${backupFont fontSize}\007 ''; in @@ -92,18 +94,10 @@ in URxvt.xftAntialias: true !! use xfontsel or fontmatrix to choose line - !URxvt.font: ${normalFont cfg.fontSize},${ - backupFont cfg.fontSize - } - !URxvt.boldFont: ${boldFont cfg.fontSize},${ - backupFont cfg.fontSize - } - !URxvt.italicFont: ${italicFont cfg.fontSize},${ - backupFont cfg.fontSize - } - !URxvt.bolditalicFont: ${itallicBoldFont cfg.fontSize},${ - backupFont cfg.fontSize - } + !URxvt.font: ${normalFont cfg.fontSize},${backupFont cfg.fontSize} + !URxvt.boldFont: ${boldFont cfg.fontSize},${backupFont cfg.fontSize} + !URxvt.italicFont: ${italicFont cfg.fontSize},${backupFont cfg.fontSize} + !URxvt.bolditalicFont: ${itallicBoldFont cfg.fontSize},${backupFont cfg.fontSize} URxvt.font: ${normalFont cfg.fontSize} URxvt.boldFont: ${boldFont cfg.fontSize} diff --git a/nixos/system/desktop/home-manager/i3.nix b/nixos/system/desktop/home-manager/i3.nix index 22b068c..5e5055b 100644 --- a/nixos/system/desktop/home-manager/i3.nix +++ b/nixos/system/desktop/home-manager/i3.nix @@ -183,7 +183,7 @@ in "${cfg.config.modifier}+Shift+f" = "floating toggle"; #"${cfg.config.modifier}+space" = "focus mode_toggle"; - "${cfg.config.modifier}+a" = "focus parent"; + "${cfg.config.modifier}+p" = "focus parent"; "${cfg.config.modifier}+Shift+minus" = "move scratchpad"; "${cfg.config.modifier}+minus" = "scratchpad show"; @@ -218,6 +218,22 @@ in exec i3-input -F 'rename workspace to "%s"' -P 'New name for this workspace: ' ''; + "${cfg.config.modifier}+grave" = + let + script = pkgs.writers.writeBash "select-workspace" '' + set -e + set -o pipefail + ${pkgs.i3}/bin/i3-msg -t get_workspaces | \ + ${pkgs.jq}/bin/jq --raw-output '.[] | .name' | \ + ${pkgs.rofi}/bin/rofi -dmenu -p 'Select Workspace' | \ + while read line + do + ${pkgs.i3}/bin/i3-msg workspace "$line" + done + ''; + in + "exec ${script}"; + "${cfg.config.modifier}+Shift+c" = "reload"; "${cfg.config.modifier}+Shift+r" = "restart"; "${cfg.config.modifier}+Shift+e" = "exec i3-nagbar -t warning -m 'Do you want to exit i3?' -b 'Yes' 'i3-msg exit'"; @@ -225,8 +241,8 @@ in "${cfg.config.modifier}+r" = "mode resize"; # like vimperator - "${cfg.config.modifier}+grave" = "exec ${pkgs.i3-easyfocus}/bin/i3-easyfocus"; + "${cfg.config.modifier}+a" = "exec ${pkgs.i3-easyfocus}/bin/i3-easyfocus"; }; };