I need some help with tweaking my Desktop! (2bwm) - Desktop Customization & Workflow

Users browsing this thread: 5 Guest(s)
fayesafe
Long time nixers
Hello to all of you tweakers out there!

I am pretty nervous writing stuff in this forum, because everything I've seen here let's me shutter most of time. Some of the Desktops here are configured to the max and I somehow got the idea to join your 'club' as well.

So, I decided to prepare a "weekend-unix-session" in order to do so. I decided pretty fast that I really like the 2bwm. I got in contact with awesome wm and openbox earlier, but i did not really like it that much then...

Now, because of the fact, that I do not want to get on the nerves of z3bra so much (sorry if i did, bud :s), I think this is the right place to ask all my questions concerning this wm. I searched the web a while for useful information, but to be honest, I did not find many. I think, that the biggest problem for me right now is, that I do not know, where to actually start. When i installed 2bwm, it did not even start. So - what I am searching for is some kind of help concerning the first steps in it and the configuration. I also searched for an IRC-channel, but I guess there is none (?). But I'd say now the fact that it did not even start is the biggest problem atm.

I hope this is the right way and place to post this request, but I thought it would be the best to start here.

I give my thanks to you all in advance.

Cheers,
fayesafe
z3bra
Grey Hair Nixers
Hi mate !

First of all, you did not get on my nerves. If I'm not keen to help you, I would have not even given you an answer. What we were saying is that, top reach the "top level" of dekstop customisation, you need to understand WELL how a unix system works.

What is a WM, what is a shell, what is a display server, how do they interact together. Once you understand all of this (it HAS to be clear in your mind), you can start tweaking your desktop, playing with it, replacing every single part of it (hotkeys, wm, status bar, notification system, monitoring, etc...)

Anyway, if you really want to dive into it, I'm ready to help you. But you have to understand that you NEED to find informations by yourself (reading wikis, blog, man pages, forums, etc..).

As a good start, read this article I wrote on the subject (customizing your setup), and ask about everything you don't understand. If you encouter a lot of difficulties to understand it, or if it looks like chinese for you, then you'll need to play a little more with *nix systems, before trying again.

Good luck buddy :)
BANGARANG, MOTHERFUCKER
fayesafe
Long time nixers
Okay,
first of all, thank you for these instructions. I know that I always get a bit impatient when it gets to f'king fancy stuff.... I read through almost all of your articles (except that one with the bar, and these that are not concerning the topic) and I think I understood it well. I somehow got an idea of how much time I need to spend from now on, but I think it's gonna be fun! I think the most important part (and that stuff you'll always miss on openbox and awesome) is now for -me- to understand how the window mananger, the display server and the connected configurations work together (?). I guess I'll start learning 'bout that. Let's see where this gets me:)
Aaaand, I'll start throwing those heavy programs away and start slowly replacing it with CLI tools.
I am going to keep you up to date guys :p
z3bra
Grey Hair Nixers
Good :)
BANGARANG, MOTHERFUCKER
venam
Administrators
Seems like someone has lost his *nix virginity here.
Welcome to the forums.
Nihility
Members
learn the basic first and everything else will follow
pvtmert
Members
i was gonna open topic with similar title but saw this so continuing here...

in my bar setup, i have this layout: < prev | curr | next > for desktop number. i want to assign mouse clicks to bar (i have xclock on time/date area)

so if there is a way to switch to Xth desktop please tell me...
i will assign prev last next accordingly...

i thought last would be:
test -z "$LAST" && LAST=0
test -z "$CURR" && LAST=0
TMP=""
while loop:
CURR=`2bwm-get-desktop` #command in 2bwm's man page
if [ ${CURR} -ne ${TMP} ]; then
LAST=${CURR}
fi
TMP=${CURR}
#rest of the code...
that would do thing... //not tested...
venam
Administrators
2bwm responds correctly to the client message "atom_current_desktop", so you should be able to switch desktop from panels/docks/bars. To emulate this you can use:
Code:
xdotool set_desktop 9
In this example it will switch to desktop number 9.
pvtmert
Members
thank you very much :)

Code:
#!/bin/bash

SLP=1
BG=\#de002b36
FG=\#de839496
PX=1
FT="-*-terminus-medium-r-normal-*-12-*"

{ #looknfeel
    OPACITY=85
    BACKGROUND=232c31
    FOREGROUND=c5c8c6
    COLOR0=2d3c46
    COLOR1=ac4142
    COLOR2=90a959
    COLOR3=de935f
    COLOR4=6a9fb5
    COLOR5=aa759f
    COLOR6=75b5aa
    COLOR7=6c7a80
    COLOR8=425059
    COLOR9=cc6666
}


makecolor()
{
    echo $(printf "#%x%s" $((OPACITY*255/100)) "$1")
}

{ #GLOB VARS
    USER=$(whoami)
    GRP=$(id -g)
    HOST=$(hostname)
    DOMAIN=$(domainname)
    BATF="/sys/class/power_supply/BAT1/capacity"
    LDAVGF="/proc/loadavg"
    # static colors:
    USRC=\#ff000000
    DATEC=$(makecolor $COLOR3)
    test $GRP -eq 0 && USRC=darkred
    test $GRP -eq 2 && USRC=yellow
    test $GRP -eq 4 && USRC=maroon
    test $GRP -eq 3 && USRC=gray
    test $GRP -eq 5 && USRC=black
    test $GRP -eq 29 && USRC=green
    LDAVGC=$(makecolor $COLOR6)
    DESKCL=$(makecolor $COLOR1)
    FG=$(makecolor $FOREGROUND)
    BG=$(makecolor $BACKGROUND)
}

NAT=`hostname`
CURRD=0
LASTD=0
while sleep $SLP; do
    test $CURRD -ne $(xdotool get_desktop) && LASTD=$CURRD
    test $(($(date +%s)%20)) -eq 0 && NAT=$(curl --connect-timeout $((SLP*2)) -s icanhazip.com || echo "(no-*net)")
    echo
    {
        INET=$(ifconfig | grep inet | grep -v inet6 | grep -v 127.0.0.1 | cut -d\  -f10 | tr \\n '|')
        BATS=$(cat $BATF)
        BATC=gray
        test $BATS -gt 80 && BATC=green
        test $BATS -lt 40 && BATC=yellow
        test $BATS -lt 20 && BATC=red
        BAT=$(printf "%3d" $BATS)
        LOADAVG=$(cat $LDAVGF | cut -d\  -f1-3)
        #DESKC=$(xprop -root _NET_CURRENT_DESKTOP | sed -e 's/_NET_CURRENT_DESKTOP(CARDINAL) = //')
        DESKC=$(xdotool get_desktop)
        test $DESKC -eq 0 && DESKB=9 || DESKB=$((DESKC-1))
        test $DESKC -eq 9 && DESKA=0 || DESKA=$((DESKC+1))
        # sep
        echo "%{c}%{+o}%{U-}"
        echo " < %{U$LDAVGC}%{A:xterm -e htop &:}$LOADAVG%{A}%{U-} > "
        echo " < %{U$BATC}%{A:xterm -e powertop &:}BAT: $BAT%%%{A}%{U-} >"
        echo " < %{U$DATEC}%{A:xclock &:}$(date +'%A, %Y-%m-%d | %H:%M:%S')%{A}%{U-} > "
        echo " <%{A:xdotool set_desktop $DESKB:} $DESKB %{A}|%{A:xdotool set_desktop $LASTD :}%{U$DESKCL} $DESKC %{U-}%{A}|%{A:xdotool set_desktop $DESKA:} $DESKA %{A}> "
        echo " < %{U$USRC}%{A:systemsettings &:}$USER@$INET$NAT%{A}%{U-} > "
    } | tr -d \\n | tr -s \
    TMP=$CURRD
    CURRD=`xdotool get_desktop`
    if [ $CURRD -eq $LASTD ]; then
        LASTD=$TMP
    fi
done | bar -u$PX -F$FG -B$BG -f$FT -d

exit 0
Code:
Slax 7.0.8 (32-bits + PAE)
----- BEGIN GEEK CODE BLOCK-----
Version: 3.1
GE/CS/CM/S d+@ s-:- a--- C++++(++) UL+++ P+ L+++ E?() W+++(++) N? o? K- w+
O M-- V- PS+ PE Y? PGP- t+ 5? X++++(+++) R- !tv b+ DI? D- G e- h+ r-- z--
------END GEEK CODE BLOCK------
4814
Members
I hope you don't mind me hijacking this topic :P

I want to use 2bwm together with the xfce4-panel.
I created an offset for the panel in my config.h using
Code:
///---Offsets---///
static const uint8_t offsets[] = {0,24,0,24};

However, 2bwm only respects this margin when maximizing windows. When I move or resize them manually, they still get on top of my panel.
Is there a way to force all windows to respect this margin?

Thanks for your help :)
pvtmert
Members
it shouldnt do that, it should respect margins... actually in the latest release (origin/master) it does not respect when doing maximize but it respects to mod shift x combination...

try recompiling your kernel 2bwm :)
z3bra
Grey Hair Nixers
We fixed this issue some time ago already (proof)

Be sure you have *at least* a "superior" version available, and recompile the software
4814
Members
Yea, the non-git version in the AUR seems to be outdated then. Got a new copy directly from Github and it works like a charm, ty :)

btw, there is no real way to disable the automatic focus-change on mouseover without going into the source files?
venam
Administrators
(04-09-2014, 03:03 PM)4814 Wrote: Yea, the non-git version in the AUR seems to be outdated then. Got a new copy directly from Github and it works like a charm, ty :)

btw, there is no real way to disable the automatic focus-change on mouseover without going into the source files?
That's a feature, it's called sloppy focus.
pvtmert
Members
i think that focus model is nice... especially you can change windows by mod+tab... also there is 10 workspaces...
4814
Members
Yea, it's a nice feature. The concept just doesn't work with a global appmenu. But it was time to get away from the xfce-panel anyway :P

But a big thank you to you guys! Everythink is working fine now and I can get to the fun part of customizing :)
Mafia
Long time nixers
Well I can tell you right now that I know nil about 2bwm, literally have never touched it. But I can help with anything else you might need help with. If it's *nix, I've probably messed with it at some point. 2bwm and bspwm are pretty much the only wms I've never really bothered with. OH! And welcome to the forum.