You are not logged in.

#626 2014-10-01 08:10:48

moetunes
Member
From: A comfortable couch
Registered: 2010-10-09
Posts: 1,033

Re: dminiwm snapwm & bipolarbar

Hi chickenPir4tea, the wm does nothing with trayer here with the command I posted above whether I change desktops or whatever. Even starting it from .xinitrc. It's been that way since we last talked about it.

Hi walex, most of the time it is a (string) for WM_NAME and (utf8 string) for _NET_WM_NAME, but can be a compound text for apps like gimp.
To match the name of aan app you need the full name as shown in xprop, not just the first word. If in xprop just one word is used for the name you use that as it is shown.

WM_NAME(STRING) = "dminiwm snapwm & bipolarbar (Page 25) / Community Contributions / Arch Linux Forums - Mozilla Firefox"
_NET_WM_NAME(UTF8_STRING) = "dminiwm snapwm & bipolarbar (Page 25) / Community Contributions / Arch Linux Forums - Mozilla Firefox"

You would need the full name as shown above to match this forum page, not just what you used.
Again, if you use what's printed in the bar for the apps name there should be no issues with matching it in the apps.conf file.

Cheers


You're just jealous because the voices only talk to me.

Offline

#627 2014-10-01 09:30:52

walex
Member
From: Germany
Registered: 2006-10-26
Posts: 28

Re: dminiwm snapwm & bipolarbar

Hi moetunes,
in the example I gave, I used just the first word of what's displayed in the bar because yesterday you said in post #622

[...] just the first word, maybe in brackets or something - and that'll be all you can use for a match[...]

Now in #626 you say

[...]You would need the full name as shown above to match this forum page, not just what you used. Again, if you use what's printed in the bar for the apps name there should be no issues with matching it in the apps.conf file.

Well, that's what I already did with my "ho man" app the other day, and it didn't work.
As you can see from my apps.conf, I tried several options with yesterday's firefox example, and at least on my system none of them works.

# DESKTOP "dminiwm";2;1;
DESKTOP (dminiwm snapwm & bipolarbar (Page 25) / Community Contributions / Arch Linux Forums - Mozilla Firefox);2;1;
# DESKTOP "dminiwm snapwm & bipolarbar (Page 25) / Community Contributions / Arch Linux Forums - Mozilla Firefox";2;1;
# DESKTOP ("dminiwm snapwm & bipolarbar (Page 25) / Community Contributions / Arch Linux Forums - Mozilla Firefox");2;1;
# DESKTOP dminiwm snapwm & bipolarbar (Page 25) / Community Contributions / Arch Linux Forums - Mozilla Firefox;2;1;

So at the moment on my installation of snapwm name matching works only for windows with names consisting of nothing more than a single word. I'm sure I'm missing something very obvious. If only scratching my head would help - or even banging my head on the desk.

Cheers

Offline

#628 2014-10-01 12:26:04

chickenPie4tea
Member
Registered: 2012-08-21
Posts: 309

Re: dminiwm snapwm & bipolarbar

Any Conky tips?
Edit, well I now find that if I kill conky and then start it again it is not shown as a running app.
I am starting Conky from a script along with other apps after snapwm has started.  just using the command
conky &
At the moment Snapwm shows whether a workspace other than the current has an app running on it  Very handy.
Trouble is Workspace one is always shown as occupied because of conky. Is this the same for others? If not then what conky settings are you using?
here is my conkyrc

##############################################
# Settings
##############################################
background yes
use_xft yes
xftfont DroidSans:size=11
xftalpha 1
update_interval 2.5
total_run_times 0
own_window yes
own_window_transparent yes
##############################################
## no compositor
own_window_type override
own_window_argb_visual no

## xcompmgr
#own_window_type override
#own_window_argb_visual yes

## cairo-compmgr
#own_window_type desktop
#own_window_argb_visual yes
##############################################
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
double_buffer yes
minimum_size 200 250
maximum_width 260
draw_shades no
draw_outline no
draw_borders no
draw_graph_borders no
default_color 656667
default_shade_color 000000
default_outline_color 828282
alignment top_right
gap_x 10
gap_y 56
no_buffers yes
uppercase no
cpu_avg_samples 2
override_utf8_locale no
##############################################
#  Output
##############################################
TEXT
${color DarkGoldenrod3}Arch-linux
${hr}
${color white}RAM:$alignr$mem/$memmax
Swap usage:$alignr$swap/$swapmax
CPU usage:$alignr${cpu cpu0}%
Temperature:     ${acpitemp}F
${hr}
${color pink}WiFi-Con. quality %: ${wireless_link_qual_perc wlp6s5}
${color yellow}WiFi-Down-speed:${downspeed wlp6s5} Kb/s
$hr
${color grey}Name              PID   CPU%   MEM%
${color lightgreen} ${top name 1} ${top pid 1} ${top cpu 1} ${top mem 1}
${color lightgreen} ${top name 2} ${top pid 2} ${top cpu 2} ${top mem 2}
${color lightgreen} ${top name 3} ${top pid 3} ${top cpu 3} ${top mem 3}
${color lightgreen} ${top name 4} ${top pid 4} ${top cpu 4} ${top mem 4}
${color lightgreen} ${top name 5} ${top pid 5} ${top cpu 5} ${top mem 5}
${color lightgreen} ${top name 6} ${top pid 6} ${top cpu 6} ${top mem 6}
${color lightgreen} ${top name 7} ${top pid 7} ${top cpu 7} ${top mem 7}
${color lightgreen} ${top name 8} ${top pid 8} ${top cpu 8} ${top mem 8}

${color0}  NETWORK INFO ${hr}${color}
IP eth0:$alignr${addr enp6s7}
IP wifi:$alignr${addr wlp6s5}
External IP: ${execi 1800 wget -q -O - checkip.dyndns.org | sed -e 's/.*Current IP Address: //' -e 's/<.*$//'}
#############################################################################
${font :size=10}
Shortcut keys
${hr}
AG+e$alignr Claws-mail
AG+g$alignr Geany
AG+v$alignr Vim
AG+f$alignr Fyr
WIN+d$alignr Dmenu
WIN+Shift+d$alignr Dmenu-edit
AG+c$alignr Dmenu-MultiChoice

Last edited by chickenPie4tea (2014-10-01 12:35:21)


You can like linux without becoming a fanatic!

Offline

#629 2014-10-01 14:53:37

walex
Member
From: Germany
Registered: 2006-10-26
Posts: 28

Re: dminiwm snapwm & bipolarbar

Hi chickenPie4tea,
I haven't  used conky for quite some time, but I don't remember such an issue. Thought I might as well check what's up with it, found some old conkyrc, started conky from my .xinitrc, and all was fine. With conky running and displaying on all desktops, the bar ignores it completely.
My conkyrc  (nothing fancy, just for testing purposes) is this one:

background yes
use_xft yes
xftfont sans:size=11
xftalpha 1
update_interval 1.0
total_run_times 0
own_window yes
own_window_transparent yes
own_window_type override #desktop
own_window_hints below,sticky,skip_taskbar,skip_pager
double_buffer yes
minimum_size 500 1
maximum_width 640
alignment top_right
default_color Black
no_buffers yes


TEXT
${font sans:size=64}${alignr}${color #805030}${time %H:%M:%S}

So, nothing conspicuously differing from yours, I would say.

Cheers

Last edited by walex (2014-10-01 15:25:21)

Offline

#630 2014-10-01 16:56:14

chickenPie4tea
Member
Registered: 2012-08-21
Posts: 309

Re: dminiwm snapwm & bipolarbar

Thanks Walex, what I tried was just changing the startup order so that conky starts last and it is not happening now.
Maybe that was just a coincidence and it was really something else that I had done, who knows.


You can like linux without becoming a fanatic!

Offline

#631 2014-10-02 07:20:56

moetunes
Member
From: A comfortable couch
Registered: 2010-10-09
Posts: 1,033

Re: dminiwm snapwm & bipolarbar

Hi walex, the first part of that sentence you quoted is important...

Hi walex, if you check your "ho man" app with xprop more than likely both WM_NAME and _NET_WM_NAME will be
the same - just the first word, maybe in brackets or something - and that'll be all you can use for a match.

it was about checking the app name with xprop.

Cheers


You're just jealous because the voices only talk to me.

Offline

#632 2014-10-02 10:30:49

walex
Member
From: Germany
Registered: 2006-10-26
Posts: 28

Re: dminiwm snapwm & bipolarbar

Hi moetunes,
sorry I failed to include the first part of the sentence in my quote.
I did check my "ho man" app with xprop, and WM_NAME as well as _NET_WM_NAME are "ho man", and the bar displays "ho man".

Now, what would the line look like that I should write in my apps.conf to make this window start on desktop 6?

Cheers

Last edited by walex (2014-10-02 10:53:32)

Offline

#633 2014-10-04 05:09:45

moetunes
Member
From: A comfortable couch
Registered: 2010-10-09
Posts: 1,033

Re: dminiwm snapwm & bipolarbar

walex wrote:

Hi moetunes,
sorry I failed to include the first part of the sentence in my quote.
I did check my "ho man" app with xprop, and WM_NAME as well as _NET_WM_NAME are "ho man", and the bar displays "ho man".

Now, what would the line look like that I should write in my apps.conf to make this window start on desktop 6?

Cheers

It would look like

DESKTOP ho man;6;0;

Cheers


You're just jealous because the voices only talk to me.

Offline

#634 2014-10-04 07:28:17

walex
Member
From: Germany
Registered: 2006-10-26
Posts: 28

Re: dminiwm snapwm & bipolarbar

Thank you so much, and I apologize: Sometimes I can be such a pain in the neck, can't I? Your latest changes definitely clearing up the blanks issue, snapwm has made a giant leap towards perfection IMHO.

Cheers

Offline

#635 2014-10-12 02:05:28

frash23
Member
From: Denmark
Registered: 2014-03-26
Posts: 49
Website

Re: dminiwm snapwm & bipolarbar

Hey again,
I'm having issues with fonts - I'm trying to get Tewi-font to work, but despite showing up correctly in xfontsel, my bar looks like this:
PSfabw2.png
Any help?
I'm running a somewhat older version, could that be the issue?


Amateur web developer & Linux enthusiast

Offline

#636 2014-10-15 07:18:54

moetunes
Member
From: A comfortable couch
Registered: 2010-10-09
Posts: 1,033

Re: dminiwm snapwm & bipolarbar

Sorry for the slow reply.
frash23 what older version do you have? It will be at the top of bar.c.
If it's above 0.4.0 fonts should be fine.
Where did you get the tewi font from and does it work in any other X app?


You're just jealous because the voices only talk to me.

Offline

#637 2014-10-15 22:57:23

frash23
Member
From: Denmark
Registered: 2014-03-26
Posts: 49
Website

Re: dminiwm snapwm & bipolarbar

I was unable to find a version number, but the most recent change in the changelog is "13/3/14". I guess I'll have to recompile soon. Any major changes I should take into mind (like config changes)?

Edit: Damnit, I misunderstood what you meant with the bar.c thing - I have version 0.8.0.

I got tewi from Lucy's repo, and used the included makefile to produce .pcf's.

It is working in urxvt, as shown in the screenshot above.

Last edited by frash23 (2014-10-21 10:05:00)


Amateur web developer & Linux enthusiast

Offline

#638 2014-10-27 07:31:09

moetunes
Member
From: A comfortable couch
Registered: 2010-10-09
Posts: 1,033

Re: dminiwm snapwm & bipolarbar

Sorry for the slow reply, having monumental isp issues here...

I've done nothing with fonts since the version you have frash23 so if it doesn't work in that version it won't in the latest either.
I'll try tewi font as soon as I can.

Cheers


You're just jealous because the voices only talk to me.

Offline

#639 2014-10-27 21:52:55

frash23
Member
From: Denmark
Registered: 2014-03-26
Posts: 49
Website

Re: dminiwm snapwm & bipolarbar

I'm using terminusmodx for now, which looks rather neat ( http://i.imgur.com/9hJnTH3.png ), so don't break a leg over it.

That's the only issue I've had with your wm for months, I really love it smile


Amateur web developer & Linux enthusiast

Offline

#640 2014-10-29 12:42:04

frash23
Member
From: Denmark
Registered: 2014-03-26
Posts: 49
Website

Re: dminiwm snapwm & bipolarbar

I ran across an issue:

When I connect a second monitor without configuring them before starting snapwm, snapwm treats it as a two-monitor setup, even though the two monitors are cloned(?).

This causes the bar/workspaces to work like on a two-monitor setup, despite displaying it all on one monitor, meaning that only every second workspace actually switches.

Being on a workspace that should not have a bar on it in snapwm's eyes causes open applications to take up the whole screen, eating up the bar as well.

On top of that, after changing monitor setup with arandr (I'm not familiar with a better tool), snapwm stays in the same state, even after updating it, completely ignoring the second monitor.


Could the bere a good solution for this? Something like detecting monitor changes and adjusting?


EDIT:
I came up with a ghetto solution.
I am running this before starting snapwm:

screens=()
while read i
do
  screens+=($(echo $i|tr '^' '\n'|awk '/connected/{printf $1"_"}!/connected/{printf $1}'))
done< <(xrandr | grep -A1 " connected"|grep -v "\-\-"|sed ':a;N;$!ba;s/\n   /\^/g')

xPos=0
xrCommand="xrandr"

for i in "${screens[@]}"
do
  xrCommand=$xrCommand$(echo $i|awk -v x=$xPos '{split($1,ar,"_");print " --output "ar[1]" --mode "ar[2]" --pos "x"x0"}')
  xPos=$(($xPos+$(echo $i|sed 's/\_/ /g'|awk 'split($2,ar,"x"){print ar[1]}')))
done
#echo ${#screens[@]}
eval $(echo $xrCommand)

Which automatically configures all connected displays, with an incremental X position.

This is a great solution for me, so I thought I'd share it.

Please keep in mind that my bash-fu is dusty, and this is my first in-depth experience with awk, sed & tr.

Last edited by frash23 (2014-10-30 12:19:27)


Amateur web developer & Linux enthusiast

Offline

#641 2014-12-19 14:17:22

frash23
Member
From: Denmark
Registered: 2014-03-26
Posts: 49
Website

Re: dminiwm snapwm & bipolarbar

I'm getting random crashes.

I've gotten these for a while, but they seemed to be fixed after I switched to arch, however it just crashed again.
I tried launching snapwm with output piped to a log, but it shows no error.

The crash happens randomly (I think), and the only way to fix it is to restart lightdm.
I'm using the snapwm-git package from the aur.


Any ideas?


Amateur web developer & Linux enthusiast

Offline

#642 2014-12-22 10:10:38

moetunes
Member
From: A comfortable couch
Registered: 2010-10-09
Posts: 1,033

Re: dminiwm snapwm & bipolarbar

Sorry for the slow reply.
I"ve had that a couple of times, seems to be when mpv closes and there isn't even any X errors.
Haven't found the issue yet but I'm pretty sure it is an update in the last 6 months or so. If you have an idea on an app it happens with on your end that might help.

On another note, I have adding another monitor to a running snapwm working ok and should have git updated shortly.

Cheers


You're just jealous because the voices only talk to me.

Offline

#643 2014-12-22 14:39:27

frash23
Member
From: Denmark
Registered: 2014-03-26
Posts: 49
Website

Re: dminiwm snapwm & bipolarbar

moetunes wrote:

Sorry for the slow reply.
I've had that a couple of times, seems to be when mpv closes and there isn't even any X errors.
Haven't found the issue yet but I'm pretty sure it is an update in the last 6 months or so. If you have an idea on an app it happens with on your end that might help.

I have been using mpv actively without an issue, sometimes it just happens while I'm lurking around in firefox.
I'll try keep a closer eye out to see if I can find a trigger.

moetunes wrote:

I have adding another monitor to a running snapwm working ok and should have git updated shortly.

Woah, that sounds awesome! Can't wait big_smile


On another sidenote, what is the best way to update the bar text? I currently have a script (snapwm-session) which I launch via a desktop entry in /usr/share/xsessions which launches a subset of commands, including a looping script that updates the bar, but it feels hacky.


Amateur web developer & Linux enthusiast

Offline

#644 2014-12-26 08:56:46

moetunes
Member
From: A comfortable couch
Registered: 2010-10-09
Posts: 1,033

Re: dminiwm snapwm & bipolarbar

In the last couple of years I've only had two "crashes" and that was in the last few months. I've fallen asleep with mpv playing a vid and woken up to a tty prompt. It is just a wild guess that it was mpv closing that caused it, I was asleep at the time. I haven't found anything obvious in the code yet that would explain it but am still looking. It sounds from what you say that it could even be something to do with the bar updates so I'll look into that as well.

I'm sure somewhere in the last couple of hundred posts updating the bar when using lightdm has been covered. I don't use a *dm, I login from a tty and I don't use systemd so I don't know what's needed with those.
I've written a small C program that gathers the info I want in the bar and run that from ~/.xinitrc.

About plugging in a monitor:
The way I'm using xrandr, when another monitor is plugged in while snapwm is running the bar will flash, that can take a couple of seconds, then I hit a keyboard shortcut to configure the monitors and the bar flashes again and snapwm sets the desktops up on the different monitors. When I remove a monitor I hit another keyboard command after the bar flashes and things are back like they were.
I use:

CMD addmoncmd;xrandr;--output;VGA1;--mode;1280x1024;--right-of;LVDS1;NULL;
CMD removemoncmd;xrandr;--output;VGA1;--auto;NULL;
...
KEY CtrlAlt;Up;spawn;addmoncmd;
KEY CtrlAlt;Down;spawn;removemoncmd;

in keys.conf
I've noticed pysol seems to take geometry settings when it's started so adding a monitor messes with things like it's menu. I might try to deal with that sort of thing if there are other apps that do that, but most seem ok. At this early stage a random window might appear after adding a monitor, it happens sometimes here, changing desktops a couple of times sorts it all out. I'm sure in time I'll iron out those little bugs.

Cheers and happy holidays.

Last edited by moetunes (2014-12-26 09:02:43)


You're just jealous because the voices only talk to me.

Offline

#645 2015-01-10 12:17:41

frash23
Member
From: Denmark
Registered: 2014-03-26
Posts: 49
Website

Re: dminiwm snapwm & bipolarbar

After having my bar script disabled for a few weeks, I can confirm it was the cause of my crashes.

How are you updating your bar? I use xsetroot, but it seems to be the cause of my crashes.


Amateur web developer & Linux enthusiast

Offline

#646 2015-01-10 21:33:07

moetunes
Member
From: A comfortable couch
Registered: 2010-10-09
Posts: 1,033

Re: dminiwm snapwm & bipolarbar

frash23 wrote:

After having my bar script disabled for a few weeks, I can confirm it was the cause of my crashes.

How are you updating your bar? I use xsetroot, but it seems to be the cause of my crashes.

I use this little C program I made.
If you post your script I'll try it and see if I can have the same results you are, or maybe fix it.
I would be suprised if xsetroot is the cause or people that use it with dwm etc would be experiencing unexplained crashes but I'll check it out.

Cheers


You're just jealous because the voices only talk to me.

Offline

#647 2015-01-10 23:54:48

frash23
Member
From: Denmark
Registered: 2014-03-26
Posts: 49
Website

Re: dminiwm snapwm & bipolarbar

#!/bin/bash

export dskfree=`df -h / | grep / | awk '{print $4}'`

while true
do
  export ramfree=`free -h | grep Mem: | awk '{printf $4}'`
  export cpusage=`mpstat -u|grep all|awk '{printf "%.0f",$4}'`
  export cputemp=`acpi -t | grep 1: | awk '{printf $4}'`
  export sndlvl=`amixer  | grep -A5 "Master" | grep -o -P '(?<= \[).*(?=%\])'`
  if [ $(acpi -b | grep -o -P '(?<=, ).*(?=%)') -gt 10 ]
  then
    export batteryleft=`acpi -b | grep -o -P '(?<=, ).*(?=%)'`
  else
    export batteryleft="&B6 "`acpi -b | grep -o -P '(?<=, ).*(?=%)'`" &B0"
  fi
    xsetroot -name " ¨ $dskfree   Æ $ramfree   µ $cpusage%   ± $cputemp°   Å $sndlvl%   ó $batteryleft%   ¶ $(date +'%H:%M') "
  sleep 5
done

Probably not a very pretty solution.
The odd letters show up as symbols in the font I use:
yDsADV6.png
(Battery is blank because I'm on a desktop)

I'll see if your program is a good solution for me, thanks smile

Last edited by frash23 (2015-01-10 23:56:14)


Amateur web developer & Linux enthusiast

Offline

#648 2015-01-14 20:41:27

moetunes
Member
From: A comfortable couch
Registered: 2010-10-09
Posts: 1,033

Re: dminiwm snapwm & bipolarbar

Hi frash23, I ran your script and straight away the wm closed. I went through it and have it working ok here.
I removed all the export's and changed it to have just one call to acpi -b, which shaved one and a half seconds off the run time. I don't have mpstat so left it to you to sort them out. I left out the font symbols and changed the amixer call to suit my system but it should give you a good idea what's needed.

#!/bin/bash

dskfree=$(df -h | grep -m1 sda | awk '{print $4}')

while true; do
  ramfree=$(free -h | grep cache: | awk '{printf $3}')
  #cpusage=`mpstat -u|grep all|awk '{printf "%.0f",$4}'`
  #cputemp=`acpi -t | grep 1: | awk '{printf $4}'`
  sndlvl=$(amixer | grep -A5 Speaker | grep % | awk '{printf $5}' | tr -d [ | tr -d ])
  # Just make one call to acpi
  battnow=$(acpi -b | grep -o -P '(?<=, ).*(?=%)')
  if [ $battnow -gt 10 ]; then
    batteryleft=$battnow
  else
    batteryleft="&B6 $battnow &B0"
  fi
    #xsetroot -name " ¨ $dskfree   Æ $ramfree   µ $cpusage%   ± $cputemp°   Å $sndlvl%   ó $batteryleft%   ¶ $(date +'%H:%M') "
  xsetroot -name "disk=$dskfree ram=$ramfree vol=$sndlvl batt=$batteryleft time=$(date +'%H:%M:%S')"
  sleep 2
done

I didn't set my C program for stat's info to be user friendly so you might struggle with that.

On other news, I added an option to dminiwm's config.h to set the mode for each desktop and have fixed wallclock so it handles wallpaper changes without going nuts.

Cheers


You're just jealous because the voices only talk to me.

Offline

#649 2015-01-15 07:14:50

frash23
Member
From: Denmark
Registered: 2014-03-26
Posts: 49
Website

Re: dminiwm snapwm & bipolarbar

Straight away? yikes
That's interesting, I usually only got a crash 1-3 times per day (with over 10 hours online time)

I'm trying out your version, will report back after testing it smile


Amateur web developer & Linux enthusiast

Offline

#650 2015-01-24 10:05:28

frash23
Member
From: Denmark
Registered: 2014-03-26
Posts: 49
Website

Re: dminiwm snapwm & bipolarbar

Hey, I've been using your script for a while and haven't had a crash since.

Thanks a lot!


Amateur web developer & Linux enthusiast

Offline

Board footer

Powered by FluxBB