Darkkal44 / Cozytile

A Cozy rice ❃
476 stars 29 forks source link

Made changes to `config.py` for every theme #3

Closed Marin-Kitagawa closed 1 year ago

Marin-Kitagawa commented 1 year ago

The code snippet below is the major change. The formatting was done by Prettier and hence can be ignored.

def autostart():
    # path to my script, under my user directory
    xauto = os.path.expanduser('~/.config/qtile/autostart_once.sh')
    subprocess.Popen([xauto])

I changed $3$ things of critical importance here

  1. Changed the path from /home/unreal/.config/qtile/autostart_once.sh to ~/.config/qtile/autostart_once.sh. This caused problem while Qtile was starting up as it was pointing to a non-existent directory.
  2. Used os.path.expanduser method on this path and assigned it to a variable. The previous variable home was never defined. I just took it straight from Qtile docs.
  3. Used subprocess.Popen method on [xauto]. Again, it was taken from Qtile docs

The Qtile docs mentioned above can be access [here](https://docs.qtile.org/en/latest/manual/config/hooks.html#:~:text=import%20os%0Aimport%20subprocess%0A%0Afrom%20libqtile%20import%20hook%0A%0A%40hook.subscribe.startup_once%0Adef%20autostart()%3A%0A%20%20%20%20home%20%3D%20os.path.expanduser(%27~/.config/qtile/autostart.sh%27)%0A%20%20%20%20subprocess.Popen(%5Bhome%5D))

These problems prevented Qtile from starting up while I was first installing.

Darkkal44 commented 1 year ago

Thanks for watching out on stuff, actually I havn't been working on this from last 4-7 days, and I've fixed these issues, I'm just fixing up some more stuff before the push..