Skip to content

Instantly share code, notes, and snippets.

View Hold a Key - Shortcut for Photoshop.json
{ "title": "Rules for Karabiner-Elements | Tested Version: 12.10.0",
"rules": [
{ "description": "Hold a Key - Shortcut for Photoshop",
"manipulators": [
{"from": { "key_code": "a" },
"parameters": {"basic.to_if_alone_timeout_milliseconds": 300,
"basic.to_if_held_down_threshold_milliseconds": 500},
"to_if_alone": [
{"key_code": "a"}],
"to_if_held_down":[
View script 51.txt
-- user input
set name_of_application to "Adobe Photoshop 2021"
set menu_1 to "Layer"
set menu_2 to "Layer Style"
set menu_3 to "Inner Shadow..."
-- end of user input--------------------------------
if menu_3 is "" then
if menu_1 is not "" and menu_2 is not "" then
View script 30.3.txt
-- Download cliclick > https://www.bluem.net/en/projects/cliclick/
-- Download MouseTools > http://www.hamsoftengineering.com/codeSharing/MouseTools/MouseTools.html
-- Put cliclick and MouseTools in Applications folder
-----------------------------------------------------------------
set theFile to (path to applications folder as text) & "MouseTools"
tell application "Finder"
if not (exists file theFile) then
set no_app to 1
else
set no_app to 0
View script 31.1.txt
-- user options
set bookmark to "off" -- "on" or "off", to run script set bookmark to "off"
set text_continue_reading to "off" -- "on" or "off"
set instruction to "on" -- "on" or "off"
-- end of user options
set theFile to (path to applications folder as text) & "MouseTools"
tell application "Finder"
if not (exists file theFile) then
View script 30.2.txt
set theFile to (path to applications folder as text) & "MouseTools"
tell application "Finder"
if not (exists file theFile) then
set no_app to 1
else
set no_app to 0
end if
end tell
if no_app is 1 then
tell application "System Events"
View Vimac - press right command.json
{ "title": "Vimac - press right command",
"rules": [
{ "description": "Vimac - press right command",
"manipulators": [
{"from": { "key_code": "right_command" },
"parameters": {"basic.to_if_alone_timeout_milliseconds": 300,
"basic.to_if_held_down_threshold_milliseconds": 500},
"to_if_alone": [
{
View script 23.5.txt
-- user options
set KillWindows_User to {"app1", "app2"}
-- end of user options
-----------------------------------------------
-- s23.5 - supported: FreeFileSync
-- s23.4 - fixed: closing windows of Finder on Mac Catalina, hang caused by some apps | improved: killing apps listed in KillWindows_User
-- s23.3 - supported: Audacity
-- s23.2 - supported: wine-preloader, wine
-----------------------------------------------
View Rule - Karabiner-Elements -Hold a Key to Execute Right Click Menu Item.json
{ "title": "Rules for Karabiner-Elements | Tested Version 12.10.0",
"rules": [
{ "description": "Rules for Karabiner-Elements - Hold a Key to Execute Right Click Menu Item",
"manipulators": [
{"from": { "key_code": "my_key" },
"parameters": {"basic.to_if_alone_timeout_milliseconds": 300,
"basic.to_if_held_down_threshold_milliseconds": 500},
"to_if_alone": [
{"key_code": "my_key"
}],
View script 45.1.txt
-- user options
set save_active_document to "off" -- "on" or "off"
set save_new_document_do_not_minimize to "off" -- "on" or "off"
-- end of user options
tell application "System Events"
set activeApp to (get name of first process where it is frontmost)
end tell
tell application "System Events"
set all_win_activeapp to name of window of process activeApp
end tell
View script 28.1 for AutoKey.py
# s28.1 - improved: getting current volume level
# This script is for volume level of sound output device >= 100%, but < 160%
# user options
notification = 'on' # 'on' or 'off'
# end of user options
#####################################################################################
info_sinks = system.exec_command("pacmd list-sinks | grep -Ei 'index:|active port:'")
all_lines = info_sinks.split("\n")
for line in all_lines:
You can’t perform that action at this time.