From d5c6e0f3a31b32363d8547c712d5eb0178734c4d Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Sat, 24 Feb 2024 17:41:50 +0300 Subject: [PATCH] Feat: Remove DBus-related scripts --- xsetbg-dbus-change | 2 -- xsetbg-dbus-client.py | 24 ------------------------ xsetbg-dbus-force | 2 -- xsetbg-dbus-restart | 2 -- xsetbg-dbus-start | 4 ---- xsetbg-dbus-stop | 2 -- xsetbg-dbus.py | 42 ------------------------------------------ 7 files changed, 78 deletions(-) delete mode 100755 xsetbg-dbus-change delete mode 100755 xsetbg-dbus-client.py delete mode 100755 xsetbg-dbus-force delete mode 100755 xsetbg-dbus-restart delete mode 100755 xsetbg-dbus-start delete mode 100755 xsetbg-dbus-stop delete mode 100755 xsetbg-dbus.py 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() -- 2.39.5