From bea3dad261a00ee978ef12be32ab61aa7ecb4bf5 Mon Sep 17 00:00:00 2001 From: pvincent Date: Sun, 10 Sep 2023 01:04:56 +0400 Subject: [PATCH] goldendict --- .gitignore | 1 + lib/goldendict/config | 195 ++++++++++++++++++++++++++++++++++++++++++ src/main | 28 ++++-- src/pvincent.pub | 1 - 4 files changed, 219 insertions(+), 6 deletions(-) create mode 100644 .gitignore create mode 100644 lib/goldendict/config delete mode 100644 src/pvincent.pub diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..8d4bfcf --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +nohup.out diff --git a/lib/goldendict/config b/lib/goldendict/config new file mode 100644 index 0000000..1251e13 --- /dev/null +++ b/lib/goldendict/config @@ -0,0 +1,195 @@ + + + /usr/share/goldendict/dicts + + + + a13e833e4c4f38948be65a543a89aa67 + 8fc82cb1aab41ff1acc846ab6c590f01 + ace10024c8482aca10393287525e55d2 + 775d4125911e8117987f677a55c6573d + affcf9678e7bfe701c9b071f97eccba3 + 0f9047d4839c0799d460cfd18a8e8573 + ae6f89aac7151829681b85f035d54e48 + 66cea76a43470e57300d4a4f5d6e8c4f + + + + + + + + + 0 + 0 + 0 + 0 + + 0 + 1 + 1 + 1 + + + 0 + 1 + 0 + 0 + 1 + 1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + lingvo + 0 + 1 + 1 + 0 + 0 + 1 + 1 + 1 + 0 + 1 + 0 + 1 + 1 + 1 + 0 + 0 + Ctrl+F11, Ctrl+F11 + 0 + Ctrl+C, Ctrl+C + 1 + 1 + 1 + 3 + 1 + 3 + 1 + 0 + 0 + 0 + 1 + 1 + 1 + 0 + 0 + 1 + 0 + 1 + Qt Multimedia + mplayer + 0 + 0 + 0 + 0 + 1 + + 0 + + 3128 + + + + + + 1 + 0 + 0 + 0 + 50 + 1 + 500 + 1 + 0 + + 1 + 1000 + 1 + 120 + 20 + 0 + 1 + + 0 + 0 + 100 + 2 + 0 + 1 + + + 1 + 0 + 0 + 0 + + + 0 + 0 + AAAA/wAAAAH9AAAAAAAAAi0AAAGTAAAABAAAAAQAAAAIAAAACPwAAAABAAAAAQAAAAEAAAAaAGQAaQBjAHQAaQBvAG4AYQByAHkAQgBhAHICAAAAAP////8AAAAAAAAAAA== + AdnQywADAAAAAAGkAAAAtgAAA9AAAAJIAAABpAAAALYAAAPQAAACSAAAAAAAAAAABVYAAAGkAAAAtgAAA9AAAAJI + 0 + 1 + AAAA/wAAAAH9AAAAAgAAAAAAAAAAAAAAAPwCAAAAAfsAAAAUAHMAZQBhAHIAYwBoAFAAYQBuAGUAAAAAAP////8AAACNAP///wAAAAEAAADMAAAB3vwCAAAAA/sAAAASAGQAaQBjAHQAcwBQAGEAbgBlAQAAADwAAACbAAAAZQD////7AAAAGgBmAGEAdgBvAHIAaQB0AGUAcwBQAGEAbgBlAQAAAN0AAACcAAAAZQD////7AAAAFgBoAGkAcwB0AG8AcgB5AFAAYQBuAGUBAAABfwAAAJsAAABlAP///wAAAbsAAAHeAAAABAAAAAQAAAAIAAAACPwAAAABAAAAAgAAAAIAAAAUAG4AYQB2AFQAbwBvAGwAYgBhAHIBAAAAAP////8AAAAAAAAAAAAAABoAZABpAGMAdABpAG8AbgBhAHIAeQBCAGEAcgEAAAHf/////wAAAAAAAAAA + AdnQywADAAAAAAAAAAAAIAAAAowAAAJeAAAAAAAAAEUAAAKMAAACXgAAAAAAAAAABVYAAAAAAAAARQAAAowAAAJe + + + + + AdnQywADAAAAAAAAAAAAIwAAA/sAAAJbAAAAAAAAAEgAAAP7AAACWwAAAAAAAAAABVYAAAAAAAAASAAAA/sAAAJb + AdnQywADAAAAAAAAAAAALQAAAssAAAJRAAAAAAAAAFIAAALLAAACUQAAAAAAAAAABVYAAAAAAAAAUgAAAssAAAJR + 2023-08-28T00:06:15 + + 0 + 1 + + 0 + 256 + 0 + + 0 + 0 + 0 + + + + diff --git a/src/main b/src/main index e5fb68a..3949126 100755 --- a/src/main +++ b/src/main @@ -43,7 +43,7 @@ function askConfirmation() { # Variables and constants ## --------- -BASEDIR=/opt/debian-gnome +BASEDIR=$(readlink -f "$(dirname "$0")/..") ALLOWED_USERS=$(id -un) #CUSTOMIZE if needed! REQUIRED_PACKAGES=( bash-completion @@ -183,6 +183,18 @@ if [[ "$favorite_apps" == "['firefox-esr.desktop', 'org.gnome.Evolution.desktop' gsettings set org.gnome.shell favorite-apps "['org.gnome.Nautilus.desktop','firefox-stable.desktop','org.gnome.Software.desktop']" fi +echo "## golden dict" +echo "================" +if [[ ! -d /usr/share/goldendict/dicts ]]; then + sudo git clone --depth 1 https://git.artcode.re/non-free/dicts.git /usr/share/goldendict/dicts +fi + +if [[ ! -f $HOME/.config/goldendict/config ]] || ! grep -q "path.*/usr/share/goldendict/dicts" $HOME/.config/goldendict/config; then + mkdir -p "$HOME/.config/goldendict/" + cp "$BASEDIR/lib/goldendict/config" "$HOME/.config/goldendict/" + nohup goldendict & +fi + echo "## gnome-extensions-cli" echo "=======================" if [[ ! -f ~/.local/bin/gext ]]; then @@ -203,8 +215,8 @@ EXTENSIONS=( for extension in "${EXTENSIONS[@]}"; do if [[ ! -d $HOME/.local/share/gnome-shell/extensions/$extension ]]; then - ~/.local/bin/gext install "$extension" - sudo cp $HOME/.local/share/gnome-shell/extensions/$extension/schemas/*.gschema.xml /usr/share/glib-2.0/schemas/ + "$HOME/.local/bin/gext" install "$extension" + sudo cp "$HOME/.local/share/gnome-shell/extensions/$extension/schemas/*.gschema.xml" /usr/share/glib-2.0/schemas/ else echo "extension <${extension}> already installed!" fi @@ -223,11 +235,17 @@ gsettings set org.gnome.shell.extensions.system-monitor net-graph-width 40 gsettings set org.gnome.shell.extensions.system-monitor disk-display false gsettings set org.gnome.shell.extensions.system-monitor icon-display false -#gsettings set org.gnome.shell.extensions.dash-to-dock dock-fixed true gsettings set org.gnome.shell.extensions.dash-to-dock apply-custom-theme true -#gsettings set org.gnome.shell.extensions.dash-to-dock extend-height true gsettings set org.gnome.shell.extensions.dash-to-dock multi-monitor true +gsettings set org.gnome.shell.extensions.network-stats display-bytes true + +if [[ $(gsettings get org.gnome.shell.extensions.network-stats show-icon) == "true" ]]; then + gsettings set org.gnome.shell.extensions.network-stats show-icon false + "$HOME/.local/bin/gext" disable network-stats@gnome.noroadsleft.xyz + "$HOME/.local/bin/gext" enable network-stats@gnome.noroadsleft.xyz +fi + echo "# firefox addons" echo "================" declare -A FIREFOX_ADDONS diff --git a/src/pvincent.pub b/src/pvincent.pub deleted file mode 100644 index 7f0a0cc..0000000 --- a/src/pvincent.pub +++ /dev/null @@ -1 +0,0 @@ -ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCw8Xjt2gh6iyoEuBCVdbLAkxA8vkXXaywDI6NJ5n6OvwIaUiU2OrmeKU6Wlpyv49dSv3+wcikyhn37H59R3X7DPJ5JX2YnvR6LDWEz6Ja1z44MzVfCUfeQYha4bofdTOdU2EZJvMc9h1M12d//YNViyXfHB8q7oOCp70XzurwvbmYeRn5xthFvMe+0BWBHyfK1yb6grOCuLtJs3vSeyFRz5WoZdDhZrkFi1NelewdNOxB60GyCyb6WRKJRvqvNiUCiEoS7IiNVbqRasdU1K8MRfoHuJYsfG87JjMdJihijQWd+TBq26aMspH8DYrxWaLMjQGRhH5YsunbHKILD8JwD pvincent \ No newline at end of file