You are not logged in.

#301 2011-05-08 17:24:04

keenerd
Package Maintainer (PM)
Registered: 2007-02-22
Posts: 647
Website

Re: Scrotwm / Spectrwm

I see.  ScrotWM only checks for the config file in /etc and $HOME.  So you were using no config file, which falls back to the default value of modkey=Mod1.  So Alt was your modkey.  (Mod4 default is an Arch patch.)

I've never seen blinking in the mouse or borders.  I have seen blinking in the status bar under extreme system load.  Could you describe the symptoms in more depth?

Offline

#302 2011-05-10 17:30:56

teh
Member
From: Tijuana, Mexico
Registered: 2009-07-07
Posts: 374
Website

Re: Scrotwm / Spectrwm

It was a tiny (maybe "decisecond") random but constant (3-5 seconds of blinking in a different intensity level, disappear, then another 3-5 seconds) blink that suddenly appeared in GUI apps, it fade in the 1st X restart.
But then, I realize that when master resize (shrink|grow) is required (with MOD+h|l) and the mouse cursor are located between 2 windows borders, the blinking started, and it stops when I change the layout or I change of "workspace". Only mouse cursor and window borders are affected, maybe an X issue that I can deal with.
I'll make a gif of this.

A real annoying thing that happens to me it's the mouse cursor and the all-time window focus, even if I hide the mouse cursor with unclutter.
If mouse cursor is located over "foo" window, I'm not able to switch to "bar" window with MOD+j|k after ~5 seconds of activity.
How exactly works the "focus_mode" option? Because none of the values (default, follow_cursor, synergy) seems to make a difference.

keenard, thank you so much for replying.

Last edited by teh (2011-05-10 17:32:14)


arst

Offline

#303 2011-05-10 19:50:40

hellomynameisphil
Member
From: /home/phil/Vancouver
Registered: 2009-10-02
Posts: 257
Website

Re: Scrotwm / Spectrwm

@teh: Do you use unclutter? I have had a similar issue with unclutter and many tiling window managers, including dwm and xmonad. Perhaps the '-noevents' flag would help.

Offline

#304 2011-05-11 05:27:22

teh
Member
From: Tijuana, Mexico
Registered: 2009-07-07
Posts: 374
Website

Re: Scrotwm / Spectrwm

hellomynameisphil wrote:

@teh: Do you use unclutter? I have had a similar issue with unclutter and many tiling window managers, including dwm and xmonad. Perhaps the '-noevents' flag would help.

Thank you, Sir. Fixed smile

That problem never happened with dwm, wmfs and wmii.


arst

Offline

#305 2011-05-23 20:30:47

sinecure
Member
Registered: 2007-09-22
Posts: 21
Website

Re: Scrotwm / Spectrwm

I was playing with /usr/share/scrotwm/baraction.sh and got a bit carried away.  Figured I'd share and hope someone finds it useful.

Testing would be helpful as I'm running it in a VM so the battery is never charging or discharging.  Hard to test cases when you don't have valid input for those cases.

Primary changes are (trying to) minimize the number of separate calls to programs (thus moving calculations into the inline awk programs) and re-flowing the code to make it more understandable to me.  Oh, also I made sure no lines go beyond 80 or so... comments are welcome, enjoy!

#!/bin/bash
# baraction.sh for scrotwm status bar
# From http://wiki.archlinux.org/index.php/Scrotwm
#
# Heavily modified by David J. Weller-Fahy.
# Modifications released into the public domain.

sleep_sec=5
#loops forever outputting a line every sleep_sec secs
while :
do
    # Grab information about the battery state, such as...
    #  Is it charged/charging/discharged?
    #  If so, at what rate?  What is its capacity?
    #  How much time left until it is empty/full?
    #
    batstate=/proc/acpi/battery/BAT0/state
    batinfo=/proc/acpi/battery/BAT0/info
    if test -f $batstate -a -f $batinfo
    then
        power=$(cat $batstate $batinfo | awk '
/charging state/ { b_state = $3; }
/present rate/ { b_rate = $3; }
/remaining capacity/ { b_left = $3; }
/present:/ { b_present = $2; }
/last full capacity/ { b_lastfull = $4; }

END {
    b_percent = (b_lastfull != 0 ? 100 * b_left / b_lastfull : 0);

    if (b_present == "yes") {
        if (b_state == "charged") {
            power = ("ON AC, " b_state " " b_percent "%");
        }
        if (b_state == "charging") {
            b_tilfull = b_lastfull - b_left;
            b_tilfull = 60 * b_tilfull;
            b_tilfull = b_tilfull / b_rate;

            power = ("ON AC, " b_state " " b_percent);
            power = (power " C=" b_left_wh "Wh");
            power = (power " Rate=" b_rate_w "W");
            power = (power " TTF=" b_tilfull "min");
        }
        if (b_state == "discharging") {
            b_run_min = b_left / b_rate;
            b_run_min = b_run_min * 60;
            b_run_hh = b_left / b_rate;
            if (b_run_hh < 10)
                b_run_hh = 0;
            b_run_mm = b_run_min - (b_run_hh * 60);
            if (b_run_mm < 10)
                b_run_mm = 0;

            power = ("ON BATT, " b_percent);
            power = (power " C=" b_left_wh "Wh");
            power = (power " Rate=" b_rate_w "W");
            power = (power " Rem=" b_run_hh ":" b_run_mm);
        }
    }
    if (b_present == "no") {
        power = "ON AC, NO BATTERY";
    }

    printf "%s", power;
}
            ' -)
    fi
    unset batstate batinfo

    # Grab CPU temperatures and fan speed.
    # This is limited to two CPUs and a single fan - for more flexibility
    # and greater detail, setting up custom output from lm_sensors would
    # be useful.
    sensors=$(which sensors 2>/dev/null)
    if test -x $sensors
    then
    # Scrotwm bar_print can't handle UTF-8 characters, so remove them.
    #Core 0:      +67.0°C  (crit = +100.0°C)
        temp_spd=$($sensors | sed -e 's/[°+]//g' | awk '
BEGIN {
    core0is = 0;
    core1is = 0;
    fan1is = 0;
}
/^Core 0/ {
    core0temp = $3;
    core0is = 1;
}
/^Core 1/ {
    core1temp = $3;
    core1is = 1;
}
/^fan1/ {
    fan1spd = $2;
    fan1is = 1;
}
END {
    if (core0is) {
        cpu = (" Tcpu=" core0temp);
        if (core1is)
            cpu = (cpu ", " core1temp);
        if (fan1is)
            cpu = (cpu " " fan1spd);
    }
    printf "%s", cpu;
}
            ' -)
    fi
    unset sensors

    # Grab information about the wireless configuration.
    iwconfig=$(which iwconfig 2>/dev/null)
    if test "$iwconfig" != ""
    then
        ssid="$(${iwconfig:-true} wlan0 | grep 'wlan0')"
        ssid="$(echo $ssid | awk -F '"' '{ print $2; }' -)"
        wireless=/proc/net/wireless
        if test -f $wireless
        then
            wlan=$(sed -e 's/[.]//g' | awk -v ssid="$ssid" '
/wlan0/ {
    qual_percent = 100 * $3 / 70;
    signal = $4;
    noise = $5;
}
/Tx-Power/ {
    wlan_power = sub("^[^=]+=", "", $4);
}
END {
    wlan = (ssid ": Q=" qual_percent "%");
    wlan = (wlan " S/N=" signal "/" noise " dBm");
    wlan = (wlan " Pwr=" wlan_power " dBm");

    printf "%s", wlan;
}
            ' -)
        fi
    fi
    unset iwconfig ssid wireless

    # Grab the CPU's speed.
    cpuinfo=/proc/cpuinfo
    if test -f $cpuinfo
    then
        freq=$(grep 'cpu MHz' $cpuinfo | sed -e 's/^.*://; s/\..*$//')
        freq="freq:$freq"
    fi
    unset cpuinfo

    # Grab the load averages.
    uptime=$(which uptime 2>/dev/null)
    if test -x "$uptime"
    then
        load=$($uptime | sed 's/^.*://; s/,//g')
        load="load:$load"
    fi
    unset uptime

    # Grab the total, free, and percent used memory.
    meminfo=/proc/meminfo
    if test -f $meminfo
    then
        mem=$(awk '
/^MemTotal/ { mem_total = $2; }
/^MemFree/ { mem_free = $2; }
END {
    mem_used = mem_total - mem_free;
    mem_percent = mem_used * 100 / mem_total;

    printf "mem=%d free=%d used=%.1f%%", mem_total, mem_free, mem_percent;
}
            ' $meminfo)
    fi
    unset meminfo

    echo "$power $temp_spd $freq $load $mem $wlan"
    unset power temp_spd freq load mem wlan

    sleep $sleep_sec
done

Offline

#306 2011-05-24 21:13:23

keenerd
Package Maintainer (PM)
Registered: 2007-02-22
Posts: 647
Website

Re: Scrotwm / Spectrwm

I do love Awk.  Sadly all the wifi and battery stuff does not work here.  I see
Q=% S/N=/ dBm Pwr= dBm
for the wifi and nothing (plugged in or battery) with regards to power.

Offline

#307 2011-05-25 20:26:37

sinecure
Member
Registered: 2007-09-22
Posts: 21
Website

Re: Scrotwm / Spectrwm

Thanks for trying it!  Would you mind posting the content of /proc/acpi/battery/BAT0/state and /proc/acpi/battery/BAT0/info and /proc/net/wireless?

I didn't know iwconfig takes think about changing the interface name in the script (I use it in a VM and don't have wireless in there).  My bad.

Try replacing any instance of wlan0 with your wireless interface, and see if that works to get the wifi data working.  If not, I'll start digging further.

Last edited by sinecure (2011-05-27 02:45:33)

Offline

#308 2011-05-30 02:13:40

techne
Member
Registered: 2011-05-08
Posts: 26

Re: Scrotwm / Spectrwm

Anyone have a working config with a systray properly docked so to speak?

Offline

#309 2011-06-06 20:31:43

skrite
Member
Registered: 2009-09-07
Posts: 160

Re: Scrotwm / Spectrwm

techne wrote:

Anyone have a working config with a systray properly docked so to speak?

i would be interested in this too

Offline

#310 2011-06-09 19:38:07

dabd
Member
Registered: 2008-11-17
Posts: 109

Re: Scrotwm / Spectrwm

I added a quirk to display Virtualbox fullscreen but I still see the scrotwm status bar at the top.  Is it possible to make an application fullscreen?
I added it to my ~/.scrotwm.conf like this:

quirk[VirtualBox:Qt-subapplication] = FULLSCREEN

ty

Offline

#311 2011-06-09 21:10:00

skanky
Member
From: WAIS
Registered: 2009-10-23
Posts: 1,847

Re: Scrotwm / Spectrwm

Not sure if there's an automated way of doing it, but Mod+b will toggle the status bar. It'll do it for all workspaces.


"...one cannot be angry when one looks at a penguin."  - John Ruskin
"Life in general is a bit shit, and so too is the internet. And that's all there is." - scepticisle

Offline

#312 2011-06-12 17:01:43

marco_p
Member
Registered: 2009-02-09
Posts: 81

Re: Scrotwm / Spectrwm

I have been able to spend time on scrotwm after it started to show some
issues with the latest X.  I rewrote the focus code yet again and it is
much simpler now that I am tossing a whole bunch of events.  It should
also be a little faster.

What prompted this was a contribution from jason@openbsd.org to add an iconic
state.  This works by hitting M-w to icon a window and M-S-w to get a
list of currently iconed windows (using dmenu).

I am still working out a few kinks but I really could use some test
results from heavy users.  Don't want to run a snapshot just yet until I
fix some border coloring issues.

It also contains the fix from mcbride@openbsd.org to make windows appear
in the correct workspace.

So get the code at: anoncvs@opensource.conformal.com:/anoncvs/scrotwm
and go into the linux directory and type make.

Then copy the binarieswhere your distro likes them.

Log issues at:
http://opensource.conformal.com/flyspra … 8&do=index

Last edited by marco_p (2011-06-12 17:03:27)

Offline

#313 2011-06-14 10:50:59

keenerd
Package Maintainer (PM)
Registered: 2007-02-22
Posts: 647
Website

Re: Scrotwm / Spectrwm

Or just make the scrotwm-cvs package from AUR.

My first impression of the iconify mode - it really needs to tell you that iconified windows even exist.  Either a simple boolean flag (there are windows you can't see) or an integer count of how many iconified windows exist on that workspace.

Here is another patch I've been working on.  It changes the layout indicator to display the mwin and stack count.  Normally these numbers are hidden.  Pressing mod-comma and mod-period change how many windows are in the master half.  Mod-< and mod-> change the columns in the other half.  It was really easy to get lost in the layouts.

Now, the old [|] indicator looks like [1|1] where the numbers represent the mwin and stack.  Hard to explain, easy to use.

--- scrotwm.c.orig    2011-06-13 18:19:28.000000000 -0400
+++ scrotwm.c    2011-06-14 17:45:32.000000000 -0400
@@ -338,6 +338,7 @@ struct workspace {
     struct swm_region    *old_r;        /* may be NULL */
     struct ws_win_list    winlist;    /* list of windows in ws */
     struct ws_win_list    unmanagedlist;    /* list of dead windows in ws */
+        char                    stacker[10];    /* display stacker and layout */
 
     /* stacker state */
     struct {
@@ -1089,6 +1090,16 @@ setscreencolor(char *val, int i, int c)
 }
 
 void
+set_stacker_string(struct workspace *ws)
+{
+    strcpy(ws->stacker, "[   ]");
+    if (ws->cur_layout == &layouts[0])
+        sprintf(ws->stacker, "[%d|%d]", ws->l_state.vertical_mwin, ws->l_state.vertical_stacks);
+    if (ws->cur_layout == &layouts[1])
+        sprintf(ws->stacker, "[%d-%d]", ws->l_state.horizontal_mwin, ws->l_state.horizontal_stacks);
+}
+
+void
 custom_region(char *val)
 {
     unsigned int            sidx, x, y, w, h;
@@ -1211,7 +1222,6 @@ bar_update(void)
     char            cn[SWM_BAR_MAX];
     char            loc[SWM_BAR_MAX];
     char            *b;
-    char            *stack = "";
 
     if (bar_enabled == 0)
         return;
@@ -1248,11 +1258,8 @@ bar_update(void)
                 bar_window_name(cn, sizeof cn, r->ws->focus);
             }
 
-            if (stack_enabled)
-                stack = r->ws->cur_layout->name;
-
             snprintf(loc, sizeof loc, "%d:%d %s   %s%s    %s    %s",
-                x++, r->ws->idx + 1, stack, s, cn, bar_ext,
+                x++, r->ws->idx + 1, r->ws->stacker, s, cn, bar_ext,
                 bar_vertext);
             bar_print(r, loc);
         }
@@ -2362,6 +2369,7 @@ stack_config(struct swm_region *r, union
 
     if (args->id != SWM_ARG_ID_STACKINIT);
         stack();
+    bar_update();
 }
 
 void
@@ -2388,6 +2396,7 @@ stack(void) {
                 g.h -= bar_height;
             }
             r->ws->cur_layout->l_stack(r->ws, &g);
+            set_stacker_string(r->ws);
             /* save r so we can track region changes */
             r->ws->old_r = r;
         }
@@ -5724,6 +5733,7 @@ setup_screens(void)
                     layouts[k].l_config(ws,
                         SWM_ARG_ID_STACKINIT);
             ws->cur_layout = &layouts[0];
+            set_stacker_string(ws);
         }
 
         scan_xrandr(i);

Last edited by keenerd (2011-06-14 21:55:52)

Offline

#314 2011-06-14 16:17:40

marco_p
Member
Registered: 2009-02-09
Posts: 81

Re: Scrotwm / Spectrwm

It was a labor of hate^Wlove but here it is 0.9.30.
http://opensource.conformal.com/snapsho … 0.9.30.tgz

Changes:
* FS#24 show window title in status bar
* add border_width for bar and windows
* fix applications like xemacs that would endlessly redraw themselves
* FS#92 add feature to iconize applications
* fix launch library to not crash with new X
* rewrite most of the focus code in order to fix a bunch of nits that
  were becoming pretty bothersome
* fix bug where the border on full screen apps were off by one
* no longer allow one to next or previous into a parent window
* when moving a transient to another workspace move the parent as well
* sort windowlist in order to simplify the "focus next" code
* remove logic from enternotify by preventing those events from ever
  making it there
* work around transients that lie about their parent window; this fixes
  a ton of little nits that were not obvious
* add FOCUSPREV quirk to force application on exit to focus on the
  application that launched them (e.g. focus on xxxterm that launched
  mplayer)
* prevent double red bordering when an app crashed
* fix drag-to-float

Offline

#315 2011-06-16 22:37:48

teh
Member
From: Tijuana, Mexico
Registered: 2009-07-07
Posts: 374
Website

Re: Scrotwm / Spectrwm

segfault (3 in ~36 hours) with 0.9.30

scrotwm[11805]: segfault at 20 ip 0804d3d7 sp bfc05200 error 4 in scrotwm[8048000+11000]

That never happened in previous version.

Last edited by teh (2011-06-16 22:45:38)


arst

Offline

#316 2011-06-16 23:14:35

keenerd
Package Maintainer (PM)
Registered: 2007-02-22
Posts: 647
Website

Re: Scrotwm / Spectrwm

Check out the latest CVS.  There is a race condition.  Details: http://opensource.conformal.com/fluxbb/ … php?id=120

Offline

#317 2011-06-23 03:27:04

marco_p
Member
Registered: 2009-02-09
Posts: 81

Re: Scrotwm / Spectrwm

New snap with linux fixes.
http://opensource.conformal.com/snapsho … 0.9.31.tgz

* add autorun option to start application in certain work spaces
* fix a crash seen on linux and potentially other OS'
* re-add scrotwm.desktop
* realloc fixes
* cleanup

Offline

#318 2011-06-23 04:52:39

anonymous_user
Member
Registered: 2009-08-28
Posts: 3,059

Re: Scrotwm / Spectrwm

I tried using this color value in ScrotWM but the color was wrong.

rgb:83/93/108

Somehow I figured out that ScrotWM cannot accept values with three digits so the color I was seeing was 83/93/10. Is this a known issue?

Offline

#319 2011-06-23 05:32:08

keenerd
Package Maintainer (PM)
Registered: 2007-02-22
Posts: 647
Website

Re: Scrotwm / Spectrwm

anonymous_user:  The colors are hex.  So they go from 00 to FF.

In other news, with this snap ScrotWM enters the community repo!

Offline

#320 2011-06-23 05:36:29

anonymous_user
Member
Registered: 2009-08-28
Posts: 3,059

Re: Scrotwm / Spectrwm

So do I just convert 108 to hex?

Or, as an example, how do I convert a color like #535d6c for use in ScrotWM?

Last edited by anonymous_user (2011-06-23 05:37:29)

Offline

#321 2011-06-23 08:32:07

cyrusza
Member
From: Italy
Registered: 2011-05-18
Posts: 29
Website

Re: Scrotwm / Spectrwm

anonymous_user wrote:

So do I just convert 108 to hex?

Or, as an example, how do I convert a color like #535d6c for use in ScrotWM?

The easy way, use GIMP color picker big_smile

Offline

#322 2011-06-23 12:29:10

marco_p
Member
Registered: 2009-02-09
Posts: 81

Re: Scrotwm / Spectrwm

I screwed up the last release by introducing a mean crash.  Please use the 0.9.32 snapshot instead.

http://opensource.conformal.com/snapsho … 0.9.32.tgz

Offline

#323 2011-06-23 14:41:01

anonymous_user
Member
Registered: 2009-08-28
Posts: 3,059

Re: Scrotwm / Spectrwm

@cyrusza - Can you be more specific? I picked the color but I'm not sure where to get the rgb hex value?

screenshot_06_23_2011_074030.jpg

Offline

#324 2011-06-23 17:09:29

cyrusza
Member
From: Italy
Registered: 2011-05-18
Posts: 29
Website

Re: Scrotwm / Spectrwm

anonymous_user wrote:

@cyrusza - Can you be more specific? I picked the color but I'm not sure where to get the rgb hex value?

http://s4.postimage.org/duqzj2g4/screenshot_06_23_2011_074030.jpg

Sure: In your screenshot, the RGB is 83/93/108 - the HEX value is that in the bottom field, 535D6C that corresponds to 53(R)5D(G)6C(B).

You can change any field (HEX, RGB, HSV), the others will be automatically adjusted smile

Offline

#325 2011-06-23 17:17:16

anonymous_user
Member
Registered: 2009-08-28
Posts: 3,059

Re: Scrotwm / Spectrwm

The fact that scrot writes the color code as: rgb:53/5D/6C instead of #535D6C confused me. Particularly since the default colors are all numerical.

Offline

Board footer

Powered by FluxBB