dotfiles

My personal shell configs and stuff
git clone git://git.alex.balgavy.eu/dotfiles.git
Log | Files | Refs | Submodules | README | LICENSE

commit 464d40b442c7ad55081735788a7f4b0c2acf0fe5
parent 6b9cfb0ecf25cc0a7711870c5d643a1db5e6911c
Author: Alex Balgavy <alex@balgavy.eu>
Date:   Sun, 23 Nov 2025 12:25:46 +0100

hammerspoon: more bindings

Diffstat:
Mhammerspoon/init.lua | 3+++
Mhammerspoon/spoonconfig/paperwm.lua | 15++++++++++++++-
Mkarabiner/karabiner.json | 28++++++++--------------------
3 files changed, 25 insertions(+), 21 deletions(-)

diff --git a/hammerspoon/init.lua b/hammerspoon/init.lua @@ -40,6 +40,9 @@ bindkey(hyper, "r", function() hs.notify.show("Config reloaded", "New config applied", "") end) +bindkey({}, "f3", hs.spaces.toggleMissionControl) +bindkey({}, "f4", hs.spaces.toggleLaunchPad) + -- Copy current mouse position bindkey(hyper, "m", function() local pos = mouse.pos() diff --git a/hammerspoon/spoonconfig/paperwm.lua b/hammerspoon/spoonconfig/paperwm.lua @@ -4,6 +4,7 @@ return { local paperWmMod = mods.paperWmMod local paperWmMoveMod = mods.paperWmMoveMod + PaperWM.window_ratios = { 1 / 3, 1 / 2, 2 / 3 } PaperWM:bindHotkeys({ -- switch to a new focused window in tiled grid focus_left = { paperWmMod, "left" }, @@ -36,7 +37,7 @@ return { center_window = { paperWmMod, "c" }, full_width = { paperWmMod, "f" }, cycle_width = { paperWmMod, "r" }, - cycle_height = { paperWmMoveMod, "r" }, + reverse_cycle_width = { paperWmMoveMod, "r" }, -- increase/decrease width increase_width = { paperWmMod, "l" }, @@ -61,5 +62,17 @@ return { move_window_9 = { paperWmMoveMod, "9" }, }) PaperWM:start() + + local set_window_width = function(width) + local old_ratios = PaperWM.window_ratios + PaperWM.window_ratios = { width } + PaperWM.windows.cycleWindowSize(PaperWM.windows.Direction.WIDTH, PaperWM.windows.Direction.ASCENDING) + PaperWM.window_ratios = old_ratios + end + + -- set to equal size + hs.hotkey.bind(paperWmMod, "=", function() + set_window_width(1 / 2) + end) end, } diff --git a/karabiner/karabiner.json b/karabiner/karabiner.json @@ -481,26 +481,6 @@ }, "simple_modifications": [ { - "from": { "consumer_key_code": "eject" }, - "to": [{ "key_code": "f13" }] - }, - { - "from": { "key_code": "f1" }, - "to": [{ "key_code": "display_brightness_decrement" }] - }, - { - "from": { "key_code": "f2" }, - "to": [{ "key_code": "display_brightness_increment" }] - }, - { - "from": { "key_code": "f3" }, - "to": [{ "apple_vendor_keyboard_key_code": "mission_control" }] - }, - { - "from": { "key_code": "f4" }, - "to": [{ "apple_vendor_keyboard_key_code": "launchpad" }] - }, - { "from": { "key_code": "f10" }, "to": [{ "consumer_key_code": "mute" }] }, @@ -523,6 +503,14 @@ { "from": { "key_code": "right_option" }, "to": [{ "key_code": "left_control" }] + }, + { + "from": { "key_code": "f1" }, + "to": [{ "consumer_key_code": "display_brightness_decrement" }] + }, + { + "from": { "key_code": "f2" }, + "to": [{ "consumer_key_code": "display_brightness_increment" }] } ] },