-
create servermeu folder in local path.
~/.local/share/kservices5/ServiceMenus/
-
put desktop to folder created above.
-
put bash file into local bin dir.
Last active
August 15, 2016 03:41
-
-
Save holmeszyx/e6fb22f6a34f193fee3585c73476f351 to your computer and use it in GitHub Desktop.
create a menu to extract zip which compress with gbk charset
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Desktop Entry] | |
Type=Service | |
ServiceTypes=KonqPopupMenu/Plugin | |
MimeType=application/zip; | |
X-KDE-Priority=TopLevel | |
X-KDE-Submenu=Extract | |
Icon=ark | |
Actions=extract-bgk-zip | |
[Desktop Action extract-bgk-zip] | |
Name=Extract GBK zip | |
Icon=ark | |
Exec=~/bin/unzip_gbk.sh %F |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
filename=$1 | |
if [[ $filename == "" ]]; then | |
exit 1 | |
fi | |
pure_name=$(echo ${filename} | cut -d "." -f1) | |
unzip -O GBK ${filename} -d ${pure_name} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment