Last active
January 9, 2025 14:48
-
-
Save garywill/a8e8c2ded02a742b1293794c53a9c1a6 to your computer and use it in GitHub Desktop.
Revisions
-
garywill revised this gist
Jan 9, 2025 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -9,6 +9,7 @@ fi kdialog --yesnocancel "$TEXT" #kdialog --yesnocancel "$TEXT" --cancel-label "假装成功打开" DIALOG_R=$? if [[ $DIALOG_R -eq 0 ]]; then -
garywill created this gist
Jan 9, 2025 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,20 @@ #!/bin/bash PARAS="$@" TEXT="是否复制以下内容?" if [[ "$PARAS" ]] ; then TEXT="$TEXT\n$PARAS" fi kdialog --yesnocancel "$TEXT" DIALOG_R=$? if [[ $DIALOG_R -eq 0 ]]; then echo "$PARAS" | xclip -i /dev/stdin -selection clipboard fi EXITCODE=$DIALOG_R [[ $DIALOG_R -eq 2 ]] && EXITCODE=0 exit $EXITCODE