From 581ce9bcebb7aada16d8df0a9ea9366e77856deb Mon Sep 17 00:00:00 2001 From: five-hundred-eleven Date: Sat, 10 Aug 2024 12:54:03 -0400 Subject: [PATCH] updated some configs --- .tmux.conf | 25 +++++++++++++++++++------ .zshrc | 35 +++++++++++++++++------------------ choose_random_ambience.sh | 7 +++++++ init.lua | 4 ++++ 4 files changed, 47 insertions(+), 24 deletions(-) create mode 100644 choose_random_ambience.sh diff --git a/.tmux.conf b/.tmux.conf index 8042488..5507ac3 100644 --- a/.tmux.conf +++ b/.tmux.conf @@ -1,16 +1,21 @@ -unbind -a +#unbind -a set -g default-terminal tmux set-option -sa terminal-features ',xterm:RGB' set-window-option -g mode-keys vi -# bind to C-a -set-option -g prefix C-a -bind-key C-a send-prefix +# bind to C-b +set-option -g prefix C-b +bind-key C-b send-prefix +# commands +bind-key -T prefix : command +# sessions +# this will be set with sessionx further down +#bind-key -T prefix s list-sessions # switch panels # switch panes using Alt-arrow without prefix -#bind-key -T prefix C-a switch-client -T prefix_ca +#bind-key -T prefix C-b switch-client -T prefix_ca bind-key -T prefix c new-window bind-key -T prefix h previous-window bind-key -T prefix l next-window @@ -64,4 +69,12 @@ setw -g window-status-format ' #I#[fg=colour237]:#[fg=colour250]#W#[fg=colour244 setw -g window-status-bell-style 'fg=colour255 bg=colour1 bold' # messages -set -g message-style 'fg=colour232 bg=colour16 bold' +set -g message-style 'fg=colour6 bg=colour16 bold' + +# list of plugins +set -g @plugin 'tmux-plugins/tpm' +set -g @plugin 'tmux-plugins/tmux-sensible' +set -g @plugin 'omerxx/tmux-sessionx' +set -g @sessionx-bind 'o' + +run '~/.tmux/plugins/tpm/tpm' diff --git a/.zshrc b/.zshrc index 372f900..1a75415 100644 --- a/.zshrc +++ b/.zshrc @@ -102,28 +102,27 @@ source $ZSH/oh-my-zsh.sh set -o vi -source $HOME/venv/default/bin/activate -PATH=$PATH:/usr/local/go/bin -PATH=$PATH:$HOME/go/bin +#source $HOME/venv/default/bin/activate +source $HOME/anaconda3/bin/activate +conda config --set changeps1 False +PATH="$PATH:/usr/local/go/bin" +PATH="$PATH:$HOME/go/bin" +PATH="$PATH:/usr/local/zig-linux-x86_64-0.13.0" export PATH +source "$HOME/.fzf.zsh" TRAPWINCH() { zle && { zle reset-prompt; zle -R } } - -function Zml2ZV9vbmVfb25lX2Nz { - dirfile="$HOME/directories.txt" - #if ! [ -f $dirfile ] || test $(find $dirfile -mmin +720) - if ! [ -f $dirfile ] - then - echo "Indexing directories..." - find $HOME -type d -not -path '*/.*' 1> $dirfile 2>/dev/null - fi - cd "$(cat $dirfile | fzf)" - zle reset-prompt -} -zle -N 'Zml2ZV9vbmVfb25lX2Nz' -bindkey -M vicmd '\\f' 'Zml2ZV9vbmVfb25lX2Nz' -alias '\f'='Zml2ZV9vbmVfb25lX2Nz' +zle -N fzf-cd-widget +bindkey -M vicmd '\\f' fzf-cd-widget +zle -N fzf-history-widget +bindkey -M vicmd '/' fzf-history-widget TRAPWINCH +export MODULAR_HOME="/home/cowley/.modular" +export PATH="/home/cowley/.modular/pkg/packages.modular.com_mojo/bin:$PATH" + +LS_COLORS=$LS_COLORS:'ow=37;42:' + +eval "$(zoxide init zsh)" diff --git a/choose_random_ambience.sh b/choose_random_ambience.sh new file mode 100644 index 0000000..95d65e1 --- /dev/null +++ b/choose_random_ambience.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +set -ex +choices=$(ls *ambience*.mp3) +shuffled=$(printf "%s\n" "${choices[@]}" | shuf -n1) +echo $shuffled +totem ${shuffled[ $RANDOM % ${#shuffled[@]} ]} diff --git a/init.lua b/init.lua index 329cab4..42a8ef4 100644 --- a/init.lua +++ b/init.lua @@ -251,6 +251,8 @@ require("lspconfig").gopls.setup{} require("lspconfig").ccls.setup{} +require("lspconfig").rust_analyzer.setup{} + -- Global mappings. -- See `:help vim.diagnostic.*` for documentation on any of the below functions @@ -334,6 +336,8 @@ vim.keymap.set("n", "gtH", ":execute 'silent! tabmove ' . (tabpagenr()-2)") vim.keymap.set("n", "gtn", ":tabedit") -- previous tab vim.keymap.set("n", "gb", ":bprevious") +-- previous tab +vim.keymap.set("n", "gb", ":bprevious") vim.keymap.set("n", "gn", ":bnext") -- switch windows using g rather than vim.keymap.set("n", "gwh", "h")