Merge remote-tracking branch 'origin/laptop'

This commit is contained in:
paul-loedige
2022-01-12 21:50:30 +01:00
24 changed files with 389 additions and 3015 deletions
+1
View File
@@ -1,6 +1,7 @@
import subprocess
import psutil
import re
import os
from libqtile import widget, bar
+44 -17
View File
@@ -1,4 +1,5 @@
from libqtile.config import Group, ScratchPad, DropDown, Key
from typing import Match
from libqtile.config import Group, ScratchPad, DropDown, Key, Match
from libqtile.command import lazy
from defines import term
@@ -6,16 +7,17 @@ from Keys import keys
group_names = [("","Home", 'h',{'layout': 'monadtall'}),
("","Browser", 'f',{'layout': 'monadtall'}),
("","Mail", 'm',{'layout': 'monadtall'}),
("","Coding", 'c',{'layout': 'monadtall'}),
("","Mail", 'm',{'layout': 'monadtall', 'matches':[Match(wm_class="Mail")]}),
("","Coding", 'c',{'layout': 'monadtall', 'matches' : [Match(wm_class="code")]}),
("","Documents", 'l',{'layout': 'monadtall'}),
("","Tor Browser", 't',{'layout': 'monadtall'}),
("","Music", 's',{'layout': 'monadtall'}),
("","Video", 'v',{'layout': 'monadtall'}),
("","Discord", 'd',{'layout': 'monadtall'}),
("1","etc1", '1', {'layout': 'monadtall'}),
("2","etc2", '2', {'layout': 'monadtall'}),
("3","etc3", '3', {'layout': 'monadtall'})]
("","Music", 'u',{'layout': 'monadtall', 'matches' : [Match(wm_class="spotify")]}),
("","Video", 'v',{'layout': 'monadtall', 'matches' : [Match(wm_class="vlc")]}),
("","Discord", 'd',{'layout': 'monadtall', 'matches':[Match(wm_class="discord")]}),
("","ClickUp", 'k',{'layout': 'monadtall', 'matches' : [Match(wm_class="clickup")]}),
("","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]
@@ -42,13 +44,14 @@ groups.append(
'bitwarden',
'bitwarden-desktop',
on_focus_lost_hide=False,
match = Match(wm_class='bitwarden')
),
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
),
@@ -56,10 +59,11 @@ groups.append(
'Signal',
'signal-desktop',
height = 0.5,
width = 0.5,
x = .25,
width = 0.8,
x = .1,
on_focus_lost_hide=False,
opacity = 1
opacity = 1,
match = Match(wm_class='signal')
),
DropDown(
'Qalculate!',
@@ -70,12 +74,31 @@ groups.append(
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
),
DropDown(
'Telegram',
'telegram-desktop',
height = 0.5,
width = 0.8,
x = 0.1,
on_focus_lost_hide=False,
opacity=1,
match = Match(wm_class='telegram-desktop')
)
])
)
for (icon,name,key, kwargs) in group_names:
keys.extend([
Key(["mod1","control"], str(key), lazy.group[icon].toscreen(),
Key(["mod1","control"], str(key), lazy.group[icon].toscreen(toggle=True),
desc="Switch to group {}".format(name)),
Key(['mod1','control', "shift"], str(key), lazy.window.togroup(icon),
@@ -97,6 +120,10 @@ keys.extend([
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'],'t',lazy.group['scratchpad'].dropdown_toggle('Telegram'),
desc="open the dropdown for Telegram"),
Key(['mod1','control'],'q',lazy.group['scratchpad'].dropdown_toggle('Qalculate!'),
desc="open the dropdown for Qalculate!"),
])
+9 -4
View File
@@ -5,6 +5,7 @@ from defines import mod, term
keys = [
#screen lock
Key([mod], "End" , lazy.spawn('dm-tool lock'),desc="locks session"),
Key([], "Pause" , lazy.spawn('dm-tool lock'),desc="locks session"),
#moving focus aroung
@@ -54,17 +55,21 @@ keys = [
Key([mod],'p',lazy.spawn("bwmenu --auto-lock -1"),desc="launch bwmenu"),
# audio hotkeys
Key([], 'XF86AudioRaiseVolume', lazy.spawn('pulseaudio-ctl up 1'), desc="increase speaker volume"),
Key([], 'XF86AudioLowerVolume', lazy.spawn('pulseaudio-ctl down 1'), desc="decrease speaker volume"),
Key([], 'XF86AudioRaiseVolume', lazy.spawn('pulseaudio-ctl up 5'), desc="increase speaker volume"),
Key([], 'XF86AudioLowerVolume', lazy.spawn('pulseaudio-ctl down 5'), desc="decrease speaker volume"),
Key([], 'XF86AudioMute', lazy.spawn('pulseaudio-ctl mute'), desc="toggle speaker mute"),
Key(['control'], 'XF86AudioRaiseVolume', lazy.spawn('amixer set Capture 1%+'), desc="increase mic volume"),
Key(['control'], 'XF86AudioLowerVolume', lazy.spawn('amixer set Capture 1%-'), desc="decrease mic volume"),
Key(['control'], 'XF86AudioRaiseVolume', lazy.spawn('amixer set Capture 5%+'), desc="increase mic volume"),
Key(['control'], 'XF86AudioLowerVolume', lazy.spawn('amixer set Capture 5%-'), desc="decrease mic volume"),
Key(['control'], 'XF86AudioMute', lazy.spawn('amixer set Capture toggle'), desc="toggle mic mute"),
Key([], 'XF86AudioMicMute', lazy.spawn('amixer set Capture toggle'), desc="toggle mic mute"),
# Media hotkeys
Key([], 'XF86AudioNext', lazy.spawn('playerctl next')),
Key([], 'XF86AudioPrev', lazy.spawn('playerctl previous')),
Key([], 'XF86AudioPlay', lazy.spawn('playerctl play-pause')),
Key([mod], 'Right', lazy.spawn('playerctl next')),
Key([mod], 'Left', lazy.spawn('playerctl previous')),
Key([mod], 'Down', lazy.spawn('playerctl play-pause')),
# backlight keys
Key([], 'XF86MonBrightnessUp', lazy.spawn('xbacklight -inc 5')),
+1
View File
@@ -45,4 +45,5 @@ floating_layout = layout.Floating(
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'),
])
+2 -4
View File
@@ -60,9 +60,7 @@ 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
@@ -207,7 +205,7 @@ def Laptop_widgets(prev_color,last_color,size,fontsize):
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,
@@ -237,7 +235,7 @@ def Laptop_widgets(prev_color,last_color,size,fontsize):
foreground=light_foreground_color,
background=yellow_color,
fontsize=fontsize,
format=" {MemUsed}GB({MemPercent}%) | {SwapUsed}GB({SwapPercent}%)",
format=" {MemUsed}GB|{SwapUsed}GB",
mouse_callbacks = launch_htop,
),
*powerline_arrow('l',yellow_color,last_color,size),
+5
View File
@@ -11,3 +11,8 @@ numlockx &
redshift-gtk -t 6500:3600 &
udiskie -t &
picom -b --experimental-backend &
cbatticon &
nm-applet &
blueman-applet &
thunderbird &
clickup &
+1 -2
View File
@@ -2,5 +2,4 @@
import os
import subprocess
home = os.path.expanduser('~/.config/qtile/autostart.sh')
subprocess.call([home])
subprocess.call([os.path.expanduser('~/.config/qtile/mic_led.sh'), "0"])