Skip to content

Commit

Permalink
changed ~/.local/share path to /usr/local/share
Browse files Browse the repository at this point in the history
  • Loading branch information
Akash6222 committed Dec 7, 2023
1 parent 7a427a6 commit cd7f695
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 12 deletions.
7 changes: 3 additions & 4 deletions tcet-welcome/scripts/about.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,14 @@
import gi
gi.require_version("Gtk", "3.0")
from gi.repository import Gtk
from os import environ

# get install dir relative to $home
# we have to do this because when we start the program from terminal its executed in the ~/.local/share/tcet-welcome
# we have to do this because when we start the program from terminal its executed in the /usr/local/share/tcet-welcome
# when we auto start welcome.sh from the .desktop in ~/.config/autostart it is executed in the $HOME dir and our relative paths are broken
# so using the $HOME env variable get the path GTK more specifically set_from_file() / set_icon_from_file wont let you user ~/.local/share/tcet-welcome
# so using the $HOME env variable get the path GTK more specifically set_from_file() / set_icon_from_file wont let you user /usr/local/share/tcet-welcome


installDir = environ['HOME']+'/.local/share/tcet-welcome'
installDir = '/usr/local/share/tcet-welcome'

class aboutWin(Gtk.Window):

Expand Down
3 changes: 1 addition & 2 deletions tcet-welcome/scripts/installer.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
gi.require_version('Gtk', '3.0')
from gi.repository import Gtk
import subprocess
from os import environ

package_map = {
"NodeJS": "nodejs",
Expand All @@ -19,7 +18,7 @@
"GoLang":"go"
}

installDir = environ['HOME']+'/.local/share/tcet-welcome'
installDir = '/usr/local/share/tcet-welcome'

class MyApp(Gtk.Window):
def __init__(self):
Expand Down
4 changes: 2 additions & 2 deletions tcet-welcome/scripts/py-about.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#!/usr/bin/bash

NINSTANCES=$(ps aux | grep python\ $HOME/.local/share/tcet-welcome/scripts/about.py | wc -l )
NINSTANCES=$(ps aux | grep python\ /usr/local/share/tcet-welcome/scripts/about.py | wc -l )
target="1"

if [ "$NINSTANCES" = "$target" ]
then
bash -c "python ~/.local/share/tcet-welcome/scripts/about.py"
bash -c "python /usr/local/share/tcet-welcome/scripts/about.py"
fi
4 changes: 2 additions & 2 deletions tcet-welcome/scripts/py-installer.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#!/usr/bin/bash

NINSTANCES=$(ps aux | grep python\ $HOME/.local/share/tcet-welcome/scripts/installer.py | wc -l )
NINSTANCES=$(ps aux | grep python\ /usr/local/share/tcet-welcome/scripts/installer.py | wc -l )
target="1"

if [ "$NINSTANCES" = "$target" ]
then
bash -c "python ~/.local/share/tcet-welcome/scripts/installer.py"
bash -c "python /usr/local/share/tcet-welcome/scripts/installer.py"
fi
2 changes: 1 addition & 1 deletion welcome
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/env bash

DIR=~/.local/share/tcet-welcome
DIR=/usr/local/share/tcet-welcome

yad --title "Welcome" \
--form \
Expand Down
2 changes: 1 addition & 1 deletion welcome-after
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/env bash

DIR=~/.local/share/tcet-welcome
DIR=/usr/local/share/tcet-welcome

yad --title "Welcome" \
--form \
Expand Down

0 comments on commit cd7f695

Please sign in to comment.