Skip to content

Commit 188311f

Browse files
committed
feat: add arc and bitwarden shortcuts
1 parent 39b7036 commit 188311f

File tree

8 files changed

+189
-21
lines changed

8 files changed

+189
-21
lines changed

editors/intellij/Code Templates/internal/PHP Class.php

-12
This file was deleted.

git/.gitconfig

-5
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,6 @@
3838
[help]
3939
autocorrect = 1
4040

41-
[filter "hawser"]
42-
clean = git hawser clean %f
43-
smudge = git hawser smudge %f
44-
required = true
45-
4641
[diff]
4742
tool = vimdiff
4843
compactionHeuristic = true

os/mac/karabiner-elements/karabiner.json

+106
Original file line numberDiff line numberDiff line change
@@ -494,6 +494,79 @@
494494
} ],
495495
"type" : "basic"
496496
} ]
497+
}, {
498+
"description" : "[arc] Toggle sidebar",
499+
"manipulators" : [ {
500+
"from" : {
501+
"modifiers" : {
502+
"mandatory" : [ "left_command" ]
503+
},
504+
"key_code" : "1"
505+
},
506+
"to" : [ {
507+
"key_code" : "s",
508+
"modifiers" : [ "left_command" ]
509+
} ],
510+
"conditions" : [ {
511+
"type" : "frontmost_application_if",
512+
"bundle_identifiers" : [ "company.thebrowser.Browser" ]
513+
} ],
514+
"type" : "basic"
515+
} ]
516+
}, {
517+
"description" : "[arc] Switch profile",
518+
"manipulators" : [ {
519+
"from" : {
520+
"modifiers" : {
521+
"mandatory" : [ "left_command" ]
522+
},
523+
"key_code" : "caps_lock"
524+
},
525+
"to" : [ {
526+
"key_code" : "right_arrow",
527+
"modifiers" : [ "left_command", "left_option" ]
528+
} ],
529+
"conditions" : [ {
530+
"type" : "frontmost_application_if",
531+
"bundle_identifiers" : [ "company.thebrowser.Browser" ]
532+
} ],
533+
"type" : "basic"
534+
}, {
535+
"from" : {
536+
"modifiers" : {
537+
"mandatory" : [ "left_command" ]
538+
},
539+
"key_code" : "escape"
540+
},
541+
"to" : [ {
542+
"key_code" : "right_arrow",
543+
"modifiers" : [ "left_command", "left_option" ]
544+
} ],
545+
"conditions" : [ {
546+
"type" : "frontmost_application_if",
547+
"bundle_identifiers" : [ "company.thebrowser.Browser" ]
548+
} ],
549+
"type" : "basic"
550+
} ]
551+
}, {
552+
"description" : "[arc] CMD P also to show url menu",
553+
"manipulators" : [ {
554+
"from" : {
555+
"key_code" : "p",
556+
"modifiers" : {
557+
"mandatory" : [ "left_command" ]
558+
}
559+
},
560+
"to" : [ {
561+
"key_code" : "l",
562+
"modifiers" : [ "left_command" ]
563+
} ],
564+
"conditions" : [ {
565+
"type" : "frontmost_application_if",
566+
"bundle_identifiers" : [ "company.thebrowser.Browser" ]
567+
} ],
568+
"type" : "basic"
569+
} ]
497570
}, {
498571
"description" : "[chatgpt] Toggle sidebar",
499572
"manipulators" : [ {
@@ -683,6 +756,39 @@
683756
} ],
684757
"type" : "basic"
685758
} ]
759+
}, {
760+
"description" : "[bitwarden] Switch account",
761+
"manipulators" : [ {
762+
"from" : {
763+
"modifiers" : {
764+
"mandatory" : [ "left_command" ]
765+
},
766+
"key_code" : "caps_lock"
767+
},
768+
"to" : [ {
769+
"shell_command" : "$HOME/.dotfiles/bin/sdot bitwarden switch_account"
770+
} ],
771+
"conditions" : [ {
772+
"type" : "frontmost_application_if",
773+
"bundle_identifiers" : [ "com.bitwarden.desktop" ]
774+
} ],
775+
"type" : "basic"
776+
}, {
777+
"from" : {
778+
"modifiers" : {
779+
"mandatory" : [ "left_command" ]
780+
},
781+
"key_code" : "escape"
782+
},
783+
"to" : [ {
784+
"shell_command" : "$HOME/.dotfiles/bin/sdot bitwarden switch_account"
785+
} ],
786+
"conditions" : [ {
787+
"type" : "frontmost_application_if",
788+
"bundle_identifiers" : [ "com.bitwarden.desktop" ]
789+
} ],
790+
"type" : "basic"
791+
} ]
686792
}, {
687793
"description" : "[finder] Create folder",
688794
"manipulators" : [ {

os/mac/karabiner-goku/karabiner.edn

+17-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@
66
:held 100
77
:sim 100}}
88
:applications
9-
{;; To obtain the app ID: `grep -A1 "CFBundleIdentifier" /Applications/The.app/Contents/Info.plist`
9+
{;; To obtain the app ID: `TThe.app/Contents/Info.plist`
10+
:Arc ["company.thebrowser.Browser"]
11+
:Bitwarden ["com.bitwarden.desktop"]
1012
:ChatGPT ["com.google.Chrome.app.jckaldkomadaenmmgladeopgmfbahfjm"]
1113
:Chrome ["com.google.Chrome", "com.google.Chrome.beta"]
1214
:Contexts ["com.contextsformac.Contexts"]
@@ -41,7 +43,6 @@
4143
:type "/opt/homebrew/bin/skhd -t \"%s\""
4244
:paste "$HOME/.dotfiles/bin/sdot mac paste_text \"%s\""
4345
:paste-and-return "$HOME/.dotfiles/bin/sdot mac paste_text \"%s\" --returning"
44-
:open-in-chrome "$HOME/.dotfiles/bin/sdot mac open_chrome_url \"%s\""
4546
:wait_seconds "osascript -e 'delay %s'"}
4647
:main
4748
[;; ------------ Windows management
@@ -121,6 +122,15 @@
121122
[:!TOC7 "$HOME/.dotfiles/bin/sdot apple music toggle-play"]]}
122123

123124
;; ------------ Application specific ------------
125+
{:des "[arc] Toggle sidebar"
126+
:rules [:Arc [:sidebar-primary-toggle :!Cs]]}
127+
{:des "[arc] Switch profile"
128+
:rules [:Arc [:switch-account :!COright_arrow]]}
129+
{:des "[arc] Switch profile"
130+
:rules [:Arc [:switch-account-esc :!COright_arrow]]}
131+
{:des "[arc] CMD P also to show url menu"
132+
:rules [:Arc [:!Cp :!Cl]]}
133+
124134
{:des "[chatgpt] Toggle sidebar"
125135
:rules [:ChatGPT [:sidebar-primary-toggle :!CSs]]}
126136
{:des "[chatgpt] New chat"
@@ -142,6 +152,11 @@
142152
{:des "[safari] Switch profile"
143153
:rules [:Safari [:switch-account-esc "$HOME/.dotfiles/bin/sdot safari switch_profile"]]}
144154

155+
{:des "[bitwarden] Switch account"
156+
:rules [:Bitwarden [:switch-account "$HOME/.dotfiles/bin/sdot bitwarden switch_account"]]}
157+
{:des "[bitwarden] Switch account"
158+
:rules [:Bitwarden [:switch-account-esc "$HOME/.dotfiles/bin/sdot bitwarden switch_account"]]}
159+
145160
{:des "[finder] Create folder"
146161
:rules [:Finder [:create-folder :!CSn]]}
147162
{:des "[finder] Toggle sidebar"

os/mac/kitty/kitty.conf

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# https://sw.kovidgoyal.net/kitty/conf/
2+
3+
# Font
4+
font_family DankMono Nerd Font Mono
5+
font_size 20
6+
font_features none
7+
8+
# Cursor
9+
10+
# Color scheme
11+
foreground #e8dbb6
12+
background #1d1d1d
13+
background_opacity 0.8
14+
background_blur 20
15+
16+
# Windows layout
17+
hide_window_decorations titlebar-only
18+
window_padding_width 5 10
19+
window_border_width 3.5pt
20+
remember_window_size yes
21+
initial_window_width 640
22+
initial_window_height 400
23+
24+
25+
map cmd+f launch --type=overlay --stdin-source=@screen_scrollback /bin/sh -c "/opt/homebrew/bin/fzf --no-sort --no-mouse --exact -i --tac | kitty +kitten clipboard"

scripts/bitwarden/switch_account

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
#!/usr/bin/env bash
2+
3+
set -euo pipefail
4+
5+
source "$DOTLY_PATH/scripts/core/_main.sh"
6+
source "$DOTFILES_PATH/scripts/core/selector.sh"
7+
8+
##? Switch Bitwarden account
9+
#?? 1.0.0
10+
##?
11+
##? Usage:
12+
##? switch_account
13+
docs::parse "$@"
14+
15+
function main() {
16+
osascript <<EOF
17+
tell application "System Events"
18+
set frontApp to name of first application process whose frontmost is true
19+
set frontWindow to first window of application process frontApp
20+
set windowPosition to position of frontWindow
21+
set windowSize to size of frontWindow
22+
-- Calcula la posición de la parte superior derecha
23+
set x to (item 1 of windowPosition) + (item 1 of windowSize) - 30 -- 30 píxeles hacia adentro
24+
set y to (item 2 of windowPosition) + 30 -- 30 píxeles hacia abajo
25+
set yOtherAccount to (item 2 of windowPosition) + 80 -- 80 píxeles hacia abajo
26+
27+
set coordinates to (x as string) & "," & (y as string)
28+
set otherAccountCoordinates to (x as string) & "," & (yOtherAccount as string)
29+
30+
do shell script "/opt/homebrew/bin/cliclick c:" & coordinates
31+
32+
do shell script "/opt/homebrew/bin/cliclick c:" & otherAccountCoordinates
33+
end tell
34+
EOF
35+
36+
}
37+
38+
main

shell/exports.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
# ------------------------------------------------------------------------------
44
export CODELY_THEME_MODE="dark"
55
export CODELY_THEME_PWD_MODE="short" # full, short, home_relative
6-
export CODELY_THEME_STATUS_ICON_OK="" #  ﭧ ﯓ
7-
export CODELY_THEME_STATUS_ICON_KO=""
6+
export CODELY_THEME_STATUS_ICON_OK="" #  ﭧ ﯓ ﬦ          
7+
export CODELY_THEME_STATUS_ICON_KO="" #
88
export CODELY_THEME_PROMPT_IN_NEW_LINE=false
99

1010
if [[ $__CFBundleIdentifier == "com.jetbrains."* ]]; then

symlinks/conf.macos.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
scripts/codely: modules/private/scripts/codely
1313
~/.config/alacritty/alacritty.toml: os/mac/alacritty/alacritty.toml
1414
~/.config/karabiner.edn: os/mac/karabiner-goku/karabiner.edn
15+
~/.config/kitty: os/mac/kitty
1516
~/.config/karabiner: os/mac/karabiner-elements
1617
~/.config/linearmouse: os/mac/linearmouse
1718
~/.config/sketchybar: os/mac/sketchybar

0 commit comments

Comments
 (0)