Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
gtk-windows in dwm-bar?!
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
LoTeK
Apprentice
Apprentice


Joined: 26 Jul 2012
Posts: 270

PostPosted: Wed Jan 30, 2013 10:16 pm    Post subject: gtk-windows in dwm-bar?! Reply with quote

hi,
I have programmed a binary clock and a battery-status widget and now I'm using dwm (really awesome WM!!). Because I only work in tiling mode I can't start my programs like for example conky. If I launch them, they use the whole terminal window (even with '&' at the end) and despite this I want to run them in the bar like conky. Is this possible?
_________________
"I want to see gamma rays! I want to hear X-rays! Do you see the absurdity of what I am? I can't even express these things properly because I have to conceptualize complex ideas in this stupid limiting spoken language!"
Back to top
View user's profile Send private message
Bones McCracker
Veteran
Veteran


Joined: 14 Mar 2006
Posts: 1564
Location: U.S.A.

PostPosted: Thu Jan 31, 2013 9:59 pm    Post subject: Reply with quote

For all intents and purposes, no.
_________________
juniper wrote:
I use ubuntu, which is why I am posting here.
Back to top
View user's profile Send private message
LoTeK
Apprentice
Apprentice


Joined: 26 Jul 2012
Posts: 270

PostPosted: Thu Jan 31, 2013 10:13 pm    Post subject: Reply with quote

why not?

Is there instead a way to reserve an area (since my screen has a resolution of 1600x900 the right and left boarder would be most suitable) in tiling mode for small applications or conky?

Now I'm using conky in the dwm-bar, but I hate it that the displayed informations "move around" (for example when CPU usage changes from 9% to 10%) and ${goto X} doesn't work with out_to_console and no background.
_________________
"I want to see gamma rays! I want to hear X-rays! Do you see the absurdity of what I am? I can't even express these things properly because I have to conceptualize complex ideas in this stupid limiting spoken language!"
Back to top
View user's profile Send private message
Bones McCracker
Veteran
Veteran


Joined: 14 Mar 2006
Posts: 1564
Location: U.S.A.

PostPosted: Thu Jan 31, 2013 10:32 pm    Post subject: Reply with quote

To your first question, I suppose you could. Windows in floating mode can go anywhere you want, and you can have it open in floating mode by configuring that in your savedconfig/ file. So you could superimpose it over the portion of the root window that serves as a "status bar", but I'm not sure how to make it appear in that precise location and in the appropriate size every time. Those are probably window manager hints you'd have to code into your application.

To your second question, not that I'm aware of, but I'm sure you could write a patch that would do this. It would just have to redefine the boundaries of the area managed by the tiling algorithm and place a static window outside it. Probably a fairly involved piece of coding, though. You might also be able to divide the X display into two "screens", one of which you could use for dwm and the other which you could use to display your gizmos and gadgets.

As I mentioned before, if you want a tiling window manager with more eye candy, you might be better off trying out Awesome window manager or Xmonad.
_________________
juniper wrote:
I use ubuntu, which is why I am posting here.
Back to top
View user's profile Send private message
LoTeK
Apprentice
Apprentice


Joined: 26 Jul 2012
Posts: 270

PostPosted: Thu Jan 31, 2013 11:09 pm    Post subject: Reply with quote

Well I'm compiling awesome and xmonad now, but dwm is way more suitable from the "codesizeviewpoint" : awesome: 740KB, dwm: 20KB :) and the 2000 lines from dwm aren't easy to master. xmonad seems to be pretty cool and I want to learn haskell too, but since I'm learning C now it's not quite the real thing for now, but thanks anyway.

btw, I've downloaded all the helper functions from http://dwm.suckless.org/dwmstatus/ but I can't find any documentations to install them. I have tried:

Code:
#include "new-acpi-battery.c"

in the dwm.c file (new-acpi-battery.c and dwm.c in the same directory), but when I run:
Code:
make clean install
(as root) I'm getting the error message:
Code:
dwm.c: ... undefined reference to `smprintf`

I thought this function is in stdlib.h ?!

Well its not only eyecandy. I like it when I can view cpu/ram usage without fire up top every time and to know the time is also nice :)
_________________
"I want to see gamma rays! I want to hear X-rays! Do you see the absurdity of what I am? I can't even express these things properly because I have to conceptualize complex ideas in this stupid limiting spoken language!"
Back to top
View user's profile Send private message
Bones McCracker
Veteran
Veteran


Joined: 14 Mar 2006
Posts: 1564
Location: U.S.A.

PostPosted: Fri Feb 01, 2013 1:01 am    Post subject: Reply with quote

Those are intended to be functions you can add to your own dwmstatus C application or the "bare bones" dwmstatus example they provide, which I've never looked at. You would then this application instead of running a ~/.dwm/dwmrc script). You can't just #include them in the dwm.c source and expect them to do anything.

You could build them into the dwm.c source, but you'd probably need to fork a new process or thread anyway. Simpler for you, as a new C programmer, just to write a separate dwmstatus application and call if from somewhere in your startup scripts (probably best done in your X session).
_________________
juniper wrote:
I use ubuntu, which is why I am posting here.
Back to top
View user's profile Send private message
LoTeK
Apprentice
Apprentice


Joined: 26 Jul 2012
Posts: 270

PostPosted: Fri Feb 01, 2013 10:25 am    Post subject: Reply with quote

Quote:
Those are intended to be functions you can add to your own dwmstatus C application or the "bare bones" dwmstatus example they provide, which I've never looked at. You would then this application instead of running a ~/.dwm/dwmrc script). You can't just #include them in the dwm.c source and expect them to do anything.

ok :oops:

Quote:
You could build them into the dwm.c source, but you'd probably need to fork a new process or thread anyway. Simpler for you, as a new C programmer, just to write a separate dwmstatus application and call if from somewhere in your startup scripts (probably best done in your X session).

ok, thanks.. I'll try it this way...

I just read our OTW thread again and I'll play with your status bar code a bit, so I can get rid of conky :)
_________________
"I want to see gamma rays! I want to hear X-rays! Do you see the absurdity of what I am? I can't even express these things properly because I have to conceptualize complex ideas in this stupid limiting spoken language!"
Back to top
View user's profile Send private message
Bones McCracker
Veteran
Veteran


Joined: 14 Mar 2006
Posts: 1564
Location: U.S.A.

PostPosted: Fri Feb 01, 2013 10:53 am    Post subject: Reply with quote

Google around, people have written others with more stuff in them, and other people may have done things similar to what you describe.

Mine takes a slightly different approach than assumed by the add-on functions on the web site, and I'm a novice C programmer too, so you might want to start with their bare-bones project.
_________________
juniper wrote:
I use ubuntu, which is why I am posting here.
Back to top
View user's profile Send private message
hcaulfield57
Tux's lil' helper
Tux's lil' helper


Joined: 13 Mar 2012
Posts: 147

PostPosted: Sat Feb 02, 2013 7:02 am    Post subject: Reply with quote

I take it you are just trying to get some stats in your statusbar for dwm? Why not just use xsetroot?
_________________
"To design the perfect anti-Unix, make all file formats binary and opaque, and require heavyweight tools to read and edit them." - The Art of Unix Programming
Back to top
View user's profile Send private message
Bones McCracker
Veteran
Veteran


Joined: 14 Mar 2006
Posts: 1564
Location: U.S.A.

PostPosted: Sat Feb 02, 2013 4:24 pm    Post subject: Reply with quote

He's trying to do it in C rather than use a script. In addition to just being a convenient learning objective, this is a lot lighter than constantly spawning processes by calling external tools over and over again every second (or ever few seconds) from the shell, the entire time the window manager is open.
_________________
juniper wrote:
I use ubuntu, which is why I am posting here.
Back to top
View user's profile Send private message
hcaulfield57
Tux's lil' helper
Tux's lil' helper


Joined: 13 Mar 2012
Posts: 147

PostPosted: Sat Feb 02, 2013 5:50 pm    Post subject: Reply with quote

Oh, sorry, I was super tired when I responded last night. I had not thought of doing it in C, that's something I might do now if I get the time.
_________________
"To design the perfect anti-Unix, make all file formats binary and opaque, and require heavyweight tools to read and edit them." - The Art of Unix Programming
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum