summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Vink <mike1994vink@gmail.com>2023-06-25 22:06:02 +0200
committerMike Vink <mike1994vink@gmail.com>2023-06-25 22:06:02 +0200
commitabefad64a98fc09fe1fdaa727d6cad07dcd40562 (patch)
tree0d02fb177678e3af03642a9d36bf9741d1282365
parentba31dd00cb93b861f4955c57a1be33a63c4efe95 (diff)
stuff
-rw-r--r--home.nix16
-rw-r--r--shell-scripts/set-bg2
-rw-r--r--shell-scripts/tmux-normal-mode10
3 files changed, 17 insertions, 11 deletions
diff --git a/home.nix b/home.nix
index 0c28630..2eaa310 100644
--- a/home.nix
+++ b/home.nix
@@ -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