From e2582f8649e9e67f02210f659b69523c46003087 Mon Sep 17 00:00:00 2001 From: Rubén Beltrán del Río Date: Sun, 15 Mar 2026 21:41:58 +0100 Subject: Simplify installation --- README.md | 64 +++++------- age-recipients | 3 - config/git/config | 36 +++++++ config/git/ignore | 1 + config/tmux/tmux.conf | 63 ++++++++++++ gitconfig | 36 ------- home/age-recipients | 3 + home/hushlogin | 0 home/nethackrc | 16 +++ home/plan | 25 +++++ home/rgignore | 1 + home/skhdrc | 225 +++++++++++++++++++++++++++++++++++++++++ home/tmuxp/main.yml | 23 +++++ home/yabairc | 13 +++ home/zlogin | 18 ++++ home/zlogout | 0 home/zprofile | 67 ++++++++++++ home/zshenv | 4 + home/zshrc | 108 ++++++++++++++++++++ hushlogin | 0 install | 130 ++++-------------------- nethackrc | 16 --- plan | 25 ----- rgignore | 1 - runcoms/zlogin | 18 ---- runcoms/zlogout | 0 runcoms/zprofile | 67 ------------ runcoms/zshenv | 4 - runcoms/zshrc | 108 -------------------- skhdrc | 225 ----------------------------------------- tmux.conf | 63 ------------ tmuxp/main.yml | 23 ----- xterm-256color-italic.terminfo | 4 - yabairc | 13 --- 34 files changed, 651 insertions(+), 752 deletions(-) delete mode 100644 age-recipients create mode 100644 config/git/config create mode 100644 config/git/ignore create mode 100644 config/tmux/tmux.conf delete mode 100644 gitconfig create mode 100644 home/age-recipients create mode 100644 home/hushlogin create mode 100644 home/nethackrc create mode 100644 home/plan create mode 100644 home/rgignore create mode 100644 home/skhdrc create mode 100644 home/tmuxp/main.yml create mode 100755 home/yabairc create mode 100644 home/zlogin create mode 100644 home/zlogout create mode 100644 home/zprofile create mode 100644 home/zshenv create mode 100644 home/zshrc delete mode 100644 hushlogin delete mode 100644 nethackrc delete mode 100644 plan delete mode 100644 rgignore delete mode 100644 runcoms/zlogin delete mode 100644 runcoms/zlogout delete mode 100644 runcoms/zprofile delete mode 100644 runcoms/zshenv delete mode 100644 runcoms/zshrc delete mode 100644 skhdrc delete mode 100644 tmux.conf delete mode 100644 tmuxp/main.yml delete mode 100644 xterm-256color-italic.terminfo delete mode 100755 yabairc diff --git a/README.md b/README.md index 3735424..64b5b68 100644 --- a/README.md +++ b/README.md @@ -1,33 +1,34 @@ -# Dotfiles - -To set up run `./install` - -It provides configuration for: - -* nvim -* tmux -* zsh -* git -* ripgrep -* tmuxp -* kitty -* karabiner -* weechat -* nethack -* terminfo italics support -* yabai & skhdc -* asdf +# Rubén's Configuration Files. + +This repository contains my unix configuration files, used on macOS, and +a few linux flavors. + +You can check which configurations it provides by checking `config` and `home`. ## Prerequisites -The scripts here have support for `brew`, `pacman`, or `apt`. -Install brew with: `/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"` +The scripts here have support for `brew`, `dnf`, `pacman`, or `apt`. + +It assumes you have an SSH key that can pull from git. +### macOS + +Install brew by following the instructions in [brew.sh](https://brew.sh/). It might also be a good idea to install the xcode command line tools with `xcode-select --install` +## Usage + +1. Clone this repository to `~/.dotfiles` +2. Run `./install` from the root of this project. + +By default, the script will attempt to provision software marked as essential +before installing. You can skip this behavior by using the --skip-provisioning +flag. + ## Provisioning -These dotfiles include some provisioning scripts for `brew`, `pacman`, and `apt`. +These dotfiles include some provisioning scripts for `brew`, `dnf`, `pacman`, +and `apt`. To set up run `./provision ` where `` is one of: @@ -42,9 +43,9 @@ To see what each recipe installs, check the files under `provisioning/` For local modifications to the zshrc create `~/.zshrc.local`. -## Local vim overrides +## Local nvim overrides -For local modifications to your neovim init create `~/.config/nvim/lua/init_local.lua` +For local modifications to your neovim init create `~/.config/nvim/lua/init_local.lua` ## Environment modification @@ -52,19 +53,10 @@ In order to specify the environment in the prompt, create a function called `env_info_provider` and echo your environment details (eg. `dev`, `staging`, `production`) -## LSP & Neovim - -For the LSP to work, some external dependencies might be needed. As some of -these depend on what version asdf has loaded, or specific projects, they're -not included by default. - -See [the nvim-lspconfig docs][lsp] for more info. -[lsp]: https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md - ## Private Files -There are some potentially sensitive files included. They're PGP encrypted. If -you need them you can run `./sensitive`. To update them if they change, +There are some potentially sensitive files included. They're encrypted with age. +If you need them you can run `./sensitive`. To update them if they change, run `./sensitive update` instead. -For passwords, make sure you have setup the `pass` store. +For passwords, make sure you have setup the `passage` store. diff --git a/age-recipients b/age-recipients deleted file mode 100644 index c59cd10..0000000 --- a/age-recipients +++ /dev/null @@ -1,3 +0,0 @@ -age1r42nded7xmvfanq5mqqa0ld6v666f3mxtfqjstfygqg5yj2nte6s2tssjf -age1yubikey1qtdpuvjq6ywtnsxz55ugjlmhquewkzccqyyafr5ngw0w5433cjw7zr6nd2v -age1yubikey1q2wnvc90uqjfwu8pxwxexnzsue72m3xjpur73hr3ndcf9d69zq6rvsgmd9w diff --git a/config/git/config b/config/git/config new file mode 100644 index 0000000..4c9ba68 --- /dev/null +++ b/config/git/config @@ -0,0 +1,36 @@ +[user] + name = Ruben Beltran del Rio + email = git@r.bdr.sh + signingkey = ~/.ssh/git.pub +[sendemail] + smtpserver = smtp.fastmail.com + smtpuser = r@bdr.sh + smtpencryption = ssl + smtpserverport = 465 +[core] + pager = delta + editor = nvim +[color] + diff = auto +[push] + default = simple + autoSetupRemote = true +[pull] + rebase = false +[commit] + gpgsign = true +[gpg] + format = ssh +[init] + defaultBranch = main +[diff] + external = difft + tool = vimdiff + algorithm = histogram +[merge] + tool = nvim + conflictstyle = zdiff3 +[mergetool] + keepBackup = false +[mergetool "nvim"] + cmd = nvim -d $LOCAL $REMOTE $MERGED -c '$wincmd w' -c 'wincmd J' diff --git a/config/git/ignore b/config/git/ignore new file mode 100644 index 0000000..66d62f8 --- /dev/null +++ b/config/git/ignore @@ -0,0 +1 @@ +**/.claude/settings.local.json diff --git a/config/tmux/tmux.conf b/config/tmux/tmux.conf new file mode 100644 index 0000000..c319f99 --- /dev/null +++ b/config/tmux/tmux.conf @@ -0,0 +1,63 @@ +# Increase the scrollback +set -g history-limit 5000 + +# Screen-like prefix. +set -g prefix C-a +bind-key C-a last-window +bind-key a send-prefix + +# Better bindings for window split +unbind % # Remove default binding since we’re replacing +bind | split-window -h +bind - split-window -v + +# Customize the status bars. +set-option -g status-style bg=default +set -g status-fg colour232 +set -g status-left-length 24 +set -g status-left '#[fg=green]#[fg=colour232, bg=green]#S#[fg=green, bg=default] #[default]' +setw -g window-status-current-format '#[fg=magenta]#[fg=white, bg=magenta]#{window_index}:#{window_name}#[fg=magenta, bg=default]#[default]' +setw -g window-status-format '#[fg=white]#[fg=colour232, bg=white]#{window_index}:#{window_name}#[fg=white, bg=default]#[default]' +set -g status-right '#[fg=green]#[fg=colour232, bg=green]#(bash ~/.dotfiles/tmux-segments/short-uptime)#[fg=green, bg=default] ' +set -g status-right-length 70 + +# Better powerline highlighting. +set-window-option -g window-status-activity-style bold,underscore + +# Set Activity monitoring. +setw -g monitor-activity on +set -g visual-activity on + +# Vi keys in copy mode. +setw -g mode-keys vi +bind -r k run-shell 'tmux select-pane -U' +bind -r j run-shell 'tmux select-pane -D' +bind -r h run-shell 'tmux select-pane -L' +bind -r l run-shell 'tmux select-pane -R' + +# Popup window +bind -r ` display-popup -b heavy -E -w 60% -h 60% -S fg=blue -T '#[bold]#[reverse]#{?window_zoomed_flag,Z:,}UTILITY#[default]' + +# Mouse Mode +set -g mouse on + +# Set color mode. +set -g default-terminal "xterm-256color" +set-option -ga terminal-overrides ",xterm-256color:Tc" + +# Pane Style +set -g pane-border-status top +set -g pane-active-border-style fg=green +set -g pane-border-format '#[bold]#[reverse]#{?window_zoomed_flag,Z:,}#{pane_current_command}#[default]' +set -g pane-border-lines double +set -g pane-scrollbars modal +set -g pane-scrollbars-style fg=blue,bg=lightgray + +set-hook -g after-resize-pane 'if -F "#{window_zoomed_flag}" "set pane-active-border-style fg=red" "set pane-active-border-style fg=green"' + +# Terminal Title +set -g set-titles on +set -g set-titles-string '󰝘 #{session_name}' + +# Clock +set -g clock-mode-style 24-with-seconds diff --git a/gitconfig b/gitconfig deleted file mode 100644 index 4c9ba68..0000000 --- a/gitconfig +++ /dev/null @@ -1,36 +0,0 @@ -[user] - name = Ruben Beltran del Rio - email = git@r.bdr.sh - signingkey = ~/.ssh/git.pub -[sendemail] - smtpserver = smtp.fastmail.com - smtpuser = r@bdr.sh - smtpencryption = ssl - smtpserverport = 465 -[core] - pager = delta - editor = nvim -[color] - diff = auto -[push] - default = simple - autoSetupRemote = true -[pull] - rebase = false -[commit] - gpgsign = true -[gpg] - format = ssh -[init] - defaultBranch = main -[diff] - external = difft - tool = vimdiff - algorithm = histogram -[merge] - tool = nvim - conflictstyle = zdiff3 -[mergetool] - keepBackup = false -[mergetool "nvim"] - cmd = nvim -d $LOCAL $REMOTE $MERGED -c '$wincmd w' -c 'wincmd J' diff --git a/home/age-recipients b/home/age-recipients new file mode 100644 index 0000000..c59cd10 --- /dev/null +++ b/home/age-recipients @@ -0,0 +1,3 @@ +age1r42nded7xmvfanq5mqqa0ld6v666f3mxtfqjstfygqg5yj2nte6s2tssjf +age1yubikey1qtdpuvjq6ywtnsxz55ugjlmhquewkzccqyyafr5ngw0w5433cjw7zr6nd2v +age1yubikey1q2wnvc90uqjfwu8pxwxexnzsue72m3xjpur73hr3ndcf9d69zq6rvsgmd9w diff --git a/home/hushlogin b/home/hushlogin new file mode 100644 index 0000000..e69de29 diff --git a/home/nethackrc b/home/nethackrc new file mode 100644 index 0000000..cc03822 --- /dev/null +++ b/home/nethackrc @@ -0,0 +1,16 @@ +OPTIONS=color +OPTIONS=catname:Pure +OPTIONS=dogname:Juan +OPTIONS=horsename:Juan +OPTIONS=symset:curses +OPTIONS=windowtype:curses +OPTIONS=align_status:bottom +OPTIONS=align_message:bottom +OPTIONS=popup_dialog +OPTIONS=perm_invent +OPTIONS=lit_corridor +DUNGEONSYMBOLS = 0x0020 0x2502 0x2500 0x250C 0x2510 0x2514 0x2518 0x253C \ + 0x2534 0x252C 0x2524 0x251C 0x00B7 0x25A0 0x25A0 0x002B \ + 0x002B 0x2261 0x00B1 0x00B7 0x2591 0x2592 0x003C 0x003E \ + 0x003C 0x003E 0x005F 0x007C 0x005C 0x0023 0x2320 0x2248 \ + 0x00B7 0x2248 0x00B7 0x00B7 0x0023 0x0023 0x0020 0x0023 0x2248 diff --git a/home/plan b/home/plan new file mode 100644 index 0000000..cc13990 --- /dev/null +++ b/home/plan @@ -0,0 +1,25 @@ +# My plan for now, roughly + +- Continue filling out wiki + + There's now 46 pages at https://wiki.r.bdr.sh. Most are stubs, but + the format is great! I should have done this ages ago. + + I'm thinking of writing a plugin to use `wmap` syntax and render + wardley maps. + +- Create videos + + In order to promote my freelance business, I want to create some videos + about topics I know. One series will be around reading code, and the + other around my three process model. + + I've been learning apple motion as part of this, and it's a fun tool. + +- Set up my freelance business. + + The finanzamt never responded to my first request, which I did through + Sorted. Who knows if it actually went through. I did another one directly + through Elster, and hopefully we'll know soon. + +[2025-12-02] diff --git a/home/rgignore b/home/rgignore new file mode 100644 index 0000000..3c3629e --- /dev/null +++ b/home/rgignore @@ -0,0 +1 @@ +node_modules diff --git a/home/skhdrc b/home/skhdrc new file mode 100644 index 0000000..d49ec4e --- /dev/null +++ b/home/skhdrc @@ -0,0 +1,225 @@ +# NOTE(koekeishiya): A list of all built-in modifier and literal keywords can +# be found at https://github.com/koekeishiya/skhd/issues/1 +# +# A hotkey is written according to the following rules: +# +# hotkey = '<' | +# +# mode = 'name of mode' | ',' +# +# action = '[' ']' | '->' '[' ']' +# ':' | '->' ':' +# ';' | '->' ';' +# +# keysym = '-' | +# +# mod = 'modifier keyword' | '+' +# +# key = | +# +# literal = 'single letter or built-in keyword' +# +# keycode = 'apple keyboard kVK_ values (0x3C)' +# +# proc_map_lst = * +# +# proc_map = ':' | '~' | +# '*' ':' | '*' '~' +# +# string = '"' 'sequence of characters' '"' +# +# command = command is executed through '$SHELL -c' and +# follows valid shell syntax. if the $SHELL environment +# variable is not set, it will default to '/bin/bash'. +# when bash is used, the ';' delimeter can be specified +# to chain commands. +# +# to allow a command to extend into multiple lines, +# prepend '\' at the end of the previous line. +# +# an EOL character signifies the end of the bind. +# +# -> = keypress is not consumed by skhd +# +# * = matches every application not specified in +# +# ~ = application is unbound and keypress is forwarded per usual, when specified in a +# +# NOTE(koekeishiya): A mode is declared according to the following rules: +# +# mode_decl = '::' '@' ':' | '::' ':' | +# '::' '@' | '::' +# +# name = desired name for this mode, +# +# @ = capture keypresses regardless of being bound to an action +# +# command = command is executed through '$SHELL -c' and +# follows valid shell syntax. if the $SHELL environment +# variable is not set, it will default to '/bin/bash'. +# when bash is used, the ';' delimeter can be specified +# to chain commands. +# +# to allow a command to extend into multiple lines, +# prepend '\' at the end of the previous line. +# +# an EOL character signifies the end of the bind. + +# add an on_enter command to the default mode +# :: default : chunkc border::color 0xff775759 +# +# defines a new mode 'test' with an on_enter command, that captures keypresses +# :: test @ : chunkc border::color 0xff24ccaa +# +# from 'default' mode, activate mode 'test' +# cmd - x ; test +# +# from 'test' mode, activate mode 'default' +# test < cmd - x ; default +# +# launch a new terminal instance when in either 'default' or 'test' mode +# default, test < cmd - return : open -na /Applications/Terminal.app + +# application specific bindings +# +# cmd - n [ +# "kitty" : echo "hello kitty" +# * : echo "hello everyone" +# "qutebrowser" : echo "hello qutebrowser" +# "terminal" ~ +# "finder" : false +# ] + +# specify a file that should be included as an additional config-file. +# treated as an absolutepath if the filename begins with '/' otherwise +# the file is relative to the path of the config-file it was loaded from. +# +# .load "/Users/Koe/.config/partial_skhdrc" +# .load "partial_skhdrc" + +# prevent skhd from monitoring events for specific applications. +# +# .blacklist [ +# "kitty" +# "terminal" +# "qutebrowser" +# ] + +# open terminal, blazingly fast compared to iTerm/Hyper +shift + alt - return : /Applications/kitty.app/Contents/MacOS/kitty --single-instance -d ~ + +# open qutebrowser +# cmd + shift - return : ~/Scripts/qtb.sh + +# open mpv +# cmd - m : open -na /Applications/mpv.app $(pbpaste) + +# focus window +alt - h : yabai -m window --focus west +alt - j : yabai -m window --focus south +alt - k : yabai -m window --focus north +alt - l : yabai -m window --focus east + +# swap managed window +shift + alt - h : yabai -m window --swap west +shift + alt - j : yabai -m window --swap south +shift + alt - k : yabai -m window --swap north +shift + alt - l : yabai -m window --swap east + +# move managed window +shift + ctrl + alt - h : yabai -m window --warp west +shift + ctrl + alt - j : yabai -m window --warp south +shift + ctrl + alt - k : yabai -m window --warp north +shift + ctrl + alt - l : yabai -m window --warp east + +# balance size of windows +shift + ctrl + alt - 0 : yabai -m space --balance + +# make floating window fill screen +shift + alt - up : yabai -m window --grid 1:1:0:0:1:1 + +# make floating window fill left-half of screen +shift + alt - left : yabai -m window --grid 1:2:0:0:1:1 +shift + alt - right : yabai -m window --grid 1:2:1:0:1:1 + +# create desktop, move window and follow focus - uses jq for parsing json (brew install jq) +# shift + cmd - n : yabai -m space --create && \ +# index="$(yabai -m query --spaces --display | jq 'map(select(."is-native-fullscreen" == false))[-1].index')" && \ +# yabai -m window --space "${index}" && \ +# yabai -m space --focus "${index}" + +# fast focus desktop +# cmd + alt - x : yabai -m space --focus recent +# cmd + alt - 1 : yabai -m space --focus 1 + +# send window to desktop and follow focus +# shift + cmd - z : yabai -m window --space next; yabai -m space --focus next +shift + alt - 1 : yabai -m window --space 1; yabai -m space --focus 1 +shift + alt - 2 : yabai -m window --space 2; yabai -m space --focus 2 +shift + alt - 3 : yabai -m window --space 3; yabai -m space --focus 3 +shift + alt - 4 : yabai -m window --space 4; yabai -m space --focus 4 +shift + alt - 5 : yabai -m window --space 5; yabai -m space --focus 5 +shift + alt - 6 : yabai -m window --space 6; yabai -m space --focus 6 +shift + alt - 7 : yabai -m window --space 7; yabai -m space --focus 7 +shift + alt - 8 : yabai -m window --space 8; yabai -m space --focus 8 +shift + alt - 9 : yabai -m window --space 9; yabai -m space --focus 9 +shift + alt - 0 : yabai -m window --space 10; yabai -m space --focus 10 + +# focus monitor +# ctrl + alt - z : yabai -m display --focus prev +shift + ctrl - 1 : yabai -m display --focus 1 +shift + ctrl - 2 : yabai -m display --focus 2 +shift + ctrl - 3 : yabai -m display --focus 3 + +# send window to monitor and follow focus +# ctrl + cmd - c : yabai -m window --display next; yabai -m display --focus next +# ctrl + cmd - 1 : yabai -m window --display 1; yabai -m display --focus 1 +shift + ctrl + alt - 1 : yabai -m window --display 1; yabai -m display --focus 1 +shift + ctrl + alt - 2 : yabai -m window --display 2; yabai -m display --focus 2 +shift + ctrl + alt - 3 : yabai -m window --display 3; yabai -m display --focus 3 + +# move floating window +# shift + ctrl - a : yabai -m window --move rel:-20:0 +# shift + ctrl - s : yabai -m window --move rel:0:20 + +# increase window size +shift + alt - a : yabai -m window --resize left:-20:0 +shift + alt - s : yabai -m window --resize bottom:0:20 +shift + alt - w : yabai -m window --resize top:0:-20 +shift + alt - d : yabai -m window --resize right:20:0 + +# decrease window size +# shift + cmd - s : yabai -m window --resize bottom:0:-20 +# shift + cmd - w : yabai -m window --resize top:0:20 +shift + ctrl+ alt - a : yabai -m window --resize right:-20:0 +shift + ctrl+ alt - s : yabai -m window --resize top:0:20 +shift + ctrl+ alt - w : yabai -m window --resize bottom:0:-20 +shift + ctrl+ alt - d : yabai -m window --resize left:20:0 + +# set insertion point in focused container +ctrl + alt - h : yabai -m window --insert west +ctrl + alt - j : yabai -m window --insert south +ctrl + alt - k : yabai -m window --insert north +ctrl + alt - l : yabai -m window --insert east + +# toggle window zoom +shift + alt - z : yabai -m window --toggle zoom-parent +shift + ctrl + alt - z : yabai -m window --toggle zoom-fullscreen + +# toggle window split type +shift + alt - e : yabai -m window --toggle split + +# float / unfloat window and center on screen +shift + alt - t : yabai -m window --toggle float --grid 4:4:1:1:2:2 + +# toggle sticky(+float), topmost, picture-in-picture +shift + alt - p : yabai -m window --toggle sticky --toggle topmost --toggle pip + +# rotate tree +shift + alt - r : yabai -m space --rotate 90 + +# mirror tree y-axis +shift + alt - y : yabai -m space --mirror y-axis + +# mirror tree x-axis +shift + alt - x : yabai -m space --mirror x-axis diff --git a/home/tmuxp/main.yml b/home/tmuxp/main.yml new file mode 100644 index 0000000..a41de4d --- /dev/null +++ b/home/tmuxp/main.yml @@ -0,0 +1,23 @@ +session_name: main + +windows: + - window_name: mail + start_directory: '~/projects' + panes: + - aerc + - window_name: notes + start_directory: '~/.local/share/nota' + panes: + - nvim + - window_name: util + start_directory: '~' + focus: true + layout: '9c05,158x41,0,0{79x41,0,0,21,78x41,80,0[78x20,80,0,22,78x20,80,21,23]}' + panes: + - figlet welcome + - figlet to + - figlet computer + - window_name: proj + start_directory: '~/Projects' + panes: + - figlet projects diff --git a/home/yabairc b/home/yabairc new file mode 100755 index 0000000..fc3774d --- /dev/null +++ b/home/yabairc @@ -0,0 +1,13 @@ +# for this to work you must configure sudo such that +# it will be able to run the command without password + +yabai -m signal --add event=dock_did_restart action="sudo yabai --load-sa" +sudo yabai --load-sa + +yabai -m config layout bsp +yabai -m config window_shadow float +yabai -m config window_border on +yabai -m config window_border_width 2 +yabai -m config window_border_radius 0 +yabai -m config active_window_border_color 0xFF55FF55 +yabai -m config window_border_blur off diff --git a/home/zlogin b/home/zlogin new file mode 100644 index 0000000..60876ac --- /dev/null +++ b/home/zlogin @@ -0,0 +1,18 @@ +# Execute code that does not affect the current session in the background. +{ + # Compile the completion dump to increase startup speed. + zcompdump="${ZDOTDIR:-$HOME}/.zcompdump" + if [[ -s "$zcompdump" && (! -s "${zcompdump}.zwc" || "$zcompdump" -nt "${zcompdump}.zwc") ]]; then + zcompile "$zcompdump" + fi +} &! + +# Print a random, hopefully interesting, adage. +if (( $+commands[fortune] )); then + echo -en "\033[30m" + if [[ -t 0 || -t 1 ]]; then + fortune -s + print + fi + echo -en "\033[m" +fi diff --git a/home/zlogout b/home/zlogout new file mode 100644 index 0000000..e69de29 diff --git a/home/zprofile b/home/zprofile new file mode 100644 index 0000000..a079fab --- /dev/null +++ b/home/zprofile @@ -0,0 +1,67 @@ +# +# Browser +# + +if [[ "$OSTYPE" == darwin* ]]; then + export BROWSER='open' +fi + +# +# Editors +# + +export EDITOR='nvim' +export VISUAL='nvim' +export PAGER='less' + +# +# Language +# + +if [[ -z "$LANG" ]]; then + export LANG='en_US.UTF-8' +fi + +# +# Paths +# + +# Ensure path arrays do not contain duplicates. +typeset -gU cdpath fpath mailpath path + +# Set the the list of directories that cd searches. +# cdpath=( +# $cdpath +# ) + +# Set the list of directories that Zsh searches for programs. +path=( + /opt/homebrew/{bin,sbin} + $path +) + +# +# Less +# + +# Set the default Less options. +# Mouse-wheel scrolling has been disabled by -X (disable screen clearing). +# Remove -X and -F (exit if the content fits on one screen) to enable it. +export LESS='-F -g -i -M -R -S -w -X -z-4' + +# Set the Less input preprocessor. +# Try both `lesspipe` and `lesspipe.sh` as either might exist on a system. +if (( $#commands[(i)lesspipe(|.sh)] )); then + export LESSOPEN="| /usr/bin/env $commands[(i)lesspipe(|.sh)] %s 2>&-" +fi + +# +# Temporary Files +# + +if [[ ! -d "$TMPDIR" ]]; then + export TMPDIR="/tmp/$LOGNAME" + mkdir -p -m 700 "$TMPDIR" +fi + +TMPPREFIX="${TMPDIR%/}/zsh" diff --git a/home/zshenv b/home/zshenv new file mode 100644 index 0000000..c23f284 --- /dev/null +++ b/home/zshenv @@ -0,0 +1,4 @@ +# Ensure that a non-login, non-interactive shell has a defined environment. +if [[ "$SHLVL" -eq 1 && ! -o LOGIN && -s "${ZDOTDIR:-$HOME}/.zprofile" ]]; then + source "${ZDOTDIR:-$HOME}/.zprofile" +fi diff --git a/home/zshrc b/home/zshrc new file mode 100644 index 0000000..2383af3 --- /dev/null +++ b/home/zshrc @@ -0,0 +1,108 @@ +################################################################################ +# Load Functions +################################################################################ +source "${ZDOTDIR:-$HOME}/.dotfiles/zsh/functions/dotenv.zsh" +source "${ZDOTDIR:-$HOME}/.dotfiles/zsh/functions/graphviz.zsh" +source "${ZDOTDIR:-$HOME}/.dotfiles/zsh/functions/short-uptime.zsh" +source "${ZDOTDIR:-$HOME}/.dotfiles/zsh/functions/figlet-sample.zsh" +source "${ZDOTDIR:-$HOME}/.dotfiles/zsh/functions/prettify-json.zsh" +source "${ZDOTDIR:-$HOME}/.dotfiles/zsh/functions/status.zsh" +source "${ZDOTDIR:-$HOME}/.dotfiles/zsh/functions/sync-repos.zsh" +source "${ZDOTDIR:-$HOME}/.dotfiles/zsh/functions/check-repos.zsh" +source "${ZDOTDIR:-$HOME}/.dotfiles/zsh/functions/ssh-key-helpers.zsh" +source "${ZDOTDIR:-$HOME}/.dotfiles/zsh/functions/todoist.zsh" + +################################################################################ +# Load Modules +################################################################################ +source "${ZDOTDIR:-$HOME}/.dotfiles/zsh/modules/environment.zsh" +source "${ZDOTDIR:-$HOME}/.dotfiles/zsh/modules/editor.zsh" +source "${ZDOTDIR:-$HOME}/.dotfiles/zsh/modules/history.zsh" +source "${ZDOTDIR:-$HOME}/.dotfiles/zsh/modules/directory.zsh" +source "${ZDOTDIR:-$HOME}/.dotfiles/zsh/modules/prompt.zsh" +source "${ZDOTDIR:-$HOME}/.dotfiles/zsh/modules/vendor/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" +source "${ZDOTDIR:-$HOME}/.dotfiles/zsh/modules/completion.zsh" +source "${ZDOTDIR:-$HOME}/.dotfiles/zsh/modules/aliases.zsh" +source "${ZDOTDIR:-$HOME}/.dotfiles/zsh/modules/color.zsh" + +################################################################################ +# ENV VARIABLES +################################################################################ +# Terminal related +export TERM=xterm-256color + +# Paths +# export JAVA_HOME=$(/usr/libexec/java_home) # Enable if using JDK, otherwise disable for performance +export XDG_CONFIG_HOME=$HOME/.config +export GOPATH=$HOME/projects/go +export ANDROID_HOME=$HOME/Library/Android/sdk +export ANDROID_NDK_HOME=$HOME/Library/Android/sdk/ndk-bundle +export PATH=$PATH:$HOME:${GOPATH//://bin:}/bin +export PATH=$PATH:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools:$ANDROID_NDK_HOME:/Applications/calibre.app/Contents/MacOS +export PATH=~/.local/bin:$PATH + +# GPG +export GPG_TTY=$(tty) + +# FZF Config +[ -x "$(command -v fzf)" ] && source <(fzf --zsh) + +export FZF_DEFAULT_COMMAND='/usr/bin/env rg --color never --files --hidden -g \!.git' +export FZF_DEFAULT_OPTS='--preview ''bat --style=numbers --color=always {} | head -500''' + +export MANPAGER='nvim +Man!' +[ -x "$(command -v jj)" ] && source <(COMPLETE=zsh jj) + +################################################################################ +# SECRET ENV VARS!! +################################################################################ + +if [[ -s "${ZDOTDIR:-$HOME}/.secrets.zsh" ]]; then + source "${ZDOTDIR:-$HOME}/.secrets.zsh" +fi + +# Load a local config + +if [[ -s "${ZDOTDIR:-$HOME}/.zshrc.local" ]]; then + source "${ZDOTDIR:-$HOME}/.zshrc.local" +fi + +if [[ -s "/opt/homebrew/bin/brew" ]]; then + # Brew Setup + export PATH=/opt/homebrew/bin:/opt/homebrew/sbin:$PATH + export FZF_VIM_PATH=/opt/homebrew/opt/fzf + . /opt/homebrew/etc/profile.d/z.sh +else + # Z (Linux) + if [[ -s "/usr/libexec/z.sh" ]]; then + . /usr/libexec/z.sh + else + if [[ -s "/usr/share/z/z.sh" ]]; then + . /usr/share/z/z.sh + else + . /usr/local/etc/profile.d/z.sh + fi + fi +fi + +# ASDF +export PATH="${ASDF_DATA_DIR:-$HOME/.asdf}/shims:$PATH" + +if [[ -s "$HOME/.cargo/env" ]]; then +. "$HOME/.cargo/env" +fi + +if [[ -s "~/.asdf/plugins/java/set-java-home.zsh" ]]; then + . ~/.asdf/plugins/java/set-java-home.zsh +fi + +# Difftastic +export DFT_BACKGROUND=light + +# pnpm +export PNPM_HOME="/Users/rbdr/Library/pnpm" +case ":$PATH:" in + *":$PNPM_HOME:"*) ;; + *) export PATH="$PNPM_HOME:$PATH" ;; +esac +# pnpm end diff --git a/hushlogin b/hushlogin deleted file mode 100644 index e69de29..0000000 diff --git a/install b/install index 38a6332..d60b7cb 100755 --- a/install +++ b/install @@ -1,124 +1,34 @@ #!/usr/bin/env sh -echo "Installing essential software" - -./provision essential +if [[ "$1" == "--skip-provisioning" ]]; then + echo "[1/4] Skipping essential software." +else + echo "[1/4] Installing essential software." + ./provision essential +fi -echo "Updating submodules" +echo "[2/4] Updating submodules" git submodule update --init --recursive -echo "Linking runcoms" - -# hush login -ln -fns .dotfiles/hushlogin ~/.hushlogin - -# zsh runcoms -ln -fns .dotfiles/runcoms/zshrc ~/.zshrc -ln -fns .dotfiles/runcoms/zshenv ~/.zshenv -ln -fns .dotfiles/runcoms/zprofile ~/.zprofile -ln -fns .dotfiles/runcoms/zlogout ~/.zlogout -ln -fns .dotfiles/runcoms/zlogin ~/.zlogin - -# TMUX -ln -fns .dotfiles/tmux.conf ~/.tmux.conf - -# Nethack -ln -fns .dotfiles/nethackrc ~/.nethackrc - -# Git -ln -fns .dotfiles/gitconfig ~/.gitconfig - -# ripgrep -ln -fns .dotfiles/rgignore ~/.rgignore +echo "[3/4] Linking Files" -# yabai -ln -fns .dotfiles/yabairc ~/.yabairc +# Link files that go directly in home +for d in home/* ; do + name=${d#home/} + ln -fns .dotfiles/$d ~/.$name +done -# skhdc -ln -fns .dotfiles/skhdrc ~/.skhdrc - -# tmuxp -ln -fns .dotfiles/tmuxp ~/.tmuxp - -# plan -ln -fns .dotfiles/plan ~/.plan - -# config dir +# Link files that go in ~/.config mkdir -p ~/.config - -# kitty -ln -fns ../.dotfiles/config/kitty ~/.config/kitty - -# ghostty -ln -fns ../.dotfiles/config/ghostty ~/.config/ghostty - -# nvim -ln -fns ../.dotfiles/config/nvim ~/.config/nvim - -# karabiner -ln -fns ../.dotfiles/config/karabiner ~/.config/karabiner - -# sway -ln -fns ../.dotfiles/config/sway ~/.config/sway - -# qutebrowser -ln -fns ../.dotfiles/config/qutebrowser ~/.config/qutebrowser - -# aerc -ln -fns ../.dotfiles/config/aerc ~/.config/aerc - -# emacs -ln -fns ../.dotfiles/config/emacs ~/.config/emacs - -# fuzzel -ln -fns ../.dotfiles/config/fuzzel ~/.config/fuzzel -# -# wofi -ln -fns ../.dotfiles/config/wofi ~/.config/wofi - -# mako -ln -fns ../.dotfiles/config/mako ~/.config/mako - -# niri -ln -fns ../.dotfiles/config/niri ~/.config/niri - -# swaylock -ln -fns ../.dotfiles/config/swaylock ~/.config/swaylock - -# waybar -ln -fns ../.dotfiles/config/waybar ~/.config/waybar - -# mpd -ln -fns ../.dotfiles/config/mpd ~/.config/mpd - -# ncmpcpp -ln -fns ../.dotfiles/config/ncmpcpp ~/.config/ncmpcpp - -# weechat -ln -fns ../.dotfiles/config/weechat ~/.config/weechat - -# wpaperd -ln -fns ../.dotfiles/config/wpaperd ~/.config/wpaperd - -# btop -ln -fns ../.dotfiles/config/btop ~/.config/btop - -# task -ln -fns ../.dotfiles/config/task ~/.config/task - -# wob -ln -fns ../.dotfiles/config/wob ~/.config/wob - -# vdirsyncer -ln -fns ../.dotfiles/config/vdirsyncer ~/.config/vdirsyncer - -# age recipients -ln -fns .dotfiles/age-recipients ~/.age-recipients +for d in config/* ; do + name=${d#config/} + ln -fns ../.dotfiles/$d ~/.config/$name +done touch ~/.tool-versions -echo "Setting up password store" +echo "[4/4] Setting up password store" mkdir -p ~/.passage if [ ! -d "$HOME/.passage" ]; then echo ">>> Cloning." @@ -127,4 +37,4 @@ else echo ">>> Already exists." fi -echo "Sensitive files have not been decrypted. Run ./sensitive to decrypt." +echo "ACHTUNG! Sensitive files have not been decrypted. Run ./sensitive to decrypt." diff --git a/nethackrc b/nethackrc deleted file mode 100644 index cc03822..0000000 --- a/nethackrc +++ /dev/null @@ -1,16 +0,0 @@ -OPTIONS=color -OPTIONS=catname:Pure -OPTIONS=dogname:Juan -OPTIONS=horsename:Juan -OPTIONS=symset:curses -OPTIONS=windowtype:curses -OPTIONS=align_status:bottom -OPTIONS=align_message:bottom -OPTIONS=popup_dialog -OPTIONS=perm_invent -OPTIONS=lit_corridor -DUNGEONSYMBOLS = 0x0020 0x2502 0x2500 0x250C 0x2510 0x2514 0x2518 0x253C \ - 0x2534 0x252C 0x2524 0x251C 0x00B7 0x25A0 0x25A0 0x002B \ - 0x002B 0x2261 0x00B1 0x00B7 0x2591 0x2592 0x003C 0x003E \ - 0x003C 0x003E 0x005F 0x007C 0x005C 0x0023 0x2320 0x2248 \ - 0x00B7 0x2248 0x00B7 0x00B7 0x0023 0x0023 0x0020 0x0023 0x2248 diff --git a/plan b/plan deleted file mode 100644 index cc13990..0000000 --- a/plan +++ /dev/null @@ -1,25 +0,0 @@ -# My plan for now, roughly - -- Continue filling out wiki - - There's now 46 pages at https://wiki.r.bdr.sh. Most are stubs, but - the format is great! I should have done this ages ago. - - I'm thinking of writing a plugin to use `wmap` syntax and render - wardley maps. - -- Create videos - - In order to promote my freelance business, I want to create some videos - about topics I know. One series will be around reading code, and the - other around my three process model. - - I've been learning apple motion as part of this, and it's a fun tool. - -- Set up my freelance business. - - The finanzamt never responded to my first request, which I did through - Sorted. Who knows if it actually went through. I did another one directly - through Elster, and hopefully we'll know soon. - -[2025-12-02] diff --git a/rgignore b/rgignore deleted file mode 100644 index 3c3629e..0000000 --- a/rgignore +++ /dev/null @@ -1 +0,0 @@ -node_modules diff --git a/runcoms/zlogin b/runcoms/zlogin deleted file mode 100644 index 60876ac..0000000 --- a/runcoms/zlogin +++ /dev/null @@ -1,18 +0,0 @@ -# Execute code that does not affect the current session in the background. -{ - # Compile the completion dump to increase startup speed. - zcompdump="${ZDOTDIR:-$HOME}/.zcompdump" - if [[ -s "$zcompdump" && (! -s "${zcompdump}.zwc" || "$zcompdump" -nt "${zcompdump}.zwc") ]]; then - zcompile "$zcompdump" - fi -} &! - -# Print a random, hopefully interesting, adage. -if (( $+commands[fortune] )); then - echo -en "\033[30m" - if [[ -t 0 || -t 1 ]]; then - fortune -s - print - fi - echo -en "\033[m" -fi diff --git a/runcoms/zlogout b/runcoms/zlogout deleted file mode 100644 index e69de29..0000000 diff --git a/runcoms/zprofile b/runcoms/zprofile deleted file mode 100644 index a079fab..0000000 --- a/runcoms/zprofile +++ /dev/null @@ -1,67 +0,0 @@ -# -# Browser -# - -if [[ "$OSTYPE" == darwin* ]]; then - export BROWSER='open' -fi - -# -# Editors -# - -export EDITOR='nvim' -export VISUAL='nvim' -export PAGER='less' - -# -# Language -# - -if [[ -z "$LANG" ]]; then - export LANG='en_US.UTF-8' -fi - -# -# Paths -# - -# Ensure path arrays do not contain duplicates. -typeset -gU cdpath fpath mailpath path - -# Set the the list of directories that cd searches. -# cdpath=( -# $cdpath -# ) - -# Set the list of directories that Zsh searches for programs. -path=( - /opt/homebrew/{bin,sbin} - $path -) - -# -# Less -# - -# Set the default Less options. -# Mouse-wheel scrolling has been disabled by -X (disable screen clearing). -# Remove -X and -F (exit if the content fits on one screen) to enable it. -export LESS='-F -g -i -M -R -S -w -X -z-4' - -# Set the Less input preprocessor. -# Try both `lesspipe` and `lesspipe.sh` as either might exist on a system. -if (( $#commands[(i)lesspipe(|.sh)] )); then - export LESSOPEN="| /usr/bin/env $commands[(i)lesspipe(|.sh)] %s 2>&-" -fi - -# -# Temporary Files -# - -if [[ ! -d "$TMPDIR" ]]; then - export TMPDIR="/tmp/$LOGNAME" - mkdir -p -m 700 "$TMPDIR" -fi - -TMPPREFIX="${TMPDIR%/}/zsh" diff --git a/runcoms/zshenv b/runcoms/zshenv deleted file mode 100644 index c23f284..0000000 --- a/runcoms/zshenv +++ /dev/null @@ -1,4 +0,0 @@ -# Ensure that a non-login, non-interactive shell has a defined environment. -if [[ "$SHLVL" -eq 1 && ! -o LOGIN && -s "${ZDOTDIR:-$HOME}/.zprofile" ]]; then - source "${ZDOTDIR:-$HOME}/.zprofile" -fi diff --git a/runcoms/zshrc b/runcoms/zshrc deleted file mode 100644 index 2383af3..0000000 --- a/runcoms/zshrc +++ /dev/null @@ -1,108 +0,0 @@ -################################################################################ -# Load Functions -################################################################################ -source "${ZDOTDIR:-$HOME}/.dotfiles/zsh/functions/dotenv.zsh" -source "${ZDOTDIR:-$HOME}/.dotfiles/zsh/functions/graphviz.zsh" -source "${ZDOTDIR:-$HOME}/.dotfiles/zsh/functions/short-uptime.zsh" -source "${ZDOTDIR:-$HOME}/.dotfiles/zsh/functions/figlet-sample.zsh" -source "${ZDOTDIR:-$HOME}/.dotfiles/zsh/functions/prettify-json.zsh" -source "${ZDOTDIR:-$HOME}/.dotfiles/zsh/functions/status.zsh" -source "${ZDOTDIR:-$HOME}/.dotfiles/zsh/functions/sync-repos.zsh" -source "${ZDOTDIR:-$HOME}/.dotfiles/zsh/functions/check-repos.zsh" -source "${ZDOTDIR:-$HOME}/.dotfiles/zsh/functions/ssh-key-helpers.zsh" -source "${ZDOTDIR:-$HOME}/.dotfiles/zsh/functions/todoist.zsh" - -################################################################################ -# Load Modules -################################################################################ -source "${ZDOTDIR:-$HOME}/.dotfiles/zsh/modules/environment.zsh" -source "${ZDOTDIR:-$HOME}/.dotfiles/zsh/modules/editor.zsh" -source "${ZDOTDIR:-$HOME}/.dotfiles/zsh/modules/history.zsh" -source "${ZDOTDIR:-$HOME}/.dotfiles/zsh/modules/directory.zsh" -source "${ZDOTDIR:-$HOME}/.dotfiles/zsh/modules/prompt.zsh" -source "${ZDOTDIR:-$HOME}/.dotfiles/zsh/modules/vendor/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" -source "${ZDOTDIR:-$HOME}/.dotfiles/zsh/modules/completion.zsh" -source "${ZDOTDIR:-$HOME}/.dotfiles/zsh/modules/aliases.zsh" -source "${ZDOTDIR:-$HOME}/.dotfiles/zsh/modules/color.zsh" - -################################################################################ -# ENV VARIABLES -################################################################################ -# Terminal related -export TERM=xterm-256color - -# Paths -# export JAVA_HOME=$(/usr/libexec/java_home) # Enable if using JDK, otherwise disable for performance -export XDG_CONFIG_HOME=$HOME/.config -export GOPATH=$HOME/projects/go -export ANDROID_HOME=$HOME/Library/Android/sdk -export ANDROID_NDK_HOME=$HOME/Library/Android/sdk/ndk-bundle -export PATH=$PATH:$HOME:${GOPATH//://bin:}/bin -export PATH=$PATH:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools:$ANDROID_NDK_HOME:/Applications/calibre.app/Contents/MacOS -export PATH=~/.local/bin:$PATH - -# GPG -export GPG_TTY=$(tty) - -# FZF Config -[ -x "$(command -v fzf)" ] && source <(fzf --zsh) - -export FZF_DEFAULT_COMMAND='/usr/bin/env rg --color never --files --hidden -g \!.git' -export FZF_DEFAULT_OPTS='--preview ''bat --style=numbers --color=always {} | head -500''' - -export MANPAGER='nvim +Man!' -[ -x "$(command -v jj)" ] && source <(COMPLETE=zsh jj) - -################################################################################ -# SECRET ENV VARS!! -################################################################################ - -if [[ -s "${ZDOTDIR:-$HOME}/.secrets.zsh" ]]; then - source "${ZDOTDIR:-$HOME}/.secrets.zsh" -fi - -# Load a local config - -if [[ -s "${ZDOTDIR:-$HOME}/.zshrc.local" ]]; then - source "${ZDOTDIR:-$HOME}/.zshrc.local" -fi - -if [[ -s "/opt/homebrew/bin/brew" ]]; then - # Brew Setup - export PATH=/opt/homebrew/bin:/opt/homebrew/sbin:$PATH - export FZF_VIM_PATH=/opt/homebrew/opt/fzf - . /opt/homebrew/etc/profile.d/z.sh -else - # Z (Linux) - if [[ -s "/usr/libexec/z.sh" ]]; then - . /usr/libexec/z.sh - else - if [[ -s "/usr/share/z/z.sh" ]]; then - . /usr/share/z/z.sh - else - . /usr/local/etc/profile.d/z.sh - fi - fi -fi - -# ASDF -export PATH="${ASDF_DATA_DIR:-$HOME/.asdf}/shims:$PATH" - -if [[ -s "$HOME/.cargo/env" ]]; then -. "$HOME/.cargo/env" -fi - -if [[ -s "~/.asdf/plugins/java/set-java-home.zsh" ]]; then - . ~/.asdf/plugins/java/set-java-home.zsh -fi - -# Difftastic -export DFT_BACKGROUND=light - -# pnpm -export PNPM_HOME="/Users/rbdr/Library/pnpm" -case ":$PATH:" in - *":$PNPM_HOME:"*) ;; - *) export PATH="$PNPM_HOME:$PATH" ;; -esac -# pnpm end diff --git a/skhdrc b/skhdrc deleted file mode 100644 index d49ec4e..0000000 --- a/skhdrc +++ /dev/null @@ -1,225 +0,0 @@ -# NOTE(koekeishiya): A list of all built-in modifier and literal keywords can -# be found at https://github.com/koekeishiya/skhd/issues/1 -# -# A hotkey is written according to the following rules: -# -# hotkey = '<' | -# -# mode = 'name of mode' | ',' -# -# action = '[' ']' | '->' '[' ']' -# ':' | '->' ':' -# ';' | '->' ';' -# -# keysym = '-' | -# -# mod = 'modifier keyword' | '+' -# -# key = | -# -# literal = 'single letter or built-in keyword' -# -# keycode = 'apple keyboard kVK_ values (0x3C)' -# -# proc_map_lst = * -# -# proc_map = ':' | '~' | -# '*' ':' | '*' '~' -# -# string = '"' 'sequence of characters' '"' -# -# command = command is executed through '$SHELL -c' and -# follows valid shell syntax. if the $SHELL environment -# variable is not set, it will default to '/bin/bash'. -# when bash is used, the ';' delimeter can be specified -# to chain commands. -# -# to allow a command to extend into multiple lines, -# prepend '\' at the end of the previous line. -# -# an EOL character signifies the end of the bind. -# -# -> = keypress is not consumed by skhd -# -# * = matches every application not specified in -# -# ~ = application is unbound and keypress is forwarded per usual, when specified in a -# -# NOTE(koekeishiya): A mode is declared according to the following rules: -# -# mode_decl = '::' '@' ':' | '::' ':' | -# '::' '@' | '::' -# -# name = desired name for this mode, -# -# @ = capture keypresses regardless of being bound to an action -# -# command = command is executed through '$SHELL -c' and -# follows valid shell syntax. if the $SHELL environment -# variable is not set, it will default to '/bin/bash'. -# when bash is used, the ';' delimeter can be specified -# to chain commands. -# -# to allow a command to extend into multiple lines, -# prepend '\' at the end of the previous line. -# -# an EOL character signifies the end of the bind. - -# add an on_enter command to the default mode -# :: default : chunkc border::color 0xff775759 -# -# defines a new mode 'test' with an on_enter command, that captures keypresses -# :: test @ : chunkc border::color 0xff24ccaa -# -# from 'default' mode, activate mode 'test' -# cmd - x ; test -# -# from 'test' mode, activate mode 'default' -# test < cmd - x ; default -# -# launch a new terminal instance when in either 'default' or 'test' mode -# default, test < cmd - return : open -na /Applications/Terminal.app - -# application specific bindings -# -# cmd - n [ -# "kitty" : echo "hello kitty" -# * : echo "hello everyone" -# "qutebrowser" : echo "hello qutebrowser" -# "terminal" ~ -# "finder" : false -# ] - -# specify a file that should be included as an additional config-file. -# treated as an absolutepath if the filename begins with '/' otherwise -# the file is relative to the path of the config-file it was loaded from. -# -# .load "/Users/Koe/.config/partial_skhdrc" -# .load "partial_skhdrc" - -# prevent skhd from monitoring events for specific applications. -# -# .blacklist [ -# "kitty" -# "terminal" -# "qutebrowser" -# ] - -# open terminal, blazingly fast compared to iTerm/Hyper -shift + alt - return : /Applications/kitty.app/Contents/MacOS/kitty --single-instance -d ~ - -# open qutebrowser -# cmd + shift - return : ~/Scripts/qtb.sh - -# open mpv -# cmd - m : open -na /Applications/mpv.app $(pbpaste) - -# focus window -alt - h : yabai -m window --focus west -alt - j : yabai -m window --focus south -alt - k : yabai -m window --focus north -alt - l : yabai -m window --focus east - -# swap managed window -shift + alt - h : yabai -m window --swap west -shift + alt - j : yabai -m window --swap south -shift + alt - k : yabai -m window --swap north -shift + alt - l : yabai -m window --swap east - -# move managed window -shift + ctrl + alt - h : yabai -m window --warp west -shift + ctrl + alt - j : yabai -m window --warp south -shift + ctrl + alt - k : yabai -m window --warp north -shift + ctrl + alt - l : yabai -m window --warp east - -# balance size of windows -shift + ctrl + alt - 0 : yabai -m space --balance - -# make floating window fill screen -shift + alt - up : yabai -m window --grid 1:1:0:0:1:1 - -# make floating window fill left-half of screen -shift + alt - left : yabai -m window --grid 1:2:0:0:1:1 -shift + alt - right : yabai -m window --grid 1:2:1:0:1:1 - -# create desktop, move window and follow focus - uses jq for parsing json (brew install jq) -# shift + cmd - n : yabai -m space --create && \ -# index="$(yabai -m query --spaces --display | jq 'map(select(."is-native-fullscreen" == false))[-1].index')" && \ -# yabai -m window --space "${index}" && \ -# yabai -m space --focus "${index}" - -# fast focus desktop -# cmd + alt - x : yabai -m space --focus recent -# cmd + alt - 1 : yabai -m space --focus 1 - -# send window to desktop and follow focus -# shift + cmd - z : yabai -m window --space next; yabai -m space --focus next -shift + alt - 1 : yabai -m window --space 1; yabai -m space --focus 1 -shift + alt - 2 : yabai -m window --space 2; yabai -m space --focus 2 -shift + alt - 3 : yabai -m window --space 3; yabai -m space --focus 3 -shift + alt - 4 : yabai -m window --space 4; yabai -m space --focus 4 -shift + alt - 5 : yabai -m window --space 5; yabai -m space --focus 5 -shift + alt - 6 : yabai -m window --space 6; yabai -m space --focus 6 -shift + alt - 7 : yabai -m window --space 7; yabai -m space --focus 7 -shift + alt - 8 : yabai -m window --space 8; yabai -m space --focus 8 -shift + alt - 9 : yabai -m window --space 9; yabai -m space --focus 9 -shift + alt - 0 : yabai -m window --space 10; yabai -m space --focus 10 - -# focus monitor -# ctrl + alt - z : yabai -m display --focus prev -shift + ctrl - 1 : yabai -m display --focus 1 -shift + ctrl - 2 : yabai -m display --focus 2 -shift + ctrl - 3 : yabai -m display --focus 3 - -# send window to monitor and follow focus -# ctrl + cmd - c : yabai -m window --display next; yabai -m display --focus next -# ctrl + cmd - 1 : yabai -m window --display 1; yabai -m display --focus 1 -shift + ctrl + alt - 1 : yabai -m window --display 1; yabai -m display --focus 1 -shift + ctrl + alt - 2 : yabai -m window --display 2; yabai -m display --focus 2 -shift + ctrl + alt - 3 : yabai -m window --display 3; yabai -m display --focus 3 - -# move floating window -# shift + ctrl - a : yabai -m window --move rel:-20:0 -# shift + ctrl - s : yabai -m window --move rel:0:20 - -# increase window size -shift + alt - a : yabai -m window --resize left:-20:0 -shift + alt - s : yabai -m window --resize bottom:0:20 -shift + alt - w : yabai -m window --resize top:0:-20 -shift + alt - d : yabai -m window --resize right:20:0 - -# decrease window size -# shift + cmd - s : yabai -m window --resize bottom:0:-20 -# shift + cmd - w : yabai -m window --resize top:0:20 -shift + ctrl+ alt - a : yabai -m window --resize right:-20:0 -shift + ctrl+ alt - s : yabai -m window --resize top:0:20 -shift + ctrl+ alt - w : yabai -m window --resize bottom:0:-20 -shift + ctrl+ alt - d : yabai -m window --resize left:20:0 - -# set insertion point in focused container -ctrl + alt - h : yabai -m window --insert west -ctrl + alt - j : yabai -m window --insert south -ctrl + alt - k : yabai -m window --insert north -ctrl + alt - l : yabai -m window --insert east - -# toggle window zoom -shift + alt - z : yabai -m window --toggle zoom-parent -shift + ctrl + alt - z : yabai -m window --toggle zoom-fullscreen - -# toggle window split type -shift + alt - e : yabai -m window --toggle split - -# float / unfloat window and center on screen -shift + alt - t : yabai -m window --toggle float --grid 4:4:1:1:2:2 - -# toggle sticky(+float), topmost, picture-in-picture -shift + alt - p : yabai -m window --toggle sticky --toggle topmost --toggle pip - -# rotate tree -shift + alt - r : yabai -m space --rotate 90 - -# mirror tree y-axis -shift + alt - y : yabai -m space --mirror y-axis - -# mirror tree x-axis -shift + alt - x : yabai -m space --mirror x-axis diff --git a/tmux.conf b/tmux.conf deleted file mode 100644 index c319f99..0000000 --- a/tmux.conf +++ /dev/null @@ -1,63 +0,0 @@ -# Increase the scrollback -set -g history-limit 5000 - -# Screen-like prefix. -set -g prefix C-a -bind-key C-a last-window -bind-key a send-prefix - -# Better bindings for window split -unbind % # Remove default binding since we’re replacing -bind | split-window -h -bind - split-window -v - -# Customize the status bars. -set-option -g status-style bg=default -set -g status-fg colour232 -set -g status-left-length 24 -set -g status-left '#[fg=green]#[fg=colour232, bg=green]#S#[fg=green, bg=default] #[default]' -setw -g window-status-current-format '#[fg=magenta]#[fg=white, bg=magenta]#{window_index}:#{window_name}#[fg=magenta, bg=default]#[default]' -setw -g window-status-format '#[fg=white]#[fg=colour232, bg=white]#{window_index}:#{window_name}#[fg=white, bg=default]#[default]' -set -g status-right '#[fg=green]#[fg=colour232, bg=green]#(bash ~/.dotfiles/tmux-segments/short-uptime)#[fg=green, bg=default] ' -set -g status-right-length 70 - -# Better powerline highlighting. -set-window-option -g window-status-activity-style bold,underscore - -# Set Activity monitoring. -setw -g monitor-activity on -set -g visual-activity on - -# Vi keys in copy mode. -setw -g mode-keys vi -bind -r k run-shell 'tmux select-pane -U' -bind -r j run-shell 'tmux select-pane -D' -bind -r h run-shell 'tmux select-pane -L' -bind -r l run-shell 'tmux select-pane -R' - -# Popup window -bind -r ` display-popup -b heavy -E -w 60% -h 60% -S fg=blue -T '#[bold]#[reverse]#{?window_zoomed_flag,Z:,}UTILITY#[default]' - -# Mouse Mode -set -g mouse on - -# Set color mode. -set -g default-terminal "xterm-256color" -set-option -ga terminal-overrides ",xterm-256color:Tc" - -# Pane Style -set -g pane-border-status top -set -g pane-active-border-style fg=green -set -g pane-border-format '#[bold]#[reverse]#{?window_zoomed_flag,Z:,}#{pane_current_command}#[default]' -set -g pane-border-lines double -set -g pane-scrollbars modal -set -g pane-scrollbars-style fg=blue,bg=lightgray - -set-hook -g after-resize-pane 'if -F "#{window_zoomed_flag}" "set pane-active-border-style fg=red" "set pane-active-border-style fg=green"' - -# Terminal Title -set -g set-titles on -set -g set-titles-string '󰝘 #{session_name}' - -# Clock -set -g clock-mode-style 24-with-seconds diff --git a/tmuxp/main.yml b/tmuxp/main.yml deleted file mode 100644 index a41de4d..0000000 --- a/tmuxp/main.yml +++ /dev/null @@ -1,23 +0,0 @@ -session_name: main - -windows: - - window_name: mail - start_directory: '~/projects' - panes: - - aerc - - window_name: notes - start_directory: '~/.local/share/nota' - panes: - - nvim - - window_name: util - start_directory: '~' - focus: true - layout: '9c05,158x41,0,0{79x41,0,0,21,78x41,80,0[78x20,80,0,22,78x20,80,21,23]}' - panes: - - figlet welcome - - figlet to - - figlet computer - - window_name: proj - start_directory: '~/Projects' - panes: - - figlet projects diff --git a/xterm-256color-italic.terminfo b/xterm-256color-italic.terminfo deleted file mode 100644 index 68407ae..0000000 --- a/xterm-256color-italic.terminfo +++ /dev/null @@ -1,4 +0,0 @@ -# A xterm-256color based TERMINFO that adds the escape sequences for italic. -xterm-256color-italic|xterm with 256 colors and italic, - sitm=\E[3m, ritm=\E[23m, - use=xterm-256color, diff --git a/yabairc b/yabairc deleted file mode 100755 index fc3774d..0000000 --- a/yabairc +++ /dev/null @@ -1,13 +0,0 @@ -# for this to work you must configure sudo such that -# it will be able to run the command without password - -yabai -m signal --add event=dock_did_restart action="sudo yabai --load-sa" -sudo yabai --load-sa - -yabai -m config layout bsp -yabai -m config window_shadow float -yabai -m config window_border on -yabai -m config window_border_width 2 -yabai -m config window_border_radius 0 -yabai -m config active_window_border_color 0xFF55FF55 -yabai -m config window_border_blur off -- cgit