Moved all .config-folders into the config folder for easier stow

This commit is contained in:
TuDatTr
2018-03-15 11:50:33 +01:00
parent f4a1e27deb
commit 27a0a96cb4
15 changed files with 36 additions and 43 deletions

24
config/.scripts/spotify-play.py Executable file
View File

@@ -0,0 +1,24 @@
#!/usr/bin/python
import subprocess
import time
def main():
state = -1
while 1:
with open('/home/tuan/.scripts/playstate', 'r') as f:
try:
file_state = int(f.readline().strip('\n'))
except ValueError:
pass
if state != file_state:
state = file_state
if state == 0:
print("")
subprocess.run(["playerctl","pause"])
elif state == 1:
print("")
subprocess.run(["playerctl","play"])
time.sleep(0.5)
if __name__ == '__main__':
main()