This commit is contained in:
2026-02-24 21:42:25 +01:00
parent 875c80027d
commit 54d01ddad3
34 changed files with 481 additions and 298 deletions

177
.gitignore vendored Normal file
View File

@@ -0,0 +1,177 @@
# ---> Python
# Byte-compiled / optimized / DLL files
**/__pycache__/**
*.py[cod]
*$py.class
# C extensions
*.so
# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST
# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec
# Installer logs
pip-log.txt
pip-delete-this-directory.txt
# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
cover/
# Translations
*.mo
*.pot
# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal
# Flask stuff:
instance/
.webassets-cache
# Scrapy stuff:
.scrapy
# Sphinx documentation
docs/_build/
# PyBuilder
.pybuilder/
target/
# Jupyter Notebook
.ipynb_checkpoints
# IPython
profile_default/
ipython_config.py
# pyenv
# For a library or package, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
# .python-version
# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock
# UV
# Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
# This is especially recommended for binary packages to ensure reproducibility, and is more
# commonly ignored for libraries.
#uv.lock
# poetry
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
# This is especially recommended for binary packages to ensure reproducibility, and is more
# commonly ignored for libraries.
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
#poetry.lock
# pdm
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
#pdm.lock
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
# in version control.
# https://pdm.fming.dev/latest/usage/project/#working-with-version-control
.pdm.toml
.pdm-python
.pdm-build/
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
__pypackages__/
# Celery stuff
celerybeat-schedule
celerybeat.pid
# SageMath parsed files
*.sage.py
# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/
# Spyder project settings
.spyderproject
.spyproject
# Rope project settings
.ropeproject
# mkdocs documentation
/site
# mypy
.mypy_cache/
.dmypy.json
dmypy.json
# Pyre type checker
.pyre/
# pytype static type analyzer
.pytype/
# Cython debug symbols
cython_debug/
# PyCharm
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/
# Ruff stuff:
.ruff_cache/
# PyPI configuration file
.pypirc

Binary file not shown.

View File

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

View File

Before

Width:  |  Height:  |  Size: 3.8 KiB

After

Width:  |  Height:  |  Size: 3.8 KiB

View File

Before

Width:  |  Height:  |  Size: 488 B

After

Width:  |  Height:  |  Size: 488 B

View File

Before

Width:  |  Height:  |  Size: 5.1 KiB

After

Width:  |  Height:  |  Size: 5.1 KiB

View File

@@ -3,11 +3,12 @@ import subprocess
from libqtile import qtile from libqtile import qtile
from qtile_extras import widget from qtile_extras import widget
from qtile_extras.popup.toolkit import (PopupRelativeLayout, from qtile_extras.popup.toolkit import (
PopupWidget, PopupRelativeLayout,
) PopupWidget,
)
from res.themes.colors import gruvbox_dark from colors import gruvbox_dark
# https://discord.com/channels/955163559086665728/1166312212223250482/1322614846155657370 # https://discord.com/channels/955163559086665728/1166312212223250482/1322614846155657370
# check for this PR to change back the code with the message contents to the prev code of the widget: # check for this PR to change back the code with the message contents to the prev code of the widget:
@@ -63,11 +64,8 @@ def calendar(qtile):
width=0.9, width=0.9,
v_align="middle", v_align="middle",
h_align="center", h_align="center",
widget=widget.Wttr( widget=widget.Wttr(fontsize=40, format="%c"),
fontsize=40, ),
format='%c'
)
),
PopupWidget( PopupWidget(
pos_x=0.3, pos_x=0.3,
pos_y=0.05, pos_y=0.05,
@@ -76,44 +74,36 @@ def calendar(qtile):
v_align="middle", v_align="middle",
h_align="center", h_align="center",
widget=widget.Wttr( widget=widget.Wttr(
font='Open Sans Bold', font="Open Sans Bold", fontsize=18, format="Actual: %t"
fontsize=18,
format='Actual: %t'
)
), ),
),
PopupWidget( PopupWidget(
pos_x=0.3, pos_x=0.3,
pos_y=0.12, pos_y=0.12,
height=0.05, height=0.05,
width=0.9, width=0.9,
widget=widget.Wttr( widget=widget.Wttr(font="Open Sans", fontsize=14, format="Feels: %f"),
font='Open Sans', ),
fontsize=14,
format='Feels: %f'
)
),
PopupWidget( PopupWidget(
pos_x=0.05, pos_x=0.05,
pos_y=0.2, pos_y=0.2,
height=0.05, height=0.05,
width=0.9, width=0.9,
widget=widget.Wttr( widget=widget.Wttr(
font='Open Sans', font="Open Sans", fontsize=14, format="Wind: %w Prec: %p"
fontsize=14,
format='Wind: %w Prec: %p'
)
), ),
),
PopupWidget( PopupWidget(
pos_x=0.05, pos_x=0.05,
pos_y=0.25, pos_y=0.25,
height=0.11, height=0.11,
width=0.9, width=0.9,
widget=widget.Wttr( widget=widget.Wttr(
font='Open Sans Bold', font="Open Sans Bold",
fontsize=14, fontsize=14,
format='City: %l', # \nFeel;%f Wind: %w' format="City: %l", # \nFeel;%f Wind: %w'
)
), ),
),
PopupWidget( PopupWidget(
pos_x=0.051, pos_x=0.051,
pos_y=0.38, pos_y=0.38,
@@ -121,15 +111,17 @@ def calendar(qtile):
width=0.9, width=0.9,
widget=widget.GenPollText( widget=widget.GenPollText(
func=parse_cal, func=parse_cal,
font='mono', font="mono",
fontsize=20, fontsize=20,
markup=False, markup=False,
)
), ),
] ),
],
) )
layout.show(relative_to=3, layout.show(
relative_to_bar=True, relative_to=3,
y=3, relative_to_bar=True,
x=-3, y=3,
) x=-3,
)

View File

@@ -6,7 +6,7 @@ from qtile_extras.popup.toolkit import (
PopupWidget, PopupWidget,
) )
from res.themes.colors import gruvbox_dark from colors import gruvbox_dark
def monitor(qtile): def monitor(qtile):

View File

@@ -1,11 +1,12 @@
from res.themes.colors import gruvbox_dark from colors import gruvbox_dark
from qtile_extras.popup.toolkit import ( from qtile_extras.popup.toolkit import (
PopupRelativeLayout, PopupRelativeLayout,
PopupImage, PopupImage,
PopupText, PopupText,
PopupSlider PopupSlider,
) )
image='/home/cerberus/.config/qtile/res/images/no_cover.svg'
image = "/home/cerberus/.config/qtile/assets/images/no_cover.svg"
MPRIS2_LAYOUT = PopupRelativeLayout( MPRIS2_LAYOUT = PopupRelativeLayout(
None, None,
@@ -18,7 +19,7 @@ MPRIS2_LAYOUT = PopupRelativeLayout(
PopupText( PopupText(
"", "",
name="title", name="title",
font='Open Sans Bold', font="Open Sans Bold",
fontsize=18, fontsize=18,
pos_x=0.35, pos_x=0.35,
pos_y=0.1, pos_y=0.1,
@@ -30,7 +31,7 @@ MPRIS2_LAYOUT = PopupRelativeLayout(
PopupText( PopupText(
"", "",
name="artist", name="artist",
font='Open Sans Medium', font="Open Sans Medium",
fontsize=14, fontsize=14,
pos_x=0.35, pos_x=0.35,
pos_y=0.24, pos_y=0.24,
@@ -42,7 +43,7 @@ MPRIS2_LAYOUT = PopupRelativeLayout(
PopupText( PopupText(
"", "",
name="album", name="album",
font='Open Sans', font="Open Sans",
fontsize=14, fontsize=14,
pos_x=0.35, pos_x=0.35,
pos_y=0.38, pos_y=0.38,
@@ -59,10 +60,12 @@ MPRIS2_LAYOUT = PopupRelativeLayout(
width=0.21, width=0.21,
height=0.42, height=0.42,
), ),
PopupSlider(name="progress", pos_x=0.1, pos_y=0.6, width=0.8, height=0.1, marker_size=0), PopupSlider(
name="progress", pos_x=0.1, pos_y=0.6, width=0.8, height=0.1, marker_size=0
),
PopupText( PopupText(
name="previous", name="previous",
text='󰙤', text="󰙤",
fontsize=30, fontsize=30,
mask=True, mask=True,
pos_x=0.125, pos_x=0.125,
@@ -71,13 +74,13 @@ MPRIS2_LAYOUT = PopupRelativeLayout(
height=0.1, height=0.1,
v_align="middle", v_align="middle",
h_align="center", h_align="center",
highlight_method='text', highlight_method="text",
foreground=gruvbox_dark["fg0"], foreground=gruvbox_dark["fg0"],
highlight=gruvbox_dark["green"], highlight=gruvbox_dark["green"],
), ),
PopupText( PopupText(
name="play_pause", name="play_pause",
text='󰐎', text="󰐎",
fontsize=30, fontsize=30,
mask=True, mask=True,
pos_x=0.325, pos_x=0.325,
@@ -86,13 +89,13 @@ MPRIS2_LAYOUT = PopupRelativeLayout(
height=0.1, height=0.1,
v_align="middle", v_align="middle",
h_align="center", h_align="center",
highlight_method='text', highlight_method="text",
foreground=gruvbox_dark["fg0"], foreground=gruvbox_dark["fg0"],
highlight=gruvbox_dark["green"], highlight=gruvbox_dark["green"],
), ),
PopupText( PopupText(
name="stop", name="stop",
text='', text="",
fontsize=30, fontsize=30,
mask=True, mask=True,
pos_x=0.525, pos_x=0.525,
@@ -101,13 +104,13 @@ MPRIS2_LAYOUT = PopupRelativeLayout(
height=0.1, height=0.1,
v_align="middle", v_align="middle",
h_align="center", h_align="center",
highlight_method='text', highlight_method="text",
foreground=gruvbox_dark["fg0"], foreground=gruvbox_dark["fg0"],
highlight=gruvbox_dark["green"], highlight=gruvbox_dark["green"],
), ),
PopupText( PopupText(
name="next", name="next",
text='󰙢', text="󰙢",
fontsize=30, fontsize=30,
mask=True, mask=True,
pos_x=0.725, pos_x=0.725,
@@ -116,10 +119,11 @@ MPRIS2_LAYOUT = PopupRelativeLayout(
height=0.1, height=0.1,
v_align="middle", v_align="middle",
h_align="center", h_align="center",
highlight_method='text', highlight_method="text",
foreground=gruvbox_dark["fg0"], foreground=gruvbox_dark["fg0"],
highlight=gruvbox_dark["green"], highlight=gruvbox_dark["green"],
), ),
], ],
close_on_click=False, close_on_click=False,
) )

50
assets/popups/network.py Normal file
View File

@@ -0,0 +1,50 @@
from libqtile import qtile
from libqtile.lazy import lazy
from colors import gruvbox_dark
from qtile_extras.popup.menu import (
PopupMenu,
PopupMenuItem,
PopupMenuSeparator,
)
items = [
PopupMenuItem(
show_icon=False,
text="󰛳 Network Manager",
font="Open Sans",
fontsize=16,
can_focus=True,
highlight_method="text",
foreground=gruvbox_dark["fg0"],
highlight=gruvbox_dark["green"],
mouse_callbacks={"Button1": lazy.spawn("nm-connection-editor")},
),
PopupMenuSeparator(),
PopupMenuItem(
show_icon=False,
text="󰐚 Wireguard",
font="Open Sans",
fontsize=16,
highlight_method="text",
can_focus=True,
foreground=gruvbox_dark["fg0"],
highlight=gruvbox_dark["green"],
mouse_callbacks={"Button1": lazy.spawn("wireguird")},
),
]
def network_menu(qtile):
layout = PopupMenu.generate(
qtile,
pos_x=100,
pos_y=100,
width=225,
opacity=0.7,
menuitems=items,
background=gruvbox_dark["bg0_soft"],
)
layout.show(relative_to=1, relative_to_bar=True, y=136, x=220)

View File

@@ -0,0 +1,71 @@
from libqtile.lazy import lazy
from colors import gruvbox_dark
from qtile_extras.popup.toolkit import (
PopupRelativeLayout,
PopupText,
)
# qtile/resources/themes/colors.py
def power_menu(qtile):
layout = PopupRelativeLayout(
qtile,
width=800,
height=250,
opacity=0.7,
# border=gruvbox_dark["red"],
# border_width=3,
background=gruvbox_dark["bg0_soft"],
initial_focus=None,
controls=[
PopupText(
# Lock betterlockscreen --lock blur
text="",
fontsize=80,
pos_y=0,
pos_x=0.1,
width=0.2,
height=1,
mouse_callbacks={"Button1": lazy.spawn("betterlockscreen --lock blur")},
highlight_method="text",
highlight=gruvbox_dark["green"],
),
PopupText(
# Hybrid Sleep systemctl hybrid-sleep
text="󰒲",
fontsize=80,
pos_y=0,
pos_x=0.32,
width=0.2,
height=1,
mouse_callbacks={"Button1": lazy.spawn("systemctl hybrid-sleep")},
highlight_method="text",
highlight=gruvbox_dark["yellow"],
),
PopupText(
# Hibernate systemctl hibernate
text="",
fontsize=80,
pos_y=0,
pos_x=0.55,
width=0.2,
height=1,
mouse_callbacks={"Button1": lazy.spawn("systemctl hibernate")},
highlight_method="text",
highlight=gruvbox_dark["orange"],
),
PopupText(
# Power off systemctl poweroff
text="",
fontsize=80,
pos_y=0,
pos_x=0.8,
width=0.2,
height=1,
mouse_callbacks={"Button1": lazy.spawn("systemctl poweroff")},
highlight_method="text",
highlight=gruvbox_dark["red"],
),
],
)
layout.show(relative_to=5, relative_to_bar=True, hide_on_timeout=5)

View File

@@ -2,7 +2,7 @@ from pydoc import importfile
from libqtile import qtile from libqtile import qtile
from libqtile.lazy import lazy from libqtile.lazy import lazy
from res.themes.colors import gruvbox_dark from colors import gruvbox_dark
from qtile_extras.popup.toolkit import ( from qtile_extras.popup.toolkit import (
PopupRelativeLayout, PopupRelativeLayout,
@@ -10,6 +10,7 @@ from qtile_extras.popup.toolkit import (
PopupText, PopupText,
) )
def powermenu_2(qtile): def powermenu_2(qtile):
layout = PopupRelativeLayout( layout = PopupRelativeLayout(
qtile, qtile,
@@ -23,7 +24,7 @@ def powermenu_2(qtile):
controls=[ controls=[
PopupText( PopupText(
# Lock # Lock
text='', text="",
fontsize=22, fontsize=22,
pos_x=0.07, pos_x=0.07,
pos_y=0.05, pos_y=0.05,
@@ -32,14 +33,14 @@ def powermenu_2(qtile):
can_focus=True, can_focus=True,
v_align="middle", v_align="middle",
h_align="center", h_align="center",
highlight_method='text', highlight_method="text",
foreground=gruvbox_dark["fg0"], foreground=gruvbox_dark["fg0"],
highlight=gruvbox_dark["green"], highlight=gruvbox_dark["green"],
mouse_callbacks={"Button1": lazy.spawn("betterlockscreen --lock blur")}, mouse_callbacks={"Button1": lazy.spawn("betterlockscreen --lock blur")},
), ),
PopupText( PopupText(
# Reboot # Reboot
text='', text="",
fontsize=22, fontsize=22,
pos_x=0.3, pos_x=0.3,
pos_y=0.05, pos_y=0.05,
@@ -48,14 +49,14 @@ def powermenu_2(qtile):
can_focus=True, can_focus=True,
v_align="middle", v_align="middle",
h_align="center", h_align="center",
highlight_method='text', highlight_method="text",
foreground=gruvbox_dark["fg0"], foreground=gruvbox_dark["fg0"],
highlight=gruvbox_dark["green"], highlight=gruvbox_dark["green"],
mouse_callbacks={"Button1": lazy.spawn("systemctl reboot")}, mouse_callbacks={"Button1": lazy.spawn("systemctl reboot")},
), ),
PopupText( PopupText(
# Suspend # Suspend
text='󰒲', text="󰒲",
fontsize=22, fontsize=22,
pos_x=0.54, pos_x=0.54,
pos_y=0.05, pos_y=0.05,
@@ -64,14 +65,14 @@ def powermenu_2(qtile):
can_focus=True, can_focus=True,
v_align="middle", v_align="middle",
h_align="center", h_align="center",
highlight_method='text', highlight_method="text",
foreground=gruvbox_dark["fg0"], foreground=gruvbox_dark["fg0"],
highlight=gruvbox_dark["green"], highlight=gruvbox_dark["green"],
mouse_callbacks={"Button1": lazy.spawn("systemctl suspend")}, mouse_callbacks={"Button1": lazy.spawn("systemctl suspend")},
), ),
PopupText( PopupText(
# Shutdown # Shutdown
text='', text="",
fontsize=22, fontsize=22,
pos_x=0.78, pos_x=0.78,
pos_y=0.05, pos_y=0.05,
@@ -80,11 +81,12 @@ def powermenu_2(qtile):
can_focus=True, can_focus=True,
v_align="middle", v_align="middle",
h_align="center", h_align="center",
highlight_method='text', highlight_method="text",
foreground=gruvbox_dark["fg0"], foreground=gruvbox_dark["fg0"],
highlight=gruvbox_dark["green"], highlight=gruvbox_dark["green"],
mouse_callbacks={"Button1": lazy.spawn("systemctl poweroff")}, mouse_callbacks={"Button1": lazy.spawn("systemctl poweroff")},
), ),
] ],
) )
layout.show(relative_to=1, relative_to_bar=True, y=136, x=30) layout.show(relative_to=1, relative_to_bar=True, y=136, x=30)

61
assets/popups/settings.py Normal file
View File

@@ -0,0 +1,61 @@
from libqtile import qtile
from libqtile.lazy import lazy
from colors import gruvbox_dark
from qtile_extras.popup.menu import (
PopupMenu,
PopupMenuItem,
PopupMenuSeparator,
)
items = [
PopupMenuItem( # Wallpaper setting
show_icon=False,
text=" 󰸉 Nitrogen Wallpaper",
font="Open Sans",
fontsize=16,
can_focus=True,
highlight_method="text",
foreground=gruvbox_dark["fg0"],
highlight=gruvbox_dark["green"],
mouse_callbacks={"Button1": lazy.spawn("nitrogen")},
),
PopupMenuSeparator(),
PopupMenuItem( # Arandr
show_icon=False,
text=" 󰹑 Arandr Display",
font="Open Sans",
fontsize=16,
can_focus=True,
highlight_method="text",
foreground=gruvbox_dark["fg0"],
highlight=gruvbox_dark["green"],
mouse_callbacks={"Button1": lazy.spawn("arandr")},
),
PopupMenuSeparator(),
PopupMenuItem( # VS-Code qtile config
show_icon=False,
text="  Qtile Config",
font="Open Sans",
fontsize=16,
can_focus=True,
highlight_method="text",
foreground=gruvbox_dark["fg0"],
highlight=gruvbox_dark["green"],
mouse_callbacks={"Button1": lazy.spawn("code /home/cerberus/.config/")},
),
]
def settings(qtile):
layout = PopupMenu.generate(
qtile,
pos_x=100,
pos_y=100,
width=225,
opacity=0.7,
menuitems=items,
background=gruvbox_dark["bg0_soft"],
)
layout.show(relative_to=1, relative_to_bar=True, y=75, x=325)

View File

@@ -9,11 +9,11 @@ from qtile_extras.popup.toolkit import (
PopupWidget, PopupWidget,
) )
from res.themes.colors import gruvbox_dark from colors import gruvbox_dark
from popups.settings import settings from assets.popups.settings import settings
from popups.network import network_menu from assets.popups.network import network_menu
from popups.powermenu_sub import powermenu_2 from assets.popups.powermenu_sub import powermenu_2
from popups.monitor import monitor from assets.popups.monitor import monitor
def start_menu(qtile): def start_menu(qtile):
@@ -36,7 +36,7 @@ def start_menu(qtile):
width=0.3, width=0.3,
mask=True, mask=True,
colour=gruvbox_dark["blue"], colour=gruvbox_dark["blue"],
filename="/home/cerberus/.config/qtile/res/images/standby_rotated.png", filename="/home/cerberus/.config/qtile/assets/images/standby_rotated_.png",
), ),
PopupWidget( PopupWidget(
# Welcome banner, fetching user name from $USER # Welcome banner, fetching user name from $USER
@@ -183,4 +183,3 @@ def start_menu(qtile):
], ],
) )
layout.show(relative_to=1, relative_to_bar=True, y=3, x=3) layout.show(relative_to=1, relative_to_bar=True, y=3, x=3)

View File

@@ -1,10 +1,6 @@
from res.themes.colors import gruvbox_dark from colors import gruvbox_dark
from qtile_extras.popup.toolkit import ( from qtile_extras.popup.toolkit import PopupRelativeLayout, PopupText, PopupSlider
PopupRelativeLayout,
PopupText,
PopupSlider
)
VOL_POPUP = PopupRelativeLayout( VOL_POPUP = PopupRelativeLayout(
@@ -38,3 +34,4 @@ VOL_POPUP = PopupRelativeLayout(
), ),
], ],
) )

View File

@@ -1,8 +1,8 @@
from modules.screens import screens, widget_defaults from screens import screens, widget_defaults
from modules.keys import keys, mouse from keys import keys, mouse
from modules.layouts import layouts, floating_layout from layouts import layouts, floating_layout
from modules.groups import groups from groups import groups
from modules.hooks import * from hooks import *
from libqtile import qtile from libqtile import qtile
from libqtile.backend.wayland.inputs import InputConfig from libqtile.backend.wayland.inputs import InputConfig

View File

@@ -1,6 +1,6 @@
from libqtile.config import Group, Key, Match, DropDown, ScratchPad from libqtile.config import Group, Key, Match, DropDown, ScratchPad
from libqtile.lazy import lazy from libqtile.lazy import lazy
from .keys import keys, mod from keys import keys, mod
import re import re
group_screen_map = { group_screen_map = {

View File

@@ -14,6 +14,7 @@ from libqtile import hook, qtile
import subprocess import subprocess
import os.path import os.path
from libqtile.config import Match from libqtile.config import Match
import asyncio
# -------------------------------------------------------------------- # --------------------------------------------------------------------
# HOOK startup # HOOK startup
@@ -24,7 +25,7 @@ FULLSCREEN_RULES = [Match(wm_class="flameshot")]
@hook.subscribe.startup_once @hook.subscribe.startup_once
def autostart(): def autostart():
autostartscript = "~/.config/qtile/res/scripts/autostart.sh" autostartscript = "~/.config/qtile/assets/scripts/autostart.sh"
home = os.path.expanduser(autostartscript) home = os.path.expanduser(autostartscript)
subprocess.Popen([home]) subprocess.Popen([home])
@@ -44,3 +45,28 @@ def force_fullscreen(client) -> None:
if any(client.match(rule) for rule in FULLSCREEN_RULES): if any(client.match(rule) for rule in FULLSCREEN_RULES):
client.fullscreen = True client.fullscreen = True
@hook.subscribe.client_new
def tile_mpv(client):
if client.name == "mpv" or "mpvk":
client.floating = False
# @hook.subscribe.client_new
# def tile_mpv(client):
# # wm_class gibt oft eine liste zurück, z.b. ['mpv', 'mpv']
# if "mpv" in client.get_wm_class():
# client.floating = false
# @hook.subscribe.client_new
# def tile_mpv(client):
# if client.name == "mpv":
# # Wartet 0.1 Sekunden, bevor das Floating deaktiviert wird
# asyncio.create_task(set_tile(client))
#
#
# async def set_tile(client):
# await asyncio.sleep(0.1)
# client.floating = False

View File

View File

View File

@@ -1,48 +0,0 @@
from libqtile import qtile
from libqtile.lazy import lazy
from res.themes.colors import gruvbox_dark
from qtile_extras.popup.menu import (
PopupMenu,
PopupMenuItem,
PopupMenuSeparator,
)
items=[
PopupMenuItem(
show_icon=False,
text='󰛳 Network Manager',
font='Open Sans',
fontsize=16,
can_focus=True,
highlight_method='text',
foreground=gruvbox_dark["fg0"],
highlight=gruvbox_dark["green"],
mouse_callbacks={"Button1": lazy.spawn("nm-connection-editor")},
),
PopupMenuSeparator(),
PopupMenuItem(
show_icon=False,
text='󰐚 Wireguard',
font='Open Sans',
fontsize=16,
highlight_method='text',
can_focus=True,
foreground=gruvbox_dark["fg0"],
highlight=gruvbox_dark["green"],
mouse_callbacks={"Button1": lazy.spawn("wireguird")},
)
]
def network_menu(qtile):
layout = PopupMenu.generate(
qtile,
pos_x=100,
pos_y=100,
width=225,
opacity=0.7,
menuitems=items,
background=gruvbox_dark["bg0_soft"]
)
layout.show(relative_to=1, relative_to_bar=True, y=136, x=220)

View File

@@ -1,70 +0,0 @@
from libqtile.lazy import lazy
from res.themes.colors import gruvbox_dark
from qtile_extras.popup.toolkit import (
PopupRelativeLayout,
PopupText,
)
# qtile/resources/themes/colors.py
def power_menu(qtile):
layout = PopupRelativeLayout(
qtile,
width=800,
height=250,
opacity=0.7,
# border=gruvbox_dark["red"],
# border_width=3,
background=gruvbox_dark["bg0_soft"],
initial_focus=None,
controls=[
PopupText(
# Lock betterlockscreen --lock blur
text="",
fontsize=80,
pos_y=0,
pos_x=0.1,
width=0.2,
height=1,
mouse_callbacks={"Button1": lazy.spawn("betterlockscreen --lock blur")},
highlight_method='text',
highlight=gruvbox_dark["green"],
),
PopupText(
# Hybrid Sleep systemctl hybrid-sleep
text="󰒲",
fontsize=80,
pos_y=0,
pos_x=0.32,
width=0.2,
height=1,
mouse_callbacks={"Button1": lazy.spawn("systemctl hybrid-sleep")},
highlight_method='text',
highlight=gruvbox_dark["yellow"],
),
PopupText(
# Hibernate systemctl hibernate
text="",
fontsize=80,
pos_y=0,
pos_x=0.55,
width=0.2,
height=1,
mouse_callbacks={"Button1": lazy.spawn("systemctl hibernate")},
highlight_method='text',
highlight=gruvbox_dark["orange"],
),
PopupText(
# Power off systemctl poweroff
text="",
fontsize=80,
pos_y=0,
pos_x=0.8,
width=0.2,
height=1,
mouse_callbacks={"Button1": lazy.spawn("systemctl poweroff")},
highlight_method='text',
highlight=gruvbox_dark["red"],
),
],
)
layout.show(relative_to=5, relative_to_bar=True, hide_on_timeout=5)

View File

@@ -1,59 +0,0 @@
from libqtile import qtile
from libqtile.lazy import lazy
from res.themes.colors import gruvbox_dark
from qtile_extras.popup.menu import (
PopupMenu,
PopupMenuItem,
PopupMenuSeparator,
)
items = [
PopupMenuItem(# Wallpaper setting
show_icon=False,
text=' 󰸉 Nitrogen Wallpaper',
font='Open Sans',
fontsize=16,
can_focus=True,
highlight_method='text',
foreground=gruvbox_dark["fg0"],
highlight=gruvbox_dark["green"],
mouse_callbacks={"Button1": lazy.spawn("nitrogen")},
),
PopupMenuSeparator(),
PopupMenuItem(# Arandr
show_icon=False,
text=' 󰹑 Arandr Display',
font='Open Sans',
fontsize=16,
can_focus=True,
highlight_method='text',
foreground=gruvbox_dark["fg0"],
highlight=gruvbox_dark["green"],
mouse_callbacks={"Button1": lazy.spawn("arandr")},),
PopupMenuSeparator(),
PopupMenuItem(# VS-Code qtile config
show_icon=False,
text='  Qtile Config',
font='Open Sans',
fontsize=16,
can_focus=True,
highlight_method='text',
foreground=gruvbox_dark["fg0"],
highlight=gruvbox_dark["green"],
mouse_callbacks={"Button1": lazy.spawn("code /home/cerberus/.config/")},),
]
def settings(qtile):
layout = PopupMenu.generate(
qtile,
pos_x=100,
pos_y=100,
width=225,
opacity=0.7,
menuitems=items,
background=gruvbox_dark["bg0_soft"]
)
layout.show(relative_to=1, relative_to_bar=True, y=75, x=325)

View File

@@ -14,15 +14,15 @@ from qtile_extras import widget
from qtile_extras.widget.groupbox2 import GroupBoxRule from qtile_extras.widget.groupbox2 import GroupBoxRule
# from plugins.notifications import Notifier # from plugins.notifications import Notifier
from plugins.graphical_notifications import Notifier from assets.plugins.graphical_notifications import Notifier
from popups.powermenu import power_menu from assets.popups.powermenu import power_menu
from popups.start_menu import start_menu from assets.popups.start_menu import start_menu
from popups.calendar import calendar from assets.popups.calendar import calendar
from popups.mpris2_layout import MPRIS2_LAYOUT from assets.popups.mpris2_layout import MPRIS2_LAYOUT
from popups.volume_notification import VOL_POPUP from assets.popups.volume_notification import VOL_POPUP
from res.themes.colors import gruvbox_dark as THEME from colors import gruvbox_dark as THEME
# -------------------------------------------------------- # --------------------------------------------------------
@@ -62,14 +62,19 @@ extension_defaults = widget_defaults.copy()
# All across defaults: # All across defaults:
BACKGROUND = gruvbox_dark["bg0_hard"] BACKGROUND = THEME["bg0_hard"]
OPACITY = 0.7 OPACITY = 0.7
SIZE = 32 SIZE = 32
MARGIN = [3, 3, 0, 3] MARGIN = [3, 3, 0, 3]
bar.Bar # screens = [
# Screen(top=bar.Bar([widget.Spacer()], size=SIZE)),
# Screen(top=bar.Bar([widget.Spacer()], size=SIZE)),
# Screen(top=bar.Bar([widget.Spacer()], size=SIZE)),
# ]
screens = [ screens = [
Screen( Screen(
# Center Screen # Center Screen
serial="0000000000001",
top=bar.Bar( top=bar.Bar(
[ [
widget.TextBox( widget.TextBox(
@@ -118,20 +123,14 @@ screens = [
popup_show_args={"relative_to": 8, "y": -70}, popup_show_args={"relative_to": 8, "y": -70},
), ),
], ],
<<<<<<< HEAD
background=BACKGROUND, background=BACKGROUND,
opacity=OPACITY, opacity=OPACITY,
size=SIZE, size=SIZE,
margin=MARGIN, margin=MARGIN,
=======
background=THEME["bg0_hard"],
opacity=0.75,
size=32,
margin=[3, 3, 0, 3],
>>>>>>> unify_colors
), ),
), ),
Screen( Screen(
serial="25175B003924",
# Right Screen # Right Screen
top=bar.Bar( top=bar.Bar(
[ [
@@ -151,7 +150,7 @@ screens = [
hide_unused=True, hide_unused=True,
rules=get_groupbox_rules(monitor_specific=False), rules=get_groupbox_rules(monitor_specific=False),
), ),
widget.Spacer(status_format="{play_status} {artist}/{title}"), widget.Spacer(),
widget.WidgetBox( widget.WidgetBox(
fontsize=22, fontsize=22,
text_closed="󱤟", text_closed="󱤟",
@@ -177,21 +176,15 @@ screens = [
mouse_callbacks={"Button1": lazy.function(power_menu)}, mouse_callbacks={"Button1": lazy.function(power_menu)},
), ),
], ],
<<<<<<< HEAD
background=BACKGROUND, background=BACKGROUND,
opacity=OPACITY, opacity=OPACITY,
size=SIZE, size=SIZE,
margin=MARGIN, margin=MARGIN,
=======
background=THEME["bg0_hard"],
opacity=0.75,
size=32,
margin=[3, 3, 0, 3],
>>>>>>> unify_colors
), ),
), ),
Screen( Screen(
# Left Screen # Left Screen
serial="25175B004131",
top=bar.Bar( top=bar.Bar(
[ [
widget.TextBox( widget.TextBox(
@@ -239,17 +232,10 @@ screens = [
mouse_callbacks={"Button1": lazy.function(power_menu)}, mouse_callbacks={"Button1": lazy.function(power_menu)},
), ),
], ],
<<<<<<< HEAD
background=BACKGROUND, background=BACKGROUND,
opacity=OPACITY, opacity=OPACITY,
size=SIZE, size=SIZE,
margin=MARGIN, margin=MARGIN,
=======
background=THEME["bg0_hard"],
opacity=0.75,
size=32,
margin=[3, 3, 0, 3],
>>>>>>> unify_colors
), ),
), ),
] ]
@@ -259,13 +245,8 @@ notifier = Notifier(
width=350, width=350,
height=80, height=80,
format="<b>{summary}</b>\n{app_name}\n{body}", format="<b>{summary}</b>\n{app_name}\n{body}",
<<<<<<< HEAD
# file_name="/home/cerberus/.config/qtile/res/images/normal.png", # Not working
foreground=gruvbox_dark["fg1"],
=======
# file_name='/home/cerberus/.config/qtile/normal.png', # Not working # file_name='/home/cerberus/.config/qtile/normal.png', # Not working
foreground=THEME["fg1"], foreground=THEME["fg1"],
>>>>>>> unify_colors
background=( background=(
THEME["bg0_hard"], THEME["bg0_hard"],
THEME["bg0_hard"], THEME["bg0_hard"],