Browse Source

Initial commit

user 1 year ago
commit
f661ea08d5
2 changed files with 42 additions and 0 deletions
  1. 10 0
      fix_Clipboard_Indicator-UTF8.desktop
  2. 32 0
      fix_Clipboard_Indicator-UTF8.sh

+ 10 - 0
fix_Clipboard_Indicator-UTF8.desktop

@@ -0,0 +1,10 @@
+[Desktop Entry]
+# For Gnome, copy this .desktip file to /usr/share/applications/, then add it to autostart using the Gnome Tweak tool.
+# HoneyBadger/MH  06-26-2024
+Name=Fix Clipboard Indicator-UTF8 problem
+Comment=Runs a Bash script to find & replace all instances of UTF8_STRING with text/plain;charset=utf-8, then disables & enables Clipboard Indicator
+GenericName=Fix Clipboard Inidactor's UTF8 issue
+Exec=/home/user/scripts/fix_Clipboard_Indicator-UTF8.sh
+#Icon=
+Type=Application
+#Path=/usr/bin

+ 32 - 0
fix_Clipboard_Indicator-UTF8.sh

@@ -0,0 +1,32 @@
+#!/bin/bash
+
+######################################################
+####                                              ####
+####  Fixes the issue making Clipboard Indicator  ####
+####    (by Tudmotu) show "Text will be here"     ####
+####           after restarting.                  ####
+####                   HoneyBadger/MH  06-26-2024 ####
+######################################################
+
+PURDYDATE=$(date +'%m-%d-%Y_%I-%M-%S%P')
+#Clipboard Inidcator's cache path:
+CACHEPATH=~/.cache/[email protected]
+#Clipboard Indicator's cache file:
+CACHEFILE=registry.txt
+
+function Disable {
+	gnome-extensions disable [email protected]
+	sleep 1
+}
+
+function Enable {
+	gnome-extensions enable [email protected]
+}
+
+function ReplaceUTF8 {
+	sed -i.backup_$PURDYDATE 's/UTF8_STRING/text\/plain\;charset\=utf-8/g' $CACHEPATH/$CACHEFILE
+}
+
+Disable
+ReplaceUTF8
+Enable