View previous topic :: View next topic |
Author |
Message |
shrimp123 Apprentice
Joined: 02 Sep 2004 Posts: 199 Location: Here!
|
Posted: Mon Apr 04, 2005 11:33 am Post subject: OPenbox + new Icon set |
|
|
Hi,
I use lately switched to openbox+pypanel+torsmo+idesk.
Now, all windows (like xterm, emacs, etc) have same icons in pypanel and on the window toolbar of openbox. Even ALT-TAB gives the same icons for all of them. However, some apps like firfox(yaa) get a different icon.
Can i get some help in modifying this behaviour to a more sensible, app-based icons?
thanks,
Kiran. |
|
Back to top |
|
|
placeholder Advocate
Joined: 07 Feb 2004 Posts: 2500
|
Posted: Mon Apr 04, 2005 12:16 pm Post subject: |
|
|
This is done because those applications do not have a set X icon for that purpose. There is nothing you can do to change that unless you code it into them. |
|
Back to top |
|
|
shrimp123 Apprentice
Joined: 02 Sep 2004 Posts: 199 Location: Here!
|
Posted: Mon Apr 04, 2005 12:37 pm Post subject: |
|
|
like u mean in the openbox code?
then how is it that some applications (firefox, xv, xemacs) are displayed right?
thanks,
Kiran |
|
Back to top |
|
|
nightm4re Guru
Joined: 20 Jun 2004 Posts: 519 Location: Providence, RI, USA
|
Posted: Mon Apr 04, 2005 1:58 pm Post subject: |
|
|
shrimp123 wrote: | like u mean in the openbox code?
then how is it that some applications (firefox, xv, xemacs) are displayed right?
|
no, he means the application itself. firefox etc have an icon taht they set for themselves to use, this is where the WM gets the icon from. Apps that don't do this just display a default icon.
I think there are some random utilities you can use to set an icon for an app... wmctrl or devil's pie perhaps? not sure on this. _________________ Nitrogen - GtkMM based background setter/restorer, please test!
Minuslab | d.minuslab.net |
|
Back to top |
|
|
shrimp123 Apprentice
Joined: 02 Sep 2004 Posts: 199 Location: Here!
|
Posted: Sun Apr 10, 2005 11:56 am Post subject: |
|
|
may be this is stupid... but here is what i did to achieve what i wanted.
i want the pypanel to display the icons right. for xterm and emacs (i have very little use in the laptop using pypanel)
so, i code that up in pypanel. Not sure if this is good since i am not a code writer for butter (or bread for that matter).
(pypanel-2.2)
diff -u /usr/bin/pypanel.old /usr/bin/pypanel
--- /usr/bin/pypanel.old 2005-04-10 04:40:33.000000000 -0700
+++ /usr/bin/pypanel 2005-04-10 04:51:30.000000000 -0700
@@ -256,10 +256,32 @@
except:
raise
except:
- # default icon
- rc = ppicon(self.window.id, 0, 0, x, y, 0, 0,
- I_WIDTH, I_HEIGHT, "")
-
+ # modificationTo get Some window names correct
+
+ window_name = task.obj.get_wm_name()
+
+ if (window_name == 'xterm'):
+ ICON = "/usr/local/icons/gnome-terminal.png"
+ ppinit(self.window.id, FONT, ICON)
+ rc = ppicon(self.window.id, 0, 0, x, y, 0,0, I_WIDTH,
+ I_HEIGHT, "")
+ ICON = "%s/pypanel/ppicon.png" % sysconfig.get_python_lib()
+ ppinit(self.window.id, FONT, ICON)
+ else:
+ if (window_name == "emacs@localhost"):
+ ICON = "/usr/local/icons/gnome-emacs.png"
+ ppinit(self.window.id, FONT, ICON)
+ rc = ppicon(self.window.id, 0, 0, x, y, 0,0, I_WIDTH,
+ I_HEIGHT, "")
+ ICON = "%s/pypanel/ppicon.png" % sysconfig.get_python_lib()
+ ppinit(self.window.id, FONT, ICON)
+
+ else:
+ sys.stderr.write("He He He: %s \n" % x)
+ # default icon
+ rc = ppicon(self.window.id, 0, 0, x, y, 0, 0,
+ I_WIDTH, I_HEIGHT, "")
+ # End of modification
if not rc:
# failed to get/draw icon
self.clearPanel(x, 0, I_WIDTH, P_HEIGHT) |
|
Back to top |
|
|
|
|
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
|
|