From 0107052823e51c5229d7249b4ee46ab4f75798ce Mon Sep 17 00:00:00 2001 From: Alpha Chen Date: Fri, 24 May 2024 09:52:42 -0700 Subject: [PATCH] mu --- .config/aerospace/aerospace.toml | 10 +++++----- .config/wezterm/wezterm.fnl | 12 ++++++++++++ .config/wezterm/wezterm.lua | 24 ++++++++++++++++++++++++ .gitignore | 2 ++ .tmux.conf | 2 +- 5 files changed, 44 insertions(+), 6 deletions(-) create mode 100644 .config/wezterm/wezterm.fnl create mode 100644 .config/wezterm/wezterm.lua diff --git a/.config/aerospace/aerospace.toml b/.config/aerospace/aerospace.toml index b2b0c95..30f0363 100644 --- a/.config/aerospace/aerospace.toml +++ b/.config/aerospace/aerospace.toml @@ -15,7 +15,7 @@ after-login-command = [] after-startup-command = [] # Start AeroSpace at login -start-at-login = false +start-at-login = true # Normalizations. See: https://nikitabobko.github.io/AeroSpace/guide#normalization enable-normalization-flatten-containers = true @@ -146,7 +146,7 @@ esc = ['reload-config', 'mode main'] r = ['flatten-workspace-tree', 'mode main'] # reset layout #s = ['layout sticky tiling', 'mode main'] # sticky is not yet supported https://github.com/nikitabobko/AeroSpace/issues/2 # f = ['layout floating tiling', 'mode main'] # Toggle between floating and tiling layout -backspace = ['close-all-windows-but-current', 'mode main'] +# backspace = ['close-all-windows-but-current', 'mode main'] alt-shift-h = ['join-with left', 'mode main'] alt-shift-j = ['join-with down', 'mode main'] @@ -166,6 +166,6 @@ if.app-id = 'com.apple.MobileSMS' run = 'layout floating' [workspace-to-monitor-force-assignment] -1 = 'LG' -2 = 'HP' -3 = 'Retina' +1 = 'Retina' +2 = 'LG' +3 = 'HP' diff --git a/.config/wezterm/wezterm.fnl b/.config/wezterm/wezterm.fnl new file mode 100644 index 0000000..2e41bcc --- /dev/null +++ b/.config/wezterm/wezterm.fnl @@ -0,0 +1,12 @@ +(local wezterm (require "wezterm")) +(local config (wezterm.config_builder)) + +; (tset config :color_scheme "Apprentice (base16)") +(tset config :color_scheme "Ashes (base16)") + +(tset config :enable_tab_bar false) + +(tset config :font (wezterm.font "Source Code Pro")) +(tset config :font_size 13) + +config diff --git a/.config/wezterm/wezterm.lua b/.config/wezterm/wezterm.lua new file mode 100644 index 0000000..df013c0 --- /dev/null +++ b/.config/wezterm/wezterm.lua @@ -0,0 +1,24 @@ +-- Handle mismatch between homebrew's version of Lua and wezterm's version +local lVer = _VERSION:match("Lua (.+)$") +local luarocks = "/opt/homebrew/bin/luarocks" + +function execute(prog) + local fh = io.popen(prog) + return fh:read("*a") +end + +package.path = package.path .. ";" .. execute( + luarocks .. " --lua-version " .. lVer .. " path --lr-path" +):gsub("\n", "") +package.cpath = package.cpath .. ";" .. execute( + luarocks .. " --lua-version " .. lVer .. " path --lr-cpath" +):gsub("\n", "") + +fennel = require "fennel" +table.insert(package.loaders or package.searchers, fennel.searcher) + +-- local wezterm = require "wezterm" +-- wezterm.log_error(package.path) + +local home = os.getenv("HOME") +return fennel.dofile(home .. "/.config/wezterm/wezterm.fnl") diff --git a/.gitignore b/.gitignore index 9667add..f9c6cef 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,7 @@ private *.private .config/* +!.config/aerospace !.config/alacritty !.config/bat !.config/direnv @@ -16,6 +17,7 @@ private !.config/pip !.config/starship.toml !.config/tridactyl +!.config/wezterm !.config/yabai .local/* diff --git a/.tmux.conf b/.tmux.conf index cb2aa7d..feb91a3 100644 --- a/.tmux.conf +++ b/.tmux.conf @@ -36,7 +36,7 @@ set -g pane-border-format ' #{pane_current_command} ' # statusline (shamelessly stolen from powerline) BG_COLOR="#1c2023" set-option -g status-interval 2 -set-option -g status-left "#{?client_prefix,#[fg=colour254]#[bg=colour31]#[bold]#[noitalics]#[nounderscore],#[fg=colour16]#[bg=colour254]#[bold]#[noitalics]#[nounderscore]} #S #{?client_prefix,#[fg=colour31],#[fg=colour254]}#[bg=$BG_COLOR]#[nobold] " +set-option -g status-left "#{?client_prefix,#[fg=colour254]#[bg=colour31]#[bold]#[noitalics]#[nounderscore],#[fg=colour232]#[bg=colour254]#[bold]#[noitalics]#[nounderscore]} #S #{?client_prefix,#[fg=colour31],#[fg=colour254]}#[bg=$BG_COLOR]#[nobold] " set-option -g status-left-length 20 set-option -g status-right "" set-option -g status-style fg=colour231,bg=$BG_COLOR