From bd704f3d0870fea651de7101f754d78376cf7536 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?No=C3=A9=20Lopez?= Date: Thu, 1 May 2025 21:08:39 +0200 Subject: [PATCH 1/8] Update French translations --- .../locales/fr/LC_MESSAGES/default.mo | Bin 9280 -> 9609 bytes .../locales/fr/LC_MESSAGES/default.po | 16 ++++++++-------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/discover_overlay/locales/fr/LC_MESSAGES/default.mo b/discover_overlay/locales/fr/LC_MESSAGES/default.mo index c7697b5a2e8fd57634df83d91780029b72210d3e..4eadbd4cca5a34ed64916d7fae2c23c78ab1227d 100644 GIT binary patch delta 3159 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 R>Iqk{$RBVAJJP)o{{uoP_%i?i diff --git a/discover_overlay/locales/fr/LC_MESSAGES/default.po b/discover_overlay/locales/fr/LC_MESSAGES/default.po index 37cc391..3d8b3fe 100644 --- a/discover_overlay/locales/fr/LC_MESSAGES/default.po +++ b/discover_overlay/locales/fr/LC_MESSAGES/default.po @@ -1,10 +1,10 @@ -# Noé Lopez , 2023, 2024. +# Noé Lopez , 2023, 2024, 2025. msgid "" msgstr "" "Project-Id-Version: discover 0.7.2\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2025-05-01 20:54+0200\n" -"PO-Revision-Date: 2024-04-03 22:46+0200\n" +"PO-Revision-Date: 2025-05-01 21:05+0200\n" "Last-Translator: Noé Lopez \n" "Language-Team: Noé Lopez \n" "Language: fr_FR\n" @@ -112,19 +112,19 @@ msgid "Discover Overlay Configuration" msgstr "Configuration de Discover Overlay" msgid "Open Configuration" -msgstr "" +msgstr "Ouvrir la configuration" msgid "Hide Overlay" -msgstr "" +msgstr "Cacher l’overlay" msgid "Quit Overlay" -msgstr "" +msgstr "Quitter l’overlay" msgid "Quit Configuration" -msgstr "" +msgstr "Quitter la configuration" msgid "Show Overlay" -msgstr "" +msgstr "Montrer l’overlay" msgid "Place Window" msgstr "Choisir la position de la fenêtre" @@ -193,7 +193,7 @@ msgid "Close overlay" msgstr "Fermer l’overlay" msgid "About" -msgstr "" +msgstr "À propos" msgid "Display Horizontally" msgstr "Afficher horizontalement" From ff1cc225153e5f8b2022ba35d42a42e009709c76 Mon Sep 17 00:00:00 2001 From: trigg Date: Sun, 4 May 2025 14:40:27 +0100 Subject: [PATCH 2/8] - Added toggle for mute & deaf --- discover_overlay/discord_connector.py | 4 ++++ discover_overlay/discover_overlay.py | 8 ++++++++ 2 files changed, 12 insertions(+) diff --git a/discover_overlay/discord_connector.py b/discover_overlay/discord_connector.py index 89418d2..c13bc81 100644 --- a/discover_overlay/discord_connector.py +++ b/discover_overlay/discord_connector.py @@ -61,6 +61,8 @@ class DiscordConnector: self.text = [] self.authed = False self.last_rate_limit_send = 0 + self.muted = False + self.deafened = False self.socket_watch = None @@ -458,6 +460,8 @@ class DiscordConnector: elif j["cmd"] == "SELECT_VOICE_CHANNEL": return elif j["cmd"] == "SET_VOICE_SETTINGS": + self.muted = j['data']['mute'] + self.deafened = j['data']['deaf'] return elif j["cmd"] == "GET_VOICE_SETTINGS": return diff --git a/discover_overlay/discover_overlay.py b/discover_overlay/discover_overlay.py index f9e7269..705e7f0 100755 --- a/discover_overlay/discover_overlay.py +++ b/discover_overlay/discover_overlay.py @@ -114,8 +114,10 @@ class Discover: _("Send command, not start new instance.")) print(" --mute ", _("Set own user to mute")) print(" --unmute ", _("Set unmuted")) + print(" --toggle-mute ", _("Toggle muted")) print(" --deaf ", _("Set own user to deafened")) print(" --undeaf ", _("Unset user deafened state")) + print(" --toggle-deaf ", _("Toggle deaf")) print(" --moveto=XX ", _("Move the user into voice room, by Room ID")) print(" --minimized ", @@ -144,6 +146,12 @@ class Discover: if "--undeaf" in data: if self.connection: self.connection.set_deaf(False) + if "--toggle-mute" in data: + if self.connection: + self.connection.set_mute(not self.connection.muted) + if "--toggle-deaf" in data: + if self.connection: + self.connection.set_deaf(not self.connection.deafened) if "--refresh-guilds" in data: if self.connection: self.connection.req_guilds() From 36368d94d2ee43dfddaa4eb45379e2b823ca34a0 Mon Sep 17 00:00:00 2001 From: trigg Date: Mon, 21 Jul 2025 15:34:24 +0100 Subject: [PATCH 3/8] - Fixed broken bottom-align option --- discover_overlay/voice_overlay.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/discover_overlay/voice_overlay.py b/discover_overlay/voice_overlay.py index 4b00e79..b84e517 100644 --- a/discover_overlay/voice_overlay.py +++ b/discover_overlay/voice_overlay.py @@ -599,7 +599,7 @@ class VoiceOverlayWindow(OverlayWindow): current_y = 0 + self.vert_edge_padding offset_y = avatar_size + self.icon_spacing if self.align_right: # A lie. Align bottom - current_y = self.height - avatar_size - self.vert_edge_padding + current_y = (height - avatar_size) - self.vert_edge_padding offset_y = -(avatar_size + self.icon_spacing) rows_to_draw = [] while len(users_to_draw) > 0: From 013f9c209054f376e12358cb78d9f43028b4809b Mon Sep 17 00:00:00 2001 From: trigg Date: Thu, 28 Aug 2025 21:56:15 +0100 Subject: [PATCH 4/8] - Fix hide-on-mouseover for XShape WMs - Fix hide-on-mouseover in wayfire - Remove edge cases for Cinnamon as they are no longer required --- discover_overlay/overlay.py | 12 +++--------- discover_overlay/settings_window.py | 5 ----- 2 files changed, 3 insertions(+), 14 deletions(-) diff --git a/discover_overlay/overlay.py b/discover_overlay/overlay.py index 1c15a08..58e2ac5 100644 --- a/discover_overlay/overlay.py +++ b/discover_overlay/overlay.py @@ -192,10 +192,6 @@ class OverlayWindow(Gtk.Window): if self.hide_on_mouseover: # We've mouse-overed if self.draw_blank: - self.set_untouchable() - context.set_source_rgba(0.0, 0.0, 0.0, 0.0) - context.set_operator(cairo.OPERATOR_SOURCE) - context.paint() return else: (width, height) = self.get_size() @@ -236,10 +232,6 @@ class OverlayWindow(Gtk.Window): if (self.floating != floating or self.pos_x != pos_x or self.pos_y != pos_y or self.width != width or self.height != height): - # Special case for Cinnamon desktop : see https://github.com/trigg/Discover/issues/322 - if ('XDG_SESSION_DESKTOP' in os.environ and - os.environ['XDG_SESSION_DESKTOP'] == 'cinnamon'): - floating = True self.floating = floating self.pos_x = pos_x @@ -487,15 +479,17 @@ class OverlayWindow(Gtk.Window): """Callback when mouseover occurs, hides overlay""" self.draw_blank = True self.set_needs_redraw() + self.hide() + GLib.timeout_add_seconds(self.timeout_mouse_over, self.mouseout_timed) return True def mouseout(self, _a=None, _b=None): """Callback when mouseout occurs, sets a timer to show overlay""" - GLib.timeout_add_seconds(self.timeout_mouse_over, self.mouseout_timed) return True def mouseout_timed(self, _a=None, _b=None): """Callback a short while after mouseout occured, shows overlay""" self.draw_blank = False + self.show() self.set_needs_redraw() return False diff --git a/discover_overlay/settings_window.py b/discover_overlay/settings_window.py index 0688685..2c4ac8d 100644 --- a/discover_overlay/settings_window.py +++ b/discover_overlay/settings_window.py @@ -732,9 +732,6 @@ class MainSettingsWindow(): self.widget['core_settings_min'].set_sensitive(self.show_sys_tray_icon) - if 'XDG_SESSION_DESKTOP' in os.environ and os.environ['XDG_SESSION_DESKTOP'] == 'cinnamon': - self.widget['voice_anchor_float'].set_sensitive(False) - self.widget['core_audio_assist'].set_active( config.getboolean("general", "audio_assist", fallback=False)) @@ -1000,8 +997,6 @@ class MainSettingsWindow(): def update_floating_anchor(self): floating = self.widget['voice_anchor_float'].get_active() == 0 - if 'XDG_SESSION_DESKTOP' in os.environ and os.environ['XDG_SESSION_DESKTOP'] == 'cinnamon': - floating = True if floating: self.widget['voice_align_1'].hide() From 02baf04eaa3a5fd546fdf9e507ea515bad973cc3 Mon Sep 17 00:00:00 2001 From: trigg Date: Mon, 1 Sep 2025 16:47:55 +0100 Subject: [PATCH 5/8] -version bump --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 5bf7a82..470e9fd 100644 --- a/setup.py +++ b/setup.py @@ -9,7 +9,7 @@ setup( name='discover-overlay', author='trigg', author_email='', - version='0.7.8', + version='0.7.9', description='Voice chat overlay', long_description=readme(), long_description_content_type='text/markdown', From d35198c56dbae42847863bfbe8db2bf5a377b9d6 Mon Sep 17 00:00:00 2001 From: Abhilash Date: Sun, 28 Dec 2025 17:23:36 -0500 Subject: [PATCH 6/8] Adding sorting for server and channel names in the text menu of config --- discover_overlay/settings_window.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/discover_overlay/settings_window.py b/discover_overlay/settings_window.py index 2c4ac8d..640b7a6 100644 --- a/discover_overlay/settings_window.py +++ b/discover_overlay/settings_window.py @@ -325,11 +325,13 @@ class MainSettingsWindow(): self.channel_ids = [] g.remove_all() c.remove_all() - for guild in data['guild'].values(): + guilds = sorted(data['guild'].values(), key=lambda x: x['name'].lower()) + for guild in guilds: g.append_text(guild['name']) self.guild_ids.append(guild['id']) if guild['id'] == self.current_guild and 'channels' in guild: - for channel in guild['channels']: + channels = sorted(guild['channels'], key=lambda x: x['name'].lower()) + for channel in channels: c.append_text(channel['name']) self.channel_ids.append(channel['id']) except FileNotFoundError: From cd5375bc6e8b611a77e71582a8792f1f46e430f3 Mon Sep 17 00:00:00 2001 From: trigg Date: Tue, 30 Dec 2025 20:39:49 +0000 Subject: [PATCH 7/8] Cleanup of #371 - Remove --rpc requirement, add version command, fix help behavior and dark mode - Add controller RPC commands and fix startup order - Fixed help command, added version command, fixed GTK Dark mode - Update README.md - Removed requirement for --rpc - Revise README for clarity and formatting - Updated usage instructions and fixed formatting issues in the README. - added a 'leave' function - Update README.md - rename helper functions - removed unreachable returns - re-added spaces - moved constants into helper function - cleaned up readme --------- Co-authored-by: Abhilash Co-authored-by: Abhilash K <81313252+ebilesh@users.noreply.github.com> --- README.md | 29 +++--- discover_overlay/discover_overlay.py | 131 ++++++++++++++++----------- 2 files changed, 98 insertions(+), 62 deletions(-) diff --git a/README.md b/README.md index ac59d35..49aa571 100644 --- a/README.md +++ b/README.md @@ -27,7 +27,11 @@ This will close out any already running discover overlay for this user #### Close the overlay `discover-overlay --close` or `discover-overlay -x` -This closes the process running the overlay, hence any `--rpc` commands sent afterwards will do nothing +This closes the process running the overlay. Any control commands sent afterwards will do nothing + +#### Show version + +`discover-overlay --version` or `discover-overlay --V` #### Open configuration window `discover-overlay --configure` or `discover-overlay -c` @@ -38,40 +42,43 @@ This closes the process running the overlay, hence any `--rpc` commands sent aft This will redirect all debug to the file `~/.config/discover-overlay/output.txt` #### Hide the currently shown overlays -`discover-overlay --rpc --hide` +`discover-overlay --hide` -This will not stop the process running the overlay. This means the `--rpc` commands sent afterwards continue working as expected, and the `--show` is much quicker than starting the overlay from the start. +This will not stop the process running the overlay. This means the control commands sent afterwards continue working as expected, and the `--show` is much quicker than starting the overlay from the start. #### Show the overlays -`discover-overlay --rpc --show` +`discover-overlay --show` Note that if the process running the overlay has stopped or crashed then this will do nothing #### Mute yourself in voice chat -`discover-overlay --rpc --mute` +`discover-overlay --mute` #### Unmute yourself in voice chat -`discover-overlay --rpc --unmute` +`discover-overlay --unmute` #### Deafen yourself in voice chat -`discover-overlay --rpc --deaf` +`discover-overlay --deaf` #### Undeafen yourself in voice chat -`discover-overlay --rpc --undeaf` +`discover-overlay --undeaf` +### Attempt to leave the current voice channel + +`discover-overlay --leave` or `discover-overlay -l` #### Attempt to join voice channel by room ID -`discover-overlay --rpc --moveto=X` +`discover-overlay --moveto=X` Using a Room ID from Discord to replace `X`, this will attempt to join the voice channel. #### Populate the channel RPC file with a list of guilds -`discover-overlay --rpc --refresh-guilds` +`discover-overlay --refresh-guilds` Requests a list of guilds. Once collected, it will write them to `~/.config/discover-overlay/channels.rpc` as a JSON object #### Populate the channel RPC file with a list of channels from a guild -`discover-overlay --rpc --guild-request=X` +`discover-overlay --guild-request=X` Using a Server ID from Discord to replace `X`, this will request a list of channels (text & voice) from the given guild. Once collected, it will write them to `~/.config/discover-overlay/channels.rpc` as a JSON object. diff --git a/discover_overlay/discover_overlay.py b/discover_overlay/discover_overlay.py index 705e7f0..4e75283 100755 --- a/discover_overlay/discover_overlay.py +++ b/discover_overlay/discover_overlay.py @@ -97,35 +97,6 @@ class Discover: """ Read in arg list from command or RPC and act accordingly """ - if "--help" in data or "-h" in data: - print(_("Usage") + ": discover-overlay [OPTIONS]... ") - print(_("Show an X11 or wlroots overlay with information")) - print(_("from Discord client")) - print("") - print(" -c, --configure ", _("Open configuration window")) - print(" -x, --close ", - _("Close currently running instance")) - print(" -v, --debug ", - _("Verbose output for aid in debugging")) - print(" -h, --help ", _("This screen")) - print(" --hide ", _("Hide overlay")) - print(" --show ", _("Show overlay")) - print(" --rpc ", - _("Send command, not start new instance.")) - print(" --mute ", _("Set own user to mute")) - print(" --unmute ", _("Set unmuted")) - print(" --toggle-mute ", _("Toggle muted")) - print(" --deaf ", _("Set own user to deafened")) - print(" --undeaf ", _("Unset user deafened state")) - print(" --toggle-deaf ", _("Toggle deaf")) - print(" --moveto=XX ", - _("Move the user into voice room, by Room ID")) - print(" --minimized ", - _("If tray icon is enabled, start with only tray icon and no configuration window")) - print("") - print(_("For gamescope compatibility ensure ENV has 'GDK_BACKEND=x11'")) - if normal_close: - sys.exit(0) if "--close" in data or "-x" in data: self.exit() if "--steamos" in data or "-s" in data: @@ -155,6 +126,9 @@ class Discover: if "--refresh-guilds" in data: if self.connection: self.connection.req_guilds() + if "--leave" in data or "-l" in data: + if self.connection: + self.connection.change_voice_room(None) pattern = re.compile("--moveto=([0-9]+)") if any((match := pattern.match(x)) for x in data): if self.connection: @@ -487,6 +461,60 @@ class Discover: if deaf is not None: GLib.idle_add(self.connection.set_deaf, deaf) +def show_help(): + print(_("Usage") + ": discover-overlay [OPTIONS]... ") + print(_("Show an X11 or wlroots overlay with information")) + print(_("from Discord client")) + print("") + print(" -c, --configure ", _("Open configuration window")) + print(" -x, --close ", + _("Close currently running instance")) + print(" -v, --debug ", + _("Verbose output for aid in debugging")) + print(" -h, --help ", _("This screen")) + print(" -V, --version ", _("Show version information")) + print(" --hide ", _("Hide overlay")) + print(" --show ", _("Show overlay")) + print(" --mute ", _("Set own user to mute")) + print(" --unmute ", _("Set unmuted")) + print(" --toggle-mute ", _("Toggle muted")) + print(" --deaf ", _("Set own user to deafened")) + print(" --undeaf ", _("Unset user deafened state")) + print(" --toggle-deaf ", _("Toggle deaf")) + print(" --moveto=XX ", + _("Move the user into voice room, by Room ID")) + print(" --leave ", _("Leave the current voice channel")) + print(" --minimized ", + _("If tray icon is enabled, start with only tray icon and no configuration window")) + print("") + print(_("For gamescope compatibility ensure ENV has 'GDK_BACKEND=x11'")) + +def show_version(): + print(pkg_resources.get_distribution('discover_overlay').version) + +def is_a_controller(argv): + + actions = { + "-x", "--close", + "--hide", "--show", + "--mute", "--unmute", "--toggle-mute", + "--deaf", "--undeaf", "--toggle-deaf", + "-l", "--leave", + "--refresh-guilds", + } + controls = { + "--moveto=", + "--guild-request=", + } + for arg in argv: + # Match the actions (i.e --mute, --deafen) + if arg in actions: + return True + # Match the controls (i.e --moveto=123456789 and --guild-request=987654321) + for control in controls: + if arg.startswith(control): + return True + return False def entrypoint(): """ @@ -502,6 +530,12 @@ def entrypoint(): """ signal.signal(signal.SIGINT, signal.SIG_DFL) + if "--help" in sys.argv or "-h" in sys.argv: + show_help() + return + if "--version" in sys.argv or "-V" in sys.argv: + show_version() + return # Find Config directory config_dir = os.path.join(xdg_config_home, "discover_overlay") os.makedirs(config_dir, exist_ok=True) @@ -512,6 +546,17 @@ def entrypoint(): config_file = os.path.join(config_dir, "config.ini") debug_file = os.path.join(config_dir, "output.txt") + if "-c" in sys.argv or "--configure" in sys.argv: + _settings = MainSettingsWindow(config_file, rpc_file, channel_file, sys.argv[1:]) + Gtk.main() + return + + if is_a_controller(sys.argv): + line = " ".join(arg for arg in sys.argv[1:]).strip() + with open(rpc_file, "w", encoding="utf-8") as f: + f.write(line) + return + # Prepare logger logging.getLogger().setLevel(logging.INFO) log_format = "%(levelname)s - %(name)s - %(message)s" @@ -528,30 +573,14 @@ def entrypoint(): if 'GAMESCOPE_WAYLAND_DISPLAY' in os.environ: os.unsetenv("WAYLAND_DISPLAY") + # Catch any errors and log them try: - if "--rpc" in sys.argv: - # Send command to overlay - line = "" - for arg in sys.argv[1:]: - line = f"{line} {arg}" - with open(rpc_file, "w", encoding="utf-8") as tfile: - tfile.write(line) - log.warning("Sent RPC command") - else: - if "-c" in sys.argv or "--configure" in sys.argv: - # Show config window - _settings = MainSettingsWindow( - config_file, rpc_file, channel_file, sys.argv[1:]) - Gtk.main() - else: - # Tell any other running overlay to close - with open(rpc_file, "w", encoding="utf-8") as tfile: - tfile.write("--close") - # Show the overlay - Discover(rpc_file, config_file, channel_file, - debug_file, sys.argv[1:]) - return + with open(rpc_file, "w", encoding="utf-8") as tfile: + tfile.write("--close") + # Show the overlay + Discover(rpc_file, config_file, channel_file, + debug_file, sys.argv[1:]) except Exception as ex: # pylint: disable=broad-except log.error(ex) From 40edf315ea4afc78f1a063ae92e41a41c0f99095 Mon Sep 17 00:00:00 2001 From: Tesla Bittgenstein Date: Fri, 20 Feb 2026 23:39:49 +0200 Subject: [PATCH 8/8] 0.7.9-alt1 - Initial build. --- .gear/rules | 2 ++ .gear/tags/list | 1 + .gear/upstream/remotes | 3 ++ discover-overlay.spec | 68 ++++++++++++++++++++++++++++++++++++++++++ discover-overlay.spec~ | 61 +++++++++++++++++++++++++++++++++++++ 5 files changed, 135 insertions(+) create mode 100644 .gear/rules create mode 100644 .gear/tags/list create mode 100644 .gear/upstream/remotes create mode 100644 discover-overlay.spec create mode 100644 discover-overlay.spec~ diff --git a/.gear/rules b/.gear/rules new file mode 100644 index 0000000..eedd5e3 --- /dev/null +++ b/.gear/rules @@ -0,0 +1,2 @@ +tar: v@version@:. +diff: v@version@:. . exclude=.gear exclude=*.spec diff --git a/.gear/tags/list b/.gear/tags/list new file mode 100644 index 0000000..3a9def2 --- /dev/null +++ b/.gear/tags/list @@ -0,0 +1 @@ +02baf04eaa3a5fd546fdf9e507ea515bad973cc3 v0.7.9 diff --git a/.gear/upstream/remotes b/.gear/upstream/remotes new file mode 100644 index 0000000..d86e54b --- /dev/null +++ b/.gear/upstream/remotes @@ -0,0 +1,3 @@ +[remote "upstream"] + url = https://github.com/trigg/Discover.git + fetch = +refs/heads/*:refs/remotes/upstream/* diff --git a/discover-overlay.spec b/discover-overlay.spec new file mode 100644 index 0000000..8eb2536 --- /dev/null +++ b/discover-overlay.spec @@ -0,0 +1,68 @@ +%define pypi_name discover_overlay + +Name: discover-overlay +Version: 0.7.9 +Release: alt1 +Summary: Yet another Discord overlay for Linux written in Python using GTK3 +License: GPL-3.0-only +Group: Networking/Other +URL: https://github.com/trigg/Discover +VCS: https://github.com/trigg/Discover +Source: %name-%version.tar +BuildRequires: rpm-build-python3 +BuildRequires: python3-module-pygobject3 +BuildRequires: python3-module-websocket-client +BuildRequires: python3-module-pyxdg +BuildRequires: python3-module-requests +BuildRequires: python3-module-pillow +BuildRequires: python3-module-xlib +BuildRequires: python3-module-setuptools +BuildRequires: python3-module-pulsectl-asyncio +BuildRequires: bash + +%description +Discover-Overlay is a GTK3 overlay written in Python3. +It can be configured to show who is currently talking on discord or +it can be set to display text and images from a preconfigured channel. +It is fully customisable and can be configured to display anywhere +on the screen. We fully support X11 and wlroots based environments. +We felt the need to make this project due to the shortcomings in support +on Linux by the official discord client. + +%package -n python3-module-%pypi_name +Summary: Moonraker - API Web Server for Klipper +BuildArch: noarch +Group: Development/Python3 + +%description -n python3-module-%pypi_name +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + +%prep +%setup + +%build +export PDM_BUILD_SCM_VERSION=%version +%pyproject_build + +%install +%pyproject_install + +%files +%_bindir/discover-overlay +%_desktopdir/%{pypi_name}* +#%_iconsdir/* +/usr/share/icons/hicolor/256x256/apps/discover-overlay-default.png +/usr/share/icons/hicolor/256x256/apps/discover-overlay-tray.png +/usr/share/icons/hicolor/256x256/apps/discover-overlay.png +/usr/share/icons/hicolor/scalable/apps/discover-overlay-default.svg +/usr/share/icons/hicolor/scalable/apps/discover-overlay-tray.svg +/usr/share/icons/hicolor/scalable/apps/discover-overlay.svg + + +%files -n python3-module-%pypi_name +%python3_sitelibdir_noarch/%pypi_name +%python3_sitelibdir_noarch/%pypi_name-%version.dist-info + +%changelog +* Fri Feb 20 2026 Tesla Bittgenstein 0.7.9-alt1 +- Initial build. diff --git a/discover-overlay.spec~ b/discover-overlay.spec~ new file mode 100644 index 0000000..1b59cce --- /dev/null +++ b/discover-overlay.spec~ @@ -0,0 +1,61 @@ +%define pypi_name discover_overlay + +Name: discover-overlay +Version: 0.7.9 +Release: alt1 +Summary: Yet another Discord overlay for Linux written in Python using GTK3 +License: GPL-3.0-only +Group: Networking/Other +URL: https://github.com/trigg/Discover +VCS: https://github.com/trigg/Discover +Source: %name-%version.tar +BuildRequires: rpm-build-python3 +BuildRequires: python3-module-pygobject3 +BuildRequires: python3-module-websocket-client +BuildRequires: python3-module-pyxdg +BuildRequires: python3-module-requests +BuildRequires: python3-module-pillow +BuildRequires: python3-module-xlib +BuildRequires: python3-module-setuptools +BuildRequires: python3-module-pulsectl-asyncio +BuildRequires: bash + +%description +Discover-Overlay is a GTK3 overlay written in Python3. +It can be configured to show who is currently talking on discord or +it can be set to display text and images from a preconfigured channel. +It is fully customisable and can be configured to display anywhere +on the screen. We fully support X11 and wlroots based environments. +We felt the need to make this project due to the shortcomings in support +on Linux by the official discord client. + +%package -n python3-module-%pypi_name +Summary: Moonraker - API Web Server for Klipper +BuildArch: noarch +Group: Development/Python3 + +%description -n python3-module-%pypi_name +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + +%prep +%setup + +%build +export PDM_BUILD_SCM_VERSION=%version +%pyproject_build + +%install +%pyproject_install + +%files +%_bindir/discover-overlay +%_desktopdir/%{pypi_name}* +#%_iconsdir/* + +%files -n python3-module-%pypi_name +%python3_sitelibdir_noarch/%pypi_name +%python3_sitelibdir_noarch/%pypi_name-%version.dist-info + +%changelog +* Fri Feb 20 2026 Tesla Bittgenstein 0.7.9-alt1 +- Initial build.