dotfiles/dot_config/qtile/old_configs/sweenu/bars.py
eeleater bc838a571d Add dot_config/qtile/.keep
Add dot_config/qtile/__pycache__/.keep
Add dot_config/qtile/__pycache__/bars.cpython-38.pyc
Add dot_config/qtile/__pycache__/bars.cpython-39.pyc
Add dot_config/qtile/__pycache__/colors.cpython-38.pyc
Add dot_config/qtile/__pycache__/colors.cpython-39.pyc
Add dot_config/qtile/__pycache__/config-done.cpython-38.pyc
Add dot_config/qtile/__pycache__/config.cpython-38.pyc
Add dot_config/qtile/__pycache__/config.cpython-39.pyc
Add dot_config/qtile/__pycache__/groups.cpython-38.pyc
Add dot_config/qtile/__pycache__/groups.cpython-39.pyc
Add dot_config/qtile/__pycache__/keys.cpython-38.pyc
Add dot_config/qtile/__pycache__/keys.cpython-39.pyc
Add dot_config/qtile/__pycache__/layouts.cpython-38.pyc
Add dot_config/qtile/__pycache__/layouts.cpython-39.pyc
Add dot_config/qtile/__pycache__/screens.cpython-38.pyc
Add dot_config/qtile/__pycache__/screens.cpython-39.pyc
Add dot_config/qtile/bars.py
Add dot_config/qtile/colors.py
Add dot_config/qtile/config.py
Add dot_config/qtile/groups.py
Add dot_config/qtile/keys.py
Add dot_config/qtile/layouts.py
Add dot_config/qtile/old_configs/.keep
Add dot_config/qtile/old_configs/config.py
Add dot_config/qtile/old_configs/sweenu/.keep
Add dot_config/qtile/old_configs/sweenu/bars.py
Add dot_config/qtile/old_configs/sweenu/colors.py
Add dot_config/qtile/old_configs/sweenu/config.py
Add dot_config/qtile/old_configs/sweenu/keys.py
Add dot_config/qtile/old_configs/sweenu/util/.keep
Add dot_config/qtile/old_configs/sweenu/util/__main__.py
Add dot_config/qtile/old_configs/sweenu/util/backlight.py
Add dot_config/qtile/old_configs/sweenu/util/monitor.py
Add dot_config/qtile/old_configs/sweenu/util/screenshot.py
Add dot_config/qtile/old_configs/sweenu/util/soundcard.py
Add dot_config/qtile/old_configs/sweenu/widgets.py
Add dot_config/qtile/screens.py
Add dot_config/qtile/scripts/.keep
Add dot_config/qtile/scripts/executable_autostart.sh
Add dot_config/qtile/themes/.keep
Add dot_config/qtile/themes/ayu-dark.json
Add dot_config/qtile/themes/dracula.json
Add dot_config/qtile/themes/hopscotch.json
Add dot_config/qtile/themes/material-darker.json
Add dot_config/qtile/themes/nord.json
Add dot_config/qtile/themes/one-dark.json
Add dot_config/qtile/themes/operator.json
Add dot_config/qtile/themes/royal.json
Add dot_config/qtile/themes/seashells.json
Add dot_config/qtile/themes/smyck.json
Add dot_config/qtile/themes/spacedust.json
Add dot_config/qtile/themes/spacegray.json
Add dot_config/qtile/themes/square.json
Add dot_config/qtile/themes/tomorrow-nb.json
2021-08-26 20:17:03 +02:00

127 lines
3.3 KiB
Python

from pathlib import Path
from libqtile import bar, widget
from colors import theme, border_color
icon_theme_path = Path.home() / '{{ icon_dir | replace(user_dir + '/', '') }}'
bar_size = 36
groupbox = {
'center_aligned': True,
'foreground': theme['very_light_white'],
'inactive': theme['gray'],
'other_current_screen_border': theme['gray'],
'this_current_screen_border': theme['dark_blue'],
'this_screen_border': theme['dark_blue'],
'urgent_border': theme['red'],
'urgent_text': theme['red']}
sep = {
'linewidth': 2,
'size_percent': 100,
'padding': 12}
soft_sep = {
'linewidth': 2,
'size_percent': 70,
'foreground': theme['dark_gray'],
'padding': 7}
tasklist = {
'border': border_color,
'max_title_width': 200,
'txt_floating': '🗗',
'txt_maximized': '🗖',
'txt_minimized': '🗕'}
volume = {'theme_path': icon_theme_path}
clock = {
'timezone': 'Europe/Paris',
'format': '%B %-d, %H:%M'}
music = widget.Mpris2(
background=theme['dark_blue'],
name='spotify',
scroll_chars=0,
stop_pause_text='',
display_metadata=['xesam:title', 'xesam:artist'],
objname="org.mpris.MediaPlayer2.spotify")
disk = widget.DF(
update_interval=3600,
warn_space=5,
format='{p} ({uf}{m})')
updates = widget.CheckUpdates(
distro='Arch_checkupdates',
display_format='{updates}',
execute='termite -e "pikaur -Syu"',
colour_have_updates=theme['dark_blue'],
colour_no_updates=theme['dark_green'],
update_interval=600)
battery = widget.Battery(
foreground=theme['green'],
low_percentage=0.10,
low_foreground=theme['red'],
update_delay=10,
format='{percent:.0%} {hour:d}:{min:02d} {watt:.2}W')
battery_icon = widget.BatteryIcon(
theme_path=icon_theme_path,
update_interval=120)
systray = widget.Systray(
icon_size=24
)
main_bar = bar.Bar(
[
widget.GroupBox(**groupbox, visible_groups=['a', 's', 'd', 'f',
'music', 'chat', 'game']),
widget.Sep(**sep),
widget.Volume(**volume),
music,
widget.TaskList(**tasklist),
systray,
widget.Sep(**sep),
disk,
updates,
widget.Sep(**soft_sep),
battery_icon,
battery,
widget.Sep(**soft_sep),
widget.Clock(**clock),
], bar_size)
bar1 = bar.Bar(
[
widget.GroupBox(**groupbox, visible_groups=['a', 's', 'd', 'f', 'game']),
widget.Sep(**sep),
widget.Volume(**volume),
music,
widget.TaskList(**tasklist),
systray,
widget.Sep(**sep),
disk,
updates,
widget.Sep(**soft_sep),
widget.Clock(**clock),
], bar_size)
bar2 = bar.Bar(
[
widget.GroupBox(**groupbox, visible_groups=['u', 'i', 'o', 'p', 'music', 'chat']),
widget.Sep(**sep),
widget.Volume(**volume),
widget.TaskList(**tasklist),
battery_icon,
battery,
widget.Sep(**soft_sep),
widget.Clock(**clock),
], bar_size)