# CLI command to import shortcuts?

**URL:** <https://discuss.kde.org/t/cli-command-to-import-shortcuts/14486>\
**Category:** Help\
**Tags:** plasma\
**Created:** [April 23, 2024, 8:23am UTC](https://discuss.kde.org/t/cli-command-to-import-shortcuts/14486 "2024-04-23T08:23:28Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![matklad](https://discuss-cdn.kde.org/user_avatar/discuss.kde.org/matklad/32/11709_2.png) [@matklad](https://discuss.kde.org/u/matklad)\
**Post date:** [April 23, 2024, 8:23am UTC](https://discuss.kde.org/t/cli-command-to-import-shortcuts/14486/1 "2024-04-23T08:23:28Z")

</div>

I have a `shortcuts.kksrc` file with my exported keyboard shortcuts. I know how to import it through settings GUI. Is there some CLI tool to allow importing in automated fashion?

```auto
$ plasma-import-shortcuts ./shorctucs.kksrc

```

In case this is an XY: I one to synchronize important shortcuts between two computers. My plan is to put `.kksrc` file into a git repo, which is checked out on both computers, and add the importing script to my autostart sequence. I don’t want to copy the entire `kglobalshorctucssrc` because it includes unknowable mess with UIDS like

```auto
[ActivityManager]
_k_friendly_name=Activity Manager
switch-to-activity-6059eb93-0f51-41e7-8311-7f247d38511e=none,none,Switch to activity "Default"

```

and because, seemingly, it includes all global shorcuts rather than the small subset I’ve actually bothered to change.

---

<div class="post-metadata">

**Author:** ![gcb](https://discuss-cdn.kde.org/user_avatar/discuss.kde.org/gcb/32/12205_2.png) [@gcb](https://discuss.kde.org/u/gcb)\
**Post date:** [May 12, 2024, 11:11pm UTC](https://discuss.kde.org/t/cli-command-to-import-shortcuts/14486/2 "2024-05-12T23:11:30Z")

</div>

knowing any arcane dbus command would also be good to write custom hacks around this, if anyone can share their knowledge.

My workflow is to keep the shortcuts in sync among computers and plasma updates.

it’s very manual for now.

1. open settings
2. export to cur-file
3. check diff from-git cur-file
4. update from-git file as needed
5. import from-git file
6. commit from-git file

thankfully i only need step 3 to 6 when i notice changes in plasma defaults. otherwise i mostly import blindly since i’m imaging other systems anyway.

---

<div class="post-metadata">

**Author:** ![matklad](https://discuss-cdn.kde.org/user_avatar/discuss.kde.org/matklad/32/11709_2.png) [@matklad](https://discuss.kde.org/u/matklad)\
**Post date:** [June 27, 2024, 10:15am UTC](https://discuss.kde.org/t/cli-command-to-import-shortcuts/14486/3 "2024-06-27T10:15:31Z")

</div>

For posterity, I ended up not using the import export, and instead added direct calls to `kwriteconfig6` to my autostart script:

> <https://github.com/matklad/config/blob/4e8c417cd8ce17679d70639c5ae9c0fe637a3cf9/xtool/src/autostart.rs#L37-L101>
