Save
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
from ignis.widgets import Widget
|
||||
from ignis.exceptions import HyprlandIPCNotFoundError
|
||||
from ignis.services.hyprland import HyprlandService
|
||||
import os
|
||||
|
||||
def toggle_engine():
|
||||
os.system("cd /home/timo/.config/hypr/linux-wallpaperengine && ./linux-wallpaperengine 2657260174 --screen-root DP-3")
|
||||
|
||||
try:
|
||||
hyprland = HyprlandService.get_default()
|
||||
|
||||
def wallpaper_engine_widget():
|
||||
return Widget.Button(
|
||||
css_classes=["kb-layout", "unset"],
|
||||
on_click=lambda x: os.system("cd /home/timo/.config/hypr/linux-wallpaperengine && ./linux-wallpaperengine 2657260174 --screen-root DP-3"),
|
||||
child=Widget.Label(
|
||||
label=hyprland.bind(
|
||||
"kb_layout", transform=lambda value: value[:2].lower()
|
||||
)
|
||||
),
|
||||
)
|
||||
except HyprlandIPCNotFoundError:
|
||||
|
||||
def kb_layout():
|
||||
return
|
||||
Reference in New Issue
Block a user