Dotfiles config update (2022-04-25)

This commit is contained in:
q3aql 2022-04-25 18:21:54 +02:00
parent 233d3e82f7
commit 188a1360fd
13 changed files with 421 additions and 3 deletions

View File

@ -0,0 +1,166 @@
import psutil
from libqtile import widget
from .theme import colors
from libqtile.widget import base
# Get the icons at https://www.nerdfonts.com/cheat-sheet (you need a Nerd Font)
def base(fg='text', bg='dark'):
return {
'foreground': colors[fg],
'background': colors[bg]
}
def separator():
return widget.Sep(**base(), linewidth=0, padding=5)
def icon(fg='text', bg='dark', fontsize=16, text="?"):
return widget.TextBox(
**base(fg, bg),
fontsize=fontsize,
text=text,
padding=3
)
def powerline(fg="light", bg="dark"):
return widget.TextBox(
**base(fg, bg),
text="", # Icon: nf-oct-triangle_left
fontsize=37,
padding=-2.1
)
def workspaces():
return [
separator(),
widget.GroupBox(
**base(fg='light'),
font='UbuntuMono Nerd Font',
fontsize=15,
#font='Liberation Mono',
#fontsize=14,
margin_y=3,
margin_x=0,
padding_y=8,
padding_x=5,
borderwidth=1,
active=colors['active'],
inactive=colors['inactive'],
rounded=False,
highlight_method='block',
urgent_alert_method='block',
urgent_border=colors['urgent'],
this_current_screen_border=colors['focus'],
this_screen_border=colors['grey'],
other_current_screen_border=colors['dark'],
other_screen_border=colors['dark'],
disable_drag=True
),
separator(),
widget.WindowName(**base(fg='focus'), fontsize=14, padding=5),
separator(),
]
primary_widgets = [
*workspaces(),
separator(),
powerline('color5', 'dark'),
icon(bg="color5", text=' '), # Icon: nf-fa-download
widget.CheckUpdates(
background=colors['color5'],
colour_have_updates=colors['text'],
colour_no_updates=colors['text'],
no_update_string='0',
display_format='{updates}',
update_interval=1800,
#custom_command='checkupdates',
custom_command='bash ~/.config/qtile/checkUpdates.sh',
execute='bash ~/.config/qtile/checkUpdates.sh',
),
powerline('color2', 'color5'),
icon(bg="color2", text=' '), # Icon: nf-fae-chipnf-fae-chip
widget.CPU(
background=colors['color2'],
foreground='222222',
update_interval=1.5,
format='{load_percent}% '
),
widget.ThermalSensor(
background=colors['color2'],
foreground='222222',
update_interval=2.0,
tag_sensor="Tctl",
),
powerline('color3', 'color2'),
icon(bg="color3", text=' '), # Icon: nf-mdi-memory
widget.Memory(
background=colors['color3'],
foreground='222222',
measure_mem='G',
format='{MemUsed:.0f}{mm}/{MemTotal:.0f}{mm} ',
update_interval=2.0,
),
powerline('color5', 'color3'),
icon(bg="color5", text=' '), # Icon: nf-fa-volume_up
widget.Volume(
background=colors['color5'],
foreground='222222',
channel='Master',
fmt='{}',
update_interval=0.2,
),
powerline('color2', 'color5'),
widget.CurrentLayoutIcon(**base(bg='color2'), scale=0.65),
widget.CurrentLayout(**base(bg='color2'), padding=5),
powerline('color1', 'color2'),
icon(bg="color1", fontsize=17, text=' '), # Icon: nf-mdi-calendar_clock
widget.Clock(**base(bg='color1'), format='%d/%m/%Y %H:%M '),
powerline('dark', 'color1'),
widget.Systray(background=colors['dark'], padding=5),
]
secondary_widgets = [
*workspaces(),
separator(),
powerline('color2', 'dark'),
widget.CurrentLayoutIcon(**base(bg='color2'), scale=0.65),
widget.CurrentLayout(**base(bg='color2'), padding=5),
powerline('color1', 'color2'),
icon(bg="color1", fontsize=17, text=' '), # Icon: nf-mdi-calendar_clock
widget.Clock(**base(bg='color1'), format='%d/%m/%Y %H:%M '),
powerline('dark', 'color1'),
]
widget_defaults = {
'font': 'UbuntuMono Nerd Font Bold',
'fontsize': 14,
'padding': 1,
}
extension_defaults = widget_defaults.copy()

View File

@ -0,0 +1,132 @@
from libqtile import widget
from .theme import colors
# Get the icons at https://www.nerdfonts.com/cheat-sheet (you need a Nerd Font)
def base(fg='text', bg='dark'):
return {
'foreground': colors[fg],
'background': colors[bg]
}
def separator():
return widget.Sep(**base(), linewidth=0, padding=5)
def icon(fg='text', bg='dark', fontsize=16, text="?"):
return widget.TextBox(
**base(fg, bg),
fontsize=fontsize,
text=text,
padding=3
)
def powerline(fg="light", bg="dark"):
return widget.TextBox(
**base(fg, bg),
text="", # Icon: nf-oct-triangle_left
fontsize=37,
padding=-2.1
)
def workspaces():
return [
separator(),
widget.GroupBox(
**base(fg='light'),
font='UbuntuMono Nerd Font',
fontsize=15,
#font='Liberation Mono',
#fontsize=14,
margin_y=3,
margin_x=0,
padding_y=8,
padding_x=5,
borderwidth=1,
active=colors['active'],
inactive=colors['inactive'],
rounded=False,
highlight_method='block',
urgent_alert_method='block',
urgent_border=colors['urgent'],
this_current_screen_border=colors['focus'],
this_screen_border=colors['grey'],
other_current_screen_border=colors['dark'],
other_screen_border=colors['dark'],
disable_drag=True
),
separator(),
widget.WindowName(**base(fg='focus'), fontsize=14, padding=5),
separator(),
]
primary_widgets = [
*workspaces(),
separator(),
powerline('color5', 'dark'),
icon(bg="color5", text=' '), # Icon: nf-fa-download
widget.CheckUpdates(
background=colors['color5'],
colour_have_updates=colors['text'],
colour_no_updates=colors['text'],
no_update_string='0',
display_format='{updates}',
update_interval=1800,
#custom_command='checkupdates',
custom_command='bash ~/.config/qtile/checkUpdates.sh',
execute='bash ~/.config/qtile/checkUpdates.sh',
),
powerline('color3', 'color5'),
icon(bg="color3", text=' '), # Icon: nf-fa-feed
widget.Net(**base(bg='color3'), interface='wlan0'),
powerline('color2', 'color3'),
widget.CurrentLayoutIcon(**base(bg='color2'), scale=0.65),
widget.CurrentLayout(**base(bg='color2'), padding=5),
powerline('color1', 'color2'),
icon(bg="color1", fontsize=17, text=' '), # Icon: nf-mdi-calendar_clock
widget.Clock(**base(bg='color1'), format='%d/%m/%Y %H:%M '),
powerline('dark', 'color1'),
widget.Systray(background=colors['dark'], padding=5),
]
secondary_widgets = [
*workspaces(),
separator(),
powerline('color2', 'dark'),
widget.CurrentLayoutIcon(**base(bg='color2'), scale=0.65),
widget.CurrentLayout(**base(bg='color2'), padding=5),
powerline('color1', 'color2'),
icon(bg="color1", fontsize=17, text=' '), # Icon: nf-mdi-calendar_clock
widget.Clock(**base(bg='color1'), format='%d/%m/%Y %H:%M '),
powerline('dark', 'color1'),
]
widget_defaults = {
'font': 'UbuntuMono Nerd Font Bold',
'fontsize': 14,
'padding': 1,
}
extension_defaults = widget_defaults.copy()

View File

@ -22,7 +22,7 @@ dotfiles - My tiling Qtile, spectrwm, i3 & sway configurations (for Arch/Devuan/
xfce4-screenshooter xscreensaver alsa-utils pulseaudio-alsa light xorg-xbacklight \
xorg-xrandr sway swaybg swayidle wofi meson waybar wayland-protocols xorg-xwayland \
wf-recorder xdg-desktop-portal-wlr wl-clipboard grim slurp jq wlroots pulseaudio \
alacritty qtile
alacritty qtile python-pip
````
```shell

View File

@ -4,6 +4,7 @@ dotfiles - My tiling i3 + i3blocks configuration (for Arch/Devuan/Debian)
### My configurations:
* [Qtile](README-qtile.md)
* [Qtile (Widget)](README-qtile-widget.md)
* [i3 + polybar](README-i3-polybar.md)
* [i3 + i3status](README-i3.md)
* [i3 + i3blocks](README-i3-i3blocks.md)

View File

@ -4,6 +4,7 @@ dotfiles - My tiling i3 + polybar configuration (for Arch/Devuan/Debian)
### My configurations:
* [Qtile](README-qtile.md)
* [Qtile (Widget)](README-qtile-widget.md)
* [i3 + polybar](README-i3-polybar.md)
* [i3 + i3status](README-i3.md)
* [i3 + i3blocks](README-i3-i3blocks.md)

View File

@ -4,6 +4,7 @@ dotfiles - My tiling i3 + i3status configuration (for Arch/Devuan/Debian)
### My configurations:
* [Qtile](README-qtile.md)
* [Qtile (Widget)](README-qtile-widget.md)
* [i3 + polybar](README-i3-polybar.md)
* [i3 + i3status](README-i3.md)
* [i3 + i3blocks](README-i3-i3blocks.md)

112
README-qtile-widget.md Normal file
View File

@ -0,0 +1,112 @@
dotfiles - My tiling Qtile (Widget Extra) configuration (for Arch/Devuan/Debian)
================================================================================
### My configurations:
* [Qtile](README-qtile.md)
* [Qtile (Widget)](README-qtile-widget.md)
* [i3 + polybar](README-i3-polybar.md)
* [i3 + i3status](README-i3.md)
* [i3 + i3blocks](README-i3-i3blocks.md)
* [sway](README-sway.md)
* [spectrwm](README-spectrwm.md)
* [spectrwm + polybar](README-spectrwm-polybar.md)
![qtile-widget](examples/qtile-widget.png)
### Installation:
* **`Install dependencies:`**
* Read [`How install dependencies on Arch and Devuan/Debian`](Dependencies.md)
* **`Install configuration (dotfiles):`**
* Clone repository and copy files to your home:
```shell
$ git clone https://github.com/q3aql/dotfiles
$ cd dotfiles
$ chmod +x install-config.sh
$ ./install-config.sh
$ sudo pip psutils
$ cd ~/.config/qtile/settings
$ cp -rfv widgets.py.advanced widgets.py
````
### Configuration:
* **`Network Manager (Connman or NetWorkManager):`**
* By default is enabled `NetWorkManager` as network manager:
* If you prefer `Connman`, edit the file `~/.config/qtile/autostart.sh`:
```shell
#connman-gtk --tray &
nm-applet
````
* **`Monitor & resolution:`**
* The configuration load my monitor configuration:
* Use the command `xrandr` for show your config & edit the file `~/.config/qtile/startxrandr.sh`:
```shell
sleep 2
xrandr --output DisplayPort-0 --mode 1920x1200 -r 59.95
xrandr --output DisplayPort-1 --mode 1280x1024 -r 75.02 --rotate left --right-of DisplayPort-0
````
* **`Wallpaper:`**
* By default, the config load wallpaper on `~/wallpapers/archlinux2.jpg`:
* Edit `~/.config/qtile/autostart.sh` for set your favorite wallpaper:
```shell
sleep 3 && nitrogen --head=0 --set-scaled ~/wallpapers/archlinux2.jpg
nitrogen --head=1 --set-zoom-fill ~/wallpapers/archlinux2.jpg
````
* **`Set Screensaver (Optional):`**
* The configuration file set `xautolock` with 20 minutes as screensaver:
* You can change the program between `xautolock` and `xscreensaver` editing the file `~/.config/qtile/startscreensaver.sh`:
```shell
# Basic configuration variables
ScreensaverProgram="xautolock" # Options: xautolock or xscreensaver
ScreensaverTime="20" # 20 minutes (only for xautolock)
````
### Keys configuration:
My list of extra combinations:
- Super + Tab = Next Layout
- Super + Shift + Tab = Previous Layout
- Super + Shift + f = Floating Window
- Super + p = Open Rofi (run mode)
- Super + q = Open Rofi (window mode)
- Super + o = Open Rofi (drun mode)
- Super + b = Open Firefox
- Super + n = Open PCManFM
- Super + t = Open Rofi Theme Selector
- Super + g = Open Geany
- Super + m = Open Telegram
- Super + z = Open Nitrogen
- Super + x = Open LXRandr
- Super + u = Open Xterm
- Super + i = Open LXAppearance
- Super + s = Open Screenshooter
- Volume-Up = Volume +5
- Volume-Down = Volume -5
- VolumeMute = Mute Volume
- Super + Shift + q = Shutdown
### External links:
* [Antonio Sarosi](https://github.com/antoniosarosi/dotfiles/)
* [Derek Taylor](https://gitlab.com/dwt1/dotfiles/)
* [TWB0109](https://github.com/TWB0109/PDots)
* [i3-style](https://github.com/altdesktop/i3-style)
* [addy-dclxvi](https://github.com/addy-dclxvi/i3-starterpack)
* [i3-gaps](https://github.com/Airblader/i3)

View File

@ -4,6 +4,7 @@ dotfiles - My tiling Qtile configuration (for Arch/Devuan/Debian)
### My configurations:
* [Qtile](README-qtile.md)
* [Qtile (Widget)](README-qtile-widget.md)
* [i3 + polybar](README-i3-polybar.md)
* [i3 + i3status](README-i3.md)
* [i3 + i3blocks](README-i3-i3blocks.md)
@ -11,7 +12,7 @@ dotfiles - My tiling Qtile configuration (for Arch/Devuan/Debian)
* [spectrwm](README-spectrwm.md)
* [spectrwm + polybar](README-spectrwm-polybar.md)
![i3-polybar](examples/qtile.png)
![qtile](examples/qtile.png)
### Installation:

View File

@ -4,6 +4,7 @@ dotfiles - My tiling spectrwm + polybar configuration (for Arch/Devuan/Debian)
### My configurations:
* [Qtile](README-qtile.md)
* [Qtile (Widget)](README-qtile-widget.md)
* [i3 + polybar](README-i3-polybar.md)
* [i3 + i3status](README-i3.md)
* [i3 + i3blocks](README-i3-i3blocks.md)

View File

@ -4,6 +4,7 @@ dotfiles - My tiling spectrwm configuration (for Arch/Devuan/Debian)
### My configurations:
* [Qtile](README-qtile.md)
* [Qtile (Widget)](README-qtile-widget.md)
* [i3 + polybar](README-i3-polybar.md)
* [i3 + i3status](README-i3.md)
* [i3 + i3blocks](README-i3-i3blocks.md)

View File

@ -4,6 +4,7 @@ dotfiles - My tiling sway configuration (for Arch/Devuan/Debian)
### My configurations:
* [Qtile](README-qtile.md)
* [Qtile (Widget)](README-qtile-widget.md)
* [i3 + polybar](README-i3-polybar.md)
* [i3 + i3status](README-i3.md)
* [i3 + i3blocks](README-i3-i3blocks.md)

View File

@ -4,6 +4,7 @@ dotfiles - My tiling Qtile, spectrwm, i3 & sway configurations (for Arch/Devuan/
### My configurations:
* [Qtile](README-qtile.md)
* [Qtile (Widget)](README-qtile-widget.md)
* [i3 + polybar](README-i3-polybar.md)
* [i3 + i3status](README-i3.md)
* [i3 + i3blocks](README-i3-i3blocks.md)
@ -11,7 +12,7 @@ dotfiles - My tiling Qtile, spectrwm, i3 & sway configurations (for Arch/Devuan/
* [spectrwm](README-spectrwm.md)
* [spectrwm + polybar](README-spectrwm-polybar.md)
![i3-polybar](examples/qtile.png)
![qtile](examples/qtile.png)
### Installation:

BIN
examples/qtile-widget.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 394 KiB