summaryrefslogtreecommitdiff
path: root/scripts/spotifyvoldec.py
diff options
context:
space:
mode:
authorSaumit Dinesan <justsaumit@protonmail.com>2022-03-06 21:36:37 +0530
committerSaumit Dinesan <justsaumit@protonmail.com>2022-03-06 21:36:37 +0530
commit6537eef95bb9067d0f20574a3f4f5f00f90cc4eb (patch)
tree26d5ac6eb0830ad523818ae1a86daf0591338349 /scripts/spotifyvoldec.py
parentf23cfa36053e25466b4bb0263c74e0a0ecfd76d2 (diff)
updating old scripts
Diffstat (limited to 'scripts/spotifyvoldec.py')
-rw-r--r--scripts/spotifyvoldec.py24
1 files changed, 0 insertions, 24 deletions
diff --git a/scripts/spotifyvoldec.py b/scripts/spotifyvoldec.py
deleted file mode 100644
index a00e06f..0000000
--- a/scripts/spotifyvoldec.py
+++ /dev/null
@@ -1,24 +0,0 @@
-#!/usr/bin/env python3
-import subprocess
-import os
-x=0
-y=0
-env = os.environ
-env['LANG'] = 'en_US'
-app = '"Spotify"'
-pactl = subprocess.check_output(['pactl', 'list', 'sink-inputs'], env=env).decode().strip().split()
-if app in pactl:
- for e in pactl:
- x += 1
- if e == app:
- break
- for i in pactl[0 : x -1 ]:
- y += 1
- if i == 'Sink' and pactl[y] == 'Input' and '#' in pactl[y + 1]:
- sink_id = pactl[y+1]
- if i == 'Volume:' and '%' in pactl[y + 3]:
- volume = pactl[y + 3]
- sink_id = sink_id[1: ]
- volume = volume[ : -1 ]
- if int(volume) < 100:
- subprocess.run(['pactl', 'set-sink-input-volume', sink_id, '-1%'])