chore: darwin improvements

This commit is contained in:
alina 🌸 2024-11-05 14:09:17 +03:00
parent e61984ca04
commit 600b52db5b
Signed by: teidesu
SSH key fingerprint: SHA256:uNeCpw6aTSU4aIObXLvHfLkDa82HWH9EiOj9AXOIRpI
4 changed files with 270 additions and 20 deletions

View file

@ -69,7 +69,7 @@
] ]
}, },
{ {
"description": "New Brave tab", "description": "New browser tab",
"manipulators": [ "manipulators": [
{ {
"from": { "from": {
@ -83,12 +83,121 @@
}, },
"to": [ "to": [
{ {
"shell_command": "osascript /Users/teidesu/.config/karabiner/new-ff-tab.scpt" "shell_command": "osascript ~/.config/karabiner/new-ff-tab.scpt"
} }
], ],
"type": "basic" "type": "basic"
} }
] ]
},
{
"description": "aerospace cmd-tab",
"manipulators": [
{
"from": {
"key_code": "tab",
"modifiers": {
"mandatory": [
"command"
]
}
},
"to": [
{
"shell_command": "~/.local/bin/aerospace focus --boundaries-action wrap-around-the-workspace right"
}
],
"type": "basic"
}
]
},
{
"description": "open terminal",
"manipulators": [
{
"from": {
"key_code": "return_or_enter",
"modifiers": {
"mandatory": [
"option",
"command"
]
}
},
"to": [
{
"shell_command": "/bin/bash ~/.config/karabiner/open-terminal.sh"
}
],
"type": "basic"
}
]
},
{
"description": "some fixes",
"manipulators": [
{
"type": "basic",
"from": {
"key_code": "3",
"modifiers": {
"mandatory": [
"shift",
"command"
]
}
},
"to": [
{
"shell_command": "/Applications/Snipaste.app/Contents/MacOS/Snipaste snip"
}
],
"conditions": [
{
"type": "device_if",
"identifiers": [
{
"product_id": 591,
"vendor_id": 1452
},
{
"product_id": 49284,
"vendor_id": 1133
}
]
}
]
},
{
"type": "basic",
"from": {
"key_code": "q",
"modifiers": {
"mandatory": [
"fn",
"command",
"option"
]
}
},
"to": [
{
"shell_command": "osascript -e 'tell application \"System Events\" to keystroke \"q\" using {control down, command down}'"
}
],
"conditions": [
{
"type": "device_if",
"identifiers": [
{
"product_id": 591,
"vendor_id": 1452
}
]
}
]
}
]
} }
] ]
}, },
@ -97,38 +206,127 @@
"delay_milliseconds_before_open_device": 1000 "delay_milliseconds_before_open_device": 1000
}, },
"selected": true, "selected": true,
"simple_modifications": [ "devices": [
{ {
"from": { "disable_built_in_keyboard_if_exists": false,
"apple_vendor_top_case_key_code": "keyboard_fn" "fn_function_keys": [],
"game_pad_swap_sticks": false,
"identifiers": {
"is_game_pad": false,
"is_keyboard": true,
"is_pointing_device": false,
"product_id": 0,
"vendor_id": 0
}, },
"to": [ "ignore": false,
"manipulate_caps_lock_led": true,
"mouse_flip_horizontal_wheel": false,
"mouse_flip_vertical_wheel": false,
"mouse_flip_x": false,
"mouse_flip_y": false,
"mouse_swap_wheels": false,
"mouse_swap_xy": false,
"simple_modifications": [
{ {
"key_code": "right_option" "from": {
"apple_vendor_top_case_key_code": "keyboard_fn"
},
"to": [
{
"key_code": "right_option"
}
]
},
{
"from": {
"key_code": "left_option"
},
"to": [
{
"apple_vendor_top_case_key_code": "keyboard_fn"
}
]
},
{
"from": {
"key_code": "right_option"
},
"to": [
{
"apple_vendor_top_case_key_code": "keyboard_fn"
}
]
} }
] ],
"treat_as_built_in_keyboard": false
}, },
{ {
"from": { "disable_built_in_keyboard_if_exists": false,
"key_code": "left_option" "fn_function_keys": [],
"game_pad_swap_sticks": false,
"identifiers": {
"is_game_pad": false,
"is_keyboard": true,
"is_pointing_device": false,
"product_id": 591,
"vendor_id": 1452
}, },
"to": [ "ignore": false,
"manipulate_caps_lock_led": true,
"mouse_flip_horizontal_wheel": false,
"mouse_flip_vertical_wheel": false,
"mouse_flip_x": false,
"mouse_flip_y": false,
"mouse_swap_wheels": false,
"mouse_swap_xy": false,
"simple_modifications": [
{ {
"apple_vendor_top_case_key_code": "keyboard_fn" "from": {
"key_code": "left_control"
},
"to": [
{
"key_code": "left_option"
}
]
},
{
"from": {
"key_code": "left_option"
},
"to": [
{
"key_code": "left_control"
}
]
} }
] ],
"treat_as_built_in_keyboard": false
}, },
{ {
"from": { "disable_built_in_keyboard_if_exists": false,
"key_code": "right_option" "fn_function_keys": [],
"game_pad_swap_sticks": false,
"identifiers": {
"is_game_pad": false,
"is_keyboard": true,
"is_pointing_device": true,
"product_id": 49284,
"vendor_id": 1133
}, },
"to": [ "ignore": false,
{ "manipulate_caps_lock_led": false,
"apple_vendor_top_case_key_code": "keyboard_fn" "mouse_flip_horizontal_wheel": false,
} "mouse_flip_vertical_wheel": false,
] "mouse_flip_x": false,
"mouse_flip_y": false,
"mouse_swap_wheels": false,
"mouse_swap_xy": false,
"simple_modifications": [],
"treat_as_built_in_keyboard": false
} }
], ],
"simple_modifications": [],
"virtual_hid_keyboard": { "virtual_hid_keyboard": {
"country_code": 0, "country_code": 0,
"indicate_sticky_modifier_keys_state": false, "indicate_sticky_modifier_keys_state": false,

View file

@ -0,0 +1,11 @@
set -eauo pipefail
export PATH="$PATH:$HOME/.local/bin"
list=$(aerospace list-windows --monitor all --app-bundle-id com.raphaelamorim.rio)
if ! [ -z "$list" ]; then
window_id=$(echo "$list" | awk '{print $1}')
aerospace move-node-to-workspace --window-id "$window_id" "$(aerospace list-workspaces --focused)"
aerospace focus --window-id "$window_id"
else
open -a /Applications/Rio.app
fi

View file

@ -0,0 +1,37 @@
{
"schemes" : [
{
"if" : {
"device" : {
"vendorID" : "0x46d",
"serialNumber" : "086738673038",
"category" : "mouse",
"productID" : "0xc084",
"productName" : "G102 Prodigy Gaming Mouse"
}
},
"buttons" : {
"switchPrimaryButtonAndSecondaryButtons" : false
},
"scrolling" : {
"distance" : {
"vertical" : "auto"
},
"reverse" : {
"vertical" : true
},
"acceleration" : {
"vertical" : 1.5
},
"speed" : {
"vertical" : 20
}
},
"pointer" : {
"acceleration" : 1,
"disableAcceleration" : true
}
}
],
"$schema" : "https:\/\/schema.linearmouse.app\/0.10.0"
}

View file

@ -60,5 +60,9 @@
source = ./assets/atuin; source = ./assets/atuin;
recursive = true; recursive = true;
}; };
home.file.".config/linearmouse" = {
source = ./assets/linearmouse;
recursive = true;
};
}; };
} }