Commits

Jhonny5 committed 9b4c337

Bottom bar padding - fit window size.

Comments (0)

Files changed (8)

 [X] Add more layouts.
 [X] Add bottom bar.
 [1/2] Set bottom bar info values.
-[ ] Fix bottom bar - fit window size
+[X] Fix bottom bar - fit window size.
 [ ] Add system tray at right down corner: tryer.
 [ ] Set at top bar more information: mp3, email. 
+[ ] Hide bottom bar with top bar (MODKEY+b).
 #!/bin/sh
 
 SLEEP=2
-ICON_PATH='$HOME/.dwm/dzen2/xbm'
+ICON_PATH="$HOME/.dwm/dzen2/xbm"
 ICON_COLOR='#224488'
 BG='#101010'
 FG='#ffffff'
 #!/bin/sh
 
-feh -z -Z --bg-scale /home/jhonny5/Wallpaper/ghost1.jpg
+log=$HOME/.dwm/dwm.log
+echo "[+] Starting dwm..." > $log
+
+feh -z -Z --bg-scale $HOME/Misc/Wallpaper/ghost1.jpg
 setxkbmap -option terminate:ctrl_alt_bksp
-conky -x 0 -y 0 -d
+#conky -x 0 -y 0 -d >> $log
+$HOME/.dwm/dzen2/startdzen & 
+#ToDo: trayer --widthtype request --edge bottom --align right --height 20 --transparent true & >> $log
 while true 
 do
     xsetroot -name  "$(date +"%a %b %d %r")"
 done &
 
 while true; do
-    # Log stderror to a file 
-    echo "Starting dwm..." >> ~/dwm.log 
-    exec dwm 2>> ~/dwm.log
+    exec dwm 2>> $log
     # No error logging
     #dwm >/dev/null 2>&1
 done
 static const int nmaster      = 1;    /* number of clients in master area */
 static const Bool resizehints = True; /* True means respect size hints in tiled resizals */
 
+#include "fibonacci.c"
 static const Layout layouts[] = {
 	/* symbol     arrange function */
 	{ "[]=",      tile },    /* first entry is default */
 
 
 /* appearance */
-#define BOTTOM_BAR_HEIGHT    20
-static const char font[]            = "-*-terminus-medium-r-*-*-16-*-*-*-*-*-*-*";
+#define BOTTOM_BAR_HEIGHT 13.5
+
+static const char font[]            = "-*-monaco-medium-r-*-*-16-*-*-*-*-*-*-*";
 static const char normbordercolor[] = "#444444";
 static const char normbgcolor[]     = "#262626";
 static const char normfgcolor[]     = "#bbbbbb";
 static const Rule rules[] = {
 	/* class      instance    title       tags mask     isfloating   monitor */
 	{ "Gimp",     NULL,       NULL,       0,            True,        -1 },
-	{ "Firefox",  NULL,       NULL,       1 << 8,       False,       -1 },
+//	{ "Firefox",  NULL,       NULL,       1 << 8,       False,       -1 },
 };
 
 /* layout(s) */
 #include "gaplessgrid.c"
 
 static const Layout layouts[] = {
-	/* symbol     arrange function */
-	{ "[]=",    tile },    /* first entry is default */
-	{ "><>",    NULL },    /* no layout function means floating behavior */
-	{ "[M]",    monocle },
+    /* symbol     arrange function */
+    { "[]=",    tile },    /* first entry is default */
+    { "><>",    NULL },    /* no layout function means floating behavior */
+    { "[M]",    monocle },
     { "===",    bstackhoriz },
     { "TTT",    bstack },
     { "(@)",    spiral },
 #define MODKEY Mod4Mask
 
 #define TAGKEYS(KEY,TAG) \
-	{ MODKEY,                       KEY,      view,           {.ui = 1 << TAG} }, \
-	{ MODKEY|MODALT,                KEY,      toggleview,     {.ui = 1 << TAG} }, \
+    { MODKEY,                       KEY,      view,           {.ui = 1 << TAG} }, \
+    { MODKEY|MODALT,                KEY,      toggleview,     {.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} },
+    { 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 } }
 
 
 static Key keys[] = {
-	/* modifier                     key        function        argument */
-	{ MODKEY,                       XK_F4,     spawn,          {.v = upvol } },
-    { MODKEY,                       XK_F3,     spawn,          {.v = downvol } },
-    { MODKEY,                       XK_F2,     spawn,          {.v = togglevol } },
-    { MODKEY,                       XK_l,      spawn,      {.v = locksaver } }, 
-	{ MODKEY|ShiftMask,             XK_Return, spawn,          {.v = termcmd } },
-    { MODKEY,                       XK_b,      togglebar,      {0} },
-    { MODKEY,                       XK_p,      spawn,          {.v = dmenucmd } },
-	{ MODKEY,                       XK_j,      focusstack,     {.i = +1 } },
-	{ MODKEY,                       XK_k,      focusstack,     {.i = -1 } },
-	{ MODKEY,                       XK_i,      incnmaster,     {.i = +1 } },
-	{ MODKEY,                       XK_d,      incnmaster,     {.i = -1 } },
-	{ MODKEY,                       XK_h,      setmfact,       {.f = -0.05} },
-	{ MODKEY,                       XK_l,      setmfact,       {.f = +0.05} },
-	{ MODKEY,                       XK_Return, zoom,           {0} },
-	{ MODKEY,                       XK_Tab,    view,           {0} },
-	{ MODKEY,                       XK_c,      killclient,     {0} },
-	{ MODKEY|MODALT,                XK_t,      setlayout,      {.v = &layouts[0]} }, //tile
-	{ MODKEY|MODALT,                XK_f,      setlayout,      {.v = &layouts[1]} }, //NULL
-	{ MODKEY|MODALT,                XK_m,      setlayout,      {.v = &layouts[2]} }, //monocle
-    { MODKEY|MODALT,                XK_h,      setlayout,      {.v = &layouts[3]} }, //bstackhoriz
-	{ MODKEY|MODALT,                XK_b,      setlayout,      {.v = &layouts[4]} }, //bstack
-	{ MODKEY|MODALT,                XK_s,      setlayout,      {.v = &layouts[5]} }, //spiral
-	{ MODKEY|MODALT,                XK_w,      setlayout,      {.v = &layouts[6]} }, //dwindle
-	{ MODKEY|MODALT,                XK_g,      setlayout,      {.v = &layouts[7]} }, //grid
-    { MODKEY|MODALT,                XK_a,      setlayout,      {.v = &layouts[8]} }, //gaplessgrid
-    { MODKEY,                       XK_space,  setlayout,      {0} },
-	{ MODKEY|ShiftMask,             XK_space,  togglefloating, {0} },
-	{ MODKEY,                       XK_0,      view,           {.ui = ~0 } },
-	{ MODKEY|ShiftMask,             XK_0,      tag,            {.ui = ~0 } },
-	{ MODKEY,                       XK_comma,  focusmon,       {.i = -1 } },
-	{ MODKEY,                       XK_period, focusmon,       {.i = +1 } },
-	{ MODKEY|ShiftMask,             XK_comma,  tagmon,         {.i = -1 } },
-	{ MODKEY|ShiftMask,             XK_period, tagmon,         {.i = +1 } },
-	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} },
+    /* modifier                     key        function         argument */
+    { MODKEY,                       XK_F4,     spawn,           {.v = upvol } },
+    { MODKEY,                       XK_F3,     spawn,           {.v = downvol } },
+    { MODKEY,                       XK_F2,     spawn,           {.v = togglevol } },
+    { MODKEY|MODALT,                XK_l,      spawn,           {.v = locksaver } }, 
+    { MODKEY|ShiftMask,             XK_Return, spawn,           {.v = termcmd } },
+    { MODKEY,                       XK_b,      togglebar,       {0} },
+    { MODKEY,                       XK_p,      spawn,           {.v = dmenucmd } },
+    { MODKEY,                       XK_j,      focusstack,      {.i = +1 } },
+    { MODKEY,                       XK_k,      focusstack,      {.i = -1 } },
+    { MODKEY,                       XK_i,      incnmaster,      {.i = +1 } },
+    { MODKEY,                       XK_d,      incnmaster,      {.i = -1 } },
+    { MODKEY,                       XK_h,      setmfact,        {.f = -0.05} },
+    { MODKEY,                       XK_l,      setmfact,        {.f = +0.05} },
+    { MODKEY,                       XK_Return, zoom,            {0} },
+    { MODKEY,                       XK_Tab,    view,            {0} },
+    { MODKEY,                       XK_c,      killclient,      {0} },
+    { MODKEY|MODALT,                XK_t,      setlayout,       {.v = &layouts[0]} }, //tile
+    { MODKEY|MODALT,                XK_f,      setlayout,       {.v = &layouts[1]} }, //NULL
+    { MODKEY|MODALT,                XK_m,      setlayout,       {.v = &layouts[2]} }, //monocle
+    { MODKEY|MODALT,                XK_h,      setlayout,       {.v = &layouts[3]} }, //bstackhoriz
+    { MODKEY|MODALT,                XK_b,      setlayout,       {.v = &layouts[4]} }, //bstack
+    { MODKEY|MODALT,                XK_s,      setlayout,       {.v = &layouts[5]} }, //spiral
+    { MODKEY|MODALT,                XK_w,      setlayout,       {.v = &layouts[6]} }, //dwindle
+    { MODKEY|MODALT,                XK_g,      setlayout,       {.v = &layouts[7]} }, //grid
+    { MODKEY|MODALT,                XK_a,      setlayout,       {.v = &layouts[8]} }, //gaplessgrid
+    { MODKEY,                       XK_space,  setlayout,       {0} },
+    { MODKEY|ShiftMask,             XK_space,  togglefloating,  {0} },
+    { MODKEY,                       XK_0,      view,            {.ui = ~0 } },
+    { MODKEY|ShiftMask,             XK_0,      tag,             {.ui = ~0 } },
+    { MODKEY,                       XK_comma,  focusmon,        {.i = -1 } },
+    { MODKEY,                       XK_period, focusmon,        {.i = +1 } },
+    { MODKEY|ShiftMask,             XK_comma,  tagmon,          {.i = -1 } },
+    { MODKEY|ShiftMask,             XK_period, tagmon,          {.i = +1 } },
+    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 */
Binary file modified.
 					m->mx = m->wx = unique[i].x_org;
 					m->my = m->wy = unique[i].y_org;
 					m->mw = m->ww = unique[i].width;
-					m->mh = m->wh = unique[i].height;
+					m->mh = m->wh = unique[i].height - BOTTOM_BAR_HEIGHT;
 					updatebarpos(m);
 				}
 		}

wm/dwm.o

Binary file removed.