This forum has been archived. All content is frozen. Please use KDE Discuss instead.
The Discussions and Opinions forum is a place for open discussion regarding everything related to KDE, within the boundaries of KDE Code of Conduct. If you have a question or need a solution for a KDE problem, please post in the apppropriate forum instead.

how? CLI toggle specific shortcut

Tags: None
(comma "," separated)
betlog
Registered Member
Posts
13
Karma
0

how? CLI toggle specific shortcut

Sun Mar 12, 2023 1:02 am
I need to enable or disable specific shortcut from command line/script.

I'm sure i could flip the Enabled= variable by sed'ing the file directly, but then how would I force the OS to reload the file?
i imagine gsettings or maybe sytemsettings kcm_khotkeys or maybe qdbus would be the better method, but I havent been able to figure out how those can get and set the desired things.
Can anyone advise?

/home/user/.config/khotkeysrc

[Data_4_36]
Comment=Comment
Enabled=true
Name=timestamp-video start
Type=SIMPLE_ACTION_DATA

[Data_4_36Actions]
ActionsCount=1

[Data_4_36Actions0]
CommandURL=/home/user/documents/scripts/handler/handler-F1.sh start
Type=COMMAND_URL

[Data_4_36Conditions]
Comment=
ConditionsCount=0

[Data_4_36Triggers]
Comment=Simple_action
TriggersCount=1

[Data_4_36Triggers0]
Key=F1
Type=SHORTCUT
Uuid={82387b31-3eae-498d-bc64-2f7ed41f21e6}


Bookmarks



Who is online

Registered users: bartoloni, Bing [Bot], Google [Bot], Yahoo [Bot]