Merge branch 'master' into laptop

This commit is contained in:
paul-loedige
2021-11-03 18:55:24 +01:00
30 changed files with 1117 additions and 337 deletions
+5 -9
View File
@@ -5,7 +5,7 @@ import re
from libqtile import widget, bar
#region Custom_Memory
class MemoryC(widget.base.ThreadedPollText):
class MemoryC(widget.base.ThreadPoolText):
orientations = widget.base.ORIENTATION_HORIZONTAL
defaults = [
("format", "{MemUsed}GB/{MemTotal}GB", "Formatting for field names."),
@@ -13,13 +13,9 @@ class MemoryC(widget.base.ThreadedPollText):
]
def __init__(self, **config):
super().__init__(**config)
super().__init__("", **config)
self.add_defaults(MemoryC.defaults)
def tick(self):
self.update(self.poll())
return self.update_interval
def poll(self):
mem = psutil.virtual_memory()
swap = psutil.swap_memory()
@@ -108,9 +104,9 @@ class Mic(widget.base._TextBox):
def _update_drawer(self):
if self.emoji:
if self.volume > 0:
self.text = ''
self.text = ''
elif self.volume <= 0:
self.text = ''
self.text = ''
else:
if self.volume == -1:
self.text = 'M'
@@ -147,4 +143,4 @@ class Mic(widget.base._TextBox):
def cmd_mute(self):
# Emulate button press.
self.button_press(0, 0, BUTTON_MUTE)
#endregion
#endregion
+2 -2
View File
@@ -30,8 +30,8 @@ groups.append(
term + ' -e htop',
),
DropDown(
'sound',[[elektronik:Protokolle]]
'pavucontrol'[[elektronik:Protokolle]]
'sound',
'pavucontrol'
),
DropDown(
'filemanager',
-2
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
+1 -1
View File
@@ -12,4 +12,4 @@ redshift-gtk -t 6500:3600 &
udiskie -t &
picom -b --experimental-backend &
cbatticon &
nm-applet &
nm-applet &
+3 -9
View File
@@ -1,5 +1,6 @@
import os
import sys
import subprocess
from libqtile import layout, bar, widget, hook
from libqtile.config import Key, Drag, Click, Group, Screen, ScratchPad, DropDown
@@ -17,15 +18,8 @@ from Screens import screens
#region Hooks
@hook.subscribe.startup_once
def autostart():
processes = [
['nitrogen','--restore'],
['dunst'],
['nextcloud'],
['redshift-gtk'],
['udiskie']
]
for process in processes:
subprocess.Popen(process)
home = os.path.expanduser('~/.config/qtile/autostart.sh')
subprocess.call([home])
#region miscelanious
dgroups_key_binder = None
+21 -19
View File
@@ -1,34 +1,36 @@
term = 'termite'
focus_color = '#bd93f9'
term = 'alacritty'
focus_color = '#076678'
border_width = 2
window_margin = 5
mod = 'mod4'
hotkey_file='/home/paul/Hotkeys'
main_screen_res = [3840,1440]
top_screen_res = [1440,780]
main_screen_res = [3440,1440]
top_screen_res = [1440,900]
#region colors
light_foreground_color = ['#f8f8f2','#f8f8f2']
dark_foreground_color = ['#282a36','#282a36']
background_color0 = ['#000000','#000000']
background_color8 = ['#4d4d4d','#4d4d4d']
base_color = ['#101010','#101010']
light_foreground_color = ['#fbf1c7','#fbf1c7']
dark_foreground_color = ['#282828','#282828']
background_color0 = ['#1d2021','#1d2021']
background_color8 = ['#7c6f64','#7c6f64']
base_color = background_color0
# red
red_color = ['#df253f','#df253f']
light_red_color = ['#ff5555','#ff5555']
red_color = ['#cc241d','#cc241d']
light_red_color = ['#fb4934','#fb4934']
# green
green_color = ['#53a93f','#53a93f']
light_green_color = ['#50fa7b','#50fa7b']
green_color = ['#98971a','#98971a']
light_green_color = ['#b8bb26','#b8bb26']
#orange
orange_color = ['#f57900','#f57900']
orange_color = ['#d65d0e','#d65d0e']
# yellow
yellow_color = ['#f1fa8c','#f1fa8c']
yellow_color = ['#d79921','#d79921']
light_yellow_color = ['#fabd2f','#fabd2f']
#blue
blue_color = ['#7197e7','#7197e7']
blue_color = ['#076678','#076678']
# purple
purple_color = ['#bd93f9','#bd93f9']
light_purple_color = ['#caa9fa','#caa9fa']
purple_color = ['#b16286','#b16286']
light_purple_color = ['#d3869b','#d3869b']
# magenta
magenta_color = ['#ff79c6','#ff79c6']
# cyan
cyan_color = ['#8be9fd','#8be9fd']
#endregion
#endregion
+2
View File
@@ -0,0 +1,2 @@
#!/bin/bash
scrot -s '/tmp/screenshots/%F_%T_$wx$h.png' -e 'echo $f | xclip -selection clipboard -target text/uri-list -i'
+3 -26
View File
@@ -1,29 +1,6 @@
# This is a test file for anything.
screens = []
main_screen_res = [3840,1440]
top_screen_res = [1440,780]
import os
import subprocess
import re
import numpy as np
cmd = ['xrandr']
p = subprocess.Popen(cmd, stdout=subprocess.PIPE)
resolution_string, junk = p.communicate()
p.stdout.close()
screen_resolutions = [np.array(screen_res.split('x')).astype(np.int) for screen_res in re.findall('[0-9]+x[0-9]+(?=[^\\\\n]*\*)',str(resolution_string))]
number_of_screens = len(screen_resolutions)
max_width = max(screen_resolutions, key=lambda res: res[0])[0]
defined_main_window = False
for width, height in screen_resolutions:
if width == main_screen_res[0] and height == main_screen_res[1]:
screens+=['main_screen']
defined_main_window = True
elif width == top_screen_res[0] and height == top_screen_res[1]:
screens+=['top_screen']
elif width == max_width and not defined_main_window:
screens+=['laptop_screen']
defined_main_window = True
else:
screens+=['peripheral_screen']
print(screens)
home = os.path.expanduser('~/.config/qtile/autostart.sh')
subprocess.call([home])