From a6f778b2a8bbeaf8b302f90af92eb3b59077e360 Mon Sep 17 00:00:00 2001 From: ggodot Date: Tue, 24 Dec 2024 21:04:57 +0100 Subject: [PATCH] contains a bug --- REDME.md | 3 ++ bar.py | 71 ++++++++++++++++++++++++++++++------------------ dependencies.txt | 5 ++-- keys.py | 3 +- 4 files changed, 52 insertions(+), 30 deletions(-) diff --git a/REDME.md b/REDME.md index 765cdac..035ef83 100644 --- a/REDME.md +++ b/REDME.md @@ -2,5 +2,8 @@ - [ ] more widgets - [ ] popup - [ ] notifications +- [ ] borders and separation of colors # Bugs +- [ ] Deflout not working +- [ ] add jq as dependencies diff --git a/bar.py b/bar.py index f5f766a..239729f 100644 --- a/bar.py +++ b/bar.py @@ -22,8 +22,6 @@ colors = [["#293136", "#293136"], #bg_dim [0] ["#434F55", "#434F55"], #bg_2 [3] ["#4D5960", "#4D5960"], #bg_3 [4] ["#555F66", "#555F66"], #bg_4 [5] - ["#7FBBB3", "#7FBBB3"], #blue [6] - ["#A7C080", "#A7C080"], #green [7] ["#DBBC7F", "#DBBC7F"], #yellow [8] ["#E69875", "#E69875"], #orange [9] ['#ED8082', '#ED8080'], #red [10] @@ -54,15 +52,15 @@ rounded_right = { # Funciton widgets icon = widget.TextBox( - text='  ', - font="JetBrainsMono Nerd Font", - mouse_callbacks={"Button1":lazy.spawn("rofi -show drun -show-icons")}, - fontsize=20, - margin=4, - padding=3, - **rounded_left, - background= colors[0], - ) + text='  ', + font="JetBrainsMono Nerd Font", + mouse_callbacks={"Button1":lazy.spawn("rofi -show drun -show-icons")}, + fontsize=20, + margin=4, + padding=3, + **rounded_left, + background= colors[0], +) group_box = widget.GroupBox( @@ -73,12 +71,12 @@ group_box = widget.GroupBox( other_current_screen_border = colors[6], other_screen_border = colors[6], **rounded_left, - ) +) spacer = widget.Spacer( **rounded_right, background = colors[11], #transparent - ) +) kb_layout = widget.KeyboardLayout( configured_keyboards=['us', 'cz qwerty'], @@ -89,6 +87,21 @@ kb_layout = widget.KeyboardLayout( **rounded_right, ) +#wifi = widget.Wlan( + #interface = "ath9k", + #font="JetBrainsMono Nerd Font", + #background=colors[10], + #**rounded_right, +#) + +#vpn = widget.GenPollCommand( + #update_interval = 3600, + #background = colors[2], + #shell = True, + #cmd = "tailscale status --peers --json | jq '.ExitNodeStatus.ID as $node_id | .Peer[] | select(.ID==$node_id) | .HostName'", + #**rounded_right, +#) + ram = widget.Memory( font="JetBrainsMono Nerd Font", format = " {MemFree:.0f} 󰓡 {SwapFree:.0f}", @@ -129,13 +142,15 @@ screens = [ bottom=bar.Gap(5), top=bar.Bar([ - icon, - group_box, - spacer, - kb_layout, - ram, - battery, - clock, + #icon, + #group_box, + #spacer, + #kb_layout, + #wifi, + #vpn, + #ram, + #battery, + #clock, ], 30, margin=6, ), @@ -150,13 +165,15 @@ screens = [ bottom=bar.Gap(5), top=bar.Bar([ - icon, - group_box, - spacer, - kb_layout, - ram, - battery, - clock, + #icon, + #group_box, + #spacer, + #kb_layout, + #wifi, + #vpn, + #ram, + #battery, + #clock, ], 30, margin=6, ), diff --git a/dependencies.txt b/dependencies.txt index fcdae44..94a1f50 100644 --- a/dependencies.txt +++ b/dependencies.txt @@ -1,2 +1,3 @@ -python-psutil for qtile-extras - +python-psutil for qtile memory widget +jq for ExitNode script +python-iwlib for qtile wifi widget diff --git a/keys.py b/keys.py index 7824356..7dddcba 100644 --- a/keys.py +++ b/keys.py @@ -61,8 +61,9 @@ keys = [ Key([mod], "z", lazy.widget["keyboardlayout"].next_keyboard(), desc="Next keyboard layout"), # Toggle between different layouts as defined below - Key([mod], "space", lazy.spawn("swaylock -C /home/godot/.config/swaylock/swaylock.conf"), desc="Launch firefox"), Key([mod], "Tab", lazy.next_layout(), desc="Toggle between layouts"), + Key([mod], "f", lazy.window.toggle_floating(), desc="Toggle flotingness"), + Key([mod], "q", lazy.window.kill(), desc="Kill focused window"), Key([mod, "control"], "r", lazy.reload_config(), desc="Reload the config"), Key([mod, "control"], "q", lazy.shutdown(), desc="Shutdown Qtile"),