You are not logged in.

#1 2008-09-27 17:43:19

leo2501
Member
From: Buenos Aires, Argentina
Registered: 2007-07-07
Posts: 637

dwm to compiz configuration

hi! im a religious dwm user, but i need to admit, that being bored at home last weekend, i did install compiz, and configure it to look and feel same way as my dwm config... it means, minimum compiz setup, nearly no effects, nor window borders, the only effects i not deactivate were:
- viewport switcher
- expo
- desktop wall
- zoom desktop
- ring switcher

so here is the result

-------------------------------------------
Config files:
-------------------------------------------
- .Xdefaults:
http://dotfiles.org/~leo2501/.Xdefaults
- .xinitrc:
http://dotfiles.org/~leo2501/.xinitrc
- dwm config.h:
http://dotfiles.org/~leo2501/config.h
- compiz config file:
http://dotfiles.org/~leo2501/.compiz.profile

-------------------------------------------
Scripts:
-------------------------------------------
- dwm-status:
http://pastebin.com/f401f357e
- start-fusion:
http://pastebin.com/f89ef8d2

-------------------------------------------
Screens:
-------------------------------------------
dwm clean screenshot:
desktop20080927142907dwvg1.th.jpgthpix.gif

dwm + dmenu:
desktop20080927142922dwnt7.th.jpgthpix.gif

dwm + urxvt's + screen:
desktop20080927145112dp0.th.jpgthpix.gif

-------------------------------

compiz Clean screenshots:
desktop20080927145846lg0.th.jpgthpix.gif

compiz + dmenu:
desktop20080927145935li2.th.jpgthpix.gif

compiz + urxvt + screen:
desktop20080927145816rl4.th.jpgthpix.gif

Last edited by leo2501 (2008-09-27 18:26:57)


Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away.
-- Antoine de Saint-Exupery

Offline

#2 2008-09-27 17:55:53

moljac024
Member
From: Serbia
Registered: 2008-01-29
Posts: 2,676

Re: dwm to compiz configuration

Where are the screenshots ? smile


The day Microsoft makes a product that doesn't suck, is the day they make a vacuum cleaner.
--------------------------------------------------------------------------------------------------------------
But if they tell you that I've lost my mind, maybe it's not gone just a little hard to find...

Offline

#3 2008-09-27 18:04:27

leo2501
Member
From: Buenos Aires, Argentina
Registered: 2007-07-07
Posts: 637

Re: dwm to compiz configuration

lol, i needed to quit x and set compiz to get the screens tongue only configs are missing now, im uploading them


Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away.
-- Antoine de Saint-Exupery

Offline

#4 2008-09-27 18:20:21

leo2501
Member
From: Buenos Aires, Argentina
Registered: 2007-07-07
Posts: 637

Re: dwm to compiz configuration

TO-DO:

- find a way to make the bottom bar display compiz "viewport"

but, i feel that this might help some people that want to use compiz standalone, hope you find it useful!


Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away.
-- Antoine de Saint-Exupery

Offline

#5 2009-02-02 21:11:00

yvonney
Member
Registered: 2008-06-11
Posts: 671

Re: dwm to compiz configuration

nice leo! you've assisted me before (can't recall what at the moment though I recall it was important)

So... for a while I'd like to have gnome co-exist with DWM.... could you take a look at this post and tell me what you might think?

http://bbs.archlinux.org/viewtopic.php?id=64501

What all do I need to change/add to get the gnome bottom menu bar to remain OR at least access to my folders AND the program boot icons or similar somehow...

The variables seem to be:

1) gnome-sessions-preferences (messy and will eventually not exist I think)
2) creating a .gnomerc file and adding: export WINDOW_MANAGER=dwm
3) try exactly what's in the gude from the link above

etc. :--)

no luck yet...

I have dmenu installed as well.

Offline

#6 2009-02-06 02:45:31

yvonney
Member
Registered: 2008-06-11
Posts: 671

Re: dwm to compiz configuration

Hi Leo... couple of questions, beening having a great time and a lot of your posts have been SO helpful for dwm etc.

So:  may I ask....

Do you still use dzen2? would like to have as SMALL a bar as possible and ideally would get conky-cli into the single dwm bar... though perhaps dzen2 IS the best solution for notifications as well as conky piping...dunno

Notifications and whatever could be useful and I want the simplest way to get the most infos.

I get the EOF issue on the right of dwm (WITH dzen2) that others have mentioned, and of course have dzen causing problems up top cutting off everything even without bring up dwm with an alt-p. Should I stop trying to use dzen maybe I think.

I'm really learning a lot about simplest and coolest. though still pretty rough understanding.


I use urxvt-unicode-256color-9.06-2   I wonder: Are all the just as compatible with Xdefault stuff. I mean if I don't specify color setting in this 256 color version in Xdefaults is it ok with that. Not a big question though.

My biggest concern is using the coolest small stuff that works best with dwm.

1) I'm also wondering if there's a way to optimize dmenu or have hotkeys so that I don't have to type 'pcm' to get pcmanfm lined up for booting.

2) I also notice you've adapted many thing I think over the screenshots of the month posts.
Do you still have a double menu bar on the bottom and I saw you have 2 dwm bars and also one below every tile. You no longer use dzen2?

3) Is all of this embeded sort of or is it because you have no border around the tiles...
http://img522.imageshack.us/img522/7471 … 112dp0.jpg

all very wonderful.

thanks!

I have almost ONLY this in .xinitrc and dwm conky-cli and dzen all run I guess... (have numlockx &  numlockx &    as well)
though nothing like:
exec dwm

FIRST WAY: THIS WORKED: (and am using ~/bin/dwm-status with your dwm-status file in the folder there.)
conky | dzen2 -y 1010 -fg '#ffffff' -bg '#000000' -ta r -fn '-*-fixed-medium-r-*-*-18-*-*-*-*-*-iso8859-*' &
exec ~/bin/dwm-status | dwm

SECOND WAY good as just dwm (?): I changed to this a test from the wiki for dwm and it work PIPED into the right side of dwm
conky -c ~/.conkyrc-dwm | exec dwm  (with wiki code in .conkyrc-dwm)

Is this NOT the best way to be flexible for other piping and packages you use?

I do not know what is the most flexible way to run dwm with the other packages I will love.



I run as root.

Last edited by yvonney (2009-02-06 04:03:20)

Offline

#7 2009-02-06 09:50:02

leo2501
Member
From: Buenos Aires, Argentina
Registered: 2007-07-07
Posts: 637

Re: dwm to compiz configuration

well, im not using dzen2 now, but im planning to use it to show some events at the top, i dont know, maybe new mail, change volume, AC power pluging unpluging, something like that, but its an idea right now...

now i only use the dwm-status script piped to dwm, so i have this in .xinitrc:

exec ~/bin/start-dwm

and it has:

#!/bin/bash
~/bin/dwm-status | while true; do /usr/bin/dwm > /dev/null; done;

with that you can exit dwm and it just starts again, useful when you compile it with a change in your config.h

and dwm-status consist on a few home made scripts to show uptime, temp, ram, swap, free disk space, new mail, new updates available, volume level, battery level (i replaced my giant desktop by a msi wind netbook big_smile im so happy with dwm and arch in it) and time and date

That bottom bar in every tile it's gnu/screen, the app i commented you before, i can't live without it, i even run X throught one of it's "tabs" that way i can see X output not leaving the X session at all

here's my .screenrc, i used to had names at every tab, but i find it irrelevant because i remember very well where things are, and sometimes i like to swap them, and it looks like dwm bar as well, see...

http://arch.kimag.es/share/21287616.png
http://arch.kimag.es/share/23833288.png

startup_message off
#termcapinfo xterm*|Eterm|mlterm|rxvt 'hs:ts=\E]0;:fs=\007:ds=\E]0;screen\007'
termcapinfo rxvt-unicode ti@:te@     #enable SHIFT-PGUP / SHIFT-PGDOWN scroll
#termcapinfo wy* CS=\E[?1h:CE=\E[?1l:vi=\E[?25l:ve=\E[?25h:VR=\E[?5h:VN=\E[?5l:cb=\E[1K:CD=\E[1J
terminfo rxvt-unicode ti@:te@:
term screen-256color
setenv LC_CTYPE en_US.UTF-8
defutf8 on
setenv DISPLAY ':0'
nonblock on
vbell off
msgwait 10
shelltitle ''

screen    -t '' 1
screen    -t '' 2
screen    -t '' 3
screen    -t '' 4
screen    -t '' 5
screen    -t '' 6
screen    -t '' 7 top
screen    -t '' 8 sudo inotail -f -n 30 /var/log/everything.log
screen    -t '' 9
#select 9

bind = resize =
bind + resize +1
bind - resize -1
bind _ resize max
bind c screen 1 # Window numbering starts at 1, not 0.
bind 0 select 10
# make life easier, f1-f10 selects screens 0-9
#bindkey -k k1 select 1
#bindkey -k k2 select 2
#bindkey -k k3 select 3
#bindkey -k k4 select 4
#bindkey -k k5 select 5
#bindkey -k k6 select 6
#bindkey -k k7 select 7
#bindkey -k k8 select 8
#bindkey -k k9 select 9
#bindkey -k k0 select 0
# windows select with Shift-Fn. May not work in all terminals.
# (screen only seems to understand up to FA)
#bindkey -k F3 select 1
#bindkey -k F4 select 2
#bindkey -k F5 select 3
#bindkey -k F6 select 4
#bindkey -k F7 select 5
#bindkey -k F8 select 6
#bindkey -k F9 select 7
#bindkey -k FA select 8
#bindkey -k k7 detach # bind F7  to detach screen session from this terminal
#bindkey -k k8 kill   # bind F8  to kill current screen window.
#bindkey -k k9 next   # bind F9 to move to previous window
#bindkey -k F1 prev   # bind F11 to move to next window
#bindkey -k F2 hardstatus alwaysignore # F12 to turn the status bar on
#bindkey -k k9 screen # bind F9  to create a new screen
#bindkey -k k; title  # bind F10 to rename current screen window
#bindkey -k F1 prev   # bind F11 to move to previous window
#bindkey -k F2 next   # bind F12 to move to next window
bindkey "^[Od" prev  # change window with ctrl-left
bindkey "^[Oc" next  # change window with ctrl-right

#let pgup/pgdn scroll under urxvt (see .Xdefaults)
bindkey "^[[5;2~" eval "copy" "stuff ^u"
bindkey -m "^[[5;2~" stuff ^u
bindkey -m "^[[6;2~" stuff ^d

# add CPU idle/sustem/user/interrupt stats
#backtick 100 5 5 tail -1 /var/tmp/vermaden-stats-top
#caption always '%{= wk} %= %100` %='
#backtick 1 60 60 $HOME/bin/get_uptime
#backtick 2 60 60 $HOME/bin/get_cputemp Core0
#backtick 3 60 60 $HOME/bin/get_freemem
#backtick 4 60 60 $HOME/bin/get_freeswap
#backtick 5 60 60 $HOME/bin/get_volume Master
#backtick 6 60 60 $HOME/bin/get_gmail
#backtick 7 60 60 $HOME/bin/get_updates
#backtick 8 60 60 $HOME/bin/get_citytemp | grep Temperature | awk '{print $3}'
backtick 9 60 60 $HOME/bin/get_batterycharge

# An alternative hardstatus to display a bar at the bottom listing the
# windownames and highlighting the current windowname in blue. (This is only
# enabled if there is no hardstatus setting for your terminal)
hardstatus on
hardstatus alwayslastline
#hardstatus string "%w"
#hardstatus string "%{.kW}%-w%{.W}%n %t%{-}%+w"
#hardstatus string "%{.kW}%-w%{.W}%n %t%{-}%+w %=%c %d/%m/%Y" #black+white+bold
#hardstatus string "%{.kw}%-w%{.w}%n %t%{-}%+w %=%c %d/%m/%Y" #black+white+normal
#hardstatus string "%{.kw}%-w%{.Kw}%n %t%{-}%+w %=%c %d/%m/%Y" #black+grey+normal
#hardstatus string "%{.kc}%-w%{.kc}%n*%t%{-}%+w %=%c %d/%m/%Y" #black+cyan+normal
hardstatus string "%{.kc}%-w%{.kw}%n*%t%{-}%+w %= %9` %c %d/%m/%Y" #black+cyan+normal+white selected
#hardstatus string "%{.kc}%-w%{.kw}%n*%t%{-}%+w %= | %1` | %2`C | %3`/%4` | %6`/%7` | %5` | %c %d/%m/%Y" #with dwm status bar
#hardstatus string '%{= kB}%-Lw%{+r}%50> %n%f* %t%{= kB}%+Lw%< %{= kB}%-= %{-}'
#hardstatus alwayslastline '%{bk}[ %{W}%H %{b}][ %{w}%l%{b} ]   %{b}[%{w} %D %d.%m %c:%s%{b} ]'
sorendition kw

# hardcopydir:  The directory which contains all hardcopies.
hardcopydir /home/aleyscha/.hardcopy

You can have "shorcuts" in two ways i think, one is adding them to config.h and recompile dwm, i have keybindings to arandr, an app to manage video output, and others to change volume and launch urxvtc, etc, to launch your apps, and the other way are aliases, in .bashrc for example

alias y="yaourt -Syu --aur"

here's my .bashrc

PS1='[\u@\h \# \W \A]\$ '

### Paths ###
PATH=$PATH:${HOME}/bin
export CDPATH=.:/sda4/Video:/sda4/Audio/Music:/sda4/Movies:/sda4/downloads
export PATH=$PATH:/usr/local/bin:/bin:/usr/bin:/sbin:/usr/sbin
export LC_ALL=C
export PAGER=less
export EDITOR=vim
export HISTCONTROL="ignoredups"
HISTFILE=~/.history
HISTSIZE=4000
SAVEHIST=2000

### autocorrects cd misspellings, 'cd /sur/src/linus' >> 'cd /usr/src/linux' ###
shopt -s cdspell

### Aliases ###
alias hi="history"
alias mountsdd="sudo mount /dev/sdd1 /sdd1"
alias lsl="ls -l --group-directories-first --color=auto -F" #ls -l --group-directories-first --time-style=+"%Y-%m-%d %H:%M" --color=auto -F
alias ls="ls --group-directories-first --color=auto -F" #ls --group-directories-first --time-style=+"%Y-%m-%d %H:%M" --color=auto -F
alias pacman="sudo pacman"
alias y="yaourt -Syu --aur"
alias yy="yes | yaourt -Syu --aur"
alias x="startx"
alias get_log="sudo tail -f /var/log/everything.log"
alias root="sudo su"
alias Reboot="sudo reboot"
alias Shutdown="sudo shutdown -h now"
alias cp="cp -vi"
alias mv="mv -vi"
alias du="du -h"
alias df="df -h"
alias isoinfo="isoinfo -d -i"
alias log_everything="sudo tail -f /var/log/everything.log"
alias isolist="isoinfo -f -i"
alias mocp="mocp -T orpheus"
alias lsdev="ls /dev | grep sd"
alias lsuuid="ls -l /dev/disk/by-uuid/"
alias sync="rsync -r -n -t -p -o -g -v --progress --delete -l"
alias gmail="elinks www.gmail.com"
alias getlive="GetLive --config-file .getliverc"
alias irssi="irssi -n lean2501"
alias Wget="wget -P /sda4/downloads"
alias compilei686="gcc -march=athlon -O2 -pipe -fomit-frame-pointer"
alias compile="gcc -O2 -Wall -pedantic"
alias diskcheck="e2fsck -v"
alias colem32="~/bin/colem/colem32"
alias vgb="~/bin/vgb/vgb"
alias vgba="~/bin/vgba/vgba32"
alias ines="~/bin/ines/ines32"
alias clamclean="clamscan --recursive --infected --bell --remove /downloads/New/"
alias cdo="eject /dev/cdrom"
alias cdc="eject -t /dev/cdrom"
alias mx="chmod a+x"
alias 000="chmod 000"
alias 644="chmod 644"
alias 755="chmod 755"
alias resreset="xrandr --size 1024x600"
alias :q="exit"
alias pebrot="pebrot 2> /dev/null"
alias mplayfb="mplayer -zoom -x 1024 -y 600"
alias cplay="cplay /sda4/Audio/Music/"

### Functions ###
# mkmv - creates a new directory and moves the file into it, in 1 step
# Usage: mkmv <file> <directory>
mkmv() {
    mkdir "$2"
    mv "$1" "$2"
}

# nh - run command detached from terminal and without output
# Usage: nh <command>
nh() {
    nohup "$@" &>/dev/null &
}

### Bash Completion ###
if [ -f /etc/bash_completion ]; then
    . /etc/bash_completion
fi

### Screen Function Retach/list :: s ###
function s {
if [[ $1 ]]; then
    screen -r $1
else
    screen -ls
fi
}
### Screen Function Init_w/title / Init :: S ###
function S {
if [[ $1 ]]; then
    screen -S $1
else
    screen -ls
fi
}
### Screen Function Mirror/List :: sx ###
function sx {
if [[ $1 ]]; then
    screen -x $1
else
    screen -ls
fi
}

### Screen Function Mirror in terminal :: scr ###
function scr {
#case $TERM in
#    xterm*|rxvt*)
    if screen -ls | grep -q Main; then
        screen -xr Main
    else
        screen -S Main
    fi
#    ;;
#esac
}

### dtach function ###
function detach {
if [ -S /tmp/$1.dtach ]; then
    dtach -a /tmp/$1.dtach
else
    dtach -c /tmp/$1.dtach $1
fi
}

### Extract Archives ###
extract () {
    if [ -f $1 ] ; then
        case $1 in
            *.tar.bz2)   tar xjvf $1    ;;
            *.tar.gz)    tar xzvf $1    ;;
            *.bz2)       bzip2 -d $1    ;;
            *.rar)       unrar2dir $1    ;;
            *.gz)        gunzip $1    ;;
            *.tar)       tar xf $1    ;;
            *.tbz2)      tar xjf $1    ;;
            *.tgz)       tar xzf $1    ;;
            *.zip)       unzip2dir $1     ;;
            *.Z)         uncompress $1    ;;
            *.7z)        7z x $1    ;;
            *.ace)       unace x $1    ;;
            *)           echo "'$1' cannot be extracted via extract()"   ;;
        esac
    else
        echo "'$1' is not a valid file"
    fi
}

#bu - Back Up a file. Usage "bu filename.txt"
bu () { cp $1 ${1}-`date +%Y%m%d%H%M`.backup ; }

if [ "$TERM" = "linux" ]; then
    echo -en "\e]P0222222" #black
    echo -en "\e]P8222222" #darkgrey
    echo -en "\e]P1803232" #darkred
    echo -en "\e]P9982b2b" #red
    echo -en "\e]P25b762f" #darkgreen
    echo -en "\e]PA89b83f" #green
    echo -en "\e]P3aa9943" #brown
    echo -en "\e]PBefef60" #yellow
    echo -en "\e]P4324c80" #darkblue
    echo -en "\e]PC2b4f98" #blue
    echo -en "\e]P5706c9a" #darkmagenta
    echo -en "\e]PD826ab1" #magenta
    echo -en "\e]P692b19e" #darkcyan
    echo -en "\e]PEa1cdcd" #cyan
    echo -en "\e]P7ffffff" #lightgrey
    echo -en "\e]PFdedede" #white
    clear #for background artifacting
fi

DO NOT RUN AS ROOT

looking forward to help you smile


Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away.
-- Antoine de Saint-Exupery

Offline

#8 2009-02-06 18:34:34

yvonney
Member
Registered: 2008-06-11
Posts: 671

Re: dwm to compiz configuration

WOW! scanning over all you told of and showed is like .... well .... dunno, it's like nothing else....so great!

I am going to study working screen right now     thanks!

NOTE 2: OH ! do you use screen to do what you would do with dmenu??? you don't use dmenu right now??

NOTE 1: i have dwm at the bottom now ...do you know how to have dmemu open up at the bottom in the dwm bar?

------------------

I have only scanned over you terrific post though my dillema is that when I hit alt-p with dwm/dmenu the bar shows at the top for the time I'm selecting what to boot.  If i were to have anything up there  (I'm not using dzen right now either)

I have recomiled dwm to have it on the bottom like you ..(takes about 20 seconds to do the whole setup and compile thing right!?! why people worry about that!)

Anyways you would guess that it's that dzen2 and the temporary bar of dmenu overlap at the top... when i tried dzen.

AND dzen can cut-off programs/terminals as well you would know (likely some setting when i tried i guess) .. So... maybe you have mentioned how move dzento the bottom... so I will read carefully, enjoyably now...!! I will edit this post when I return.... how wonderful to be arriving at this point after trying months ago... then back to gnome... now getting there this time...! cool!


oh! a while back i went to a laptop after always having desktop. It changes everything ... and good time for laptops and your msi wind for sure!

Last edited by yvonney (2009-02-06 19:08:56)

Offline

#9 2009-02-06 23:16:54

leo2501
Member
From: Buenos Aires, Argentina
Registered: 2007-07-07
Posts: 637

Re: dwm to compiz configuration

Thanks for the comments!

im still using dmenu, yes, it's the best companion for dwm i think, and i only use screen to have my terminal apps so if i want terminate the X session and chat, mail, encodings, and work don't get disturbed...

you can get dmenu at the bottom by adding "-b" to the dmenu command array in config.h, like this...

static const char *dmenucmd[] = { "dmenu_run", "-b", "-fn", font, "-nb", normbgcolor, "-nf", normfgcolor, "-sb", selbgcolor, "-sf", selfgcolor, NULL };

but i personally like it at the top

yes, i never have a laptop before and im in love with my msi wind tongue

talking about dzen2 is a way in dwm to make apps don't use certain amoung of pixels at a screen edge, for example if you want a bar at the top, make apps dont use that top space occupied by the bar...

This post will help you with that... hoo wait... it's by me tongue lol

http://bbs.archlinux.org/viewtopic.php?id=52827

Last edited by leo2501 (2009-02-06 23:18:10)


Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away.
-- Antoine de Saint-Exupery

Offline

#10 2009-02-11 09:08:16

yvonney
Member
Registered: 2008-06-11
Posts: 671

Re: dwm to compiz configuration

Hi...! Amazing things are 'beginning' to be understood by me... and of course.... I thought of your help and other help at the wonder forums all the while...

I was not going to write thought kept thinking.. oh just a little message to say crazy busy and yet learning still....then didn't thinking it a waste of space perhaps.... So anyways!

these past couple of days... I've asked a few main questions of myself ALL about how people go from DE to WM ,,, like me!

1) I found out how to make the bash history not such an eye scan thing when looking back for commands ... So.... I now know the CTR-r brings up reverse search...that's great... I recently knew about the ways to get auto complete working though I needed the bash history to be available too as I'm alway finding lines the work and then they get lost a bit in the history.... there's one other good bash history command that I can't recall this second.

2) VERY interesting is SCREEN!!! I've been looking at your .screenrc and now I'm thinking: I need to find a way for it to have screen start at boot up....   putting  screen &  in the .xinitrc hasn't worked for me the one time I tried... and then I thought   HEY.... what if there's a way to have a BUNCH of apps load into the screens  1-9 all at boot up....  so we could have htop, mc etc etc ...

I am thinking you have seperate instances though as you have about three winddows in one screenshot of yours and the screen 1-9 are at the bottom of each.

I must ask::::  Is there a way to have screen start on boot? Is there any good reason to find a way to autoload a few apps into ONE instance of screen...switchable via  ctr-a 1  ,   ctr-a 2   etc etc.

3) Do you keep seperate instances of screen running in seperate terminal it looks like...?  Also, I never quite understood or know if the cool terminal-looking desktop screenshots were just 'borderless' terminal windows that WERE moveable.... or if they are somehow embedded in the desktop stationary-like... with transparency I guess I thought??  I have SO many things that are shakily understood at this point...

The WONDERFUL part is that I know where I'd like to get to generally and when this point has been reach in the past I always get the result....eventually.... So, I will always remember these past 2 or 3 weeks as been a new era for me.... probably the era I will stay with for a long time.... I wanted full....um,,,, simplicity.... hehehe.... not just handholding with the OS with linux not really understood enough.

I'm a bit rambly as I'm tired.....though a short post felt like a great thing to do right now as I'm going for it with SCREEN!!!!!

Someday soon I will have enough of the pieces fit together and it is great already... cool keycommands and, conky, mc, (mpd or moc), screen, really getting all the cool Xdefaults, xinitirc and the other ~/   and  /etc  files that can all work together with the apps.

OH..... one other thing people in my spot going from DE to WM (tiling  dwm/dmenu)  might encounter....

4) I must find out how to best find out what is the way to boot many of the programs that do not show up in dmenu... I've had a good bit of fun locating the boot icon etc. for several apps that hide away from dmenu or have their name not at all like the way they showed up in gnome's menu system.

This looks interesting now that I think of it again....
http://bbs.archlinux.org/viewtopic.php?id=52827
not quite geting it at the moment though am thinking.


5) Which reminds me that I use many of your files you've posted whih is fun as I need to change things and I learn a bit more each time that way too. Many things still very wobbbbly or course....
conky read-out is very cool...
also: there is one line in .screenrc that references backtick something like:  get_batterycharge

I have tried to figure out somewhat the coolest way to be aware of battery level.... bugs me when the laptop just shuts off!!!!
i like to take the time to find the linux guru's way of doing things....it's slow though so much better for where I am going as of recently.

Geez.... it's all so fascinating....!
no more gnome.... that is SO great to have arrived here from just a few weeks ago... or less...

yep, been thinking about all the people that might get gottcha'd by the little things and more that I'm having fun learnng about....

very best wishes to you and everyone else too!!!


back to screen learning.... and of course some of that usual life stuff...

Last edited by yvonney (2009-02-11 21:07:33)

Offline

#11 2009-02-11 09:39:54

leo2501
Member
From: Buenos Aires, Argentina
Registered: 2007-07-07
Posts: 637

Re: dwm to compiz configuration

Well, about screen, i start it with the "scr" .bashrc function

### Screen Function Mirror in terminal :: scr ###
function scr {
#case $TERM in
#    xterm*|rxvt*)
    if screen -ls | grep -q Main; then
        screen -xr Main
    else
        screen -S Main
    fi
#    ;;
#esac
}

This function is all you will ever need! smile with this you type "scr" in your terminal, and if there's no gnu/screen instance already running, it launch the screen session with all your .screenrc settings, that include the apps, if there's one already running, it mirrors that session in the terminal, so you can have ANY number of the same screen session in multiple terminals with the same session!, all showing a different or the same "tab"

The way to launch a "BUNCH of apps load into the screens  1-9 all at boot up" is in .screenrc

screen    -t '' 1 #the syntax is screen -t '<TITLE>' <TABNUMBER> <COMMAND>
screen    -t '' 2
screen    -t '' 3
screen    -t '' 4
screen    -t '' 5
screen    -t '' 6
screen    -t '' 7 top
screen    -t '' 8 sudo inotail -f -n 30 /var/log/everything.log
screen    -t '' 9
#select 9 #this selects the tab that is presented to you after init

The (i think) benefit of this 'minimal' setups, is that you relay in a few apps, in a typical DE, you install a LOT of programs, (even similar ones... same functionality) and then you browse a huge menu with a lot of icons and names of apps you don't even remember when you installed, for what, or even what they do... So with dmenu, you actually REMEMBER what you REALLY USE, so if ii run a script showing me 'unused apps' i'll discover a lot of programs i forget i had installed, so if i wanna browse, "ALT-P swif..." swiftweasel... if i want my beloved urxvtc, ALT-ENTER... if i want my screen session mirrored/started in urxvtc, ALT-CTRL-ENTER (a keybinding in dwm config.h to urxvtc -e scr) so you understand, that if you are used to a gtk+/qt app, you can always adapt to a CLI one, so there's irssi for chat, mc to file manager (i use thunar when i do a lot of USB mount & unmount), bitlbee for instant messaging, rtorrent & amulecmd for file sharing...

What is magic about this simplicity is that theres a HUGE way to understand it, so to do a graphical "obvious" thing like change one gui color, etc, for doing that simple thing you need to learn TO SEARCH, AND TO MAKE YOUR WAY, is there you realize that you never stop learning, even yesterday i get so happy because after nearly a year using screen i discover the "monitor" stuff big_smile


Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away.
-- Antoine de Saint-Exupery

Offline

#12 2009-02-11 16:35:51

yvonney
Member
Registered: 2008-06-11
Posts: 671

Re: dwm to compiz configuration

leo2501 wrote:

REMEMBER what you REALLY USE

WoW! for me that is timely and profound. my next reinstall of ARCH will just be what I will use. How many things you address with that one...!

My current install and it's successful/understood/productive switch to DWM/DMemu and friends .... has me with a "saving of the list of everything installed on the system" for reference (as text files) ... and at some point in the next while I'll start fresh and just have the lists as text files to scan through I'm I'm looking to remember what WAS on this current install. Long way of saying it....

I'm looking forward to today and enjoying your very helpful post.... looks fabulous.
I love the way you say... 'beloved urxvtc' ...      iI is SO true that the interface we have with such things can be described with an exclamation, or a very very long 'attempt' to detail why...

I like the exclamation!!                fantastic!!!!

the details are everywhere....
the proof of the best roads can come from dedication.... um, and stuff.


UPDATE COMMENT: well at the moment something magical has happened...
seems like apps are running  in screen (without me know quite how they started - hehehe)  and I'm figuring out how it all happened.. 

i've noticed many thing I've already noticed such  as lines in .bashrc, .screenrc  that I JUST put there thanks to you, (bashrc) or that were there (screenrc) and I'm now going.... ok, that must be doing that!!!!

I'll write again at some point soon-ish.... I'm able to get a lot further now....
I'm going to see 'again'  if mutt might be for me today a bit... looks very likely.
claws-mail is nice though I'm definitely getting re-comfortable in urxvtc in a new way.

Last edited by yvonney (2009-02-11 17:11:46)

Offline

#13 2009-02-11 18:43:15

yvonney
Member
Registered: 2008-06-11
Posts: 671

Re: dwm to compiz configuration

Few interesting things:

1) I use jedit as I can't find a way yet to have scite have a projects feature. I use a lot of text files to make various notes on subjects. I fixed jedit (not opening windows fully)  for use in dwm though pasting from console does't work into jedit... obviously a java thing I guess.

2) (I tried the .bashrc function you posted though not working for me - the dwm keybinding funtion is most interesting as well - [[ keybinding in dwm config.h to urxvtc -e scr ]]) 

I'm really trying to have urxvtc open up on boot and a screen instance start up. .screenrc is working great though I currently am not getting urxvtc to autoload nor obviously screen start either.  I did some reading about this I've seen in one of your files:
autocutsel &
urxvtd -q -f -o &

I have it in .xinitrc

Can this somehow start urxvt on startup? And, is there a way to have it start then screen load into it? I feel close though not there yet.

:---))))


3) I'm now studying gkrellm.  Maybe that is how I can have get_batterycharge.  Maybe you use this only in screen. Guessing here... fun!

4) A couple of weeks ago when I was simply working with dwm/dmenu and getting conky_cli running I had a few things to work with:

- putting this in .xinitrc    conky -c ~/.conkyrc-dwm | exec dwm     I believe you have a more straight-foward  'exec dwm' or similar.

- Which makes me think of 2 things that are floating in my head :--): 

THE LINE: # exec ~/bin/dwm-status | dwm  ( I just created the dwn-status and put in in bin though it's not doing anything right now - commented out)
AND:
THE CONFIG FILE:  .conkyrc-dwm   (which is doing the conky to dwm bar thing.

I will clear this all up when later I decide/know which is the best most efficient way to have status/info help and where is best.


Just writing all this here to keep track of my thought.

Right now I could like to know about Number 2) above.   getting urxvt to autostart and the screen to load into it would get me thru the week. hehehehe


so great.

Last edited by yvonney (2009-02-11 18:49:25)

Offline

#14 2009-02-11 20:57:22

yvonney
Member
Registered: 2008-06-11
Posts: 671

Re: dwm to compiz configuration

Here's an interesting to me one.

What does one do if a program is set to minimize upon close, or if it's gui is simply minimized and it's still running. AND, it's not desired or allowed to have a second instance occur upon trying to bring it back up.

Is there a best way with htop/top getting a running process to be visible again. or perhaps more likely, something I've missed entirely!

Yet another one of the fascinating little dilemmas that are going in my DE to WM assention list....  :--)


Oh, also:
I was going over your:
http://dotfiles.org/~leo2501/config.h

and wondered if it would work with 5.3.1

Interested that things change and improve... also thinking as to what of your:
http://dotfiles.org/~leo2501/.xinitrc
is still current....

just thoughts though... I'm having busy fun busy fun week...  there is never any urgency with me pretty much always.
nice day.

Last edited by yvonney (2009-02-11 21:02:20)

Offline

#15 2009-02-11 21:09:22

yvonney
Member
Registered: 2008-06-11
Posts: 671

Re: dwm to compiz configuration

GOT ONE:
the best way is to just type
src

one time in terminal so that is the most automatic way?
it works of course.
i will do more careful reading thinking later when the day is night.
thank you.



----------
NOTE:   @SamC
heheheOOPS!  funny comment... thanks. And:
Yes, I thought about that Sam ..... ARCH'll do that to ya from time to time of course...
I considered that this post wan't getting any attention 'much' due to specific subject. Then again, it gets bumped up every time....so, ... right. Will be tidier in the future.

Last edited by yvonney (2009-02-11 23:36:45)

Offline

#16 2009-02-11 23:26:35

SamC
Member
From: Calgary
Registered: 2008-05-13
Posts: 611
Website

Re: dwm to compiz configuration

Four posts in a row is a sure sign that you should learn to use the "Edit" button.

Offline

#17 2009-02-12 00:06:57

leo2501
Member
From: Buenos Aires, Argentina
Registered: 2007-07-07
Posts: 637

Re: dwm to compiz configuration

mmm let see if i can keep your way... tongue i'll answer you as i remember some of your questions...

=========================================================================
GKRELLM

well for the gkrellm part, http://bbs.archlinux.org/viewtopic.php?id=52827 hoo what tha hell? also a post i did tongue lol

=========================================================================
STATUSBAR

for the conky-cli and status bar scripts i tried with both, scripts, and conky-cli, now i currently use my scripts...

:: dwm-status ::

#!/bin/bash
while true
do
    echo $(get_citytemp)/$(get_cputemp temp1) $(get_freemem)/$(get_freeswap) $(get_diskinfo sda4)/$(get_diskinfo sdc1) $(get_gmail)/$(get_updates) $(get_volume PCM)/$(get_batterycharge) $(date +'%R %d/%m/%Y')
    sleep 60
done

:: dwm-conkystatus ::

background no
out_to_console yes
update_interval 5.0
total_run_times 0
uppercase no

TEXT
${uptime_short}/${execi 60 sh /home/aleyscha/bin/get_citytemp | grep Temperature | awk '{print $3 $4}'} | ${cpu cpu0}%/${execi 60 sh /home/aleyscha/bin/get_cputemp Core0}C/${running_processes}/${processes} | ${execi 60 sh /home/aleyscha/bin/get_freemem}/${execi 60 sh /home/aleyscha/bin/get_freeswap} | /sdb1:${execi 60 sh /home/aleyscha/bin/get_diskinfo sdb1} /sdd1:${execi 60 sh /home/aleyscha/bin/get_diskinfo sdd1} /cdrom:${execi 5 sh /home/aleyscha/bin/get_cdrominfo cdrom} | ${execi 60 /home/aleyscha/bin/get_volume PCM}% | ${downspeed eth0}k/${upspeed eth0}k | ${execi 60 sh /home/aleyscha/bin/get_gmail}/${execi 60 perl /home/aleyscha/bin/arch-updates/conky-updates.pl} | ${time %H:%M %d/%m/%Y}

:: My Scripts ::

get_citytemp

#!/bin/bash
TMP=$(weatherget -m -s ARBA0009 | grep Temperature | awk '{print $3}')
#weatherget -m -s ARDF0127
if [ "$TMP" = "" ]; then
    echo X
else
    echo $TMP
fi

get_cputemp

#!/bin/bash
sensors | grep $1 | awk '{print $2}' | tr -d + | tr -d C

get_freemem

#!/bin/bash
free -m | grep - | awk '{print $4}'

get_freeswap

#!/bin/bash
free -m | grep Swap | awk '{print $4}'

get_diskinfo

#!/bin/bash
dev=$(df -mh | grep /dev/$1 | awk '{print $4}')
if [ "$dev" == "" ]; then
    echo "X"
else
df -mh | grep /dev/$1 | awk '{print $4}' | tr -d G
fi

get_gmail

#!/bin/bash
gmail_login="xxxxxxx.xxxxxxxxx"
gmail_password="xxxxxxxxxxxxxxxxxxxxxx"

dane="$(wget --secure-protocol=TLSv1 --timeout=3 -t 1 -q -O - \
https://${gmail_login}:${gmail_password}@mail.google.com/mail/feed/atom \
--no-check-certificate | grep 'fullcount' \
| sed -e 's/.*<fullcount>//;s/<\/fullcount>.*//' 2>/dev/null)"

if [ -z "$dane" ]; then
    echo "X"
else
    echo "$dane"
fi

get_updates

#! /usr/bin/perl -w
use strict;
# November 15, 2006
# Daniel Vredenburg (Vredfreak)
# This is a program that checks for package updates for Arch Linux users.

open (MYINPUTFILE, "/home/aleyscha/bin/arch-updates/updates.log") or die "No such file or directory: $!";

my $i = 0;
while(<MYINPUTFILE>)
{
        if (/^(.*)\/(.*)(\..*\..*\.)/)  {
                #print " \n";
                $i++;
        }

}
if ($i == 0) {
        print "0";
} else {
        print "$i";
}
close(MYINPUTFILE);

pacsync.sh (add as a cronjob)

#!/bin/bash

# This issues a command to 1. Sync the package database, 
# 2. Check for upgradable packages, 3. print the URL of any possible upgrade. 
# The output of our command gets written to updates.log, which we will use 
# conky_updates.sh to parse to see if there are any available updates.

pacman -Syup --noprogressbar > /home/aleyscha/bin/arch-updates/updates.log

get_volume

#!/bin/bash
amixer sget $1 | tail -n 1 | gawk '{print $5}' | tr -d [%]

get_batterycharge

#!/bin/bash
BATT=$(acpi | cut -d " " -f 9 | sed s/,//g | tr -d %)
if [ "$BATT" = "" ]; then
    echo X
else
    echo $BATT
fi

=========================================================================
URXVTC

i never add it to open when X starts, for me, minimal is also to do things WHEN i need them, not always... but i think that adding

urxvtc -e scr &

to .xinitrc after the urxvtd line will do it

=========================================================================
MINIMIZE

I installed and run stalonetray in tag 9 for that specific purpose, wicd-client and amule, even pidgin use icons when minimized or even start minimized, so that way you can manage those apps

=========================================================================
JEDIT

tryed gvim?

=========================================================================
my updated dwm config.h

/* See LICENSE file for copyright and license details. */

/* appearance */
/*static const char font[]            = "-*-fixed-medium-r-*-*-18-*-*-*-*-*-iso8859-*"; */
static const char font[]            = "-*-terminus-medium-*-*-*-19--*-*-*-*-iso8859-*";
static const char normbordercolor[] = "#cccccc";
static const char normbgcolor[]     = "#000000";
static const char normfgcolor[]     = "#cccccc";
static const char selbordercolor[]  = "#cccccc";
static const char selbgcolor[]      = "#222222";
static const char selfgcolor[]      = "#ffffff";
static unsigned int borderpx        = 0;        /* border pixel of windows */
static unsigned int snap            = 32;       /* snap pixel */
static Bool showbar                 = True;     /* False means no bar */
static Bool topbar                  = False;     /* False means bottom bar */
static Bool readin                  = True;     /* False means do not read stdin */
static Bool usegrab                 = False;    /* True means grabbing the X server
                                                   during mouse-based resizals */

    /* tagging */
static const char tags[][MAXTAGLEN] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" };
static unsigned int tagset[] = {1, 1}; /* after start, first tag is selected */

static Rule rules[] = {
    /* class      instance    title       tags mask     isfloating */
    { "Gimp",          NULL,  NULL,          0,            True },
    { "MPlayer",       NULL,  NULL,          0,            True },
    { "Swiftweasel",   NULL,  NULL,          4,            False},
    { "File Manager",  NULL,  NULL,          5,            False},
    { "videmux",       NULL,  "videmux",     6,            False},
    { "tellarium",     NULL,  "tellarium",   7,            False},
    { "elestia",       NULL,  "elestia",     7,            False},
    { "oogle Earth",   NULL,  "oogle Earth", 7,            False},
    { "anel",          NULL,  "anel",        1 << 9,       True },
    { "feh",           NULL,  NULL,          0,            True },
    { "stalonetray",   NULL,  "stalonetray", 1 << 9,       True },
};

/* layout(s) */
static float mfact      = 0.55; /* factor of master area size [0.05..0.95] */
static Bool resizehints = False; /* False means respect size hints in tiled resizals */

static Layout layouts[] = {
    /* symbol     arrange function */
    { "[M]",      monocle },    /* first entry is default */
    { "[]=",      tile },
    { "><>",      NULL },    /* no layout function means floating behavior */
};

/* key definitions */
#define MODKEY Mod1Mask
#define TAGKEYS(KEY,TAG) \
    { MODKEY,                       KEY,      view,           {.ui = 1 << TAG} }, \
    { MODKEY|ControlMask,           KEY,      toggleview,     {.ui = 1 << TAG} }, \
    { MODKEY|ShiftMask,             KEY,      tag,            {.ui = 1 << TAG} }, \
    { MODKEY|ControlMask|ShiftMask, KEY,      toggletag,      {.ui = 1 << TAG} },

/* helper for spawning shell commands in the pre dwm-5.0 fashion */
#define SHCMD(cmd) { .v = (const char*[]){ "/bin/sh", "-c", cmd, NULL } }

/* commands */
static const char *dmenucmd[] = { "dmenu_run", "-fn", font, "-nb", normbgcolor, "-nf", normfgcolor, "-sb", selbgcolor, "-sf", selfgcolor, NULL };
static const char *termcmd[]  = { "urxvtc", NULL };
static const char *screencmd[]  = { "urxvtc", "-e", "get_screen", NULL };
/*   static const char *volup[]  = { "dvol", "-i", "10", NULL };
static const char *voldown[]  = { "dvol", "-d", "10", NULL };   */
static const char *volup[]  = { "amixer", "-q", "set", "PCM", "10+", NULL };
static const char *voldown[]  = { "amixer", "-q", "set", "PCM", "10-", NULL };
static const char *slock[]  = { "slock", NULL };
static const char *arandr[]  = { "arandr", NULL };
static const char *xrandrnormal[]  = { "xrandr", "--output", "LVDS", "--rotate", "normal", NULL };
static const char *xrandrleft[]  = { "xrandr", "--output", "LVDS", "--rotate", "left", NULL };

static Key keys[] = {
    /* modifier                     key        function        argument */
    { MODKEY,                       XK_p,      spawn,          {.v = dmenucmd } },
    { MODKEY,                       XK_Return, spawn,          {.v = termcmd } },
    { MODKEY|ControlMask,           XK_Return, spawn,          {.v = screencmd } },
      { MODKEY,                       XK_x,      spawn,          {.v = volup } },
    { MODKEY,                       XK_z,      spawn,          {.v = voldown } },
    { MODKEY|ControlMask,           XK_s,      spawn,          {.v = slock } },
    { MODKEY|ControlMask,           XK_b,      spawn,          {.v = arandr } },
    { MODKEY|ControlMask,           XK_n,      spawn,          {.v = xrandrnormal } },
    { MODKEY|ControlMask,           XK_m,      spawn,          {.v = xrandrleft } },
    { MODKEY,                       XK_b,      togglebar,      {0} },
    { MODKEY,                       XK_j,      focusstack,     {.i = +1 } },
    { MODKEY,                       XK_k,      focusstack,     {.i = -1 } },
    { MODKEY,                       XK_h,      setmfact,       {.f = -0.05} },
    { MODKEY,                       XK_l,      setmfact,       {.f = +0.05} },
    { MODKEY|ShiftMask|ControlMask, XK_Return, zoom,           {0} },
    { MODKEY,                       XK_Tab,    view,           {0} },
    { MODKEY,                       XK_q,      killclient,     {0} },
    { MODKEY,                       XK_t,      setlayout,      {.v = &layouts[1]} },
    { MODKEY,                       XK_f,      setlayout,      {.v = &layouts[2]} },
    { MODKEY,                       XK_m,      setlayout,      {.v = &layouts[0]} },
    { MODKEY,                       XK_space,  setlayout,      {0} },
    { MODKEY|ShiftMask,             XK_space,  togglefloating, {0} },
    { MODKEY,                       XK_0,      view,           {.ui = ~0 } },
    { MODKEY|ShiftMask,             XK_0,      tag,            {.ui = ~0 } },
    TAGKEYS(                        XK_1,                      0)
    TAGKEYS(                        XK_2,                      1)
    TAGKEYS(                        XK_3,                      2)
    TAGKEYS(                        XK_4,                      3)
    TAGKEYS(                        XK_5,                      4)
    TAGKEYS(                        XK_6,                      5)
    TAGKEYS(                        XK_7,                      6)
    TAGKEYS(                        XK_8,                      7)
    TAGKEYS(                        XK_9,                      8)
    { MODKEY|ShiftMask,             XK_q,      quit,           {0} },
};

/* button definitions */
/* click can be a tag number (starting at 0),
 * ClkLtSymbol, ClkStatusText, ClkWinTitle, ClkClientWin, or ClkRootWin */
static Button buttons[] = {
    /* click                event mask      button          function        argument */
    { ClkLtSymbol,          0,              Button1,        setlayout,      {0} },
    { ClkLtSymbol,          0,              Button3,        setlayout,      {.v = &layouts[2]} },
    { ClkWinTitle,          0,              Button2,        zoom,           {0} },
    { ClkStatusText,        0,              Button2,        spawn,          {.v = termcmd } },
    { ClkClientWin,         MODKEY,         Button1,        movemouse,      {0} },
    { ClkClientWin,         MODKEY,         Button2,        togglefloating, {0} },
    { ClkClientWin,         MODKEY,         Button3,        resizemouse,    {0} },
    { ClkTagBar,            0,              Button1,        view,           {0} },
    { ClkTagBar,            0,              Button3,        toggleview,     {0} },
    { ClkTagBar,            MODKEY,         Button1,        tag,            {0} },
    { ClkTagBar,            MODKEY,         Button3,        toggletag,      {0} },
};

Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away.
-- Antoine de Saint-Exupery

Offline

#18 2009-02-12 03:11:05

yvonney
Member
Registered: 2008-06-11
Posts: 671

Re: dwm to compiz configuration

COMMENT: it is SO brilliantly helpful, all you have posted on the ARCH community forum.

Last edited by yvonney (2009-02-18 01:30:58)

Offline

#19 2009-02-18 02:08:29

yvonney
Member
Registered: 2008-06-11
Posts: 671

Re: dwm to compiz configuration

UPDATE COMMENT 1: while searching for xsetroot info I recalled/found the dwm mail achives etc.

http://www.mail-archive.com/dwm@suckless.org/   I will have some fun trying to get the xsetroot param.

NOTE: I just found this which I would bet you saw days ago.. :--)
http://thread.gmane.org/gmane.comp.wind … s.dwm/6874


I think I understand it removes the need for the stdin-to-statusbar output in config.h etc. I have now recompiled the config.h after removing the line and no longer get the 'on though not used' comment about  stdin-to-statusbar output.

BASICALLY: I'm trying to figure out how to pipe your scripts (or conky-cli?) to dwm initially,  and how the stdin-to-statusbar change (xsetroot) may be affecting further my already unsuccesful attempts.

UPDATE COMMENT 2: just got reminded after looking at your .screenrc.  Maybe you think it can be logical to have conky-cli piped to dwm and your scripts piped to screen. I wrote what's below before so wanted to mention this wondering/thought about piping your scripts to screen and conky-cli stuff to dwm?  maybe flexible and good to learn for me...? I dunno yet:-) I would like the knowledge and full learnings result by having infos output to both screen AND dwm I think.

UPDATE COMMENT 3: Just realized that I use a slightly modfied version of your .bashrc (removed 'sudo' to run it as root mainly) and that it perhaps is affecting other things!  I don't know yet. cool, more learning!

--------- My  Post Below  (some edits made regarding conky or scripts? to dwm puzzle) ----------

[OBJECTIVE: be able to pipe into dwm 5.4.1 and into screen. conky-cli  and  scripts assumed to both have benefits.]

Hi!!! Saw your new ~/.xinitrc you posted on the 14th. Nice, code that is news to me and most interesting.

I've thought to write many many times in the past week. New amazing stuff kept falling into place or causing a wonderful learning curve. For the past 3 or so days I've been working on piping to dwm... and just a couple of hours ago found mention of the new requirement: do xsetroot -name 

I've made notes all along though right now I was going to stick with dwm and piping. From thinking and looking at your scripts and .xinitrc etc. and considering that screen can have stuff piped to it's bottom bar and so can dwm.   Concentrating on dwm's bar for this post I guessing that it's a decision to either have conky-cli OR scripts piped into dwm. Right now I'm totally stumped as to how to get the script OR conky-cli output to show, even with the new info I just found about xsetroot for dwm 5.4.1. First an aside:

[gvim]
- vim/gvim forever!!  Learning all I can. Initially, finding out how to have just a single instance which brings into play how different vim/gvim are. Got tabs running though.   ALSO: Vimperator with Firefox making a lot of sense as well. And now 'hjkl' makes beautiful sense too!! :--) thank you. Looking forward to being able to really vim around.

BACK to DWM: [i love your keybindings for dwm - your changes are a lot better for me than the stock ones that dwm uses. alt-space and alt-enter... nice!

So: my .xinitrc has:
exec ~/bin/start-dwm
This triggers   start-dwm in /bin/start-dwm   I've tried all kinds of permissions and all kinds of code changes in start-dwm and dwm-status to get either your scripts running OR some conky stuff. No luck at all. Though in looking at the newly updated dwm wiki I can get this line to run beautifully when put in .xinitrc:

conky -c ~/bin/dwm-conkystatus | while true; read line; do xsetroot -name "$line"; sleep 1s; done &
exec dwm

Something about '$line' is very critical. This isn't of course what I want. I'm hoping to use your scripts.
it was funny, even when I renamed /bin/dwm-conkystatus and restarted X it still found the great read-out. Maybe it caches it or maybe it didn't even read dwm-conkystatus...which is probably more likely as I changed the up and down net speed line to what should have worked and it didn't. So, perhaps there's something I really don't get about that conky -c line above.

------------ dwm-conkystatus -----------
background no
out_to_console yes
update_interval 2
total_run_times 0
use_spacer none

TEXT
$mpd_smart :: ${cpu cpu1}% / ${cpu cpu2}%  ${loadavg 1} ${loadavg 2 3} :: ${acpitemp}c :: $memperc% ($mem) :: ${downspeed wlan0}K/s ${upspeed wlan0}K/s :: ${time %a %b %d %I:%M%P}
---------------

This is what I have in start-dwm


---------------- start-dwm ------------
/root/bin/dwm-status | while true;  do  /usr/bin/dwm > /dev/null; done;
-----------------------------------------

it DOES start up dwm of course though doesn't get ANYTHING in dwm-status to pipe into dwm bar. I have tried amny things modifying the while true part with xsetroot etc.


In dwm-status I've also tried many many things... here's one that of course doesn't work.

-------- dwm-status -------------
#!/bin/bash

while true
do
xsetroot -name
    echo $(get_citytemp)/$(get_cputemp temp1) $(get_freemem)/$(get_freeswap)/$(get_diskinfo sda1)/$(get_updates) $(get_volume PCM)/$(get_batterycharge) $(date +'%R %d/%m/%Y')
    sleep 60
done
--------

I'm missing only the get_uptime script which I removed from the above. And I removed some others to try to get it to work for me.

WHEN I control-alt-backspace the output says that it cannot find the command(s) ... then it names all your scripts.

So.... I've not written about many subjects here... This is still a long post it seems though. It really has been so so amazing these past days. I feel like soon it will be as good and minimalistic as can be.
I am very interested in the best method for running scripts if you think that's good.
I don't think I want something fixed like the 'conky -c etc' line above... I like the way it seems you've done it with scripts/files triggering other files/scripts in order, like below 1) 2) 3)  Is this still most flexible and fun?


So, there's a change in dwm and xsetroot is needed somewhere(s)...

At the most basic level:

1) I put   exec ~/bin/start-dwm   in .xinitrc

2) I have ~/bin/start-dwm with some instructions in it to run dwm-status piped into dwm and to start dwm.

3) I have ~/bin/dwm-status which instructs which scripts to run. The scripts are all in ~/bin

- If I'm missing a script will that cause them not to run?

- Do you know, what is probably obvious, where exactly I put xsetroot etc. and is it used only once ?

- Are permission any concern with your scripts and/or the start-dwm and dwn-status files? i have them as executable as root, which is how I am running. Also I concluded that in  your scripts the $ wasn't a sudo thing and that it would need to be there even if running as root user.


I am concentrating on getting your scripts to run IN dwm bar if you think that's most flexible and cool. Then I will move on to screen and wish to have things piped into it. Additionally I've been wondering why stalonetray shows up everywhere... is there some way, or is it logical to have it only appear IN screen window number 9 as you mentioned you had done? I tried many things with the ~/.stalonetray  prefs.

I am having the most! amazing! time! Thank you!

I have found many post about bash scripts and am learning.

...  now that I'm learning how scripts work and wondering currently how much my failures are: dwm-centric tips needed and/or how much is just my mangled usage of your code with dwm 5.4.1.  fun!


OOPS, as this is again long and asking of you, i must mention:

As ALWAYS with me,  there is never any urgency or even need to write back. Truly.
The unknown things work themselves out ... i know you know. hehehe

When I can again pipe, and properly, to dwm 5.4.1 and screen I will be able to take time and study broadly and post new threads on the forums.

As piping scripts is primary and most useful and i love your system I stay with this subject for the great time it's been. I go over your posts here and some others and find new things a lot. Yes, obviously!!

Last edited by yvonney (2009-02-20 00:45:01)

Offline

#20 2009-02-20 01:35:36

yvonney
Member
Registered: 2008-06-11
Posts: 671

Re: dwm to compiz configuration

THIS WORKS in DWM:  (the huge post above [eek!] I guess is partly redundant as I just can't get dwm-status to find scripts now)

1) in .xinitrc
exec ~/bin/start-dwm

2) in start-dwm (maybe some of the second part is'nt needed now to restart dwm?)
~/bin/dwm-status | while true;  do  /usr/bin/dwm > /dev/null; done;

3) in dwm-status
  while true; do
  xsetroot -name "$(date)"
   sleep 1
   done

If I have any of the scripts in place of date they are not found and this seems to be confirmed when I go at-ctrl-backspace as it says can find  get_freemem etc.

I tried many things though not everything I could think of. PErhaps I need to have the location of the script hard coded.
right now this doesn't work, with the scripts all in ~/bin and set to execute as permissions.

while true; do
   xsetroot -name $(get_citytemp)/$(get_cputemp temp1) $(get_freemem)/$(get_freeswap) $(get_diskinfo sda4)/$(get_diskinfo sda1) $(get_gmail)/$(get_updates) $(get_volume PCM)/$(get_batterycharge) $(date +'%R %d/%m/%Y')
sleep 10
done

I will try so more things now... maybe  ~/root/bin/get_freemem    OR  "$(get_freemem)"

I like posting SHORTER posts... this I will remember!
Any idea what to change to get scripts working like simply    xsetroot -name "$(date)"    already does.... in dwm of course... nothing in screen yet.

Last edited by yvonney (2009-02-20 01:41:42)

Offline

#21 2009-02-20 01:42:56

leo2501
Member
From: Buenos Aires, Argentina
Registered: 2007-07-07
Posts: 637

Re: dwm to compiz configuration

hi! sorry the delay, well you need quotes! like this... (my latest dwm-status)

#!/bin/bash
while true
do
    xsetroot -name "$(get_uptime) $(get_diskinfo sda4)/$(get_diskinfo sdc1) $(date +'%R %d/%m/%Y')"
    sleep 60
done

i moved every other script from the dwm statusbar to screen's hardstatus line...like this

48389698.png


Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away.
-- Antoine de Saint-Exupery

Offline

#22 2009-02-20 02:47:03

yvonney
Member
Registered: 2008-06-11
Posts: 671

Re: dwm to compiz configuration

That is brilliant.

FACT: I will be formatting machine soon-ish and will then improve by running as regular-user.
I tried adding a regular user and I can't get it to startX, though that's easy and for me.

I only need to figure out the scripts not running and basic .screenrc and I'm fine.
Just basic working, and then I can fix/tweak/study myself in weeks to come.

So on the quotes needed:

Actually I tried the quotes, and just again as well. No luck.
I get only the date  and time.. It's Not finding scripts in ~/bin i think is wgat i've got wrong.


1) Could it be my path in .bashrc? {HOME}/bin is there, as below,  though would runing as root cause it not to find ~/bin?   I guess not.  Maybe the PS1 at the top is for normal user and not root user?

==============
[.bashrc PART of]
PS1='[\u@\h \# \W \A]\$ '

### Paths ###
PATH=$PATH:${HOME}/bin
export CDPATH=.:/sda1/Tests
export PATH=$PATH:/usr/local/bin:/bin:/usr/bin:/sbin:/usr/sbin
==============


2) Are the scripts to be named like  get_uptime   and not  get_uptime.sh  I have it without .sh    And: i have them executeable.


=====================================================================
3) I did the simplest way possible, adding one script, and still get only date stuff.

[dwm-status]
#!/bin/bash
while true
do
    xsetroot -name "$(get_freemem) $(date +'%R %d/%m/%Y')"
    sleep 60
done

[get_freemem]
#!/bin/bash
free -m | grep - | awk '{print $4}'

=====================================================================

4) .SCREENRC :::::: Has your .screenrc changed in past couple of weeks? Love to see it as my entire computing life has changed and rest of scripts   in hardstatus line sounds great! i'd like to know what to turn on and off. And I must resolve why the scripts are not found.

5) You do not use conky-cli any more? Just scripts...? I love removing everything possible myself. Scripts are so personal and alterable.

My breakthru today is discovering the answer to why I saw scripts in .screenrc and also thought them pointing to dwm sorta.  Some in screen some in dwm !!! thank you!

After this saga of getting scripts to run I will study myself scripting etc. etc. etc. as I will be more useful all round after that!

Last edited by yvonney (2009-02-20 06:00:50)

Offline

#23 2009-02-20 09:54:10

leo2501
Member
From: Buenos Aires, Argentina
Registered: 2007-07-07
Posts: 637

Re: dwm to compiz configuration

1) well i think your issue relays in the fact that you run things as root in the first place, see if you newly created user has correct path (~/bin) in your .bashrc as your root user has

2) I also has the scripts without the ".sh" extension, extension in unix are irrelevant smile

3) mmm i think this is the number 1... newly created user .bashrc, look if you get it's .bashrc right and of course, that the scripts themselves are in the /home/NEWLYCREATEDUSER/bin/get_blablabla


4) My latest .screenrc, with my scripts on it

startup_message off
#termcapinfo xterm*|Eterm|mlterm|rxvt 'hs:ts=\E]0;:fs=\007:ds=\E]0;screen\007'
termcapinfo rxvt-unicode ti@:te@     #enable SHIFT-PGUP / SHIFT-PGDOWN scroll
#termcapinfo wy* CS=\E[?1h:CE=\E[?1l:vi=\E[?25l:ve=\E[?25h:VR=\E[?5h:VN=\E[?5l:cb=\E[1K:CD=\E[1J
terminfo rxvt-unicode ti@:te@:
term screen-256color
setenv LC_CTYPE en_US.UTF-8
defutf8 on
setenv DISPLAY ':0'
nonblock on
vbell off
msgwait 10
shelltitle ''
#defmonitor on

screen    -t '' 1 
screen    -t '' 2 
screen    -t '' 3 
screen    -t '' 4 
screen    -t '' 5 
screen    -t '' 6 
screen    -t '' 7 top
screen    -t '' 8 sudo inotail -f -n 30 /var/log/everything.log
screen    -t '' 9
#select 9

bind = resize =
bind + resize +1
bind - resize -1
bind _ resize max
bind c screen 1 # Window numbering starts at 1, not 0.
bind 0 select 10
# make life easier, f1-f10 selects screens 0-9
#bindkey -k k1 select 1
#bindkey -k k2 select 2
#bindkey -k k3 select 3
#bindkey -k k4 select 4
#bindkey -k k5 select 5
#bindkey -k k6 select 6
#bindkey -k k7 select 7
#bindkey -k k8 select 8
#bindkey -k k9 select 9
#bindkey -k k0 select 0
# windows select with Shift-Fn. May not work in all terminals.
# (screen only seems to understand up to FA)
#bindkey -k F3 select 1
#bindkey -k F4 select 2
#bindkey -k F5 select 3
#bindkey -k F6 select 4
#bindkey -k F7 select 5
#bindkey -k F8 select 6
#bindkey -k F9 select 7
#bindkey -k FA select 8
#bindkey -k k7 detach # bind F7  to detach screen session from this terminal
#bindkey -k k8 kill   # bind F8  to kill current screen window.
#bindkey -k k9 next   # bind F9 to move to previous window
#bindkey -k F1 prev   # bind F11 to move to next window
#bindkey -k F2 hardstatus alwaysignore # F12 to turn the status bar on
#bindkey -k k9 screen # bind F9  to create a new screen
#bindkey -k k; title  # bind F10 to rename current screen window
#bindkey -k F1 prev   # bind F11 to move to previous window
#bindkey -k F2 next   # bind F12 to move to next window
bindkey "^[Od" prev  # change window with ctrl-left
bindkey "^[Oc" next  # change window with ctrl-right

#let pgup/pgdn scroll under urxvt (see .Xdefaults)
bindkey "^[[5;2~" eval "copy" "stuff ^u"
bindkey -m "^[[5;2~" stuff ^u
bindkey -m "^[[6;2~" stuff ^d

# add CPU idle/sustem/user/interrupt stats
#backtick 100 5 5 tail -1 /var/tmp/vermaden-stats-top
#caption always '%{= wk} %= %100` %='
#backtick 1 60 60 $HOME/bin/get_uptime
backtick 2 60 60 $HOME/bin/get_cputemp temp1
backtick 3 60 60 $HOME/bin/get_freemem
backtick 4 60 60 $HOME/bin/get_freeswap
backtick 5 60 60 $HOME/bin/get_volume PCM
backtick 6 60 60 $HOME/bin/get_gmail
backtick 7 600 600 $HOME/bin/get_updates
#backtick 8 60 60 $HOME/bin/get_citytemp | grep Temperature | awk '{print $3}'
backtick 9 60 60 $HOME/bin/get_batterycharge

# An alternative hardstatus to display a bar at the bottom listing the
# windownames and highlighting the current windowname in blue. (This is only
# enabled if there is no hardstatus setting for your terminal)
hardstatus on
hardstatus alwayslastline
#hardstatus string "%w"
#hardstatus string "%{.kW}%-w%{.W}%n %t%{-}%+w"
#hardstatus string "%{.kW}%-w%{.W}%n %t%{-}%+w %=%c %d/%m/%Y" #black+white+bold
#hardstatus string "%{.kw}%-w%{.w}%n %t%{-}%+w %=%c %d/%m/%Y" #black+white+normal
#hardstatus string "%{.kw}%-w%{.Kw}%n %t%{-}%+w %=%c %d/%m/%Y" #black+grey+normal
#hardstatus string "%{.kc}%-w%{.kc}%n*%t%{-}%+w %=%c %d/%m/%Y" #black+cyan+normal
hardstatus string "%{.kc}%-w%{.kw}%n*%t%{-}%+w %= %2` %3`/%4` %6`/%7` %5`/%9` %c %d/%m/%Y" #black+cyan+normal+white selected
#hardstatus string "%{.kc}%-w%{.kw}%n*%t%{-}%+w %= | %1` | %2`C | %3`/%4` | %6`/%7` | %5` | %c %d/%m/%Y" #with dwm status bar
#hardstatus string '%{= kB}%-Lw%{+r}%50> %n%f* %t%{= kB}%+Lw%< %{= kB}%-= %{-}'
#hardstatus alwayslastline '%{bk}[ %{W}%H %{b}][ %{w}%l%{b} ]   %{b}[%{w} %D %d.%m %c:%s%{b} ]'
sorendition kw

# hardcopydir:  The directory which contains all hardcopies.
hardcopydir /home/aleyscha/.hardcopy

5) no, i don't use conky-cli anymore, plain scripts updated once a minute only, and only relevant information smile "what you really use" i mean, only the scripts i actually "look" to know how my computer is going, one doesnt need all the info updated once in a second... tongue

So, my personal advice is:
1. Reinstall with newest iso 2009.02
2. install/configure SYSTEM as root
3. as soon as you have booted after install, create your user
4. install /setup sudo
5. install yaourt
6. start/configure all your apps (move your /root settings to your /home/newuser/ changing your permissions/ownership)
7. be happy smile


Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away.
-- Antoine de Saint-Exupery

Offline

Board footer

Powered by FluxBB