moetunes / Nextwm

snapwm is an easy to configure, dynamic, tiling window manager. Built on dminiwm with a desktop switcher, info bar and reloadable rc file.
53 stars 5 forks source link

Window's Geometry #14

Closed r004 closed 10 years ago

r004 commented 10 years ago

Well; I hate that there is no clock on the bar so I started tweaking with tty-clock. urxvt -tr +sb -borderLess -override-redirect -geometry 36x9+1388+28 -e tty-clock -C 6
It is working but still compton creates shadow around the window. If you have any better idea or the way to improve this frankenstein idea that would be swell.
thanks

moetunes commented 10 years ago

You can put a clock in the bar easy enough. https://wiki.archlinux.org/index.php/Snapwm#The_Bar You could use conky if you want more than just a clock or use a while loop with date and sleep. I haven't used tty clock but maybe you can pipe it to xsetroot. The possibilities are nearly endless. :)

I haven't bothered with compton much but iirc there's a way to have it ignore certain windows. Maybe that was cairo-compmgr, I'm not sure...

moetunes commented 10 years ago

I don't know what shell you use in freebsd but with bash this one liner works from .xinitrc for a clock in the bar: while true; do sleep 5; xsetroot -name $(date +'%I:%M:%S'); done &

HTH

moetunes commented 10 years ago

Working on the theory that no news is good news I'll take it that this issue is sorted. Cheers

r004 commented 10 years ago

Sorry, I was very busy with your WM look and feel. and your xsetroot command is nice. but as far as I can figure out there could be other stuff piped out to your bar but I couldn't find complete "howto" on that. It would be grade if you gave one.

moetunes commented 10 years ago

That's ok. First you have to figure out what you want shown in the bar. If you have a look at the screenshots at the start of my archlinux thread you'll see the info I have shown: wifi download speed and strength what the battery is doing and how much charge is left cpu cores temps memory used cpu speed and how much each core is working uptime the date and a fuzzy clock.

Originally I was using using conky, putting out to cli, to have that info in the bar but have now written my own little program that just grabs the info I want. Some people have the currently playing song's title in the bar, a count of the unread emails they have or even the current ip address. There's a lot that can go in the bar but only so much room. Have a think about what you want shown and we'll sort out a good approach. Cheers

r004 commented 10 years ago

Well that is nice of you Sir; We will go with your approach but please explain the process in a matter that enable me for feature endeavours. ( if it is possible to have a copy of your little program). a. First Font color of the informations going to be shown up in the bar b . clock (your fuzzy clock is nice) c. TX/RX of wifi connection (pure wpa_supplicant) d. cpu load/memory load and I see you used icon instead of letters in your bar (like dzen) how? again Thanks

moetunes commented 10 years ago

The program I wrote for the info in the bar is in C and for linux so you will have to sort out the adjustments to have it work in freebsd. It's https://github.com/moetunes/status_output That contains the infos I mentioned earlier. a. The archwiki snapwm entry has a blurb about the colours. https://wiki.archlinux.org/index.php/Snapwm#Colors and the sample.rc.conf file explains them too. The first colour in the STATUSTHEME line is for the bar background so to use the first font colour you add &1 in front of the text you want displayed. so using the above .xinitrc one liner for the clock to add the first text colour: while true; do xsetroot -name "&1date +'%I:%M:%S'"; sleep 5; done b. The status_output repo has a file fuzzy-time.c which is the fuzzy clock or strftime can show a 'digital' clock. c. TX/RX of wifi is not something I've bothered with. d. cpu and memory is pretty straight forward.

I can't help with a c program for freebsd as I have no way to test it here but conky is supposed to be available and works well in freebsd so lets go with that for now. I'll sort out a conkyrc and post it in a bit. The icons in the bar come from a font that had them added by a clever man named Dave. The entry under Colors in the snapwm wiki is about adding icons to the bar. You just need a font with icons added to the font line in rc.conf and the icons from the font copied to the place in the bar text where you want them.

moetunes commented 10 years ago

As per the wiki in .xinitrc have conky -c /path/to/conkyrc | while read -r; do xsetroot -name "$REPLY"; done &

conkyrc: out_to_x no own_window no extra_newline no background no cpu_avg_samples 2 net_avg_samples 2 no_buffers yes out_to_console yes out_to_stderr no update_interval 1.0 uppercase no use_spacer none

TEXT &1 $freq_g $mem/$memmax - $memperc% $cpu% ${time %I:%m}

Couldn't find anything about RX/TX in man conky but there's lots of other net stuff to use in there. HTH

r004 commented 10 years ago

hello and thank you very much. So as you predicted the conky is the best case for FreeBSD. because first most of the network drivers here (wifi or ethernet) don't contain the measurement layer and second all of available scriprts are written for linux and read /proc which is mostly empty here.

moetunes commented 10 years ago

That's great. When you are happy enough with it I would like to see screenshot. I'm trying to find the simplest way to support both linux and freebsd builds without os checks in the code so if I could ask a favour... Can you see if snapwm builds ok with the #include line in snapwm.c commented? Like: // #include It was one of the changes recommended to you for building snapwm. Cheers

moetunes commented 10 years ago

This place sucks as somewhere to discuss code. I was asking about commenting the signal.h include line. Markup got in the road again...

r004 commented 10 years ago

Sorry Sir; I was away. Well regarding the FreeBSD compile. I did compile that about 20 or so days ago. I don't get what do you mean! But I will test any changes you will do to the code. just tell me and I build snapwm here again from scratch and report back. ( Good enought? anything you want. NP :) :+1: )

for in-line code enclose the code in one back-tick (strat and end) for a code block enclose the code in tribble backticks (start and end)