guest@dotshare [~/groups/wms/wmfs] $ ls wmfs2-mk1/ | cat

wmfs2 mk1 (scrot)

radiceta Feb 05, 2012 (wms/wmfs)

wmfsrc(raw, dl)

SCROT

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
#
# WMFS2 configuration file
#
@include ~/.config/wmfs/wmfs_rules
@include ~/.config/wmfs/wmfs_themes


[bars]
    # Position:0 Top, 1 Bottom, 2 Hide
    # Element type:
    # t  Tags
    # s  Statustext (will take available space)
    # y  Systray (can be set only ONE time among all element)
    # l  Launcher (will be expended at launcher use)
    [bar]
        name        = "leftbar"
        position    = 0
        screen      = 0
        elements    = "tlsy"   # element order in bar
        theme       = "greygreen"
    [/bar]
[/bars]

[tags]
    # Use no screen option or screen = -1 to set tag on each screen
    [tag] name = "1" [/tag]
    [tag] name = "2" [/tag]
    [tag] name = "3" [/tag]
    [tag] name = "4" [/tag]
    [tag] name = "5" [/tag]
    [tag] name = "6" [/tag]
    [tag] name = "7" [/tag]
    [tag] name = "8" [/tag]
    [tag] name = "9" [/tag]

    # Mousebinds associated to Tags element button
    [mouse] button= "1" func = "tag_click" [/mouse]
    [mouse] button = "4" func = "tag_next"  [/mouse]
    [mouse] button = "5" func = "tag_prev"  [/mouse]
[/tags]

[client]
    key_modifier = "Alt"
    theme = "greygreen"
    [mouse] button = "1" func = "client_focus_click"    [/mouse]
    [mouse] button = "1" func = "mouse_swap"            [/mouse]
    [mouse] button = "2" func = "mouse_tab"             [/mouse]
    [mouse] button = "3" func = "mouse_resize"          [/mouse]
    [mouse] button = "4" func = "client_focus_next_tab" [/mouse]
    [mouse] button = "5" func = "client_focus_prev_tab" [/mouse]
[/client]

[launchers]
# command can be an uicb function or an uicb function + extension (see example)
    [launcher]
        name = "exec"
        prompt = "Run:"
        # Example of uicb + ext:
        #   command = "spawn xterm -e"
        command = "spawn"
        width = 150
    [/launcher]
    [launcher]
        name = "launcher_man" 
        prompt = "Man: " 
        command = "spawn urxvtc -e man"
        width = 150
    [/launcher]
[/launchers]

[keys]
    [key] mod = {"Alt"} key = "x" func = "spawn" cmd = "urxvt" [/key]
    [key] mod = {"Control", "Alt"} key = "q" func = "quit" [/key]
    [key] mod = {"Control", "Alt"} key = "r" func = "reload" [/key]

    # Tag manipulation
    [key] mod = {"Alt"} key = "F1"  func = "tag_set" cmd = "0" [/key]
    [key] mod = {"Alt"} key = "F2"     func = "tag_set" cmd = "1" [/key]
    [key] mod = {"Alt"} key = "F3"   func = "tag_set" cmd = "2" [/key]
    [key] mod = {"Alt"} key = "F4" func = "tag_set" cmd = "3" [/key]
    [key] mod = {"Alt"} key = "F5"  func = "tag_set" cmd = "4" [/key]
    [key] mod = {"Alt"} key = "F6"      func = "tag_set" cmd = "5" [/key]
    [key] mod = {"Alt"} key = "F7"     func = "tag_set" cmd = "6" [/key]
    [key] mod = {"Alt"} key = "F8" func = "tag_set" cmd = "7" [/key]
    [key] mod = {"Alt"} key = "F9"   func = "tag_set" cmd = "8" [/key]

    [key] mod = {"Alt", "Shift"} key = "F1" func = "tag_client" cmd = "0" [/key]
    [key] mod = {"Alt", "Shift"} key = "F2" func = "tag_client" cmd = "1" [/key]
    [key] mod = {"Alt", "Shift"} key = "F3" func = "tag_client" cmd = "2" [/key]
    [key] mod = {"Alt", "Shift"} key = "F4" func = "tag_client" cmd = "3" [/key]
    [key] mod = {"Alt", "Shift"} key = "F5" func = "tag_client" cmd = "4" [/key]
    [key] mod = {"Alt", "Shift"} key = "F6" func = "tag_client" cmd = "5" [/key]
    [key] mod = {"Alt", "Shift"} key = "F7" func = "tag_client" cmd = "6" [/key]
    [key] mod = {"Alt", "Shift"} key = "F8" func = "tag_client" cmd = "7" [/key]
    [key] mod = {"Alt", "Shift"} key = "F9" func = "tag_client" cmd = "8" [/key]

    [key] mod = {"Control"} key = "Right" func = "tag_next" [/key]
    [key] mod = {"Control"} key = "Left"  func = "tag_prev" [/key]
    [key] mod = {"Control", "Alt"} key = "Left"  func = "spawn" cmd = "mpc -q prev" [/key]
    [key] mod = {"Control", "Alt"} key = "Right" func = "spawn" cmd = "mpc -q next" [/key]
    [key] mod = {"Alt", "Control"} key = "space" func = "spawn" cmd = "mpc -q toggle" [/key]

    [key] mod = {"Super"} key = "q" func = "client_close" [/key]

    # Focus next / prev client and next / prev tabbed client
    [key] mod = { "Alt" }            key = "Tab" func = "client_focus_next" [/key]
    [key] mod = { "Alt", "Shift" }   key = "Tab" func = "client_focus_prev" [/key]
    [key] mod = { "Super" }          key = "Tab" func = "client_focus_next_tab" [/key]
    [key] mod = { "Super", "Shift" } key = "Tab" func = "client_focus_prev_tab" [/key]

    # Focus next client with direction
    [key] mod = {"Alt"} key = "h" func = "client_focus_left"   [/key]
    [key] mod = {"Alt"} key = "l" func = "client_focus_right"  [/key]
    [key] mod = {"Alt"} key = "k" func = "client_focus_top"    [/key]
    [key] mod = {"Alt"} key = "j" func = "client_focus_bottom" [/key]

    # swap next client with direction:
    [key] mod = {"Alt", "Control"} key = "h" func = "client_swap_left"   [/key]
    [key] mod = {"Alt", "Control"} key = "l" func = "client_swap_right"  [/key]
    [key] mod = {"Alt", "Control"} key = "k" func = "client_swap_top"    [/key]
    [key] mod = {"Alt", "Control"} key = "j" func = "client_swap_bottom" [/key]
    [key] mod = {"Alt", "Control"} key = "Up" func = "client_swap_prev" [/key]
    [key] mod = {"Alt", "Control"} key = "Down" func = "client_swap_next" [/key]


    # Resize selected tiled client with direction
    [key] mod = {"Super"} key = "h" func = "client_resize_left"   cmd = "20" [/key]
    [key] mod = {"Super"} key = "l" func = "client_resize_left"   cmd = "-20" [/key]
    [key] mod = {"Super"} key = "k" func = "client_resize_top"    cmd = "20" [/key]
    [key] mod = {"Super"} key = "j" func = "client_resize_top"    cmd = "-20" [/key]
    [key] mod = {"Super", "Control"} key = "h" func = "client_resize_right"  cmd = "-20" [/key]
    [key] mod = {"Super", "Control"} key = "l" func = "client_resize_right"  cmd = "20" [/key]
    [key] mod = {"Super", "Control"} key = "k" func = "client_resize_bottom" cmd = "-20" [/key]
    [key] mod = {"Super", "Control"} key = "j" func = "client_resize_bottom" cmd = "20" [/key]

    # Tabbing command
    [key] mod = {"Alt", "Shift"} key = "h" func = "client_tab_left"   [/key]
    [key] mod = {"Alt", "Shift"} key = "l" func = "client_tab_right"  [/key]
    [key] mod = {"Alt", "Shift"} key = "k" func = "client_tab_top"    [/key]
    [key] mod = {"Alt", "Shift"} key = "j" func = "client_tab_bottom" [/key]
    [key] mod = {"Alt", "Shift"} key = "u" func = "client_untab" [/key]

    # Layout manipulation
    #[key] mod = {"Super"}          key = "m" func = "layout_vmirror" [/key]
    #[key] mod = {"Super", "Shift"} key = "m" func = "layout_hmirror" [/key]
    [key] mod = {"Alt"}            key = "space" func = "layout_rotate_right" [/key]
    #[key] mod = {"Super", "Shift"} key = "r" func = "layout_rotate_left" [/key]

    [key] mod = {"Super", "Alt"} key = "h" func = "layout_integrate_left" [/key]
    [key] mod = {"Super", "Alt"} key = "j" func = "layout_integrate_bottom" [/key]
    [key] mod = {"Super", "Alt"} key = "k" func = "layout_integrate_top" [/key]
    [key] mod = {"Super", "Alt"} key = "l" func = "layout_integrate_right" [/key]
  
    # Toggle client free/tile
    [key] mod = {"Alt"} key = "f" func = "client_toggle_free" [/key]

    # Layout set historic travelling function (TESTING)
    [key] mod = {"Alt"} key = "o" func = "layout_prev_set" [/key]
    [key] mod = {"Alt", "Shift"} key = "o" func = "layout_next_set" [/key]

    # Launchers
    [key] mod = {"Alt"}                     key = "a" func = "launcher" cmd = "exec" [/key]
    [key] mod = {"Alt", "Shift"}            key = "m" func = "launcher" cmd = "launcher_man" [/key]

    # Keybinds
    [key] mod = {"Alt"}             key = "s" func = "spawn" cmd = "thunar" [/key]
    [key] mod = {"Alt", "Shift"}    key = "s" func = "spawn" cmd = "urxvt -e mc" [/key]
    [key] mod = {"Alt"}             key = "w" func = "spawn" cmd = "firefox" [/key]
    [key] mod = {"Alt", "Shift"}    key = "w" func = "spawn" cmd = "dwb" [/key]
    [key] mod = {"Alt"}             key = "e" func = "spawn" cmd = "urxvtc -e vim" [/key]
    [key] mod = {"Alt", "Shift"}    key = "e" func = "spawn" cmd = "winefish" [/key]
    [key] mod = {"Alt"}             key = "Print" func = "spawn" cmd = "scrot -d 1 ~/Obrázky/shots/%Y-%m-%d_%H:%M:%S.png" [/key]

[/keys]

CLICK TO VIEW

x

wmfs_themes(raw, dl)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#themes for wmfs²
[themes]
    [theme]
        # default arp theme
        name = "greygreen"
         font = "-*-dinpro regular-medium-*-*-*-12-*-*-*-*-*-*-*"

        # Bars        
        bars_width = 18
        bars_fg = "#EEEEEE"
        bars_bg = "#262729"
        # Element tags
        tags_normal_fg = "#EEEEEE"
        tags_normal_bg = "#262729"
        #tags_normal_statusline = ""
        tags_sel_fg    = "#262729"
        tags_sel_bg    = "#A7A15E"
        #tags_sel_statusline = ""
        tags_occupied_fg = "#EEEEEE"
        tags_occupied_bg = "#424344"
#        tags_occupied_statusline = "\R[1;0;2;4;#A7A15E]"
        tags_border_color = "#262729"
        tags_border_width = 0
        # Frame / Client
        client_normal_fg = "#666666"
        client_normal_bg = "#262729"
#        client_normal_statusline = "\s[right;#7D7D7D;cls](1;client_close)"
        client_sel_fg = "#B7CE42"
        client_sel_bg = "#262729"
        client_sel_statusline = "\s[right;#A7A15E;flt ](1;client_toggle_free)\s[right;#D81860;cls ](1;client_close)"
        frame_bg = "#000000"
        client_titlebar_width = 16
        client_border_width = 1
    [/theme]
[/themes]
 

x

wmfs_rules(raw, dl)

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
#rules for wmfs²
[rules]
    [rule]
        instance = "xv"
        #role   = ""
        #name   = ""
        #theme  = "default"
        #tag    = 1  # 2nd tag
        screen = 0
        free = true
        #max = false
        #ignore_tag = false
    [/rule]
    [rule] 
	instance = "gimp" 
	class = "GIMP" 
	screen = 0  
	tag = "8" 
	free = true 
    [/rule]
    [rule] 
	instance = "gimp-toolbox" 
	class = "GIMP-toolbox" 
	screen = 0  
	tag = "8" 
	free = true 
    [/rule]
    [rule]
        class = "Opera"
	tag = "1" 
    [/rule]
    [rule]
        class = "dwb"
	tag = "1" 
    [/rule]
    [rule]
        class = "Firefox"
	tag = "1" 
    [/rule]
    [rule]
        class = "Zathura"
	tag = "4" 
    [/rule]
    [rule]
        class = "Xnoise"
	tag = "6" 
    [/rule]
    [rule]
        class = "vlc"
	tag = "6" 
    [/rule]
    [rule]
        class = "smplayer"
	tag = "6" 
    [/rule]
    [rule]
        class = "minitube"
	tag = "6" 
    [/rule]
    [rule]
        class = "gmediafinder"
	tag = "6" 
    [/rule]
    [rule]
        class = "Winefish"
	tag = "3" 
    [/rule]

    [rule]
        name = "Copy"
        free = true
    [/rule]
    [rule]
        name = "Delete"
        free = true
    [/rule]
    [rule]
        name = "Move"
        free = true
    [/rule]
    [rule]
        name = "Options"
        free = true
    [/rule]
    [rule]
        name = "Set icon"
        free = true
    [/rule]
    [rule]
        name = "Downloads"
        free = true
    [/rule]
    [rule]
        name = "sound"
        free = true
    [/rule]
    [rule]
        name = "sound"
        free = true
    [/rule]
    [rule]
        class = "Savebox"
        free = true
    [/rule]
[/rules]
 

x

wmfs-status.sh(raw, dl)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#!/bin/bash
 
#colors
green="#B7CE42"
grey="#666666"
white="dddddd"
dblue="#1874cd"
blue="#6F99B4"
yellow="#FEA63C"
red="#D81860"
cyan="#A7A15E"
magenta="#8B7B8B"

mpd(){
    mpd="$(mpc | grep - | cut -c1-30)"
    echo "^s[right;$green;$mpd  ]"
}

mail(){
    mail="$(curl -u [YOUR GMAIL ACOCUNT]:[PASSWORD] --silent "https://mail.google.com/mail/feed/atom" | tr -d '\n' | awk -F '<entry>' '{for (i=2; i<=NF; i++) {print $i}}' | sed -n "s/<title>\(.*\)<\/title.*name>\(.*\)<\/name>.*/\2 - \1/p" | wc -l
)"
    echo "^s[right;$grey;mail: ]^s[right;$yellow;$mail  ]"
}

bat(){
    bat="$(acpi -V | awk '{ gsub(/,/, "");} NR==1 {print $4}')"
    echo "^s[right;$grey;bat: ]^s[right;$red;$bat  ]"
}

cpu(){
    cpu="$(eval $(awk '/^cpu /{print "previdle=" $5 "; prevtotal=" $2+$3+$4+$5 }' /proc/stat); sleep 0.4; eval $(awk '/^cpu /{print "idle=" $5 "; total=" $2+$3+$4+$5 }' /proc/stat); intervaltotal=$((total-${prevtotal:-0})); echo "$((100*( (intervaltotal) - ($idle-${previdle:-0}) ) / (intervaltotal) ))")"
    echo "^s[right;$grey;cpu: ]^s[right;$blue;$cpu%  ]"
}

dte(){
    dte="$(date +"%d %b")"
    echo "^s[right;$cyan;$dte  ]"
}
tme(){
    tme="$(date +"%H:%M")"
    echo "^s[right;$cyan;$tme;$clear ]"
}
 
TIMING=1
 
statustext()
{
    wmfs -c status "leftbar $(mpd) $(mail) $(cpu) $(bat) $(dte) $(tme)"
}
 
while true;
do
    statustext
    sleep $TIMING
done
 

x

Notes

This is my configuration for WMFS2. For statusbar the wmfs-status.sh file has to be launched from .xinit.

I still have some torubles with selecting appropriate font for theme, but i hope i’ll manage to get my ttf fonts from ~/.fonts worging too.

Comments

crshd said about 5 years ago

If you feel like you need to blank out your username, you should remember to do it in weechat as well…

radiceta said about 5 years ago

You know, i have different name as user and another name here or on irssi.