Skip to content

Commit

Permalink
update contexts
Browse files Browse the repository at this point in the history
  • Loading branch information
rgomezcasas committed Oct 23, 2023
1 parent b1bf944 commit 9c51973
Show file tree
Hide file tree
Showing 6 changed files with 144 additions and 18 deletions.
Binary file modified os/mac/contexts/com.contextsformac.Contexts.plist
Binary file not shown.
84 changes: 82 additions & 2 deletions os/mac/karabiner-elements/karabiner.json
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@
"from" : {
"key_code" : "d",
"modifiers" : {
"mandatory" : [ "left_option" ]
"mandatory" : [ "left_option", "left_shift" ]
}
},
"to" : [ {
Expand Down Expand Up @@ -395,7 +395,7 @@
"from" : {
"key_code" : "i",
"modifiers" : {
"mandatory" : [ "left_control" ]
"mandatory" : [ "left_command", "left_control", "left_option" ]
}
},
"to" : [ {
Expand Down Expand Up @@ -445,6 +445,34 @@
} ],
"type" : "basic"
} ]
}, {
"description" : "[launch] Google Meet",
"manipulators" : [ {
"from" : {
"key_code" : "g",
"modifiers" : {
"mandatory" : [ "left_command", "left_control", "left_option" ]
}
},
"to" : [ {
"shell_command" : "open -a \"Google Meet\""
} ],
"type" : "basic"
} ]
}, {
"description" : "[launch] Notion",
"manipulators" : [ {
"from" : {
"key_code" : "n",
"modifiers" : {
"mandatory" : [ "left_command", "left_control", "left_option" ]
}
},
"to" : [ {
"shell_command" : "open -a \"Notion\""
} ],
"type" : "basic"
} ]
}, {
"description" : "[launch] dotly ui scripts",
"manipulators" : [ {
Expand Down Expand Up @@ -501,6 +529,58 @@
} ],
"type" : "basic"
} ]
}, {
"description" : "[script] Open CodelyTV Repo",
"manipulators" : [ {
"from" : {
"key_code" : "r",
"modifiers" : {
"mandatory" : [ "left_command", "left_control", "left_option" ]
}
},
"to" : [ {
"shell_command" : "$HOME/.dotfiles/bin/sdot github open_codely_repo"
} ],
"type" : "basic"
} ]
}, {
"description" : "[chatgpt] Toggle sidebar",
"manipulators" : [ {
"from" : {
"modifiers" : {
"mandatory" : [ "left_command" ]
},
"key_code" : "1"
},
"to" : [ {
"key_code" : "s",
"modifiers" : [ "left_command", "left_shift" ]
} ],
"conditions" : [ {
"type" : "frontmost_application_if",
"bundle_identifiers" : [ "com.apple.Safari.WebApp.82A772AA-B484-4B6A-958B-EFC0502C8EAD" ]
} ],
"type" : "basic"
} ]
}, {
"description" : "[chatgpt] New chat",
"manipulators" : [ {
"from" : {
"modifiers" : {
"mandatory" : [ "left_command" ]
},
"key_code" : "n"
},
"to" : [ {
"key_code" : "o",
"modifiers" : [ "left_command", "left_shift" ]
} ],
"conditions" : [ {
"type" : "frontmost_application_if",
"bundle_identifiers" : [ "com.apple.Safari.WebApp.82A772AA-B484-4B6A-958B-EFC0502C8EAD" ]
} ],
"type" : "basic"
} ]
}, {
"description" : "[chrome] Show recent tabs",
"manipulators" : [ {
Expand Down
48 changes: 32 additions & 16 deletions os/mac/karabiner-goku/karabiner.edn
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,22 @@
:sim 100}}
:applications
{;; To obtain the app ID: `grep -A1 "CFBundleIdentifier" /Applications/The.app/Contents/Info.plist`
:ChatGPT ["com.apple.Safari.WebApp.82A772AA-B484-4B6A-958B-EFC0502C8EAD"]
:Chrome ["com.google.Chrome", "com.google.Chrome.beta"]
:Contexts ["com.contextsformac.Contexts"]
:Finder ["com.apple.finder"]
:GuitarPro ["com.arobas-music.guitarpro7"]
:IntelliJ ["com.jetbrains.intellij"]
:Keynote ["com.apple.iWork.Keynote"]
:Notion ["notion.id"]
:Safari ["com.apple.Safari"]
:Slack ["com.tinyspeck.slackmacgap"]
:VSCode ["com.microsoft.VSCode"]}
:froms {:line-delete {:modi :left_command :key :delete_or_backspace}
:clipboard-history {:modi [:left_command :left_shift] :key :v}
:ChatGPT ["com.apple.Safari.WebApp.82A772AA-B484-4B6A-958B-EFC0502C8EAD"]
:Chrome ["com.google.Chrome", "com.google.Chrome.beta"]
:Contexts ["com.contextsformac.Contexts"]
:Finder ["com.apple.finder"]
:GoogleMeet ["com.google.Chrome.app.kjgfgldnnfoeklkmfkjfagphfepbbdan"]
:GuitarPro ["com.arobas-music.guitarpro7"]
:IntelliJ ["com.jetbrains.intellij"]
:Keynote ["com.apple.iWork.Keynote"]
:Notion ["notion.id"]
:Safari ["com.apple.Safari"]
:Slack ["com.tinyspeck.slackmacgap"]
:VSCode ["com.microsoft.VSCode"]}
:froms {:clipboard-history {:modi [:left_command :left_shift] :key :v}
:create-folder {:modi [:left_control :left_option :left_command] :key :p}
:create-new {:modi [:left_command] :key :n}
:line-delete {:modi :left_command :key :delete_or_backspace}
:line-duplicate {:modi :left_command :key :d}
:move-next-screen {:modi [:left_command :left_shift :left_option] :key :right_arrow}
:move-prev-screen {:modi [:left_command :left_shift :left_option] :key :left_arrow}
Expand All @@ -28,7 +31,6 @@
:show-recent {:modi :left_command :key :e}
:sidebar-primary-toggle {:modi :left_command :key :1}
:sidebar-secondary-toggle {:modi :left_command :key :2}
:create-folder {:modi [:left_control :left_option :left_command] :key :p}
:switch-account {:modi :left_command :key :caps_lock}
:switch-account-esc {:modi :left_command :key :escape}
:zoom-in {:modi :left_command :key :equal_sign}
Expand All @@ -46,6 +48,8 @@
:script-mode {:key :s}}
:main
[;; ------------ Remaps ------------

;; ------------ Windows management
{:des "[mouse] Up key -> Restore last hidden"
:rules [[{:pkey :button5} :!Ctab]]}
{:des "[mouse] Down key -> Hide"
Expand All @@ -60,7 +64,7 @@
{:des "[keyboard] supr ctrl+backspace"
:rules [[:!Tdelete_or_backspace :delete_forward]]}
{:des "[mouse] Show desktop"
:rules [[:!Od :!Cmission_control]]}
:rules [[:!SOd :!Cmission_control]]}

{:des "[keyboard] Symbols // @todo: move this to a keyboard layout using ukelele"
:rules [[:!On [:type "ñ"]]
Expand Down Expand Up @@ -100,13 +104,17 @@
{:des "[launch] iTerm"
:rules [[:!CTOspacebar [:open-app "iTerm"]]]}
{:des "[launch] IntelliJ"
:rules [[:!Ti [:open-app "IntelliJ IDEA Ultimate"]]]}
:rules [[:!CTOi [:open-app "IntelliJ IDEA Ultimate"]]]}
{:des "[launch] Chrome"
:rules [[:!CTOc [:open-app "Google Chrome"]]]}
{:des "[launch] Slack"
:rules [[:!CTOs [:open-app "Slack"]]]}
{:des "[launch] ChatGPT"
:rules [[:!CTOa [:open-app "ChatGPT"]]]}
{:des "[launch] Google Meet"
:rules [[:!CTOg [:open-app "Google Meet"]]]}
{:des "[launch] Notion"
:rules [[:!CTOn [:open-app "Notion"]]]}

{:des "[launch] dotly ui scripts"
:rules [[:!Tcaps_lock "$HOME/.dotfiles/bin/sdot ui show_scripts"]]}
Expand All @@ -120,7 +128,15 @@
{:des "[script] Open common folders"
:rules [[:!CTgrave_accent_and_tilde "$HOME/.dotfiles/bin/sdot utils open_common"]]}

{:des "[script] Open CodelyTV Repo"
:rules [[:!CTOr "$HOME/.dotfiles/bin/sdot github open_codely_repo"]]}

;; ------------ Application specific ------------
{:des "[chatgpt] Toggle sidebar"
:rules [:ChatGPT [:sidebar-primary-toggle :!CSs]]}
{:des "[chatgpt] New chat"
:rules [:ChatGPT [:create-new :!CSo]]}

{:des "[chrome] Show recent tabs"
:rules [:Chrome [:show-recent :!CSa]]}
{:des "[chrome] Inspect element" :rules [:Chrome [:!CSi :!CSc]]}
Expand Down
16 changes: 16 additions & 0 deletions scripts/github/open_codely_repo
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/usr/bin/env bash

set -euo pipefail

source "$DOTLY_PATH/scripts/core/_main.sh"

##? Open a CodelyTV repository
#?? 1.0.0
##?
##? Usage:
##? open_codely_repo
docs::parse "$@"

repo_to_open=$(gh repo list codelytv --no-archived --source --limit 200 | awk '{print $1}' | sed 's|CodelyTV/||g' | choose)

open "https://github.com/CodelyTV/$repo_to_open"
13 changes: 13 additions & 0 deletions scripts/utils/record_mode
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/usr/bin/env bash

source "$DOTLY_PATH/scripts/core/_main.sh"

##? Setup all for recording or streaming
#?? 1.0.0
##?
##? Usage:
##? record_mode
##?
docs::parse "$@"

mv "$HOME/.zsh_history" "$HOME/.zsh_history.pre-record"
1 change: 1 addition & 0 deletions shell/aliases.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ alias ~="cd ~"
alias tmp="cd ~/Desktop/tmp"
alias cdc='cd ~/Code'
alias cly="cd ~/Code/codely"
alias ccc="cd ~/Code/codely/domain_events-course"

# Git
alias gaa="git add -A"
Expand Down

0 comments on commit 9c51973

Please sign in to comment.