From: Oleg Broytman Date: Sat, 24 Feb 2024 14:41:50 +0000 (+0300) Subject: Feat: Remove DBus-related scripts X-Git-Tag: 5.1.0~4 X-Git-Url: https://git.phdru.name/?a=commitdiff_plain;h=d5c6e0f3a31b32363d8547c712d5eb0178734c4d;p=xsetbg.git Feat: Remove DBus-related scripts --- diff --git a/xsetbg-dbus-change b/xsetbg-dbus-change deleted file mode 100755 index 0e4c197..0000000 --- a/xsetbg-dbus-change +++ /dev/null @@ -1,2 +0,0 @@ -#! /bin/sh -exec "`dirname \"$0\"`"/xsetbg-dbus-client.py change diff --git a/xsetbg-dbus-client.py b/xsetbg-dbus-client.py deleted file mode 100755 index b2aff34..0000000 --- a/xsetbg-dbus-client.py +++ /dev/null @@ -1,24 +0,0 @@ -#!/usr/bin/env python -"""XSetBg DBus client - -""" - -import sys -import dbus - - -def main(): - try: - command = sys.argv[1] - except IndexError: - sys.exit('Usage: %s command' % sys.argv[0]) - - bus = dbus.SessionBus() - remote_object = bus.get_object("name.phdru.XSetBg", "/name/phdru/XSetBg") - iface = dbus.Interface(remote_object, "name.phdru.XSetBg") - - getattr(iface, command)() - - -if __name__ == '__main__': - main() diff --git a/xsetbg-dbus-force b/xsetbg-dbus-force deleted file mode 100755 index 694b35f..0000000 --- a/xsetbg-dbus-force +++ /dev/null @@ -1,2 +0,0 @@ -#! /bin/sh -exec "`dirname \"$0\"`"/xsetbg-dbus-client.py force diff --git a/xsetbg-dbus-restart b/xsetbg-dbus-restart deleted file mode 100755 index 512531e..0000000 --- a/xsetbg-dbus-restart +++ /dev/null @@ -1,2 +0,0 @@ -#! /bin/sh -"`dirname \"$0\"`"/xsetbg-dbus-stop && exec "`dirname \"$0\"`"/xsetbg-dbus-start diff --git a/xsetbg-dbus-start b/xsetbg-dbus-start deleted file mode 100755 index 70fcaed..0000000 --- a/xsetbg-dbus-start +++ /dev/null @@ -1,4 +0,0 @@ -#! /bin/sh - -umask 077 -nice -20 ionice -c3 "`dirname \"$0\"`"/xsetbg-dbus.py >/dev/null 2>&1 & diff --git a/xsetbg-dbus-stop b/xsetbg-dbus-stop deleted file mode 100755 index 0ff6cc2..0000000 --- a/xsetbg-dbus-stop +++ /dev/null @@ -1,2 +0,0 @@ -#! /bin/sh -exec "`dirname \"$0\"`"/xsetbg-dbus-client.py stop diff --git a/xsetbg-dbus.py b/xsetbg-dbus.py deleted file mode 100755 index 4d7d348..0000000 --- a/xsetbg-dbus.py +++ /dev/null @@ -1,42 +0,0 @@ -#! /usr/bin/env python -"""XSetBg (DBus version) - -""" - -import gobject - -import dbus -import dbus.service -import dbus.mainloop.glib - -from xsetbg import change - - -class XsetBg(dbus.service.Object): - - @dbus.service.method("name.phdru.XSetBg", - in_signature='', out_signature='') - def change(self): - change() - - @dbus.service.method("name.phdru.XSetBg", - in_signature='', out_signature='') - def force(self): - change(force=True) - - @dbus.service.method("name.phdru.XSetBg", - in_signature='', out_signature='') - def stop(self): - mainloop.quit() - - -if __name__ == '__main__': - dbus.mainloop.glib.DBusGMainLoop(set_as_default=True) - - session_bus = dbus.SessionBus() - name = dbus.service.BusName("name.phdru.XSetBg", session_bus) - object = XsetBg(session_bus, '/name/phdru/XSetBg') - - change(force=True) - mainloop = gobject.MainLoop() - mainloop.run()