diff --git a/config/ghostty/config b/config/ghostty/config index e91590a..f2505c4 100644 --- a/config/ghostty/config +++ b/config/ghostty/config @@ -47,3 +47,4 @@ theme = nightfox # palette = 15=#b5bfe2 keybind = all:ctrl+shift+period=text:\x1b\x1f\x4c\x23\x1f +keybind = shift+enter=text:\n diff --git a/config/home/.hammerspoon/keyboard/yabai.lua b/config/home/.hammerspoon/keyboard/yabai.lua index 1e6f628..f38ed4e 100644 --- a/config/home/.hammerspoon/keyboard/yabai.lua +++ b/config/home/.hammerspoon/keyboard/yabai.lua @@ -133,5 +133,61 @@ keymap.super { } -- split type - use insert direction to control next window placement -yabai_key { key = 'v', commands = { 'window --insert east' } } -yabai_key { key = 'v', mods = { 'shift' }, commands = { 'window --insert south' } } +-- yabai_key { key = 'v', commands = { 'window --insert east' } } +-- yabai_key { mods = { 'shift' }, key = 'v', commands = { 'window --insert south' } } + +yabai_key { key = 'v', commands = { 'config split_type vertical' } } +yabai_key { mods = { 'shift' }, key = 'v', commands = { 'config split_type horizontal' } } + +-- Resize mode +local resize_mode = hs.hotkey.modal.new() + +-- Function to show resize mode indicator +function resize_mode:entered() hs.alert.show('Resize Mode', { textSize = 20, radius = 10 }, 999999) end + +function resize_mode:exited() hs.alert.closeAll() end + +-- Enter resize mode + +keymap.super { + key = 'r', + message = 'Enter resize mode', + fn = function() resize_mode:enter() end, +} + +-- Exit resize mode (escape or return) +resize_mode:bind({}, 'escape', function() resize_mode:exit() end) + +resize_mode:bind({}, 'return', function() resize_mode:exit() end) + +-- Resize bindings (no modifiers needed in resize mode) +resize_mode:bind({}, 'h', function() os.execute(yabai_cmd .. ' -m window --resize left:-20:0 || ' .. yabai_cmd .. ' -m window --resize right:-20:0') end) + +resize_mode:bind({}, 'j', function() os.execute(yabai_cmd .. ' -m window --resize bottom:0:20 || ' .. yabai_cmd .. ' -m window --resize top:0:20') end) + +resize_mode:bind({}, 'k', function() os.execute(yabai_cmd .. ' -m window --resize top:0:-20 || ' .. yabai_cmd .. ' -m window --resize bottom:0:-20') end) + +resize_mode:bind({}, 'l', function() os.execute(yabai_cmd .. ' -m window --resize right:20:0 || ' .. yabai_cmd .. ' -m window --resize left:20:0') end) + +-- Shift variants for larger increments +resize_mode:bind( + { 'shift' }, + 'h', + function() os.execute(yabai_cmd .. ' -m window --resize left:-50:0 || ' .. yabai_cmd .. ' -m window --resize right:-50:0') end +) + +resize_mode:bind({ 'shift' }, 'j', function() os.execute(yabai_cmd .. ' -m window --resize bottom:0:50 || ' .. yabai_cmd .. ' -m window --resize top:0:50') end) + +resize_mode:bind( + { 'shift' }, + 'k', + function() os.execute(yabai_cmd .. ' -m window --resize top:0:-50 || ' .. yabai_cmd .. ' -m window --resize bottom:0:-50') end +) + +resize_mode:bind({ 'shift' }, 'l', function() os.execute(yabai_cmd .. ' -m window --resize right:50:0 || ' .. yabai_cmd .. ' -m window --resize left:50:0') end) + +-- Equalize windows +resize_mode:bind({}, 'e', function() + os.execute(yabai_cmd .. ' -m space --balance') + resize_mode:exit() +end) diff --git a/config/nvim/init.lua b/config/nvim/init.lua index e8137ff..d455c19 100644 --- a/config/nvim/init.lua +++ b/config/nvim/init.lua @@ -574,8 +574,20 @@ map('n', 'ws', 'split', 'Split window horizontally') map('n', 'wv', 'vsplit', 'Split window vertically') map('n', 'wq', 'q', 'Close window') --- Terminal mode keymap to unfocus and return to previous window -vim.keymap.set('t', '', 'p', { desc = 'Unfocus terminal and return to editor' }) +-- Visual mode +map('v', '', function() require('tmux').move_left() end, 'Move to left tmux pane') +map('v', '', function() require('tmux').move_right() end, 'Move to right tmux pane') +map('v', '', function() require('tmux').move_bottom() end, 'Move to bottom tmux pane') +map('v', '', function() require('tmux').move_top() end, 'Move to top tmux pane') + +-- Terminal mode +map('t', '', function() require('tmux').move_left() end, 'Move to left tmux pane') +map('t', '', function() require('tmux').move_right() end, 'Move to right tmux pane') +map('t', '', function() require('tmux').move_bottom() end, 'Move to bottom tmux pane') +map('t', '', function() require('tmux').move_top() end, 'Move to top tmux pane') +map('t', '', '', 'Unfocus terminal and return to editor') + +-- Auto commands vim.api.nvim_create_autocmd('QuickFixCmdPost', { callback = function() diff --git a/config/sketchybar/items/yabai.lua b/config/sketchybar/items/yabai.lua index cccafdb..33de20a 100644 --- a/config/sketchybar/items/yabai.lua +++ b/config/sketchybar/items/yabai.lua @@ -30,9 +30,9 @@ for i = 1, 10, 1 do padding_left = 1, background = { color = colors.bg1, - border_width = 1, + -- border_width = 1, height = 26, - border_color = colors.black, + -- border_color = colors.black, }, popup = { background = { border_width = 5, border_color = colors.black } }, }) @@ -43,7 +43,7 @@ for i = 1, 10, 1 do local space_bracket = sbar.add('bracket', { space.name }, { background = { color = colors.transparent, - border_color = colors.bg2, + -- border_color = colors.bg2, height = 28, border_width = 2, }, @@ -77,11 +77,11 @@ for i = 1, 10, 1 do space:set { icon = { highlight = selected }, label = { highlight = selected }, - background = { border_color = selected and colors.black or colors.bg2 }, + background = { border_color = selected and colors.black }, drawing = selected or has_windows, } space_bracket:set { - background = { border_color = selected and colors.grey or colors.bg2 }, + background = { border_color = selected and colors.grey }, } end) diff --git a/config/tmux/tmux.conf b/config/tmux/tmux.conf index c87e19a..8e9d40b 100644 --- a/config/tmux/tmux.conf +++ b/config/tmux/tmux.conf @@ -20,8 +20,8 @@ set -g history-limit 2000 set-option -g detach-on-destroy off set-option -g status-position bottom # top -set-option -g default-terminal 'tmux-256color' -set-option -sa terminal-features ',xterm-kitty:RGB' +set-option -g default-terminal 'xterm-256color' +set-option -sa terminal-features ',xterm-kitty:RGB:extkeys' # set -g default-terminal "screen-256color" # set -ga terminal-overrides ",xterm-256color*:Tc" diff --git a/config/yabai/yabairc b/config/yabai/yabairc index 7d24de8..fd24f27 100644 --- a/config/yabai/yabairc +++ b/config/yabai/yabairc @@ -11,7 +11,7 @@ yabai -m config window_gap 15 yabai -m config auto_balance off yabai -m config mouse_follows_focus off -yabai -m config focus_follows_mouse autofocus +yabai -m config focus_follows_mouse off yabai -m config mouse_modifier fn yabai -m config mouse_action1 move yabai -m config mouse_action2 resize diff --git a/home/default.nix b/home/default.nix index 5391d75..cd7e4c4 100644 --- a/home/default.nix +++ b/home/default.nix @@ -30,7 +30,6 @@ programs = { nh = { enable = true; - # package = pkgs.custom.nh; clean.enable = true; clean.extraArgs = "--keep-since 4d --keep 3"; flake = dots; diff --git a/hosts/dango/default.nix b/hosts/dango/default.nix index f214129..59d1f6d 100644 --- a/hosts/dango/default.nix +++ b/hosts/dango/default.nix @@ -7,7 +7,7 @@ gui = { aerospace.enable = false; sketchybar.enable = true; - jankyborders.enable = false; + jankyborders.enable = true; yabai.enable = true; }; brew = { diff --git a/packages/default.nix b/packages/default.nix index 1711cad..61fb0af 100644 --- a/packages/default.nix +++ b/packages/default.nix @@ -1,15 +1,13 @@ { - inputs, pkgs, ... }: let - inherit (pkgs) lib callPackage; + inherit (pkgs) callPackage; in -rec { +{ minimal-emacs-d = callPackage ./minimal-emacs-d { }; boomer = callPackage ./boomer { }; - # nh = callPackage ./nh { }; whatsapp-for-mac = callPackage ./whatsapp-for-mac { }; sf-symbols = callPackage ./sf-symbols { full = true; }; sf-mono = callPackage ./sf-mono { }; diff --git a/packages/sbarlua/default.nix b/packages/sbarlua/default.nix index bcf7717..5526b4a 100644 --- a/packages/sbarlua/default.nix +++ b/packages/sbarlua/default.nix @@ -8,7 +8,7 @@ lua54Packages, stdenv, lib, - apple-sdk_12, + apple-sdk_14, }: lua54Packages.buildLuaPackage rec { pname = "sbar"; @@ -30,5 +30,5 @@ lua54Packages.buildLuaPackage rec { clang stdenv ] - ++ lib.optionals stdenv.isDarwin [ apple-sdk_12 ]; + ++ lib.optionals stdenv.isDarwin [ apple-sdk_14 ]; } diff --git a/packages/sf-mono/default.nix b/packages/sf-mono/default.nix index 87945a5..65da1b0 100644 --- a/packages/sf-mono/default.nix +++ b/packages/sf-mono/default.nix @@ -6,7 +6,7 @@ xar, cpio, }: -stdenvNoCC.mkDerivation rec { +stdenvNoCC.mkDerivation { pname = "sf-mono"; version = "2025-04-05";