Welcome
Welcome to antiX-forum.

You are currently viewing our boards as a guest, which gives you limited access to view most discussions and access our other features. By joining our free community, you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content, and access many other special features. Registration is fast, simple, and absolutely free, so please, join our community today!

Have different conkies for IceWM and FluxBox.

Post your tips and tricks here.

Have different conkies for IceWM and FluxBox.

Postby secipolla on Fri Oct 23, 2009 1:07 pm

I like to display the keyboard shortcuts with conky so I get used to them step-by-step. Only these shortcuts are different for each window manager so I created two different conkyrc files, one for icewm and one for fluxbox.
Also I made tiny scripts for the proper conkyrc file to be loaded in accordance with the window manager.

Step 1 - you have already a ~/.conkyrc file so you create another one for the other window manager. If you're in icewm, create ~/.conkyrcflux, if you're in fluxbox, create ~/.conkyrcice.

My conkyrc for icewm
Code: Select all
alignment top_right
background yes
border_width 1
cpu_avg_samples 2
default_color 5825c9
default_outline_color 5825c9
default_shade_color red
double_buffer yes
draw_borders no
draw_graph_borders yes
draw_outline no
draw_shades no
use_xft yes
xftfont DejaVu Sans Mono:size=9
gap_x 25
gap_y 65
minimum_size 5 5
net_avg_samples 2
no_buffers yes
out_to_console no
out_to_stderr no
own_window yes
own_window_transparent yes
own_window_class Conky
#own_window_colour aecee0
own_window_type desktop
stippled_borders 0
update_interval 1.0
uppercase no
use_spacer left
show_graph_scale no
show_graph_range no

TEXT
$nodename - $sysname $kernel
$hr
Uptime:$alignr $color $uptime
Frequency (in MHz):$alignr $color $freq
RAM Usage:$alignr $color $mem/$memmax - $memperc%
Swap Usage:$alignr $color $swap/$swapmax - $swapperc%
CPU Usage:$alignr $color $cpu%
Processes:$alignr $color $processes  Running:$color $running_processes
$hr
File systems:
/ $color${fs_used /} +${fs_free /} ${fs_bar 6 /}
$hr
Networking:
Up:  ${upspeed eth0}$alignr Down:  ${downspeed eth0}
$hr
Super+space$alignr Run
Super+t$alignr Terminal
Super+f$alignr File Manager
Super+u$alignr Rox
Super+e$alignr Editor
Super+m$alignr Media Player
Super+w$alignr Web Browser
Super+n$alignr Htop
Super+o$alignr Conky on/off
PrtSc$alignr Screenshot
Insert$alignr Screensaver

Alt+Shift+F2$alignr Tile Vert
Alt+Shift+F3$alignr Tile Horz

Super+r$alignr Reboot
Super+x$alignr Shutdown


My conkyrc for fluxbox

Code: Select all
alignment top_right
background yes
border_width 1
cpu_avg_samples 2
default_color 5825c9
default_outline_color 5825c9
default_shade_color red
double_buffer yes
draw_borders no
draw_graph_borders yes
draw_outline no
draw_shades no
use_xft yes
xftfont DejaVu Sans Mono:size=9
gap_x 25
gap_y 65
minimum_size 5 5
net_avg_samples 2
no_buffers yes
out_to_console no
out_to_stderr no
own_window yes
own_window_transparent yes
own_window_class Conky
#own_window_colour 6F728E
own_window_type desktop
stippled_borders 0
update_interval 1.0
uppercase no
use_spacer left
show_graph_scale no
show_graph_range no

TEXT
$nodename - $sysname $kernel
$hr
Uptime:$alignr $color $uptime
Frequency (in MHz):$alignr $color $freq
RAM Usage:$alignr $color $mem/$memmax - $memperc%
Swap Usage:$alignr $color $swap/$swapmax - $swapperc%
CPU Usage:$alignr $color $cpu%
Processes:$alignr $color $processes  Running:$color $running_processes
$hr
File systems:
/ $color${fs_used /} +${fs_free /} ${fs_bar 6 /}
$hr
Networking:
Up:  ${upspeed eth0}$alignr Down:  ${downspeed eth0}
$hr
Alt+d$alignr ShowDesktop
Alt+m$alignr Minimize
Alt+f$alignr Iceweasel
Alt+t$alignr Terminal
Alt+r$alignr RootMenu
Alt+s$alignr Screenshot
Alt+h$alignr Htop
Alt+c$alignr ControlCenter
Super+t$alignr Conky On/Off


Step 2 - create a folder ~/bin/ and two scripts in it, one for icewm to load its conky and another for fluxbox to load its own.
Open a new text file, paste the following text and save as conkyice:
Code: Select all
#!/bin/bash
mv ~/.conkyrc ~/.conkyrcflux && mv ~/.conkyrcice ~/.conkyrc

Then right-click it, choose 'properties' and check execute for owner, group and world/other users.

Open another new text file, paste the following text and save as conkyflux:
Code: Select all
#!/bin/bash
mv ~/.conkyrc ~/.conkyrcice && mv ~/.conkyrcflux ~/.conkyrc

Right-click it and make it executable as well.

Now if you go from fluxbox to icewm you only need to run conkyice (Super+spacebar, and type conkyice) and if you go from icewm to fluxbox you only need to run conkyflux to set the proper conky.
Last edited by secipolla on Fri Oct 23, 2009 4:23 pm, edited 1 time in total.
secipolla
 
Posts: 437
Joined: Sun Jun 15, 2008 2:56 pm
Location: São Paulo / Brazil

Re: Have different conkies for IceWM and FluxBox.

Postby secipolla on Fri Oct 23, 2009 4:01 pm

For the scripts to run at startup of icewm and fluxbox they would have to be expanded so they wouldn't make any change when starting the same window manager as the last time.
secipolla
 
Posts: 437
Joined: Sun Jun 15, 2008 2:56 pm
Location: São Paulo / Brazil

Re: Have different conkies for IceWM and FluxBox.

Postby eriefisher on Mon Nov 02, 2009 2:02 am

That a lot going on for conky. A better option would be to just create two conkyrc files, one for each WM and place them in their respective folders(~/.icewm + ~/.fluxbox). Next would be to just add a line to to respective startup script.

Fluxbox:
Open /home/username/.fluxbox/startup in leafpad or your favorite text editor(as user) and add
Code: Select all
sleep 5 && conky -c ~/.fluxbox/conkyrc &

Save and close.

Icewm:
Open /home/username/.icewm/startup in leafpad or your favorite text editor(as user) and add
Code: Select all
sleep 5 && conky -c ~/.icewm/conkyrc &

Save and close.

In both WM the line must be added before the line that starts the WM itself. 'sleep 5' is added to delay conky from starting to make sure the WM is running first. The -c option tells conky which file to read. The two files can be completely different or exactly the same, it doesn't matter.
eriefisher

Image

SOME PEOPLE ARE LIKE SLINKIES - NOT REALLY GOOD FOR ANYTHING BUT THEY BRING A SMILE TO YOUR FACE WHEN PUSHED DOWN THE STAIRS.
User avatar
eriefisher
 
Posts: 1431
Joined: Sun Oct 07, 2007 5:16 pm
Location: Canada's South Coast

Re: Have different conkies for IceWM and FluxBox.

Postby secipolla on Mon Nov 02, 2009 12:44 pm

Thanks.
I used .conkyrc (hidden file) just to keep the habit. Also it works without the sleep command.
For Fluxbox, I added the command to ~/.fluxbox/apps file:
Code: Select all
[startup] {conky -c ~/.fluxbox/.conkyrc}
secipolla
 
Posts: 437
Joined: Sun Jun 15, 2008 2:56 pm
Location: São Paulo / Brazil

Re: Have different conkies for IceWM and FluxBox.

Postby secipolla on Mon Nov 02, 2009 11:25 pm

I customized conkytoggle for each wm too:
conkytoggleice -
Code: Select all
#!/bin/sh

if pidof conky | grep [0-9] > /dev/null
then
killall conky
else
conky -c ~/.icewm/.conkyrc
fi


conkytoggleflux -
Code: Select all
#!/bin/sh

if pidof conky | grep [0-9] > /dev/null
then
killall conky
else
conky -c ~/.fluxbox/.conkyrc
fi
secipolla
 
Posts: 437
Joined: Sun Jun 15, 2008 2:56 pm
Location: São Paulo / Brazil

Re: Have different conkies for IceWM and FluxBox.

Postby eriefisher on Tue Nov 03, 2009 1:20 am

Interesting.
eriefisher

Image

SOME PEOPLE ARE LIKE SLINKIES - NOT REALLY GOOD FOR ANYTHING BUT THEY BRING A SMILE TO YOUR FACE WHEN PUSHED DOWN THE STAIRS.
User avatar
eriefisher
 
Posts: 1431
Joined: Sun Oct 07, 2007 5:16 pm
Location: Canada's South Coast


Return to Tips and Tricks

Who is online

Users browsing this forum: No registered users and 0 guests