Skip to content

Commit

Permalink
prevent rewriting of system shortcuts
Browse files Browse the repository at this point in the history
  • Loading branch information
alkazar committed May 6, 2024
1 parent 7abe7ac commit d81d9be
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions chimera_app/shortcuts.py
Original file line number Diff line number Diff line change
Expand Up @@ -425,6 +425,9 @@ def load_shortcut_entries(self) -> None:
def prune_deleted_shortcuts(self) -> None:
"""Drop shortcuts marked as deleted from all YAML files"""
for f in self.shortcut_files:
if context.SYSTEM_SHORTCUT_DIR in f.path and f.path.index(context.SYSTEM_SHORTCUT_DIR) == 0:
# system shortcuts are read-only
continue
f.load_data()
f.prune_deleted()
f.save()
Expand Down
4 changes: 2 additions & 2 deletions shortcuts/default.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
- cmd: chimera-cart-loader
- name: Cart Loader
cmd: chimera-cart-loader
condition: lsusb | grep 1d50:6018
hidden: false
name: Cart Loader
poster: /usr/share/chimera/images/cart-loader/poster.png
banner: /usr/share/chimera/images/cart-loader/banner.png
background: /usr/share/chimera/images/cart-loader/background.png
Expand Down

0 comments on commit d81d9be

Please sign in to comment.