SEARCH

Enter your search query in the box above ^, or use the forum search tool.

You are not logged in.

#1 2009-11-06 20:23:33

Joe-Doe
#! Member
Registered: 2009-10-02
Posts: 50

[Solved] Workspace indicator

Hey there,

i'm using Crunchbang for a few months now and since i'm finally comfortable with all my setups i started to play around with the look&feel.

Is there any way to add an indicator that shows me wich workspace i'm on? At the moment i'm using only 2, but i plan to upgrade to 3 or 4, so having one would indeed be a nice feature.

I looked for tint2 solutions, but couldn't find any, so maybe you guys can help me out.
I had the following ideas:

1. since i don't have borders around my tint panels, the active ws's taskbar could get a border
2. a written text in the tint taskbars like "one for ws 1 etc." with the text getting "highlighted" when ws is active
3. a little indicator in the free space next to my tint panel (i'd prefer numbers) with the corresponding number of the workspace highlighted

any ideas?

thanks in advance smile

Last edited by Joe-Doe (2010-01-29 10:41:20)


Cheers,

Joe

Offline

Be excellent to each other!

#2 2009-11-06 20:39:52

benj1
Wiki Wizard
From: Yorkshire, England
Registered: 2009-09-05
Posts: 1,084

Re: [Solved] Workspace indicator

i know you can do it in conky

ps if that isn't what you want, what youre looking for is a 'pager' if you need to google.


- - - - - - - - Wiki Pages - - - - - - -
#! install guide           *autostart programs, modify the menu & keybindings
configuring Conky       *installing scripts

Offline

#3 2009-11-06 20:56:06

Hanna
Conky Queen
From: Finland
Registered: 2008-11-29
Posts: 760

Re: [Solved] Workspace indicator


HANNA (without "h" in the end) likes green and #! smile
Also know as ultraturquoise online

Offline

#4 2009-11-06 21:11:43

Joe-Doe
#! Member
Registered: 2009-10-02
Posts: 50

Re: [Solved] Workspace indicator

First of all, thanks to both of you smile

The conky thing looks like it could do what i tried to describe with my third idea.
But since i'm not that good with conky and hanna has the title conky queen...

Would it be possible to use digits (or words) instead of the squares, to indicate the active desktop by changing the font color?

I must admit i'm a little helpless with this, so any hints would be highly appreciated...

p.s. i don't need to make a second conky panel for that, do i?


Cheers,

Joe

Offline

#5 2009-11-06 21:30:21

Hanna
Conky Queen
From: Finland
Registered: 2008-11-29
Posts: 760

Re: [Solved] Workspace indicator

You don't need another conky panel (unless of course if you want), you can just add this in your current conkyrc where you want it.
This would show the number of desktop up to four desktop (if you need more, you can obv add them), and change the colour (BD3535) to what is best for you.

${if_match ${desktop}==1}${color BD3535}1${else}${color}1${endif} ${if_match ${desktop}==2}${color BD3535}2${else}${color}2${endif} ${if_match ${desktop}==3}${color BD3535}3${else}${color}3${endif} ${if_match ${desktop}==4}${color BD3535}4${else}${color}4${endif}

It will look something like this:
vMnBubQ

ps... I think londonali would be a lot better conky queen than I am...

Last edited by Hanna (2009-11-06 21:33:46)


HANNA (without "h" in the end) likes green and #! smile
Also know as ultraturquoise online

Offline

#6 2009-11-06 22:01:12

Joe-Doe
#! Member
Registered: 2009-10-02
Posts: 50

Re: [Solved] Workspace indicator

Wow....thank you soo much!!!

Are there any settings i need to change though, because it shows the digits, but there's no color changing.

I also simplified the code to simply show 1 if desktop 1 and 2 if desktop 2, just to test if i broke something while copy&paste'ing (happens), but it's the same...


Cheers,

Joe

Offline

#7 2009-11-06 22:08:22

Hanna
Conky Queen
From: Finland
Registered: 2008-11-29
Posts: 760

Re: [Solved] Workspace indicator

^could you post here what you have exactly now?


HANNA (without "h" in the end) likes green and #! smile
Also know as ultraturquoise online

Offline

#8 2009-11-06 22:13:14

Joe-Doe
#! Member
Registered: 2009-10-02
Posts: 50

Re: [Solved] Workspace indicator

##############################################
#  Settings
##############################################
background yes
use_xft yes
xftfont Sans:size=8
xftalpha 1
update_interval 1.0
total_run_times 0
own_window yes
own_window_transparent yes
own_window_type desktop
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
double_buffer yes
minimum_size 200 200
maximum_width 240
draw_shades yes
draw_outline no
draw_borders no
draw_graph_borders no
default_color white
default_shade_color black
default_outline_color white
alignment top_right
gap_x 12
gap_y 12
no_buffers yes
uppercase no
cpu_avg_samples 2
override_utf8_locale no
##############################################
#  Output
##############################################
TEXT
SYSTEM INFO:
${hr}
Host:$alignr$nodename
Uptime:$alignr$uptime
RAM:$alignr$mem/$memmax
Swap usage:$alignr$swap/$swapmax
Disk usage:$alignr${fs_used /}/${fs_size /}
CPU usage:$alignr${cpu cpu0}%
Updates:$alignr${execi 3600 aptitude search "~U" | wc -l} 


SHORTCUT KEYS:
${hr}
Alt+F2$alignr Run Dialog
Alt+F3$alignr Alt Menu
Super+space$alignr Main Menu
Super+tab$alignr Client Menu
Super+t$alignr Terminal
Super+f$alignr File Manager
Super+e$alignr Editor
Super+m$alignr Media Player
Super+w$alignr Web Browser
Super+c$alignr Clock
Super+l$alignr Lock Screen
Super+v$alignr Volume Control
Super+u$alignr System Update
Super+x$alignr Logout
PrtSc$alignr Screenshot

# ${if_match ${desktop}==1}${color BD3535}1${else}${color}1${endif} ${if_match ${desktop}==2}${color BD3535}2${else}${color}2${endif} ${if_match ${desktop}==3}${color BD3535}3${else}${color}3${endif} ${if_match ${desktop}==4}${color BD3535}4${else}${color}4${endif}
${if_match ${desktop}==1}${color white}1${else}${color white}2${endif} 

It's the basic settings, i only added the Update line and the pager


Cheers,

Joe

Offline

#9 2009-11-06 22:17:44

Hanna
Conky Queen
From: Finland
Registered: 2008-11-29
Posts: 760

Re: [Solved] Workspace indicator

You should have it like this... you can't really simplify it, at least I can't come up with anything simpler that would work (if you want to see 1 2 and then when you are on desktop 1 it's different colour than 2).

${if_match ${desktop}==1}${color fffff}1${else}${color}1${endif} ${if_match ${desktop}==2}${color ffffff}2${else}${color}2${endif}

This would show just the number of the desktop:

${if_match ${desktop}==1}1${endif} ${if_match ${desktop}==2}2${endif}

btw. I have friend who lives in Bochum big_smile

Last edited by Hanna (2009-11-06 22:19:14)


HANNA (without "h" in the end) likes green and #! smile
Also know as ultraturquoise online

Offline

#10 2009-11-06 22:29:56

Joe-Doe
#! Member
Registered: 2009-10-02
Posts: 50

Re: [Solved] Workspace indicator

Really? Well i know a Hanna from Finland...
Just kidding tongue
Where exactly does he come from?

I added this:

${if_match ${desktop}==1}1${endif} ${if_match ${desktop}==2}2${endif}

But it still only shows the two numbers next to each other, no changes when switching desktops... sad


Cheers,

Joe

Offline

#11 2009-11-06 22:34:26

Hanna
Conky Queen
From: Finland
Registered: 2008-11-29
Posts: 760

Re: [Solved] Workspace indicator

^It just crossed in my mind, what version of conky you have (in terminal: conky -v), ${desktop} requires conky 1.7.2.

You find the newest conky here: https://launchpad.net/~norsetto/+archive/ppa

Last edited by Hanna (2009-11-06 22:37:00)


HANNA (without "h" in the end) likes green and #! smile
Also know as ultraturquoise online

Offline

#12 2009-11-06 22:40:23

Joe-Doe
#! Member
Registered: 2009-10-02
Posts: 50

Re: [Solved] Workspace indicator

Alright...that's embarassing..


Cheers,

Joe

Offline

#13 2009-11-06 22:43:13

Hanna
Conky Queen
From: Finland
Registered: 2008-11-29
Posts: 760

Re: [Solved] Workspace indicator

Well, I should have remembered it earlier. tongue


HANNA (without "h" in the end) likes green and #! smile
Also know as ultraturquoise online

Offline

#14 2009-11-07 11:55:38

Nicky
#! CrunchBanger
From: Paris (France)
Registered: 2009-04-05
Posts: 172

Re: [Solved] Workspace indicator

I have that in my conky:

Bureau ${color red}${exec wmctrl -d | grep \* | awk '{print $10}'}

but for this to work you need to install wmctrl by "sudo apt-get wmctrl" in a terminal.

For info "bureau" just mean desktop in french

Offline

#15 2009-11-07 12:49:50

benj1
Wiki Wizard
From: Yorkshire, England
Registered: 2009-09-05
Posts: 1,084

Re: [Solved] Workspace indicator

Nicky wrote:

I have that in my conky:

Bureau ${color red}${exec wmctrl -d | grep \* | awk '{print $10}'}

but for this to work you need to install wmctrl by "sudo apt-get wmctrl" in a terminal.

For info "bureau" just mean desktop in french

you know you don't need grep for that.

wmctrl -d | awk '/\*/ {print $10}'

would do it smile


- - - - - - - - Wiki Pages - - - - - - -
#! install guide           *autostart programs, modify the menu & keybindings
configuring Conky       *installing scripts

Offline

#16 2009-11-07 13:05:00

Nicky
#! CrunchBanger
From: Paris (France)
Registered: 2009-04-05
Posts: 172

Re: [Solved] Workspace indicator

Right, it works tongue

I am far to be a specialist, I adapted the command from another one to do what I wanted but I don't understand everything big_smile

Offline

#17 2009-11-07 13:36:06

benj1
Wiki Wizard
From: Yorkshire, England
Registered: 2009-09-05
Posts: 1,084

Re: [Solved] Workspace indicator

Nicky wrote:

Right, it works tongue

I am far to be a specialist, I adapted the command from another one to do what I wanted but I don't understand everything big_smile

don't worry about it, i quite like awk so i see things like that all the time

if your interested this is quite a good resource for awk
http://awk.info/?index


- - - - - - - - Wiki Pages - - - - - - -
#! install guide           *autostart programs, modify the menu & keybindings
configuring Conky       *installing scripts

Offline

#18 2009-11-07 13:42:05

Kookaburra
#! CrunchBanger
From: Orléans - France
Registered: 2009-09-03
Posts: 234

Re: [Solved] Workspace indicator

Nicky wrote:

I have that in my conky:

Bureau ${color red}${exec wmctrl -d | grep \* | awk '{print $10}'}

but for this to work you need to install wmctrl by "sudo apt-get wmctrl" in a terminal.

For info "bureau" just mean desktop in french

I love it, thanks !
J'aime beaucoup, merci big_smile

wink

Offline

#19 2009-11-07 13:50:57

searchOne
#! Member
From: Germany - Hessen - DA
Registered: 2009-08-28
Posts: 51
Website

Re: [Solved] Workspace indicator

Hi,
From Conky 1.7.2, there are these new commands:

desktop -    Number of the desktop on which conky is running or the message "Not running in X" if this is the case.
desktop_name - Name of the desktop on which conky is running or the message "Not running in X" if this is the case.
desktop_number - Number of desktops or the message "Not running in X" if this is the case.

Thus it is quite simply leave the name of the desktop and also display the number! big_smile


64Bit - HP Compaq Presario CQ60-105EG, 4GB RAM, 160GB, NVIDIA GeForce 8200M, AMD Athlon X2 Dual-Core / Mandriva 2009.1 Spring Free KDE, Mandriva 2010.1 Free KDE, #! Crunchbang 10 Alpha 2 Statler

Offline

#20 2009-11-07 14:03:13

Joe-Doe
#! Member
Registered: 2009-10-02
Posts: 50

Re: [Solved] Workspace indicator

Alright, everything works now, thanks a ton!

One problem though...i wanted to setup a CrunchBang logo in my conky, while thinking about it i realized that you can't use the "'#" symbol...so is there anyway to tell the script to read on after the "#" symbol?


Cheers,

Joe

Offline

#21 2009-11-07 14:14:33

searchOne
#! Member
From: Germany - Hessen - DA
Registered: 2009-08-28
Posts: 51
Website

Re: [Solved] Workspace indicator

Hi, you just have a \ before the # set, then it is read as a normal character!

blablabla \#

Display:

blablabla #

Last edited by searchOne (2009-11-07 14:17:05)


64Bit - HP Compaq Presario CQ60-105EG, 4GB RAM, 160GB, NVIDIA GeForce 8200M, AMD Athlon X2 Dual-Core / Mandriva 2009.1 Spring Free KDE, Mandriva 2010.1 Free KDE, #! Crunchbang 10 Alpha 2 Statler

Offline

#22 2009-11-07 15:44:33

benj1
Wiki Wizard
From: Yorkshire, England
Registered: 2009-09-05
Posts: 1,084

Re: [Solved] Workspace indicator

searchOne wrote:

Hi, you just have a \ before the # set, then it is read as a normal character!

blablabla \#

Display:

blablabla #

this is the only problem ive found with crunchbang.

i mean what happens if youre writing a document about crunchbang and python?
you can't call it '#! /usr/bin/python' wink


- - - - - - - - Wiki Pages - - - - - - -
#! install guide           *autostart programs, modify the menu & keybindings
configuring Conky       *installing scripts

Offline

#23 2009-11-07 18:48:24

Kookaburra
#! CrunchBanger
From: Orléans - France
Registered: 2009-09-03
Posts: 234

Re: [Solved] Workspace indicator

The new version of Conky have cool news items ! big_smile

Offline

#24 2009-11-08 14:41:30

Nicky
#! CrunchBanger
From: Paris (France)
Registered: 2009-04-05
Posts: 172

Re: [Solved] Workspace indicator

benj1 wrote:
Nicky wrote:

Right, it works tongue

I am far to be a specialist, I adapted the command from another one to do what I wanted but I don't understand everything big_smile

don't worry about it, i quite like awk so i see things like that all the time

if your interested this is quite a good resource for awk
http://awk.info/?index

Thanks, I put it in my to read list smile

Offline

Help fund CrunchBang, donate to the project!

#25 2009-11-08 14:44:09

Nicky
#! CrunchBanger
From: Paris (France)
Registered: 2009-04-05
Posts: 172

Re: [Solved] Workspace indicator

Kookaburra wrote:
Nicky wrote:

I have that in my conky:

Bureau ${color red}${exec wmctrl -d | grep \* | awk '{print $10}'}

but for this to work you need to install wmctrl by "sudo apt-get wmctrl" in a terminal.

For info "bureau" just mean desktop in french

I love it, thanks !
J'aime beaucoup, merci big_smile

wink

De rien wink

Offline

Board footer

Powered by FluxBB

Copyright © 2012 CrunchBang Linux.
Proudly powered by Debian. Hosted by Linode.
Debian is a registered trademark of Software in the Public Interest, Inc.
Server: acrobat

Debian Logo