Skip to content

Commit c35db03

Browse files
author
halak0013
committed
fixing location error
1 parent e52ec1b commit c35db03

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

fonksiyonlar.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,13 +68,15 @@ def change(mode):
6868
print(display_manager)
6969
add = ""
7070
location = getLocation()
71+
print(location)
7172
if display_manager == "sddm":
7273
add = "--dm sddm"
7374
cmd = f"""#!/bin/bash
7475
echo 'Lütfen şifrenizi giriniz'
7576
sudo python3 {location}/envycontrol.py -s {mode} {add}
7677
exit
7778
"""
79+
print(cmd)
7880
subprocess.Popen(['x-terminal-emulator', '-e',
7981
f'bash -c "echo \'{cmd}\' > betik.sh && chmod +x betik.sh && ./betik.sh; exec bash"'], cwd="/tmp/")
8082

@@ -134,6 +136,6 @@ def change_brightness(window, val):
134136

135137
def getLocation():
136138
if os.path.exists("/opt/surucu-ayar/envycontrol.py"):
137-
return "/opt/surucu-ayar/envycontrol.py"
139+
return "/opt/surucu-ayar"
138140
else:
139141
return os.getcwd()

0 commit comments

Comments
 (0)