changed qtile config to fit laptop
This commit is contained in:
@@ -4,12 +4,13 @@ import subprocess
|
|||||||
import psutil
|
import psutil
|
||||||
from PIL import Image, ImageDraw, ImageFont
|
from PIL import Image, ImageDraw, ImageFont
|
||||||
|
|
||||||
from libqtile import layout, bar, widget
|
from libqtile import layout, bar, widget, hook
|
||||||
from libqtile.config import Key, Drag, Click, Group, Screen, ScratchPad, DropDown
|
from libqtile.config import Key, Drag, Click, Group, Screen, ScratchPad, DropDown
|
||||||
from libqtile.command import lazy
|
from libqtile.command import lazy
|
||||||
|
|
||||||
|
|
||||||
#region defines
|
#region defines
|
||||||
|
|
||||||
term = 'termite'
|
term = 'termite'
|
||||||
focus_color = '#bd93f9'
|
focus_color = '#bd93f9'
|
||||||
border_width = 2
|
border_width = 2
|
||||||
@@ -44,6 +45,19 @@ cyan_color = ['#8be9fd','#8be9fd']
|
|||||||
#endregion
|
#endregion
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
#region Hooks
|
||||||
|
@hook.subscribe.startup_once
|
||||||
|
def autostart():
|
||||||
|
processes = [
|
||||||
|
['nitrogen','--restore'],
|
||||||
|
['dunst'],
|
||||||
|
['nextcloud'],
|
||||||
|
['redshift-gtk'],
|
||||||
|
['udiskie']
|
||||||
|
]
|
||||||
|
for process in processes:
|
||||||
|
subprocess.Popen(process)
|
||||||
|
|
||||||
#region Keys
|
#region Keys
|
||||||
keys = [
|
keys = [
|
||||||
#moving focus aroung
|
#moving focus aroung
|
||||||
@@ -51,10 +65,10 @@ keys = [
|
|||||||
Key([mod], "l", lazy.layout.right(),desc="move focus right"),
|
Key([mod], "l", lazy.layout.right(),desc="move focus right"),
|
||||||
Key([mod], "j", lazy.layout.down(),desc="move focus down"),
|
Key([mod], "j", lazy.layout.down(),desc="move focus down"),
|
||||||
Key([mod], "k", lazy.layout.up(),desc="move focus up"),
|
Key([mod], "k", lazy.layout.up(),desc="move focus up"),
|
||||||
Key([mod,"mod1"], "k", lazy.to_screen(0),desc="move focus to top screen"),
|
# Key([mod,"mod1"], "k", lazy.to_screen(0),desc="move focus to top screen"),
|
||||||
Key([mod,"mod1"], "j", lazy.to_screen(1),desc="move focus to main screen"),
|
# Key([mod,"mod1"], "j", lazy.to_screen(1),desc="move focus to main screen"),
|
||||||
Key([mod,"mod1"], "l", lazy.to_screen(1),desc="move focus to main screen"),
|
Key([mod,"mod1"], "l", lazy.to_screen(1),desc="move focus to main screen"),
|
||||||
Key([mod,"mod1"], "h", lazy.to_screen(2),desc="move focus to left screen"),
|
Key([mod,"mod1"], "h", lazy.to_screen(0),desc="move focus to left screen"),
|
||||||
|
|
||||||
# moving windows around
|
# moving windows around
|
||||||
Key([mod, "shift"], "h", lazy.layout.swap_left(),desc="move focused window left"),
|
Key([mod, "shift"], "h", lazy.layout.swap_left(),desc="move focused window left"),
|
||||||
@@ -74,7 +88,8 @@ keys = [
|
|||||||
Key([mod],"f", lazy.spawn("firefox"),desc="Launch firefox"),
|
Key([mod],"f", lazy.spawn("firefox"),desc="Launch firefox"),
|
||||||
Key([mod],"e", lazy.spawn("pcmanfm"),desc="Launch pcmanfm"),
|
Key([mod],"e", lazy.spawn("pcmanfm"),desc="Launch pcmanfm"),
|
||||||
Key([mod],"c", lazy.spawn("code"),desc="Launch visual studio code"),
|
Key([mod],"c", lazy.spawn("code"),desc="Launch visual studio code"),
|
||||||
Key([mod, "shift"],"s", lazy.spawn('gscreenshot -s -o -f /tmp/screenshots'),desc="take a screenshot"),
|
#Key([mod, "shift"],"s", lazy.spawn('gscreenshot -s -o -f /tmp/screenshots'),desc="take a screenshot"),
|
||||||
|
Key([mod, "shift"],"s", lazy.spawn("scrot '/tmp/%F_%T_$wx$h.png' -e 'xclip -selection clipboard -target image/png -i $f'"),desc="take a screenshot"),
|
||||||
|
|
||||||
# Toggle between different layouts as defined below
|
# Toggle between different layouts as defined below
|
||||||
Key([mod], "Tab", lazy.next_layout(), desc="Toggle between layouts"),
|
Key([mod], "Tab", lazy.next_layout(), desc="Toggle between layouts"),
|
||||||
@@ -400,6 +415,7 @@ def vloume_widget(prev_color,color,size,fontsize):
|
|||||||
widget.Volume(
|
widget.Volume(
|
||||||
foreground=dark_foreground_color,
|
foreground=dark_foreground_color,
|
||||||
background=color,
|
background=color,
|
||||||
|
font='Noto Sans',
|
||||||
emoji=True,
|
emoji=True,
|
||||||
fontsize=fontsize,
|
fontsize=fontsize,
|
||||||
),
|
),
|
||||||
@@ -430,7 +446,15 @@ launch_htop= {'Button1': lambda qtile: qtile.cmd_spawn(term + ' -e htop')}
|
|||||||
|
|
||||||
def System_widgets(prev_color,last_color,size,fontsize):
|
def System_widgets(prev_color,last_color,size,fontsize):
|
||||||
return [
|
return [
|
||||||
*powerline_arrow('l',prev_color,green_color,size),
|
*powerline_arrow('l',prev_color,red_color,size),
|
||||||
|
widget.Battery(
|
||||||
|
foreground=dark_foreground_color,
|
||||||
|
background=red_color,
|
||||||
|
fontsize=fontsize,
|
||||||
|
update_interval=1,
|
||||||
|
format="{percent:2.0%}",
|
||||||
|
),
|
||||||
|
*powerline_arrow('l',red_color,green_color,size),
|
||||||
widget.Image(
|
widget.Image(
|
||||||
filename='~/.config/qtile/icons/cpu.png',
|
filename='~/.config/qtile/icons/cpu.png',
|
||||||
margin=5,
|
margin=5,
|
||||||
|
|||||||
Reference in New Issue
Block a user