fix
177
.gitignore
vendored
Normal 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
|
||||
|
||||
|
||||
|
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 2.4 KiB |
|
Before Width: | Height: | Size: 3.8 KiB After Width: | Height: | Size: 3.8 KiB |
|
Before Width: | Height: | Size: 488 B After Width: | Height: | Size: 488 B |
|
Before Width: | Height: | Size: 5.1 KiB After Width: | Height: | Size: 5.1 KiB |
@@ -3,11 +3,12 @@ import subprocess
|
||||
from libqtile import qtile
|
||||
|
||||
from qtile_extras import widget
|
||||
from qtile_extras.popup.toolkit import (PopupRelativeLayout,
|
||||
from qtile_extras.popup.toolkit import (
|
||||
PopupRelativeLayout,
|
||||
PopupWidget,
|
||||
)
|
||||
|
||||
from res.themes.colors import gruvbox_dark
|
||||
from colors import gruvbox_dark
|
||||
|
||||
# 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:
|
||||
@@ -63,10 +64,7 @@ def calendar(qtile):
|
||||
width=0.9,
|
||||
v_align="middle",
|
||||
h_align="center",
|
||||
widget=widget.Wttr(
|
||||
fontsize=40,
|
||||
format='%c'
|
||||
)
|
||||
widget=widget.Wttr(fontsize=40, format="%c"),
|
||||
),
|
||||
PopupWidget(
|
||||
pos_x=0.3,
|
||||
@@ -76,21 +74,15 @@ def calendar(qtile):
|
||||
v_align="middle",
|
||||
h_align="center",
|
||||
widget=widget.Wttr(
|
||||
font='Open Sans Bold',
|
||||
fontsize=18,
|
||||
format='Actual: %t'
|
||||
)
|
||||
font="Open Sans Bold", fontsize=18, format="Actual: %t"
|
||||
),
|
||||
),
|
||||
PopupWidget(
|
||||
pos_x=0.3,
|
||||
pos_y=0.12,
|
||||
height=0.05,
|
||||
width=0.9,
|
||||
widget=widget.Wttr(
|
||||
font='Open Sans',
|
||||
fontsize=14,
|
||||
format='Feels: %f'
|
||||
)
|
||||
widget=widget.Wttr(font="Open Sans", fontsize=14, format="Feels: %f"),
|
||||
),
|
||||
PopupWidget(
|
||||
pos_x=0.05,
|
||||
@@ -98,10 +90,8 @@ def calendar(qtile):
|
||||
height=0.05,
|
||||
width=0.9,
|
||||
widget=widget.Wttr(
|
||||
font='Open Sans',
|
||||
fontsize=14,
|
||||
format='Wind: %w Prec: %p'
|
||||
)
|
||||
font="Open Sans", fontsize=14, format="Wind: %w Prec: %p"
|
||||
),
|
||||
),
|
||||
PopupWidget(
|
||||
pos_x=0.05,
|
||||
@@ -109,10 +99,10 @@ def calendar(qtile):
|
||||
height=0.11,
|
||||
width=0.9,
|
||||
widget=widget.Wttr(
|
||||
font='Open Sans Bold',
|
||||
font="Open Sans Bold",
|
||||
fontsize=14,
|
||||
format='City: %l', # \nFeel;%f Wind: %w'
|
||||
)
|
||||
format="City: %l", # \nFeel;%f Wind: %w'
|
||||
),
|
||||
),
|
||||
PopupWidget(
|
||||
pos_x=0.051,
|
||||
@@ -121,15 +111,17 @@ def calendar(qtile):
|
||||
width=0.9,
|
||||
widget=widget.GenPollText(
|
||||
func=parse_cal,
|
||||
font='mono',
|
||||
font="mono",
|
||||
fontsize=20,
|
||||
markup=False,
|
||||
)
|
||||
),
|
||||
]
|
||||
),
|
||||
],
|
||||
)
|
||||
layout.show(relative_to=3,
|
||||
layout.show(
|
||||
relative_to=3,
|
||||
relative_to_bar=True,
|
||||
y=3,
|
||||
x=-3,
|
||||
)
|
||||
|
||||
@@ -6,7 +6,7 @@ from qtile_extras.popup.toolkit import (
|
||||
PopupWidget,
|
||||
)
|
||||
|
||||
from res.themes.colors import gruvbox_dark
|
||||
from colors import gruvbox_dark
|
||||
|
||||
|
||||
def monitor(qtile):
|
||||
@@ -1,11 +1,12 @@
|
||||
from res.themes.colors import gruvbox_dark
|
||||
from colors import gruvbox_dark
|
||||
from qtile_extras.popup.toolkit import (
|
||||
PopupRelativeLayout,
|
||||
PopupImage,
|
||||
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(
|
||||
None,
|
||||
@@ -18,7 +19,7 @@ MPRIS2_LAYOUT = PopupRelativeLayout(
|
||||
PopupText(
|
||||
"",
|
||||
name="title",
|
||||
font='Open Sans Bold',
|
||||
font="Open Sans Bold",
|
||||
fontsize=18,
|
||||
pos_x=0.35,
|
||||
pos_y=0.1,
|
||||
@@ -30,7 +31,7 @@ MPRIS2_LAYOUT = PopupRelativeLayout(
|
||||
PopupText(
|
||||
"",
|
||||
name="artist",
|
||||
font='Open Sans Medium',
|
||||
font="Open Sans Medium",
|
||||
fontsize=14,
|
||||
pos_x=0.35,
|
||||
pos_y=0.24,
|
||||
@@ -42,7 +43,7 @@ MPRIS2_LAYOUT = PopupRelativeLayout(
|
||||
PopupText(
|
||||
"",
|
||||
name="album",
|
||||
font='Open Sans',
|
||||
font="Open Sans",
|
||||
fontsize=14,
|
||||
pos_x=0.35,
|
||||
pos_y=0.38,
|
||||
@@ -59,10 +60,12 @@ MPRIS2_LAYOUT = PopupRelativeLayout(
|
||||
width=0.21,
|
||||
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(
|
||||
name="previous",
|
||||
text='',
|
||||
text="",
|
||||
fontsize=30,
|
||||
mask=True,
|
||||
pos_x=0.125,
|
||||
@@ -71,13 +74,13 @@ MPRIS2_LAYOUT = PopupRelativeLayout(
|
||||
height=0.1,
|
||||
v_align="middle",
|
||||
h_align="center",
|
||||
highlight_method='text',
|
||||
highlight_method="text",
|
||||
foreground=gruvbox_dark["fg0"],
|
||||
highlight=gruvbox_dark["green"],
|
||||
),
|
||||
PopupText(
|
||||
name="play_pause",
|
||||
text='',
|
||||
text="",
|
||||
fontsize=30,
|
||||
mask=True,
|
||||
pos_x=0.325,
|
||||
@@ -86,13 +89,13 @@ MPRIS2_LAYOUT = PopupRelativeLayout(
|
||||
height=0.1,
|
||||
v_align="middle",
|
||||
h_align="center",
|
||||
highlight_method='text',
|
||||
highlight_method="text",
|
||||
foreground=gruvbox_dark["fg0"],
|
||||
highlight=gruvbox_dark["green"],
|
||||
),
|
||||
PopupText(
|
||||
name="stop",
|
||||
text='',
|
||||
text="",
|
||||
fontsize=30,
|
||||
mask=True,
|
||||
pos_x=0.525,
|
||||
@@ -101,13 +104,13 @@ MPRIS2_LAYOUT = PopupRelativeLayout(
|
||||
height=0.1,
|
||||
v_align="middle",
|
||||
h_align="center",
|
||||
highlight_method='text',
|
||||
highlight_method="text",
|
||||
foreground=gruvbox_dark["fg0"],
|
||||
highlight=gruvbox_dark["green"],
|
||||
),
|
||||
PopupText(
|
||||
name="next",
|
||||
text='',
|
||||
text="",
|
||||
fontsize=30,
|
||||
mask=True,
|
||||
pos_x=0.725,
|
||||
@@ -116,10 +119,11 @@ MPRIS2_LAYOUT = PopupRelativeLayout(
|
||||
height=0.1,
|
||||
v_align="middle",
|
||||
h_align="center",
|
||||
highlight_method='text',
|
||||
highlight_method="text",
|
||||
foreground=gruvbox_dark["fg0"],
|
||||
highlight=gruvbox_dark["green"],
|
||||
),
|
||||
],
|
||||
close_on_click=False,
|
||||
)
|
||||
|
||||
50
assets/popups/network.py
Normal 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)
|
||||
|
||||
71
assets/popups/powermenu.py
Normal 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)
|
||||
@@ -2,7 +2,7 @@ from pydoc import importfile
|
||||
from libqtile import qtile
|
||||
from libqtile.lazy import lazy
|
||||
|
||||
from res.themes.colors import gruvbox_dark
|
||||
from colors import gruvbox_dark
|
||||
|
||||
from qtile_extras.popup.toolkit import (
|
||||
PopupRelativeLayout,
|
||||
@@ -10,6 +10,7 @@ from qtile_extras.popup.toolkit import (
|
||||
PopupText,
|
||||
)
|
||||
|
||||
|
||||
def powermenu_2(qtile):
|
||||
layout = PopupRelativeLayout(
|
||||
qtile,
|
||||
@@ -23,7 +24,7 @@ def powermenu_2(qtile):
|
||||
controls=[
|
||||
PopupText(
|
||||
# Lock
|
||||
text='',
|
||||
text="",
|
||||
fontsize=22,
|
||||
pos_x=0.07,
|
||||
pos_y=0.05,
|
||||
@@ -32,14 +33,14 @@ def powermenu_2(qtile):
|
||||
can_focus=True,
|
||||
v_align="middle",
|
||||
h_align="center",
|
||||
highlight_method='text',
|
||||
highlight_method="text",
|
||||
foreground=gruvbox_dark["fg0"],
|
||||
highlight=gruvbox_dark["green"],
|
||||
mouse_callbacks={"Button1": lazy.spawn("betterlockscreen --lock blur")},
|
||||
),
|
||||
PopupText(
|
||||
# Reboot
|
||||
text='',
|
||||
text="",
|
||||
fontsize=22,
|
||||
pos_x=0.3,
|
||||
pos_y=0.05,
|
||||
@@ -48,14 +49,14 @@ def powermenu_2(qtile):
|
||||
can_focus=True,
|
||||
v_align="middle",
|
||||
h_align="center",
|
||||
highlight_method='text',
|
||||
highlight_method="text",
|
||||
foreground=gruvbox_dark["fg0"],
|
||||
highlight=gruvbox_dark["green"],
|
||||
mouse_callbacks={"Button1": lazy.spawn("systemctl reboot")},
|
||||
),
|
||||
PopupText(
|
||||
# Suspend
|
||||
text='',
|
||||
text="",
|
||||
fontsize=22,
|
||||
pos_x=0.54,
|
||||
pos_y=0.05,
|
||||
@@ -64,14 +65,14 @@ def powermenu_2(qtile):
|
||||
can_focus=True,
|
||||
v_align="middle",
|
||||
h_align="center",
|
||||
highlight_method='text',
|
||||
highlight_method="text",
|
||||
foreground=gruvbox_dark["fg0"],
|
||||
highlight=gruvbox_dark["green"],
|
||||
mouse_callbacks={"Button1": lazy.spawn("systemctl suspend")},
|
||||
),
|
||||
PopupText(
|
||||
# Shutdown
|
||||
text='',
|
||||
text="",
|
||||
fontsize=22,
|
||||
pos_x=0.78,
|
||||
pos_y=0.05,
|
||||
@@ -80,11 +81,12 @@ def powermenu_2(qtile):
|
||||
can_focus=True,
|
||||
v_align="middle",
|
||||
h_align="center",
|
||||
highlight_method='text',
|
||||
highlight_method="text",
|
||||
foreground=gruvbox_dark["fg0"],
|
||||
highlight=gruvbox_dark["green"],
|
||||
mouse_callbacks={"Button1": lazy.spawn("systemctl poweroff")},
|
||||
),
|
||||
]
|
||||
],
|
||||
)
|
||||
layout.show(relative_to=1, relative_to_bar=True, y=136, x=30)
|
||||
|
||||
61
assets/popups/settings.py
Normal 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)
|
||||
@@ -9,11 +9,11 @@ from qtile_extras.popup.toolkit import (
|
||||
PopupWidget,
|
||||
)
|
||||
|
||||
from res.themes.colors import gruvbox_dark
|
||||
from popups.settings import settings
|
||||
from popups.network import network_menu
|
||||
from popups.powermenu_sub import powermenu_2
|
||||
from popups.monitor import monitor
|
||||
from colors import gruvbox_dark
|
||||
from assets.popups.settings import settings
|
||||
from assets.popups.network import network_menu
|
||||
from assets.popups.powermenu_sub import powermenu_2
|
||||
from assets.popups.monitor import monitor
|
||||
|
||||
|
||||
def start_menu(qtile):
|
||||
@@ -36,7 +36,7 @@ def start_menu(qtile):
|
||||
width=0.3,
|
||||
mask=True,
|
||||
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(
|
||||
# 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)
|
||||
|
||||
@@ -1,10 +1,6 @@
|
||||
from res.themes.colors import gruvbox_dark
|
||||
from colors import gruvbox_dark
|
||||
|
||||
from qtile_extras.popup.toolkit import (
|
||||
PopupRelativeLayout,
|
||||
PopupText,
|
||||
PopupSlider
|
||||
)
|
||||
from qtile_extras.popup.toolkit import PopupRelativeLayout, PopupText, PopupSlider
|
||||
|
||||
|
||||
VOL_POPUP = PopupRelativeLayout(
|
||||
@@ -38,3 +34,4 @@ VOL_POPUP = PopupRelativeLayout(
|
||||
),
|
||||
],
|
||||
)
|
||||
|
||||
10
config.py
@@ -1,8 +1,8 @@
|
||||
from modules.screens import screens, widget_defaults
|
||||
from modules.keys import keys, mouse
|
||||
from modules.layouts import layouts, floating_layout
|
||||
from modules.groups import groups
|
||||
from modules.hooks import *
|
||||
from screens import screens, widget_defaults
|
||||
from keys import keys, mouse
|
||||
from layouts import layouts, floating_layout
|
||||
from groups import groups
|
||||
from hooks import *
|
||||
|
||||
from libqtile import qtile
|
||||
from libqtile.backend.wayland.inputs import InputConfig
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
from libqtile.config import Group, Key, Match, DropDown, ScratchPad
|
||||
from libqtile.lazy import lazy
|
||||
from .keys import keys, mod
|
||||
from keys import keys, mod
|
||||
import re
|
||||
|
||||
group_screen_map = {
|
||||
@@ -14,6 +14,7 @@ from libqtile import hook, qtile
|
||||
import subprocess
|
||||
import os.path
|
||||
from libqtile.config import Match
|
||||
import asyncio
|
||||
|
||||
# --------------------------------------------------------------------
|
||||
# HOOK startup
|
||||
@@ -24,7 +25,7 @@ FULLSCREEN_RULES = [Match(wm_class="flameshot")]
|
||||
|
||||
@hook.subscribe.startup_once
|
||||
def autostart():
|
||||
autostartscript = "~/.config/qtile/res/scripts/autostart.sh"
|
||||
autostartscript = "~/.config/qtile/assets/scripts/autostart.sh"
|
||||
home = os.path.expanduser(autostartscript)
|
||||
subprocess.Popen([home])
|
||||
|
||||
@@ -44,3 +45,28 @@ def force_fullscreen(client) -> None:
|
||||
|
||||
if any(client.match(rule) for rule in FULLSCREEN_RULES):
|
||||
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
|
||||
@@ -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)
|
||||
@@ -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)
|
||||
@@ -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)
|
||||
|
||||
@@ -14,15 +14,15 @@ from qtile_extras import widget
|
||||
from qtile_extras.widget.groupbox2 import GroupBoxRule
|
||||
|
||||
# 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 popups.start_menu import start_menu
|
||||
from popups.calendar import calendar
|
||||
from popups.mpris2_layout import MPRIS2_LAYOUT
|
||||
from popups.volume_notification import VOL_POPUP
|
||||
from assets.popups.powermenu import power_menu
|
||||
from assets.popups.start_menu import start_menu
|
||||
from assets.popups.calendar import calendar
|
||||
from assets.popups.mpris2_layout import MPRIS2_LAYOUT
|
||||
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:
|
||||
|
||||
BACKGROUND = gruvbox_dark["bg0_hard"]
|
||||
BACKGROUND = THEME["bg0_hard"]
|
||||
OPACITY = 0.7
|
||||
SIZE = 32
|
||||
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 = [
|
||||
Screen(
|
||||
# Center Screen
|
||||
serial="0000000000001",
|
||||
top=bar.Bar(
|
||||
[
|
||||
widget.TextBox(
|
||||
@@ -118,20 +123,14 @@ screens = [
|
||||
popup_show_args={"relative_to": 8, "y": -70},
|
||||
),
|
||||
],
|
||||
<<<<<<< HEAD
|
||||
background=BACKGROUND,
|
||||
opacity=OPACITY,
|
||||
size=SIZE,
|
||||
margin=MARGIN,
|
||||
=======
|
||||
background=THEME["bg0_hard"],
|
||||
opacity=0.75,
|
||||
size=32,
|
||||
margin=[3, 3, 0, 3],
|
||||
>>>>>>> unify_colors
|
||||
),
|
||||
),
|
||||
Screen(
|
||||
serial="25175B003924",
|
||||
# Right Screen
|
||||
top=bar.Bar(
|
||||
[
|
||||
@@ -151,7 +150,7 @@ screens = [
|
||||
hide_unused=True,
|
||||
rules=get_groupbox_rules(monitor_specific=False),
|
||||
),
|
||||
widget.Spacer(status_format="{play_status} {artist}/{title}"),
|
||||
widget.Spacer(),
|
||||
widget.WidgetBox(
|
||||
fontsize=22,
|
||||
text_closed="",
|
||||
@@ -177,21 +176,15 @@ screens = [
|
||||
mouse_callbacks={"Button1": lazy.function(power_menu)},
|
||||
),
|
||||
],
|
||||
<<<<<<< HEAD
|
||||
background=BACKGROUND,
|
||||
opacity=OPACITY,
|
||||
size=SIZE,
|
||||
margin=MARGIN,
|
||||
=======
|
||||
background=THEME["bg0_hard"],
|
||||
opacity=0.75,
|
||||
size=32,
|
||||
margin=[3, 3, 0, 3],
|
||||
>>>>>>> unify_colors
|
||||
),
|
||||
),
|
||||
Screen(
|
||||
# Left Screen
|
||||
serial="25175B004131",
|
||||
top=bar.Bar(
|
||||
[
|
||||
widget.TextBox(
|
||||
@@ -239,17 +232,10 @@ screens = [
|
||||
mouse_callbacks={"Button1": lazy.function(power_menu)},
|
||||
),
|
||||
],
|
||||
<<<<<<< HEAD
|
||||
background=BACKGROUND,
|
||||
opacity=OPACITY,
|
||||
size=SIZE,
|
||||
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,
|
||||
height=80,
|
||||
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
|
||||
foreground=THEME["fg1"],
|
||||
>>>>>>> unify_colors
|
||||
background=(
|
||||
THEME["bg0_hard"],
|
||||
THEME["bg0_hard"],
|
||||