Skip to content

Screen refresh #6

Description

@Emru1

I've created simple program for screen refreshing and ghosts removal (basically swapping white and black, fullscreen).
I've also modified rc.lua to use it via button. Entry in crontab could also be desirable.
Program is available here: https://git.sr.ht/~emru/scref/
Compile with mkdir -p ~/.local/bin/; gcc -lX11 scref.h -o ~/.local/bin/scref.
Needs libx11-dev package on Alpine/PostmarketOS.
Here is rc.lua diff:

diff --git a/rc.lua b/rc.lua
index 3eaec05..60f9479 100644
--- a/rc.lua
+++ b/rc.lua
@@ -81,7 +81,7 @@ warmslider:connect_signal("property::value", function(maybe, new_value)
 end)
 
 wifitoggle = wibox.widget({
-  text = "Toggle",
+  text = "WiFi",
   align = "center",
   widget = wibox.widget.textbox,
 })
@@ -100,6 +100,17 @@ sleepbutton:connect_signal("button::press", function()
   awful.spawn(gears.filesystem.get_configuration_dir() .. "suspend.sh")
 end)
 
+refreshbutton = wibox.widget({
+  text = "Refresh",
+  align = "center",
+  widget = wibox.widget.textbox,
+})
+
+refreshbutton:connect_signal("button::press", function()
+  pop.visible = not pop.visible
+  awful.spawn("scref")
+end)
+
 powerbutton = wibox.widget({
   text = "Poweroff",
   align = "center",
@@ -130,7 +141,6 @@ pop = awful.popup({
         coldslider,
         { text = "Warm", widget = wibox.widget.textbox },
         warmslider,
-        { text = "WiFi", widget = wibox.widget.textbox },
         {
           wifitoggle,
 
@@ -156,6 +166,14 @@ pop = awful.popup({
           shape = gears.shape.rounded_bar,
           widget = wibox.widget.background,
         },
+        {
+          refreshbutton,
+
+          bg = "#ff00ff",
+          clip = true,
+          shape = gears.shape.rounded_bar,
+          widget = wibox.widget.background,
+        },
         forced_num_cols = 2,
         forced_num_rows = 4,
         homogeneous = true,

What do you think?
Is it worth to add it to air?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions