merged master into laptop branch

This commit is contained in:
paul-loedige
2021-11-03 11:01:09 +01:00
parent b0a7410dfd
commit b3a2bc1e5d
18 changed files with 624 additions and 2966 deletions
+2 -2
View File
@@ -8,12 +8,12 @@ widget_defaults = dict(
background=base_color,
font='Ubuntu Mono',
fontsize=18,
padding=3,
padding=1,
)
extension_defaults = widget_defaults.copy()
main_bar_fontsize=22
main_bar_height=28
main_bar_height=24
secondary_bar_height=24
secondary_bar_fontsize=18
+50 -19
View File
@@ -4,16 +4,18 @@ from libqtile.command import lazy
from defines import term
from Keys import keys
group_names = [("","Home", 'h',{'layout': 'monadtall'}),
("","Coding", 'c',{'layout': 'monadtall'}),
("","Browser", 'f',{'layout': 'monadtall'}),
("","Mail", 'm',{'layout': 'monadtall'}),
("","Music", 's',{'layout': 'monadtall'}),
("","Video", 'v',{'layout': 'monadtall'}),
("","Documents", 'l',{'layout': 'monadtall'}),
("","Discord", 'd',{'layout': 'monadtall'}),
("","VM's", 'o',{'layout': 'monadtall'}),
("","Gaming", 'g',{'layout': 'monadtall'})]
group_names = [("","Home", 'h',{'layout': 'monadtall'}),
("","Browser", 'f',{'layout': 'monadtall'}),
("","Mail", 'm',{'layout': 'monadtall'}),
("","Coding", 'c',{'layout': 'monadtall'}),
("","Documents", 'l',{'layout': 'monadtall'}),
("","Music", 'u',{'layout': 'monadtall'}),
("","Video", 'v',{'layout': 'monadtall'}),
("","Discord", 'd',{'layout': 'monadtall'}),
("","etc1", '1', {'layout': 'monadtall'}),
("","etc2", '2', {'layout': 'monadtall'}),
("","etc3", '3', {'layout': 'monadtall'}),
("","etc4", '4', {'layout': 'monadtall'})]
groups = [Group(icon, **kwargs) for icon, name, key, kwargs in group_names]
@@ -28,8 +30,8 @@ groups.append(
term + ' -e htop',
),
DropDown(
'sound',
'pavucontrol'
'sound',[[elektronik:Protokolle]]
'pavucontrol'[[elektronik:Protokolle]]
),
DropDown(
'filemanager',
@@ -37,21 +39,46 @@ groups.append(
on_focus_lost_hide=False
),
DropDown(
'password manager',
'keepassxc',
'bitwarden',
'bitwarden-desktop',
on_focus_lost_hide=False,
),
DropDown(
'WhatsApp',
'whatsapp-for-linux',
'whatsapp-nativefier',
height = 0.5,
width = 0.5,
x = .25
width = 0.8,
x = .1,
on_focus_lost_hide=False,
opacity=1
),
DropDown(
'Signal',
'signal-desktop',
height = 0.5,
width = 0.8,
x = .1,
on_focus_lost_hide=False,
opacity = 1
),
DropDown(
'Qalculate!',
'qalculate-gtk',
height = 0.5,
width = 0.5,
x = .25,
on_focus_lost_hide=True,
opacity = 1
),
DropDown(
'Slack',
'slack',
height = 0.5,
width = 0.8,
x = 0.1,
on_focus_lost_hide=False,
opacity=1
)
])
)
@@ -73,10 +100,14 @@ keys.extend([
desc="open the dropdown pavucontrol"),
Key(['mod1','control'],'e',lazy.group['scratchpad'].dropdown_toggle('filemanager'),
desc="open the dropdown filemanager"),
Key(['mod1','control'],'p',lazy.group['scratchpad'].dropdown_toggle('password manager'),
Key(['mod1','control'],'b',lazy.group['scratchpad'].dropdown_toggle('bitwarden'),
desc="open the dropdown password manager KeePassXC"),
Key(['mod1','control'],'w',lazy.group['scratchpad'].dropdown_toggle('WhatsApp'),
desc="open the dropdown for WhatsApp"),
Key(['mod1','control'],'i',lazy.group['scratchpad'].dropdown_toggle('Signal'),
desc="open the dropdown for Signal"),
])
Key(['mod1','control'],'s',lazy.group['scratchpad'].dropdown_toggle('Slack'),
desc="open the dropdown for Slack"),
Key(['mod1','control'],'q',lazy.group['scratchpad'].dropdown_toggle('Qalculate!'),
desc="open the dropdown for Qalculate!"),
])
+12 -2
View File
@@ -4,6 +4,9 @@ from libqtile.command import lazy
from defines import mod, term
keys = [
#screen lock
Key([mod], "End" , lazy.spawn('dm-tool lock'),desc="locks session"),
#moving focus aroung
Key([mod], "h", lazy.layout.left(),desc="move focus left"),
Key([mod], "l", lazy.layout.right(),desc="move focus right"),
@@ -13,12 +16,15 @@ keys = [
Key([mod,"mod1"], "j", lazy.to_screen(2),desc="move focus to main screen"),
Key([mod,"mod1"], "l", lazy.to_screen(2),desc="move focus to main screen"),
Key([mod,"mod1"], "h", lazy.to_screen(1),desc="move focus to left screen"),
Key([mod,"mod1"], "n", lazy.next_screen(),desc="move focus to left screen"),
# moving windows around
Key([mod, "shift"], "h", lazy.layout.swap_left(),desc="move focused window left"),
Key([mod, "shift"], "l", lazy.layout.swap_right(),desc="move focused window right"),
Key([mod, "shift"], "j", lazy.layout.shuffle_down(),desc="move focused window down"),
Key([mod, "shift"], "k", lazy.layout.shuffle_up(),desc="move focused window up"),
Key([mod, "shift", "control"], "h", lazy.layout.swap_column_left(),desc="move focused window one column to the left"),
Key([mod, "shift", "control"], "l", lazy.layout.swap_column_right(),desc="move focused window one column to the right"),
# resize windows
Key([mod], "plus", lazy.layout.grow(),desc="increase window size"),
@@ -32,7 +38,7 @@ keys = [
Key([mod],"f", lazy.spawn("firefox"),desc="Launch firefox"),
Key([mod],"e", lazy.spawn("pcmanfm"),desc="Launch pcmanfm"),
Key([mod],"c", lazy.spawn("code"),desc="Launch visual studio code"),
Key([mod],"v", lazy.spawn(term + " -e vim"),desc="Launch Vim"),
Key([mod],"v", lazy.spawn(term + " -e nvim"),desc="Launch NeoVim"),
Key([mod, "shift"],"s", lazy.spawn('gscreenshot -s -o -f /tmp/screenshots'),desc="take a screenshot"),
# Toggle between different layouts as defined below
@@ -59,6 +65,10 @@ keys = [
Key([], 'XF86AudioNext', lazy.spawn('playerctl next')),
Key([], 'XF86AudioPrev', lazy.spawn('playerctl previous')),
Key([], 'XF86AudioPlay', lazy.spawn('playerctl play-pause')),
# backlight keys
Key([], 'XF86MonBrightnessUp', lazy.spawn('xbacklight -inc 5')),
Key([], 'XF86MonBrightnessDown', lazy.spawn('xbacklight -dec 5')),
]
@@ -69,4 +79,4 @@ mouse = [
Drag([mod], "Button3", lazy.window.set_size_floating(),
start=lazy.window.get_size()),
Click([mod], "Button2", lazy.window.bring_to_front())
]
]
+24 -18
View File
@@ -1,24 +1,34 @@
from libqtile import layout
from libqtile.config import Match
from defines import focus_color, border_width
from defines import focus_color, border_width, window_margin
layouts = [
layout.MonadTall(
align=1,
border_focus = focus_color,
border_width = border_width,
new_at_current = True,
margin=window_margin,
new_client_position = 'after_current',
),
layout.Floating(
border_focus = focus_color,
border_width = border_width,
margin=window_margin,
),
layout.Max(),
layout.MonadWide(
border_focus = focus_color,
border_width = border_width,
new_at_current = True,
new_client_position = 'after_current',
margin=window_margin,
),
layout.Columns(
border_focus = focus_color,
border_width = border_width,
num_columns = 3,
margin = window_margin,
)
]
floating_layout = layout.Floating(
@@ -26,18 +36,14 @@ floating_layout = layout.Floating(
border_width = border_width,
float_rules=[
# Run the utility of `xprop` to see the wm class and name of an X client.
{'wmclass': 'confirm'},
{'wmclass': 'dialog'},
{'wmclass': 'download'},
{'wmclass': 'error'},
{'wmclass': 'file_progress'},
{'wmclass': 'notification'},
{'wmclass': 'splash'},
{'wmclass': 'toolbar'},
{'wmclass': 'confirmreset'}, # gitk
{'wmclass': 'makebranch'}, # gitk
{'wmclass': 'maketag'}, # gitk
{'wname': 'branchdialog'}, # gitk
{'wname': 'pinentry'}, # GPG key password entry
{'wmclass': 'ssh-askpass'}, # ssh-askpass
])
*layout.Floating.default_float_rules,
Match(wm_class='confirmreset'), # gitk
Match(wm_class='makebranch'), # gitk
Match(wm_class='maketag'), # gitk
Match(title='branchdialog'), # gitk
Match(title='pinentry'), # GPG key password entry
Match(wm_class='ssh-askpass'), # ssh-askpass
Match(wm_class='sun-awt-X11-XWindowPeer'), #matlab
Match(wm_class='sun-awt-X11-XDialogPeer'), #matlab
Match(wm_class='Nitrogen'),
])
+93 -83
View File
@@ -1,7 +1,7 @@
from libqtile import widget
from defines import base_color, term
from defines import blue_color, light_foreground_color, dark_foreground_color, red_color, light_purple_color, purple_color, green_color, orange_color, magenta_color
from defines import blue_color, light_foreground_color, dark_foreground_color, red_color, light_purple_color, purple_color, green_color, orange_color, magenta_color, yellow_color
from Custom_Widgets import MemoryC, Mic
#region Powerline
@@ -34,16 +34,20 @@ def powerline_arrow(direction, color1, color2,size):
#region Left_widgets
def Left_widgets(size,fontsize,prompt=False):
return [
widget.CurrentLayoutIcon(),
widget.CurrentLayoutIcon(
scale = 0.9,
),
*powerline_arrow('r',base_color,blue_color,size),
widget.Image(
filename='~/.config/qtile/icons/archlinux-logo-small.png',
widget.TextBox(
text='',
foreground=light_foreground_color,
fontsize=fontsize+14,
margin=5,
background=blue_color
),
*powerline_arrow('r',blue_color,base_color,size),
widget.GroupBox(
fontsize=fontsize,
fontsize=fontsize+10,
rounded=False,
active=light_foreground_color,
inactive=dark_foreground_color,
@@ -56,7 +60,9 @@ def Left_widgets(size,fontsize,prompt=False):
urgent_alert_method='block',
urgent_border = red_color,
),
widget.Spacer(),
widget.WindowName(fontsize=fontsize-2),
widget.Spacer(),
]
#endregion
@@ -65,25 +71,25 @@ def volume_widget(prev_color,color,size,fontsize):
return[
*powerline_arrow('l',prev_color,color,size),
widget.Volume(
foreground=dark_foreground_color,
foreground=light_foreground_color,
background=color,
emoji=True,
fontsize=fontsize,
),
widget.Volume(
foreground=dark_foreground_color,
foreground=light_foreground_color,
background=color,
fontsize=fontsize,
padding=0
),
Mic(
foreground=dark_foreground_color,
foreground=light_foreground_color,
background=color,
emoji=True,
fontsize=fontsize,
fontsize=fontsize + 6,
),
Mic(
foreground=dark_foreground_color,
foreground=light_foreground_color,
background=color,
fontsize=fontsize,
padding=0
@@ -99,58 +105,58 @@ launch_htop= {'Button1': launch_htop}
def System_widgets(prev_color,last_color,size,fontsize):
return [
*powerline_arrow('l',prev_color,red_color,size),
widget.Image(
filename='~/.config/qtile/icons/temp.png',
margin=5,
background=red_color,
mouse_callbacks = launch_htop,
),
*powerline_arrow('l',prev_color,orange_color,size),
widget.TextBox(
text='',
foreground=light_foreground_color,
background=orange_color,
fontsize=fontsize+6
),
widget.ThermalSensor(
foreground=dark_foreground_color,
background=red_color,
foreground=light_foreground_color,
background=orange_color,
fontsize=fontsize,
tag_sensor='Tctl',
mouse_callbacks = launch_htop,
),
*powerline_arrow('l',red_color,green_color,size),
widget.Image(
filename='~/.config/qtile/icons/cpu.png',
margin=5,
*powerline_arrow('l',orange_color,green_color,size),
widget.TextBox(
text='',
foreground=light_foreground_color,
background=green_color,
mouse_callbacks = launch_htop,
),
fontsize=fontsize+6
),
widget.CPU(
foreground=dark_foreground_color,
foreground=light_foreground_color,
background=green_color,
fontsize=fontsize,
format='{load_percent}% @ {freq_current}GHz',
mouse_callbacks = launch_htop,
),
*powerline_arrow('l',green_color,orange_color,size),
widget.Image(
filename='~/.config/qtile/icons/ram.png',
background=orange_color,
margin=-10,
mouse_callbacks = launch_htop,
),
*powerline_arrow('l',green_color,yellow_color,size),
widget.TextBox(
text='',
foreground=light_foreground_color,
background=yellow_color,
fontsize=fontsize+6
),
MemoryC(
foreground=dark_foreground_color,
background=orange_color,
foreground=light_foreground_color,
background=yellow_color,
fontsize=fontsize,
format=" {MemUsed}GB({MemPercent}%) | {SwapUsed}GB({SwapPercent}%)",
mouse_callbacks = launch_htop,
),
*powerline_arrow('l',orange_color,last_color,size),
widget.Image(
filename='~/.config/qtile/icons/network.png',
*powerline_arrow('l',yellow_color,last_color,size),
widget.TextBox(
text='',
foreground=light_foreground_color,
background=blue_color,
margin=5,
mouse_callbacks = launch_htop,
),
fontsize=fontsize+6
),
widget.Net(
background=last_color,
foreground=dark_foreground_color,
foreground=light_foreground_color,
fontsize=fontsize,
fmt='{:.9}',
format='{down}',
@@ -158,7 +164,7 @@ def System_widgets(prev_color,last_color,size,fontsize):
),
widget.Net(
background=last_color,
foreground=dark_foreground_color,
foreground=light_foreground_color,
fontsize=fontsize,
fmt='{:.9}',
format='{up}',
@@ -170,19 +176,20 @@ def System_widgets(prev_color,last_color,size,fontsize):
#region End_widgets
def end_widgets(prev_color,size,fontsize):
return [
*powerline_arrow('l',prev_color,magenta_color,size),
widget.Image(
filename='~/.config/qtile/icons/calendar.png',
margin=5,
background=magenta_color,
),
*powerline_arrow('l',prev_color,purple_color,size),
widget.TextBox(
text='',
foreground=light_foreground_color,
background=purple_color,
fontsize=fontsize+6
),
widget.Clock(
foreground=dark_foreground_color,
background=magenta_color,
foreground=light_foreground_color,
background=purple_color,
fontsize=fontsize,
format='%Y-%m-%d'
),
*powerline_arrow('l',magenta_color,base_color,size),
*powerline_arrow('l',purple_color,base_color,size),
widget.Clock(
font='dseg7 classic bold',
fontsize=16,
@@ -194,52 +201,55 @@ def end_widgets(prev_color,size,fontsize):
#region Laptop widgets
def Laptop_widgets(prev_color,last_color,size,fontsize):
return [
*powerline_arrow('l',prev_color,red_color,size),
*powerline_arrow('l',prev_color,orange_color,size),
widget.Battery(
foreground=dark_foreground_color,
background=red_color,
foreground=light_foreground_color,
background=orange_color,
fontsize=fontsize,
update_interval=1,
format="{percent:2.0%}",
format="{char} {percent:2.0%}",
low_percentage=0.2,
notify_below=True,
low_foreground=red_color,
),
*powerline_arrow('l',red_color,green_color,size),
widget.Image(
filename='~/.config/qtile/icons/cpu.png',
margin=5,
*powerline_arrow('l',orange_color,green_color,size),
widget.TextBox(
text='',
foreground=light_foreground_color,
background=green_color,
mouse_callbacks = launch_htop,
),
fontsize=fontsize+6
),
widget.CPU(
foreground=dark_foreground_color,
foreground=light_foreground_color,
background=green_color,
fontsize=fontsize,
format='{load_percent}%',
format='{load_percent}% @ {freq_current}GHz',
mouse_callbacks = launch_htop,
),
*powerline_arrow('l',green_color,orange_color,size),
widget.Image(
filename='~/.config/qtile/icons/ram.png',
background=orange_color,
margin=-10,
mouse_callbacks = launch_htop,
),
*powerline_arrow('l',green_color,yellow_color,size),
widget.TextBox(
text='',
foreground=light_foreground_color,
background=yellow_color,
fontsize=fontsize+6
),
MemoryC(
foreground=dark_foreground_color,
background=orange_color,
foreground=light_foreground_color,
background=yellow_color,
fontsize=fontsize,
format=" {MemUsed}GB | {SwapUsed}GB",
format=" {MemUsed}GB|{SwapUsed}GB",
mouse_callbacks = launch_htop,
),
*powerline_arrow('l',orange_color,last_color,size),
widget.Image(
filename='~/.config/qtile/icons/network.png',
*powerline_arrow('l',yellow_color,last_color,size),
widget.TextBox(
text='',
foreground=light_foreground_color,
background=blue_color,
margin=5,
mouse_callbacks = launch_htop,
),
fontsize=fontsize+6
),
widget.Net(
background=last_color,
foreground=dark_foreground_color,
foreground=light_foreground_color,
fontsize=fontsize,
fmt='{:.9}',
format='{down}',
@@ -247,11 +257,11 @@ def Laptop_widgets(prev_color,last_color,size,fontsize):
),
widget.Net(
background=last_color,
foreground=dark_foreground_color,
foreground=light_foreground_color,
fontsize=fontsize,
fmt='{:.9}',
format='{up}',
mouse_callbacks = launch_htop,
),
]
#endregion
#endregion
+15
View File
@@ -0,0 +1,15 @@
#!/bin/sh
sleep 1&
setxkbmap de&
nitrogen --restore &
bash .screenlayout/layout.sh &
pulseaudio-ctl set 50 &
dunst &
nextcloud &
timeshift &
numlockx &
redshift-gtk -t 6500:3600 &
udiskie -t &
picom -b --experimental-backend &
cbatticon &
nm-applet &