Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 20 additions & 3 deletions edgeware/src/os_utils/linux.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,21 +27,38 @@
import mpv
from config import load_default_config
from paths import CustomAssets, Process
from features.prompt import Prompt

from os_utils.linux_utils import find_get_wallpaper_command, find_set_wallpaper_commands, find_set_wallpaper_function, get_desktop_environment


def close_mpv(player: mpv.MPV) -> None:
player.stop()


def set_borderless(window: Toplevel) -> None:
if get_desktop_environment() == "kde":

window.attributes("-type", "splash")
# windows that use overrideredirect(true) can't take focus (https://core.tcl-lang.org/tk/artifact/7892c68f49012d2d71222ae0e312a1e7dc69a801?txt=1&ln=51-64)
# so prompt windows need to be treated as a special case
if isinstance(window, Prompt):

window.title("PROMPT")

# remove min, max and close buttons
window.attributes("-type", "toolbar")

window.resizable(False, False)

return

# below needed to ensure popups can have transparency
window.attributes("-type", "splash")

if get_desktop_environment() == "kde":
# below needed to ensure popups remain on top in KDE Plasma
window.overrideredirect(True)
else:
window.attributes("-type", "splash")



def set_clickthrough(window: Toplevel) -> None:
Expand Down