remove testing shebang

This commit is contained in:
Aaron Bieber 2025-01-14 20:28:06 -07:00
parent 9aaecdf9f1
commit 187bbd1b9e
No known key found for this signature in database

View File

@ -1,6 +1,4 @@
#! /usr/bin/env nix-shell #! /usr/bin/env python3
#!nix-shell -i python3 -p python3 python3Packages.dbus-python python3Packages.pygobject3 python3Packages.requests
import dbus.service import dbus.service
from dbus.mainloop.glib import DBusGMainLoop from dbus.mainloop.glib import DBusGMainLoop
from gi.repository import GLib from gi.repository import GLib
@ -19,7 +17,6 @@ iface = "org.kde.krunner1"
class Runner(dbus.service.Object): class Runner(dbus.service.Object):
def __init__(self): def __init__(self):
dbus.service.Object.__init__(self, dbus.service.BusName("org.kde.krha", dbus.SessionBus()), objpath) dbus.service.Object.__init__(self, dbus.service.BusName("org.kde.krha", dbus.SessionBus()), objpath)
# Load config from ~/.config/krunnerrc or environment variables
self.api_key = os.environ.get("HA_API_KEY", "") self.api_key = os.environ.get("HA_API_KEY", "")
self.ha_url = os.environ.get("HA_URL", "").rstrip('/') self.ha_url = os.environ.get("HA_URL", "").rstrip('/')
@ -44,7 +41,6 @@ class Runner(dbus.service.Object):
@dbus.service.method(iface, out_signature='a(sss)') @dbus.service.method(iface, out_signature='a(sss)')
def Actions(self): def Actions(self):
# id, text, icon
return [("send", "Send to Home Assistant", "home")] return [("send", "Send to Home Assistant", "home")]
@dbus.service.method(iface, in_signature='ss') @dbus.service.method(iface, in_signature='ss')