Add initial clipboard widget
This commit is contained in:
parent
9480f7f4bf
commit
47a9be50bd
2 changed files with 37 additions and 18 deletions
|
@ -164,7 +164,7 @@ screens = [
|
||||||
widget.StatusNotifier(
|
widget.StatusNotifier(
|
||||||
decorations=[
|
decorations=[
|
||||||
BorderDecoration(
|
BorderDecoration(
|
||||||
colour = colors[5],
|
colour = colors[1],
|
||||||
border_width = [0, 0, 2, 0],
|
border_width = [0, 0, 2, 0],
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
|
@ -173,10 +173,10 @@ screens = [
|
||||||
widget.Mpris2(
|
widget.Mpris2(
|
||||||
playing_text = "",
|
playing_text = "",
|
||||||
stop_pause_text = "",
|
stop_pause_text = "",
|
||||||
foreground = colors[6],
|
foreground = colors[2],
|
||||||
decorations=[
|
decorations=[
|
||||||
BorderDecoration(
|
BorderDecoration(
|
||||||
colour = colors[6],
|
colour = colors[2],
|
||||||
border_width = [0, 0, 2, 0],
|
border_width = [0, 0, 2, 0],
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
|
@ -189,21 +189,34 @@ screens = [
|
||||||
font = "Noto Sans",
|
font = "Noto Sans",
|
||||||
fontsize = "14",
|
fontsize = "14",
|
||||||
fmt = '⌨ {}',
|
fmt = '⌨ {}',
|
||||||
foreground = colors[7],
|
foreground = colors[3],
|
||||||
decorations=[
|
decorations=[
|
||||||
BorderDecoration(
|
BorderDecoration(
|
||||||
colour = colors[7],
|
colour = colors[3],
|
||||||
border_width = [0, 0, 2, 0],
|
border_width = [0, 0, 2, 0],
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
widget.Spacer(length = 8),
|
widget.Spacer(length = 8),
|
||||||
widget.CPU(
|
# Custom clipboard manager widget, based on Cliphist
|
||||||
format = ' {load_percent:.1f}%',
|
widget.TextBox(
|
||||||
foreground = colors[8],
|
text="",
|
||||||
|
foreground = colors[4],
|
||||||
decorations=[
|
decorations=[
|
||||||
BorderDecoration(
|
BorderDecoration(
|
||||||
colour = colors[8],
|
colour = colors[4],
|
||||||
|
border_width = [0, 0, 2, 0],
|
||||||
|
)
|
||||||
|
],
|
||||||
|
mouse_callbacks={"Button1": lambda: qtile.cmd_spawn("/usr/share/qtile/scripts/clipboard.sh --list")},
|
||||||
|
),
|
||||||
|
widget.Spacer(length = 8),
|
||||||
|
widget.CPU(
|
||||||
|
format = ' {load_percent:.1f}%',
|
||||||
|
foreground = colors[5],
|
||||||
|
decorations=[
|
||||||
|
BorderDecoration(
|
||||||
|
colour = colors[5],
|
||||||
border_width = [0, 0, 2, 0],
|
border_width = [0, 0, 2, 0],
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
|
@ -213,10 +226,10 @@ screens = [
|
||||||
widget.Memory(
|
widget.Memory(
|
||||||
format = " {MemUsed:.1f}/{MemTotal:.1f} GiB",
|
format = " {MemUsed:.1f}/{MemTotal:.1f} GiB",
|
||||||
measure_mem='G',
|
measure_mem='G',
|
||||||
foreground = colors[9],
|
foreground = colors[6],
|
||||||
decorations=[
|
decorations=[
|
||||||
BorderDecoration(
|
BorderDecoration(
|
||||||
colour = colors[9],
|
colour = colors[6],
|
||||||
border_width = [0, 0, 2, 0],
|
border_width = [0, 0, 2, 0],
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
|
@ -226,10 +239,10 @@ screens = [
|
||||||
widget.Net(
|
widget.Net(
|
||||||
prefix="M",
|
prefix="M",
|
||||||
format=' {down:.0f}{down_suffix} ↓↑ {up:.0f}{up_suffix}',
|
format=' {down:.0f}{down_suffix} ↓↑ {up:.0f}{up_suffix}',
|
||||||
foreground = colors[10],
|
foreground = colors[7],
|
||||||
decorations=[
|
decorations=[
|
||||||
BorderDecoration(
|
BorderDecoration(
|
||||||
colour = colors[10],
|
colour = colors[7],
|
||||||
border_width = [0, 0, 2, 0],
|
border_width = [0, 0, 2, 0],
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
|
@ -237,11 +250,11 @@ screens = [
|
||||||
),
|
),
|
||||||
widget.Spacer(length = 8),
|
widget.Spacer(length = 8),
|
||||||
widget.Volume(
|
widget.Volume(
|
||||||
foreground = colors[11],
|
foreground = colors[8],
|
||||||
fmt = '🔉 {}',
|
fmt = '🔉 {}',
|
||||||
decorations=[
|
decorations=[
|
||||||
BorderDecoration(
|
BorderDecoration(
|
||||||
colour = colors[11],
|
colour = colors[8],
|
||||||
border_width = [0, 0, 2, 0],
|
border_width = [0, 0, 2, 0],
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
|
@ -250,10 +263,10 @@ screens = [
|
||||||
widget.Spacer(length = 8),
|
widget.Spacer(length = 8),
|
||||||
widget.Clock(
|
widget.Clock(
|
||||||
format="%d %b %H:%M",
|
format="%d %b %H:%M",
|
||||||
foreground = colors[12],
|
foreground = colors[9],
|
||||||
decorations=[
|
decorations=[
|
||||||
BorderDecoration(
|
BorderDecoration(
|
||||||
colour = colors[12],
|
colour = colors[9],
|
||||||
border_width = [0, 0, 2, 0],
|
border_width = [0, 0, 2, 0],
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
|
@ -265,7 +278,7 @@ screens = [
|
||||||
margin = 6,
|
margin = 6,
|
||||||
decorations=[
|
decorations=[
|
||||||
BorderDecoration(
|
BorderDecoration(
|
||||||
colour = colors[13],
|
colour = colors[10],
|
||||||
border_width = [0, 0, 2, 0],
|
border_width = [0, 0, 2, 0],
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
|
|
6
usr/share/qtile/scripts/clipboard.sh
Executable file
6
usr/share/qtile/scripts/clipboard.sh
Executable file
|
@ -0,0 +1,6 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
case "$1" in
|
||||||
|
--list) cliphist list | rofi -dmenu -p "Select item to copy:" -lines 10 -width 35 | cliphist decode | wl-copy;;
|
||||||
|
--del) cliphist list | rofi -dmenu -p "Select item to delete:" -lines 10 -width 35 | cliphist delete;;
|
||||||
|
esac
|
Loading…
Add table
Reference in a new issue