From e32e6f912ee7b6edb21b44fb6aa1d63f2bfca359 Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Mon, 17 Jul 2023 16:44:22 -0500 Subject: [PATCH] Re-add tmux, firefox fancy on laptop --- common/bin/dotfiles-setup | 2 +- common/firefox/userChrome.d.css | 9 ++ common/tmux/conf | 116 ++++++++++++++++++ .../arch/provision.d/20-install-packages.bash | 2 +- 4 files changed, 127 insertions(+), 2 deletions(-) create mode 100644 common/tmux/conf diff --git a/common/bin/dotfiles-setup b/common/bin/dotfiles-setup index 2d95a9b..dafd85e 100755 --- a/common/bin/dotfiles-setup +++ b/common/bin/dotfiles-setup @@ -36,10 +36,10 @@ function l -a dot -a target -d "Symlink a dotfile configuration file or director end pushd $dfp -l common/tmux/conf $h/.tmux.conf test -d ~/.tmux/pluginx/tpm || \ git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm l common/zellij $c/zellij +l common/tmux/conf $h/.tmux.conf l common/fish $c/fish l common/bat $c/bat l common/bash/rc $h/.bashrc diff --git a/common/firefox/userChrome.d.css b/common/firefox/userChrome.d.css index 132abbc..3210517 100644 --- a/common/firefox/userChrome.d.css +++ b/common/firefox/userChrome.d.css @@ -1,3 +1,12 @@ #webrtcIndicator { display: none; } + +#main-window[tabsintitlebar="true"]:not([extradragspace="true"]) #TabsToolbar>.toolbar-items { + opacity: 0; + pointer-events: none; +} + +#main-window:not([tabsintitlebar="true"]) #TabsToolbar { + visibility: collapse !important; +} \ No newline at end of file diff --git a/common/tmux/conf b/common/tmux/conf new file mode 100644 index 0000000..3a28d9c --- /dev/null +++ b/common/tmux/conf @@ -0,0 +1,116 @@ +unbind C-b +set -g prefix C-s +bind s send-prefix + +bind v split-window -h -c "#{pane_current_path}" +bind b split-window -c "#{pane_current_path}" + +bind T source-file "$HOME/.tmux.conf" \; display-message "Reloaded $HOME/.tmux.conf" + +# dump buffer contents to file +bind O display-message "#(tmux-save-buffer '#S')" +# TODO: dump buffer to file and open in EDITOR? + +bind D attach-session -t . -c '#{pane_current_path}' \; display-message "Set session path to #{pane_current_path}" + +# toggle status bar +bind H set -s status + +# pane navigation +bind -n C-l select-pane -R +bind -n C-k select-pane -U +bind -n C-j select-pane -D +bind -n C-h select-pane -L + +# tab creation +bind -n C-t new-window +bind Tab next-window + +# tab nav is the default p and n binds +# window switcher is the default w bind + +# session switcher +bind s run "tmux split-window -l 12 'tmuxswitcher'" + +set -g update-environment "WAYLAND_DISPLAY DISPLAY" + +set -g mouse on +set -g escape-time 0 + +set -g monitor-activity on +set -g visual-bell off +set -g bell-action other +set -g activity-action none + +set -g mode-keys vi +set -g history-limit 1000000 +set -g status on +set -g status-position bottom +set -g status-style "fg=colour8 bg=default" +# set -g status-bg default +# set -g status-fg colour8 +set -g status-interval 5 +set -g status-left-length 50 +set -g window-status-style "fg=colour8 bg=default" +set -g window-status-format "#W" +set -g window-status-separator " " +set -g window-status-activity-style "fg=colour7 bg=default" +set -g window-status-bell-style "fg=colour1 bg=default" +set -g window-status-current-style "fg=colour4 bg=default" +set -g window-status-current-format " #W " +set -g status-left "#h:#S " +set -g status-right "" + # set -ag status-right "#(pwd | $XDG_CONFIG_HOME/lytedev-dotfiles/common/bin/glancepath) " + set -ag status-right "#(kubeline && printf ' ')" +set -g status-left-length 1000 +# set -g status-right-length 280 + # set -ag status-right "#{pane_current_command}" + +set -g message-style "fg=colour7 bg=default" +set -g pane-active-border-style fg=blue +set -g pane-border-style fg=colour0 +set -g clock-mode-colour colour8 +set -g base-index 1 +set -g pane-base-index 1 + +set -g window-status-current-format "#W" + +# present a menu of urls to open from the visible pane +# TODO: fuzzy search this +# bind u capture-pane \;\ +# save-buffer /tmp/tmux-buffer \;\ +# split-window -l 10 "urlscan /tmp/tmux-buffer" + +bind -T copy-mode-vi "y" send-keys -X copy-pipe-no-clear 'wl-copy' \; display-message 'Copied to clipboard!' +bind -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-no-clear 'wl-copy' \; display-message 'Copied to clipboard!' + +bind K kill-pane +bind C-S-k kill-window + +# TODO: handle tmux nesting by being able to toggle the prefix (and indicate in status bar?) + +# TODO: styles after `set -u key-table` +#if -F '#{pane_in_mode}' 'send-keys -X cancel' \;\ +bind -T root F12 set -g prefix None \; set -g key-table off \; display-message "Keys OFF" \; refresh-client -S + +# TODO: styles after `set -u key-table` +bind -T off F12 \ + set -g -u prefix \;\ + set -g -u key-table \;\ + display-message "Keys ON" \;\ + refresh-client -S + +source-file "$ENV_PATH/*/tmux.d.conf" + +set -g @plugin 'tmux-plugins/tpm' +set -g @plugin 'tmux-plugins/tmux-resurrect' +set -g @plugin 'tmux-plugins/tmux-continuum' + +set -g @resurrect-capture-pane-contents 'on' +set -g @resurrect-processes 'helix hx vi vim nvim emacs man less more tail top htop btm irssi weechat mutt "git log" iex mix deno watchexec mosh-client ssh' + +bind A run-shell "#{@resurrect-save-script-path}" +bind L run-shell "#{@resurrect-restore-script-path}" + +set -g @continuum-restore 'on' +set -g @continuum-save-interval '120' \ No newline at end of file diff --git a/os/linux/arch/provision.d/20-install-packages.bash b/os/linux/arch/provision.d/20-install-packages.bash index 9920be7..e0eb618 100755 --- a/os/linux/arch/provision.d/20-install-packages.bash +++ b/os/linux/arch/provision.d/20-install-packages.bash @@ -26,7 +26,7 @@ pacman -Sy --needed --noconfirm \ rsync rclone `# File Transfer` \ helix `# Text Editors` \ unzip `# Simple Unzipping` \ - zellij `# Terminal Multiplexer` \ + tmux zellij `# Terminal Multiplexer` \ dog bind nmap traceroute iputils `# Networking Utilities` \ curl wget xh `# HTTP Utilities` \ w3m `# Web Browser` \