Skip to content

Commit 4b0a851

Browse files
committed
fix: python3 runtime errors
1 parent 417fd1f commit 4b0a851

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

prayertime.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727

2828
import gi
2929
gi.require_version('Gtk', '3.0')
30+
gi.require_version('Notify', '0.7')
3031
from gi.repository import Gtk, Gst, GObject, Gio, GLib, GdkPixbuf, Notify
3132
from math import degrees, radians, atan, atan2, asin, acos, cos, sin, tan, fabs
3233
from datetime import date, timedelta
@@ -283,8 +284,8 @@ def calculate(self, notify_also = True):
283284

284285
def muteApps(self, value = 'true'):
285286
try:
286-
inputs = subprocess.getoutput('pacmd list-sink-inputs | sed -n "s/^\s*index: \([[:digit:]]*\)/\\1/p"').split('\n')
287-
clients = subprocess.getoutput('pacmd list-sink-inputs | sed -n "s/^\s*client: [[:digit:]]* <\(.*\)>/\\1/p"').split('\n')
287+
inputs = subprocess.getoutput('pacmd list-sink-inputs | sed -n "s/^\\s*index: \\([[:digit:]]*\\)/\\1/p"').split('\n')
288+
clients = subprocess.getoutput('pacmd list-sink-inputs | sed -n "s/^\\s*client: [[:digit:]]* <\\(.*\\)>/\\1/p"').split('\n')
288289
for i in range(len(inputs)):
289290
if clients[i] not in ['silaty-indicator', 'ZOOM VoiceEngine']:
290291
subprocess.Popen(['pacmd', 'set-sink-input-mute', inputs[i], value])

silaty-indicator.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
import locale
2222
import sys
2323

24+
# you might need to install the locale: sudo apt install language-pack-en
2425
locale.setlocale(locale.LC_ALL, 'en_US.UTF-8')
2526

2627
class SilatyIndicator():

silatycal.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -646,4 +646,4 @@ class CalendarColor(object):
646646
White, Blue, LGrey, DGrey = range(4)
647647

648648
GObject.type_register(CalEntry)
649-
GObject.signal_new("sidebar-button-pressed", CalEntry, GObject.SIGNAL_RUN_FIRST, GObject.TYPE_NONE, ())
649+
GObject.signal_new("sidebar-button-pressed", CalEntry, GObject.SIGNAL_RUN_FIRST, GObject.TYPE_NONE, ())

0 commit comments

Comments
 (0)