added script for automatically creating wallpapers
This commit is contained in:
@@ -2,6 +2,7 @@ import re
|
||||
import os
|
||||
import subprocess
|
||||
import psutil
|
||||
from PIL import Image, ImageDraw, ImageFont
|
||||
|
||||
from libqtile import layout, bar, widget
|
||||
from libqtile.config import Key, Drag, Click, Group, Screen
|
||||
@@ -105,26 +106,26 @@ mouse = [
|
||||
#endregion
|
||||
|
||||
#region Groups
|
||||
group_names = [("", 'h',{'layout': 'monadtall'}),
|
||||
("", 'c',{'layout': 'monadtall'}),
|
||||
("", 'f',{'layout': 'monadtall'}),
|
||||
("", 'm',{'layout': 'monadtall'}),
|
||||
("", 's',{'layout': 'monadtall'}),
|
||||
("", 'w',{'layout': 'monadtall'}),
|
||||
("", 'v',{'layout': 'monadtall'}),
|
||||
("", 'l',{'layout': 'monadtall'}),
|
||||
("", 'd',{'layout': 'monadtall'}),
|
||||
("", 'o',{'layout': 'monadtall'}),
|
||||
("", 'g',{'layout': 'monadtall'})]
|
||||
group_names = [("","Home", 'h',{'layout': 'monadtall'}),
|
||||
("","Coding", 'c',{'layout': 'monadtall'}),
|
||||
("","Browser", 'f',{'layout': 'monadtall'}),
|
||||
("","Mail", 'm',{'layout': 'monadtall'}),
|
||||
("","Music", 's',{'layout': 'monadtall'}),
|
||||
("","Chat", 'w',{'layout': 'monadtall'}),
|
||||
("","Video", 'v',{'layout': 'monadtall'}),
|
||||
("","Documents", 'l',{'layout': 'monadtall'}),
|
||||
("","Discord", 'd',{'layout': 'monadtall'}),
|
||||
("","VM's", 'o',{'layout': 'monadtall'}),
|
||||
("","Gaming", 'g',{'layout': 'monadtall'})]
|
||||
|
||||
groups = [Group(name, **kwargs) for name, key, kwargs in group_names]
|
||||
groups = [Group(icon, **kwargs) for icon, name, key, kwargs in group_names]
|
||||
|
||||
for (name,key, kwargs) in group_names:
|
||||
for (icon,name,key, kwargs) in group_names:
|
||||
keys.extend([
|
||||
Key(["mod1","control"], str(key), lazy.group[name].toscreen(),
|
||||
Key(["mod1","control"], str(key), lazy.group[icon].toscreen(),
|
||||
desc="Switch to group {}".format(name)),
|
||||
|
||||
Key(['mod1','control', "shift"], str(key), lazy.window.togroup(name),
|
||||
Key(['mod1','control', "shift"], str(key), lazy.window.togroup(icon),
|
||||
desc="move focused window to group {}".format(name)),
|
||||
])
|
||||
#endregion
|
||||
@@ -584,7 +585,9 @@ cursor_warp = False
|
||||
auto_fullscreen = True
|
||||
focus_on_window_activation = "smart"
|
||||
|
||||
#export keys into textfile
|
||||
#region Hotkey_Wallpaper
|
||||
|
||||
#create hotkey textfile
|
||||
if os.path.isfile(hotkey_file):
|
||||
os.remove(hotkey_file)
|
||||
with open(hotkey_file,'w') as file:
|
||||
@@ -595,8 +598,9 @@ with open(hotkey_file,'w') as file:
|
||||
modifiers += '{:^7}'.format(
|
||||
str(modifier).replace("mod1","Alt").replace("mod4","Super").replace("shift","Shift").replace("control","Ctrl")
|
||||
) + "+"
|
||||
file.write('{:30}'.format(modifiers+' '+str(key.key).upper())+"=>\t"+key.desc)
|
||||
file.write('\n')
|
||||
file.write('{:30}'.format(modifiers+' '+str(key.key).upper())+"=> "+key.desc)
|
||||
file.write('\n\n')
|
||||
#endregion
|
||||
|
||||
# XXX: Gasp! We're lying here. In fact, nobody really uses or cares about this
|
||||
# string besides java UI toolkits; you can see several discussions on the
|
||||
|
||||
Reference in New Issue
Block a user