You are not logged in.

#251 2011-01-26 14:28:35

jOaNbE
Member
Registered: 2011-01-20
Posts: 20

Re: dzen & xmobar Hacking Thread

Have anybody managed to get dropbox status icons to display through dzen? When I use i3 window manager, I don't get the status icons when running dropboxd (I don't really rely on the icons alone but they are nice to have).

I've looked at the dzen and dropbox sites and looked through a few dzen threads but I have not found anything on this (I apologize if I've missed anything obvious). Dropbox uses .png images but that can be changed to xbm.

Offline

#252 2011-01-27 13:37:42

tvale
Member
From: Portugal
Registered: 2008-12-11
Posts: 175

Re: dzen & xmobar Hacking Thread

jOaNbE wrote:

Have anybody managed to get dropbox status icons to display through dzen? When I use i3 window manager, I don't get the status icons when running dropboxd (I don't really rely on the icons alone but they are nice to have).

I've looked at the dzen and dropbox sites and looked through a few dzen threads but I have not found anything on this (I apologize if I've missed anything obvious). Dropbox uses .png images but that can be changed to xbm.

The dropbox-cli package in AUR is a command line interface to dropbox. You can make use of it! wink

Offline

#253 2011-03-16 02:08:06

gorilla
Member
From: Berlin
Registered: 2010-06-15
Posts: 72

Re: dzen & xmobar Hacking Thread

Today I tried dmplex to pipe the output  of a script and the output of conky-cli to dzen2. It works so far, but very, very slow and conky only appears, when I hit Ctrl+C. Is this normal? If yes, is there another way to do this?

What I did:

mkfifo .dmpipe

tail -f .dmpipe | dmplex | dzen2 -p -ta l

./myscript > .dmpipe  #the script writes the number as well
echo "2" | conky > .dmpipe

When I pipe them seperately and directly to dzen, it works perfect, but of course only one of each...

Offline

#254 2011-04-16 08:28:50

nixfag
Member
From: Romania
Registered: 2011-03-03
Posts: 73

Re: dzen & xmobar Hacking Thread

Does anybody know how can I get the workspace switcher like in awesome in xmonad?

Offline

#255 2011-04-16 11:57:45

Ashren
Member
From: Denmark
Registered: 2007-06-13
Posts: 1,229
Website

Offline

#256 2011-04-16 14:12:10

nixfag
Member
From: Romania
Registered: 2011-03-03
Posts: 73

Re: dzen & xmobar Hacking Thread

Ashren: I've tried that and it didn't work.Here's the config : http://sprunge.us/jOZI?hs
            And here's the error:
           $ xmonad --recompile
            Error detected while loading xmonad configuration file: /home/derp/.xmonad/xmonad.hs

            xmonad.hs:7:3: parse error on input `main'

            Please check the file for errors.

            xmonad: xmessage: executeFile: does not exist (No such file or directory)

Last edited by nixfag (2011-04-16 14:14:05)

Offline

#257 2011-04-16 16:50:00

Ashren
Member
From: Denmark
Registered: 2007-06-13
Posts: 1,229
Website

Re: dzen & xmobar Hacking Thread

nixfag: You need to install xdotool.

Offline

#258 2011-04-16 18:36:55

nixfag
Member
From: Romania
Registered: 2011-03-03
Posts: 73

Re: dzen & xmobar Hacking Thread

Ashren: I do have xdotool installed.

Offline

#259 2011-04-16 19:02:10

Ashren
Member
From: Denmark
Registered: 2007-06-13
Posts: 1,229
Website

Re: dzen & xmobar Hacking Thread

nixfag: Your indentation looks wrong.

Look here: http://www.arch-ed.dk/wiki/doku.php?id=xmonad.hs

and here:
ttp://haskell.org/haskellwiki/Xmonad/Config_archive

Offline

#260 2011-04-18 08:02:19

nixfag
Member
From: Romania
Registered: 2011-03-03
Posts: 73

Re: dzen & xmobar Hacking Thread

I've used the template config at that page and modified a little bit,here it is http://sprunge.us/WVOZ?hs
I've also added those lines for clickable workspaces.Now how do I run dzen2 so it will show the workspaces?I've tried running 'dzen2' but it doesn't output anything and shows nothing.
I just want a bar that sits on the top,has clickable workspaces,prints the active window title and then shows the system tray.

Offline

#261 2011-05-10 17:21:07

thayer
Fellow
From: Vancouver, BC
Registered: 2007-05-20
Posts: 1,560
Website

Re: dzen & xmobar Hacking Thread

Does anyone know if it's possible to wrap the window title (or logTitle) with xdotool tags?

I've recently come back to Xmonad after years of dwm and I miss the ability to kill focused clients by middle-clicking the window title in the statusbar. It seems this would be easy enough, given that it can be done to the workspaces and layouts, but my haskell foo is sadly lacking.

Edit:

Turns out it wasn't that difficult at all...for anyone else interested:

ppTitle   = dzenColor "#ffffff" "" 
                    . wrap "^ca(1,xdotool key super+k)^ca(2,xdotool key super+shift+c)"
                           "                          ^ca()^ca()" . shorten 20 . dzenEscape

Clicking the left button on the window title will cycle to the next client; clicking the middle button will kill the selected client.

The rest of the config, and a mouse-less xmobar version, can be found at github:

http://github.com/thayerwilliams

Last edited by thayer (2011-05-29 00:15:44)


thayer williams ~ cinderwick.ca

Offline

#262 2011-05-28 21:52:09

grimp3ur
Member
Registered: 2010-09-05
Posts: 7

Re: dzen & xmobar Hacking Thread

thayer wrote:
ppTitle   = dzenColor "#ffffff" "" 
                    . wrap "^ca(1,xdotool key super+k)^ca(2,xdotool key super+shift+c)" "  ^ca()^ca()" 
                    . shorten 20

You probably miss ". dzenEscape" (afrer "shorten"): consider the case when <title> contents "^ca(1, ...)".

Offline

#263 2011-05-29 00:15:11

thayer
Fellow
From: Vancouver, BC
Registered: 2007-05-20
Posts: 1,560
Website

Re: dzen & xmobar Hacking Thread

grimp3ur wrote:

You probably miss ". dzenEscape" (afrer "shorten"): consider the case when <title> contents "^ca(1, ...)".

Good catch, thanks! I've updated the snippet.


thayer williams ~ cinderwick.ca

Offline

#264 2011-06-07 13:59:09

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

Re: dzen & xmobar Hacking Thread

Little question, there's a way (hack, patch, etc.) to prevent dzen dimming?

Last edited by cyrusza (2011-06-07 13:59:57)

Offline

#265 2011-06-07 15:00:45

thayer
Fellow
From: Vancouver, BC
Registered: 2007-05-20
Posts: 1,560
Website

Re: dzen & xmobar Hacking Thread

cyrusza wrote:

Little question, there's a way (hack, patch, etc.) to prevent dzen dimming?

Dimming? What exactly is it doing?


thayer williams ~ cinderwick.ca

Offline

#266 2011-06-07 18:31:52

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

Re: dzen & xmobar Hacking Thread

thayer wrote:
cyrusza wrote:

Little question, there's a way (hack, patch, etc.) to prevent dzen dimming?

Dimming? What exactly is it doing?

After 8 seconds bar content darkens, like a "power saving" mode.

Offline

#267 2011-06-07 23:24:19

thayer
Fellow
From: Vancouver, BC
Registered: 2007-05-20
Posts: 1,560
Website

Re: dzen & xmobar Hacking Thread

cyrusza wrote:
thayer wrote:
cyrusza wrote:

Little question, there's a way (hack, patch, etc.) to prevent dzen dimming?

Dimming? What exactly is it doing?

After 8 seconds bar content darkens, like a "power saving" mode.

I've never heard of that before, but whatever it is I'm fairly certain it isn't dzen causing it; there is no dimming feature in dzen.


thayer williams ~ cinderwick.ca

Offline

#268 2011-06-08 00:43:21

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

Re: dzen & xmobar Hacking Thread

thayer wrote:
cyrusza wrote:
thayer wrote:

Dimming? What exactly is it doing?

After 8 seconds bar content darkens, like a "power saving" mode.

I've never heard of that before, but whatever it is I'm fairly certain it isn't dzen causing it; there is no dimming feature in dzen.

Strange. I have this behaviour with both WMFS and ScrotWM and i thought it was a default undocumented feature. Maybe the dev has some hints to debug this.

Offline

#269 2011-06-08 10:04:27

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

Re: dzen & xmobar Hacking Thread

cyrusza wrote:
thayer wrote:
cyrusza wrote:

After 8 seconds bar content darkens, like a "power saving" mode.

I've never heard of that before, but whatever it is I'm fairly certain it isn't dzen causing it; there is no dimming feature in dzen.

Strange. I have this behaviour with both WMFS and ScrotWM and i thought it was a default undocumented feature. Maybe the dev has some hints to debug this.

Ok, found the culprit, it's the cairo composite manager big_smile

Offline

#270 2011-07-10 18:34:34

eriksatie
Member
Registered: 2011-06-13
Posts: 30

Re: dzen & xmobar Hacking Thread

Hi

I have an arch xbm logo that I'd like displayed in dzen

anyone know a good way to go about doing this?

Offline

#271 2011-07-10 19:27:00

nixfag
Member
From: Romania
Registered: 2011-03-03
Posts: 73

Re: dzen & xmobar Hacking Thread

eriksatie wrote:

Hi

I have an arch xbm logo that I'd like displayed in dzen

anyone know a good way to go about doing this?

^i(/path/to/icon.xbm)

Offline

#272 2011-07-30 04:21:05

eriksatie
Member
Registered: 2011-06-13
Posts: 30

Re: dzen & xmobar Hacking Thread

nixfag wrote:
eriksatie wrote:

Hi

I have an arch xbm logo that I'd like displayed in dzen

anyone know a good way to go about doing this?

^i(/path/to/icon.xbm)

this is the error I'm getting when I execute that

arch.sh: line 1: syntax error near unexpected token `~/.icons/arch.xbm'
arch.sh: line 1: `^i(~/.icons/arch.xbm)'

Offline

#273 2011-07-30 06:32:32

gotmor
Member
From: Germany
Registered: 2007-09-03
Posts: 84
Website

Re: dzen & xmobar Hacking Thread

eriksatie wrote:

this is the error I'm getting when I execute that

arch.sh: line 1: syntax error near unexpected token `~/.icons/arch.xbm'
arch.sh: line 1: `^i(~/.icons/arch.xbm)'
 
echo 'my shiny icon: ^i(/home/USER/.icons/arch.xbm)' | dzen2 -p

Offline

#274 2011-08-23 16:17:31

srijan4
Member
From: India
Registered: 2010-11-25
Posts: 5
Website

Re: dzen & xmobar Hacking Thread

tvale wrote:
jOaNbE wrote:

Have anybody managed to get dropbox status icons to display through dzen? When I use i3 window manager, I don't get the status icons when running dropboxd (I don't really rely on the icons alone but they are nice to have).

I've looked at the dzen and dropbox sites and looked through a few dzen threads but I have not found anything on this (I apologize if I've missed anything obvious). Dropbox uses .png images but that can be changed to xbm.

The dropbox-cli package in AUR is a command line interface to dropbox. You can make use of it! wink

I have tried doing this, and was mostly successful. Here is my code. Note that I am a beginner in shell scripting, so the following might contain errors I don't know yet.

#!/bin/sh
DZEN_ICONPATH="${HOME}/.dzen"
BOOL=0
while true; do
  dropbox running
  DROPBOXRUNNING=$?
  if [[ $DROPBOXRUNNING -eq 1 ]]; then
    DROPBOXSTATUS=` dropbox status`
    if [[ $DROPBOXSTATUS = "Idle" ]]; then
      DROPBOXLINE="^i(${DZEN_ICONPATH}/dropbox-idle.xpm)"
    elif [[ $DROPBOXSTATUS = "Starting..." ]]; then
      DROPBOXLINE="^i(${DZEN_ICONPATH}/dropbox-logo.xpm)"
    else
      if [[ $BOOL -eq 0 ]]; then
	DROPBOXLINE="^i(${DZEN_ICONPATH}/dropbox-busy.xpm)"
      else
	DROPBOXLINE="^i(${DZEN_ICONPATH}/dropbox-busy2.xpm)"
      fi
      BOOL=~$BOOL
    fi
  else
    DROPBOXLINE="^ca(1,dropbox start)^i(${DZEN_ICONPATH}/dropbox-x.xpm)^ca()"
  fi
  echo "$DROPBOXLINE"
  sleep 1s
done | dzen2

When dropbox is not running, clicking on the icon starts it. I am using the dropbox-cli and dzen2-xft-xpm-xinerama-svn packages from AUR.
I am trying to add more stuff to this. Lets see how it goes. smile

Offline

#275 2011-10-22 21:58:45

Jabrick
Member
Registered: 2011-05-13
Posts: 79

Re: dzen & xmobar Hacking Thread

Moved to newbie section.

Last edited by Jabrick (2011-10-22 22:18:20)

Offline

Board footer

Powered by FluxBB