summaryrefslogtreecommitdiff
path: root/.config
diff options
context:
space:
mode:
authorThanos Apollo <[email protected]>2023-02-10 06:41:33 +0200
committerGitHub <[email protected]>2023-02-10 06:41:33 +0200
commitf68a4b1d3234b1a154d8aa293d2891d4280e559a (patch)
treed227a078b10bac5b9b85b1057589f8182bff2b97 /.config
parent53762337d4e35d320dc7ad543dfdf5cbb0256866 (diff)
parent94909bbe12ada172c63387025bad189f4a851b84 (diff)
Merge pull request #5 from ThanosApollo/org-config
Update literate configuration, adding qtile
Diffstat (limited to '.config')
-rw-r--r--.config/qtile/config.py366
-rw-r--r--.config/qtile/keys.py302
2 files changed, 333 insertions, 335 deletions
diff --git a/.config/qtile/config.py b/.config/qtile/config.py
index 306057f..a128fd5 100644
--- a/.config/qtile/config.py
+++ b/.config/qtile/config.py
@@ -31,25 +31,25 @@ groups = []
group_names = ["1", "2", "3", "4", "5", "6", "7", "8", "9", "0", ]
group_labels = ["Ⅰ", "Ⅱ", "Ⅲ", "Ⅳ", "Ⅴ", "Ⅵ", "Ⅶ", "Ⅷ", "Ⅸ", "Ⅹ", ]
group_layouts = ["monadtall", "monadtall", "monadtall", "monadtall",
- "monadtall", "monadtall", "monadtall", "monadtall",
- "monadtall", "monadtall", ]
+ "monadtall", "monadtall", "monadtall", "monadtall",
+ "monadtall", "monadtall", ]
for i in range(len(group_names)):
groups.append(
- Group(
- name=group_names[i],
- layout=group_layouts[i].lower(),
- label=group_labels[i],
- ))
+ Group(
+ name=group_names[i],
+ layout=group_layouts[i].lower(),
+ label=group_labels[i],
+ ))
def init_layout_theme():
"""Layout default theme."""
return {"margin": 5,
- "border_width": 2,
- "border_focus": dracula["cyan"],
- "border_normal": dracula["bg"],
- }
+ "border_width": 2,
+ "border_focus": dracula["cyan"],
+ "border_normal": dracula["bg"],
+ }
layout_theme = init_layout_theme()
@@ -65,14 +65,14 @@ layouts = [
# layout.Max(**layout_theme),
# layout.Spiral(**layout_theme),
layout.TreeTab(bg_color=dracula["bg"],
- active_bg=dracula["purple"],
- active_fg=dracula["fg"],
- inactive_fg=dracula["fg"],
- inactive_bg=dracula["bg"],
- font="JetBrains Mono",
- fontshadow=None,
- section_fontsize=14,
- panel_width=135,),
+ active_bg=dracula["purple"],
+ active_fg=dracula["fg"],
+ inactive_fg=dracula["fg"],
+ inactive_bg=dracula["bg"],
+ font="JetBrains Mono",
+ fontshadow=None,
+ section_fontsize=14,
+ panel_width=135,),
# layout.Zoomy(**layout_theme),
]
@@ -82,11 +82,11 @@ layouts = [
def init_widgets_defaults():
"""Set widget default settings."""
return dict(font="JetBrains Mono",
- fontsize=12,
- padding=2,
- foreground=dracula["fg"],
- background=dracula["bg"]
- )
+ fontsize=12,
+ padding=2,
+ foreground=dracula["fg"],
+ background=dracula["bg"]
+ )
widget_defaults = init_widgets_defaults()
@@ -95,162 +95,162 @@ widget_defaults = init_widgets_defaults()
def init_widgets_list():
"""My widget list."""
widgets_list = [
- widget.Spacer(
- length=7,
- ),
- widget.Image(
- filename="~/.config/qtile/rms.png",
- scale="True",
- margin=2,
- ),
- widget.Spacer(
- length=7,
- ),
- widget.GroupBox(
- font="FontAwesome",
- fontsize=20,
- padding=3,
- margin=4,
- borderwidth=1,
- active=dracula["cyan"],
- inactive=dracula["curr"],
- rounded=False,
- highlight_method="line",
- this_current_screen_border=dracula["red"],
- other_current_screen_border=dracula["curr"],
- ),
- widget.CurrentLayout(
- font="Noto Sans Bold",
- foreground=dracula["fg"],
- background="#5B4B8A",
- ),
- widget.Spacer(
- length=5
- ),
- widget.WindowName(
- font="JetBrains Mono Bold",
- fontsize=12,
- foreground=dracula["green"],
- background=dracula["bg"],
- ),
- # widget.Image(
- # filename = "~/.config/qtile/spotify2.png",
- # scale = True,
- # ),
- # Spotify(
- # fontsize = 12,
- # background = dracula["bg"],
- # color = dracula["green"],
- # fmt = '{}',
- # font = "JetBrains Mono Bold"
- # ),
- # widget.Moc(
- # font = "JetBrains Mono",
- # fontsize= 13,
- # play_color=dracula["green"],
- # paddig = 10,
- # ),
- widget.Pomodoro(
- color_active=dracula["cyan"],
- color_break=dracula["orange"],
- color_inactive=dracula["curr"],
- lenghth_pomodori=30,
- fontsize=17,
- ),
- widget.Spacer(
- length=10,
- ),
- widget.Image(
- filename="~/.config/qtile/volume1.png",
- scale=True,
- ),
- widget.Spacer(
- length=7,
- padding=10,
- ),
- widget.Volume(
- fontsize=15,
- fmt='{} ',
- background=dracula["bg"],
- foreground=dracula['orange'],
- font="JetBrains Mono",
- margin=10,
- ),
- # widget.Mpris2(
- # fontsize= 16,
- # background = my_colors["red"],
- # objname="org.mpris.MediaPlayer2.spotify"
- # ),
- widget.Spacer(
- length=7,
- padding=10,
- ),
- widget.Image(
- filename="~/.config/qtile/ram2.png",
- scale=True,
- ),
- widget.Memory(
- measure_mem="G",
- fontsize=15,
- foreground=dracula["cyan"],
- background=dracula["bg"],
- font='JetBrains Mono Bold',
- ),
- widget.MemoryGraph(
- type='box',
- graph_color=dracula["cyan"],
- foreground=dracula["fg"],
- background=dracula["bg"],
- ),
- widget.Spacer(
- length=7
- ),
- widget.Image(
- filename="~/.config/qtile/cpu1.png",
- scale=True,
- ),
- widget.ThermalSensor(
- threshold=50,
- fontsize=15,
- font='JetBrains Mono Bold',
- foreground=dracula["cyan"],
- background=dracula["bg"],
- ),
- widget.CPUGraph(
- type='box',
- graph_color=dracula["cyan"],
- background=dracula["bg"],
- ),
- widget.Spacer(
- length=5
- ),
- widget.TextBox(
- font="FontAwesome",
- text="  ",
- foreground=dracula["orange"],
- background=dracula["bg"],
- padding=2,
- fontsize=18
- ),
- widget.Clock(
- font='JetBrains Mono Bold',
- foreground=dracula["cyan"],
- background=dracula["bg"],
- fontsize=18,
- format="%d-%m-%Y | %H:%M"
- ),
- widget.Spacer(
- length=6
- ),
- widget.Systray(
- background=dracula["bg"],
- icon_size=20,
- padding=10,
- margin=10,
- ),
- widget.Spacer(
- length=5
- ),
+ widget.Spacer(
+ length=7,
+ ),
+ widget.Image(
+ filename="~/.config/qtile/rms.png",
+ scale="True",
+ margin=2,
+ ),
+ widget.Spacer(
+ length=7,
+ ),
+ widget.GroupBox(
+ font="FontAwesome",
+ fontsize=20,
+ padding=3,
+ margin=4,
+ borderwidth=1,
+ active=dracula["cyan"],
+ inactive=dracula["curr"],
+ rounded=False,
+ highlight_method="line",
+ this_current_screen_border=dracula["red"],
+ other_current_screen_border=dracula["curr"],
+ ),
+ widget.CurrentLayout(
+ font="Noto Sans Bold",
+ foreground=dracula["fg"],
+ background="#5B4B8A",
+ ),
+ widget.Spacer(
+ length=5
+ ),
+ widget.WindowName(
+ font="JetBrains Mono Bold",
+ fontsize=12,
+ foreground=dracula["green"],
+ background=dracula["bg"],
+ ),
+ # widget.Image(
+ # filename = "~/.config/qtile/spotify2.png",
+ # scale = True,
+ # ),
+ # Spotify(
+ # fontsize = 12,
+ # background = dracula["bg"],
+ # color = dracula["green"],
+ # fmt = '{}',
+ # font = "JetBrains Mono Bold"
+ # ),
+ # widget.Moc(
+ # font = "JetBrains Mono",
+ # fontsize= 13,
+ # play_color=dracula["green"],
+ # paddig = 10,
+ # ),
+ widget.Pomodoro(
+ color_active=dracula["cyan"],
+ color_break=dracula["orange"],
+ color_inactive=dracula["curr"],
+ lenghth_pomodori=30,
+ fontsize=17,
+ ),
+ widget.Spacer(
+ length=10,
+ ),
+ widget.Image(
+ filename="~/.config/qtile/volume1.png",
+ scale=True,
+ ),
+ widget.Spacer(
+ length=7,
+ padding=10,
+ ),
+ widget.Volume(
+ fontsize=15,
+ fmt='{} ',
+ background=dracula["bg"],
+ foreground=dracula['orange'],
+ font="JetBrains Mono",
+ margin=10,
+ ),
+ # widget.Mpris2(
+ # fontsize= 16,
+ # background = my_colors["red"],
+ # objname="org.mpris.MediaPlayer2.spotify"
+ # ),
+ widget.Spacer(
+ length=7,
+ padding=10,
+ ),
+ widget.Image(
+ filename="~/.config/qtile/ram2.png",
+ scale=True,
+ ),
+ widget.Memory(
+ measure_mem="G",
+ fontsize=15,
+ foreground=dracula["cyan"],
+ background=dracula["bg"],
+ font='JetBrains Mono Bold',
+ ),
+ widget.MemoryGraph(
+ type='box',
+ graph_color=dracula["cyan"],
+ foreground=dracula["fg"],
+ background=dracula["bg"],
+ ),
+ widget.Spacer(
+ length=7
+ ),
+ widget.Image(
+ filename="~/.config/qtile/cpu1.png",
+ scale=True,
+ ),
+ widget.ThermalSensor(
+ threshold=50,
+ fontsize=15,
+ font='JetBrains Mono Bold',
+ foreground=dracula["cyan"],
+ background=dracula["bg"],
+ ),
+ widget.CPUGraph(
+ type='box',
+ graph_color=dracula["cyan"],
+ background=dracula["bg"],
+ ),
+ widget.Spacer(
+ length=5
+ ),
+ widget.TextBox(
+ font="FontAwesome",
+ text="  ",
+ foreground=dracula["orange"],
+ background=dracula["bg"],
+ padding=2,
+ fontsize=18
+ ),
+ widget.Clock(
+ font='JetBrains Mono Bold',
+ foreground=dracula["cyan"],
+ background=dracula["bg"],
+ fontsize=18,
+ format="%d-%m-%Y | %H:%M"
+ ),
+ widget.Spacer(
+ length=6
+ ),
+ widget.Systray(
+ background=dracula["bg"],
+ icon_size=20,
+ padding=10,
+ margin=10,
+ ),
+ widget.Spacer(
+ length=5
+ ),
]
return widgets_list
@@ -277,9 +277,9 @@ widgets_screen2 = init_widgets_screen2()
def init_screens():
"""Panel settings."""
return [Screen(top=bar.Bar(widgets=init_widgets_screen1(), size=33,
- margin=11),),
- Screen(top=bar.Bar(widgets=init_widgets_screen2(), size=28,
- margin=7))]
+ margin=11),),
+ Screen(top=bar.Bar(widgets=init_widgets_screen2(), size=28,
+ margin=7))]
screens = init_screens()
diff --git a/.config/qtile/keys.py b/.config/qtile/keys.py
index 85bf7ef..477c164 100644
--- a/.config/qtile/keys.py
+++ b/.config/qtile/keys.py
@@ -1,5 +1,3 @@
-#!/usr/bin/env python3
-
from libqtile.config import Key
from libqtile.command import lazy
from libqtile.config import Click, Drag
@@ -13,159 +11,159 @@ class MyKeys():
"""
def __init__(self):
- """
- Default customization
- """
- self.mod = "mod4"
- self.browser = "firefox"
- self.term = "emacsclient -c"
- self.editor = "emacsclient -c -a 'emacs'"
+ """
+ Default customization
+ """
+ self.mod = "mod4"
+ self.browser = "firefox"
+ self.term = "emacsclient -c"
+ self.editor = "emacsclient -c -a 'emacs'"
def init_keys(self):
- """
- Keyboard keybindings | Emacs-like | Set them and forget them.
+ """
+ Keyboard keybindings | Emacs-like | Set them and forget them.
- I'm used to having the superkey to control my window manager,
- and control for my emacs.
- """
- my_keys = [
- Key([self.mod], "Return",
- lazy.spawn(self.term),
- ),
- Key([self.mod, "shift"], "a",
- lazy.spawn('anki'),
- ),
- Key([self.mod, "shift"], "m",
- lazy.spawn("spotify"),
- ),
- Key([self.mod], "Tab",
- lazy.spawn("rofi -show drun"),
- ),
- Key([self.mod], "r",
- lazy.spawn("rofi -show run"),
- ),
- Key([self.mod], "w",
- lazy.spawn("rofi -show window"),
- ),
- Key([self.mod], "p",
- lazy.spawn("passmenu -p 'Password for: '"),
- ),
- Key([self.mod], "b",
- lazy.spawn(self.browser),
- ),
- Key([self.mod, "shift"], "c",
- lazy.next_layout(),
- ),
- Key([self.mod], "q",
- lazy.window.kill(),
- ),
- Key([self.mod, "shift"], "r",
- lazy.restart(),
- ),
- Key([self.mod, "shift"], "0",
- lazy.shutdown(),
- ),
- Key([self.mod, "shift"], "e",
- lazy.spawn(self.editor),
- ),
- # Switch focus of monitors
- Key([self.mod], "period",
- lazy.next_screen(),
- ),
- # Treetab controls
- Key([self.mod, "shift"], "h",
- lazy.layout.move_left(),
- ),
- Key([self.mod, "shift"], "l",
- lazy.layout.move_right(),
- ),
- # Window controls
- Key([self.mod], "n",
- lazy.layout.down(),
- ),
- Key([self.mod], "p",
- lazy.layout.up(),
- ),
- Key([self.mod, "shift"], "n",
- lazy.layout.shuffle_down(),
- lazy.layout.section_down(),
- ),
- Key([self.mod, "shift"], "p",
- lazy.layout.shuffle_up(),
- lazy.layout.section_up(),
- ),
- Key([self.mod], "s",
- lazy.layout.shrink(),
- lazy.layout.decrease_nmaster(),
- ),
- Key([self.mod], "l",
- lazy.layout.grow(),
- lazy.layout.increase_nmaster(),
- ),
- Key([self.mod], "o",
- lazy.layout.normalize(),
- ),
- Key([self.mod], "m",
- lazy.layout.maximize(),
- ),
- Key([self.mod, "shift"], "f",
- lazy.window.toggle_floating(),
- ),
- Key([self.mod], "f",
- lazy.window.toggle_fullscreen(),
- ),
- # Stack controls
- Key([self.mod, "shift"], "Tab",
- lazy.layout.rotate(),
- lazy.layout.flip(),
- ),
- Key([self.mod, "shift"], "space",
- lazy.layout.toggle_split(),
- ),
- # Volume controls
- Key([], "XF86AudioLowerVolume",
- lazy.spawn('amixer sset Master 5%-'),
- ),
- Key([], "XF86AudioRaiseVolume",
- lazy.spawn('amixer sset Master 5%+'),
- ),
- # I use mod+F[key] to change volume in my thinkpad,
- # as I dislike using "fn" key in laptops
- Key([self.mod], "F11",
- lazy.spawn('amixer sset Master 5%-'),
- ),
- Key([self.mod], "F12",
- lazy.spawn('amixer sset Master 5%+'),
- ),
- # Music controls | MOC
- Key([self.mod], "u",
- lazy.spawn("mocp -G "),
- ),
- Key([self.mod], "o",
- lazy.spawn("mocp -f"),
- ),
- Key([self.mod], "i",
- lazy.spawn("mocp -r"),
- ),
- # Change languages
- Key([self.mod], "F1",
- lazy.spawn("setxkbmap us -option ctrl:swapcaps"),
- ),
- Key([self.mod], "F2",
- lazy.spawn("setxkbmap gr"),
- ),
- ]
+ I'm used to having the superkey to control my window manager,
+ and control for my emacs.
+ """
+ my_keys = [
+ Key([self.mod], "Return",
+ lazy.spawn(self.term),
+ ),
+ Key([self.mod, "shift"], "a",
+ lazy.spawn('anki'),
+ ),
+ Key([self.mod, "shift"], "m",
+ lazy.spawn("spotify"),
+ ),
+ Key([self.mod], "Tab",
+ lazy.spawn("rofi -show drun"),
+ ),
+ Key([self.mod], "r",
+ lazy.spawn("rofi -show run"),
+ ),
+ Key([self.mod], "w",
+ lazy.spawn("rofi -show window"),
+ ),
+ Key([self.mod], "p",
+ lazy.spawn("passmenu -p 'Password for: '"),
+ ),
+ Key([self.mod], "b",
+ lazy.spawn(self.browser),
+ ),
+ Key([self.mod, "shift"], "c",
+ lazy.next_layout(),
+ ),
+ Key([self.mod], "q",
+ lazy.window.kill(),
+ ),
+ Key([self.mod, "shift"], "r",
+ lazy.restart(),
+ ),
+ Key([self.mod, "shift"], "0",
+ lazy.shutdown(),
+ ),
+ Key([self.mod, "shift"], "e",
+ lazy.spawn(self.editor),
+ ),
+ # Switch focus of monitors
+ Key([self.mod], "period",
+ lazy.next_screen(),
+ ),
+ # Treetab controls
+ Key([self.mod, "shift"], "h",
+ lazy.layout.move_left(),
+ ),
+ Key([self.mod, "shift"], "l",
+ lazy.layout.move_right(),
+ ),
+ # Window controls
+ Key([self.mod], "n",
+ lazy.layout.down(),
+ ),
+ Key([self.mod], "p",
+ lazy.layout.up(),
+ ),
+ Key([self.mod, "shift"], "n",
+ lazy.layout.shuffle_down(),
+ lazy.layout.section_down(),
+ ),
+ Key([self.mod, "shift"], "p",
+ lazy.layout.shuffle_up(),
+ lazy.layout.section_up(),
+ ),
+ Key([self.mod], "s",
+ lazy.layout.shrink(),
+ lazy.layout.decrease_nmaster(),
+ ),
+ Key([self.mod], "l",
+ lazy.layout.grow(),
+ lazy.layout.increase_nmaster(),
+ ),
+ Key([self.mod], "o",
+ lazy.layout.normalize(),
+ ),
+ Key([self.mod], "m",
+ lazy.layout.maximize(),
+ ),
+ Key([self.mod, "shift"], "f",
+ lazy.window.toggle_floating(),
+ ),
+ Key([self.mod], "f",
+ lazy.window.toggle_fullscreen(),
+ ),
+ # Stack controls
+ Key([self.mod, "shift"], "Tab",
+ lazy.layout.rotate(),
+ lazy.layout.flip(),
+ ),
+ Key([self.mod, "shift"], "space",
+ lazy.layout.toggle_split(),
+ ),
+ # Volume controls
+ Key([], "XF86AudioLowerVolume",
+ lazy.spawn('amixer sset Master 5%-'),
+ ),
+ Key([], "XF86AudioRaiseVolume",
+ lazy.spawn('amixer sset Master 5%+'),
+ ),
+ # I use mod+F[key] to change volume in my thinkpad,
+ # as I dislike using "fn" key in laptops
+ Key([self.mod], "F11",
+ lazy.spawn('amixer sset Master 5%-'),
+ ),
+ Key([self.mod], "F12",
+ lazy.spawn('amixer sset Master 5%+'),
+ ),
+ # Music controls | MOC
+ Key([self.mod], "u",
+ lazy.spawn("mocp -G "),
+ ),
+ Key([self.mod], "o",
+ lazy.spawn("mocp -f"),
+ ),
+ Key([self.mod], "i",
+ lazy.spawn("mocp -r"),
+ ),
+ # Change languages
+ Key([self.mod], "F1",
+ lazy.spawn("setxkbmap us -option ctrl:swapcaps"),
+ ),
+ Key([self.mod], "F2",
+ lazy.spawn("setxkbmap gr"),
+ ),
+ ]
- return my_keys
+ return my_keys
def init_mouse(self):
- """Mouse keys | cause sometimes we have to use the mouse."""
- mouse_keys = [
- Drag([self.mod], "Button1", lazy.window.set_position_floating(),
- start=lazy.window.get_position()),
- Drag([self.mod], "Button3", lazy.window.set_size_floating(),
- start=lazy.window.get_size()),
- Click([self.mod], "Button2",
- lazy.window.bring_to_front()),
- ]
- return mouse_keys
+ """Mouse keys | cause sometimes we have to use the mouse."""
+ mouse_keys = [
+ Drag([self.mod], "Button1", lazy.window.set_position_floating(),
+ start=lazy.window.get_position()),
+ Drag([self.mod], "Button3", lazy.window.set_size_floating(),
+ start=lazy.window.get_size()),
+ Click([self.mod], "Button2",
+ lazy.window.bring_to_front()),
+ ]
+ return mouse_keys