Skip to content

Instantly share code, notes, and snippets.

View adjust brightness with keyboard - ubuntu - code.txt
brightness-up
one key:
gsettings set org.gnome.settings-daemon.plugins.media-keys screen-brightness-up "['F4']"
key combination:
gsettings set org.gnome.settings-daemon.plugins.media-keys screen-brightness-up "['<Ctrl><Shift>B']"
clear key:
gsettings set org.gnome.settings-daemon.plugins.media-keys screen-brightness-up "['']"
View Script 6.4 for AutoKey.py
# apps: xclip,xdotool,zenity
import time
def new_item_categ_other():
keyboard.send_keys("other")
time.sleep(1.00)
keyboard.send_keys("<tab>")
time.sleep(0.1)
keyboard.send_keys("<tab>")
time.sleep(0.1)
View script 55.1
-- user input (name of magic keybord and magic mouse: system preferences > bluetooth)
set keyboard to "Magic Keyboard"
set mouse to "Magic Mouse 2"
set warn_if_lower_than_percent to 74
-- end of user input
set aa to do shell script "system_profiler SPBluetoothDataType | grep '" & keyboard & "\\|Connected'"
set apple_std to text item delimiters
set text item delimiters to {keyboard, ":"}
set aa_list to aa's text items
View script 55.txt
-- user input (name of magic keybord and magic mouse: system preferences > bluetooth)
set keyboard to "Magic Keyboard"
set mouse to "Magic Mouse 2"
set warn_if_lower_than_percent to 74
-- end of user input
set aa to do shell script "system_profiler SPBluetoothDataType | grep '" & keyboard & "\\|Connected'"
set apple_std to text item delimiters
set text item delimiters to {keyboard, ":"}
set aa_list to aa's text items
View script 23.9.txt
-- user options
set KillWindows_User to {"app1", "app2"}
set KillWindows_with_window to {"BCompare", "app2"}
set display_dialog_if_magic_mouse_or_magic_keyboard_connected to "on" -- "on" or "off"
set keyboard to "Magic Keyboard" -- name of magic keybord: system preferences > bluetooth
set mouse to "Magic Mouse 2" -- name of magic mouse: system preferences > bluetooth
-- end of user options
-----------------------------------------------
-- s23.6 - supported: TextMate
-- s23.5 - supported: FreeFileSync
View script 54.2.txt
-- user input (name of magic keybord and magic mouse: system preferences > bluetooth)
set keyboard to "Magic Keyboard"
set mouse to "Magic Mouse 2"
-- end of user input
set aa to do shell script "system_profiler SPBluetoothDataType | grep '" & keyboard & "\\|Connected'"
set apple_std to text item delimiters
set text item delimiters to {keyboard, ":"}
set aa_list to aa's text items
View script 54.1.txt
-- user input (name of magic keybord and magic mouse: system preferences > bluetooth)
set keyboard to "Magic Keyboard"
set mouse to "Magic Mouse 2"
-- end of user input
set aa to do shell script "system_profiler SPBluetoothDataType | grep '" & keyboard & "\\|Connected'"
set apple_std to text item delimiters
set text item delimiters to ":"
set aa_list to aa's text items
View script 54.txt
-- user input (name of magic keybord and magic mouse: system preferences > bluetooth)
set keyboard to "Magic Keyboard"
set mouse to "Magic Mouse 2"
-- end of user input
set aa to do shell script "system_profiler SPBluetoothDataType | grep '" & keyboard & "\\|Connected'"
set apple_std to text item delimiters
set text item delimiters to ":"
set aa_list to aa's text items
View script 23.8.txt
-- user options
set KillWindows_User to {"app1", "app2"}
set KillWindows_with_window to {"BCompare", "app2"}
set display_dialog_if_magic_mouse_or_magic_keyboard_connected to "on" -- "on" or "off"
set keyboard to "Magic Keyboard" -- name of magic keybord: system preferences > bluetooth
set mouse to "Magic Mouse 2" -- name of magic mouse: system preferences > bluetooth
-- end of user options
-----------------------------------------------
-- s23.6 - supported: TextMate
-- s23.5 - supported: FreeFileSync
View script 23.7.txt
-- user options
set KillWindows_User to {"app1", "app2"}
set KillWindows_with_window to {"BCompare", "app2"}
-- end of user options
-----------------------------------------------
-- s23.6 - supported: TextMate
-- 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