diff options
| -rw-r--r-- | home.nix | 16 | ||||
| -rw-r--r-- | shell-scripts/set-bg | 2 | ||||
| -rw-r--r-- | shell-scripts/tmux-normal-mode | 10 |
3 files changed, 17 insertions, 11 deletions
@@ -52,6 +52,7 @@ extraConfig = '' set-option -g default-shell ${pkgs.bashInteractive}/bin/bash set -s set-clipboard on + setw -g mouse on set -g default-terminal "xterm-256color" set -as terminal-overrides ',xterm*:RGB' set-option -g focus-events on @@ -63,16 +64,6 @@ bind-key -T copy-mode-vi y send -X copy-pipe-and-cancel 'xclip -in -selection clipboard' bind-key -T copy-mode-vi : command-prompt - # Make our own copy-mode with Kakoune! - # cursor_y=$(tmux display-message -t "''${pane_id}" -p "#{cursor_y}") ;\ - # cursor_x=$(tmux display-message -t "''${pane_id}" -p "#{cursor_x}") ;\ - # pane_height=$(tmux display-message -t "''${pane_id}" -p "#{pane_height}") ;\ - # line_count="$(wc -l "$file" |awk "{print \$1}")" ;\ - # sel_line=$(( line_count - ( pane_height - cursor_y ) + 1 )) ;\ - # printf "sel = %s\n" "$line_count" >>/tmp/debug.log ;\ - # cursor="''${sel_line}.''${cursor_x},''${sel_line}.''${cursor_x}" ;\ - # printf "cursor = %s\n" "$cursor" >>/tmp/debug.log - bind -n C-s run-shell tmux-normal-mode bind -n C-q run-shell 'tmux-normal-mode --quit' ''; @@ -149,6 +140,7 @@ xsession = { enable = true; initExtra = '' + wal -R & ${pkgs.xorg.xmodmap}/bin/xmodmap -e "remove mod1 = Alt_R" ${pkgs.xorg.xmodmap}/bin/xmodmap -e "add mod3 = Alt_R" ''; @@ -159,6 +151,8 @@ search = "dmenu -ip -p 'Window name/id:'"; browser = "firefox"; lock = "slock"; + editor = "bash -c 'kakup'"; + projecteditor = "bash -c 'kakup .'"; }; bindings = { lock = "Mod+s"; @@ -166,6 +160,8 @@ term = "Mod+Return"; restart = "Mod+Shift+r"; quit = "Mod+Shift+q"; + editor = "Mod+e"; + projecteditor = "Mod+Shift+e"; }; settings = { modkey = "Mod4"; diff --git a/shell-scripts/set-bg b/shell-scripts/set-bg index ad04730..e470e88 100644 --- a/shell-scripts/set-bg +++ b/shell-scripts/set-bg @@ -13,4 +13,4 @@ else fi kak -l | parallel '<<< "colorscheme wal" kak -p {}' pgrep -x st | parallel kill -st -e tmux attach +st -e tmux attach & diff --git a/shell-scripts/tmux-normal-mode b/shell-scripts/tmux-normal-mode index 661f8af..5730017 100644 --- a/shell-scripts/tmux-normal-mode +++ b/shell-scripts/tmux-normal-mode @@ -1,3 +1,13 @@ + # Make our own copy-mode with Kakoune! + # cursor_y=$(tmux display-message -t "''${pane_id}" -p "#{cursor_y}") ;\ + # cursor_x=$(tmux display-message -t "''${pane_id}" -p "#{cursor_x}") ;\ + # pane_height=$(tmux display-message -t "''${pane_id}" -p "#{pane_height}") ;\ + # line_count="$(wc -l "$file" |awk "{print \$1}")" ;\ + # sel_line=$(( line_count - ( pane_height - cursor_y ) + 1 )) ;\ + # printf "sel = %s\n" "$line_count" >>/tmp/debug.log ;\ + # cursor="''${sel_line}.''${cursor_x},''${sel_line}.''${cursor_x}" ;\ + # printf "cursor = %s\n" "$cursor" >>/tmp/debug.log + kakoune_session="$(tmux display-message -p "#{window_name}" | sed "s/kakc@//")" dispatch_name="dispatch://$(tmux display-message -p "#{pane_start_command}")" case "${@}" in |
