Skip to content

Instantly share code, notes, and snippets.

@jms1989
Created March 11, 2023 22:24
Show Gist options
  • Save jms1989/4763d4d197d7493667956e6144bd8bcf to your computer and use it in GitHub Desktop.
Save jms1989/4763d4d197d7493667956e6144bd8bcf to your computer and use it in GitHub Desktop.
desktop files for compressing to 7zip and decompressing various filetypes.

These two files go in ~/.local/share/kservices5/ServiceMenus/.

Mark as executable.

Ensure unar is installed for the decompression to work.

[Desktop Entry]
Type=Service
Icon=ark
X-KDE-ServiceTypes=KonqPopupMenu/Plugin
MimeType=inode/directory;
Actions=compress;
Encoding=UTF-8
[Desktop Action compress]
Name=Compress Directory into 7zip
Icon=ark
Exec=7z a -mx0 %f.7z %f; rm -r %f
[Desktop Entry]
Type=Service
Icon=ark
X-KDE-ServiceTypes=KonqPopupMenu/Plugin
MimeType=application/zip;application/vnd.rar;application/x-7z-compressed;
Actions=decompress;
Encoding=UTF-8
[Desktop Action decompress]
Name=Decompress file into subdirectory
Icon=ark
Exec=unar %f; rm %f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment