diff --git a/.config/dwm/autostart.sh b/.config/dwm/autostart.sh index 7f06a63..3603be2 100755 --- a/.config/dwm/autostart.sh +++ b/.config/dwm/autostart.sh @@ -17,12 +17,10 @@ pnmixer -t & #compton & #sleep 15 && picom & -kitty & -kitty & - # Configure wallpaper -sleep 3 && nitrogen --head=0 --set-scaled ~/wallpapers/archlinux2.jpg & -sleep 3 && nitrogen --head=1 --set-zoom-fill ~/wallpapers/archlinux2.jpg & +wallpaper_path="${HOME}/wallpapers/archlinux3.png" +#sleep 5 && nitrogen --head=0 --set-scaled ${wallpaper_path} & +sleep 5 && nitrogen --head=0 --set-scaled ${wallpaper_path} ; nitrogen --head=1 --set-zoom-fill ${wallpaper_path} & # Configure screensaver ~/.config/dwm/startscreensaver.sh & diff --git a/.config/dwm/config.h b/.config/dwm/config.h index 69dc0af..cef65e7 100644 --- a/.config/dwm/config.h +++ b/.config/dwm/config.h @@ -15,13 +15,13 @@ static const int systraypinningfailfirst = 1; // 0 means no systray static const int showsystray = 1; // 0 means no bar -static const int showbar = 1; +static const int showbar = 5; // 0 means bottom bar -static const int topbar = 1; +static const int topbar = 5; // ---------------------------------- Fonts ------------------------------------ -static const char *fonts[] = { "UbuntuMono Nerd Font:size=14:weight=bold:antialias=true:autohint:true" }; +static const char *fonts[] = { "UbuntuMono Nerd Font:size=12:weight=bold:antialias=true:autohint:true" }; static const char dmenufont[] = "UbuntuMono Nerd Font:size=12:antialias=true:autohint=true"; // ---------------------------------- Colors ----------------------------------- @@ -104,10 +104,10 @@ static const int resizehints = 1; // 1 means respect size hints in tiled resizal static const Layout layouts[] = { // symbol arrange function { "[]", tile }, // first entry is default - { "[F]", NULL }, // no layout function means floating behavior - { "[M]", monocle }, + //{ "[M]", monocle }, { "[C]", tcl }, - { "[G]", grid }, + { "[F]", NULL }, // no layout function means floating behavior + //{ "[G]", grid }, { NULL, NULL }, }; @@ -179,7 +179,7 @@ static Key keys[] = { { MODKEY, XK_Right, schemeCycle, {0} }, // Kill window - { MODKEY, XK_w, killclient, {0} }, + { MODKEY|ShiftMask, XK_q, killclient, {0} }, // Restart dwm { MODKEY|ControlMask, XK_r, quit, {1} }, @@ -204,27 +204,21 @@ static Key keys[] = { // dmenu { MODKEY|ShiftMask, XK_Return, spawn, {.v = dmenucmd } }, - // rofi - { MODKEY, XK_m, spawn, SHCMD("rofi -show drun") }, - - // Window nav (rofi) - { MODKEY|ShiftMask, XK_m, spawn, SHCMD("rofi -show") }, - - // Terminal + { MODKEY, XK_o, spawn, SHCMD("rofi -show drun") }, + { MODKEY, XK_p, spawn, SHCMD("rofi -show run") }, + { MODKEY|ShiftMask, XK_w, spawn, SHCMD("rofi -show") }, { MODKEY, XK_Return, spawn, SHCMD("kitty") }, - - // File explorer - { MODKEY, XK_e, spawn, SHCMD("pcmanfm") }, - - // Browser + { MODKEY, XK_n, spawn, SHCMD("pcmanfm") }, { MODKEY, XK_b, spawn, SHCMD("firefox") }, - - // Redshift - { MODKEY, XK_r, spawn, SHCMD("redshift -O 2400") }, - { MODKEY|ShiftMask, XK_r, spawn, SHCMD("redshift -x") }, + { MODKEY, XK_e, spawn, SHCMD("geany") }, + { MODKEY, XK_m, spawn, SHCMD("telegram") }, + { MODKEY, XK_z, spawn, SHCMD("nitrogen") }, + { MODKEY, XK_u, spawn, SHCMD("xterm") }, + { MODKEY, XK_t, spawn, SHCMD("rofi-theme-selector") }, + { MODKEY, XK_i, spawn, SHCMD("lxappearance") }, // Screenshot - { MODKEY, XK_s, spawn, SHCMD("scrot") }, + { MODKEY, XK_s, spawn, SHCMD("xfce4-screenshooter") }, { MODKEY|ShiftMask, XK_s, spawn, SHCMD("scrot -s") }, // ----------------- Hardware ------------------ diff --git a/.config/dwm/dwm.c b/.config/dwm/dwm.c index cac811a..eefa74d 100644 --- a/.config/dwm/dwm.c +++ b/.config/dwm/dwm.c @@ -214,7 +214,7 @@ static void killclient(const Arg *arg); static void manage(Window w, XWindowAttributes *wa); static void mappingnotify(XEvent *e); static void maprequest(XEvent *e); -static void monocle(Monitor *m); +//static void monocle(Monitor *m); static void motionnotify(XEvent *e); static void movemouse(const Arg *arg); static Client *nexttagged(Client *c); @@ -1330,20 +1330,20 @@ maprequest(XEvent *e) manage(ev->window, &wa); } -void -monocle(Monitor *m) -{ - unsigned int n = 0; - Client *c; +//void +//monocle(Monitor *m) +//{ +// unsigned int n = 0; +// Client *c; - for (c = m->clients; c; c = c->next) - if (ISVISIBLE(c)) - n++; - if (n > 0) /* override layout symbol */ - snprintf(m->ltsymbol, sizeof m->ltsymbol, "[%d]", n); - for (c = nexttiled(m->clients); c; c = nexttiled(c->next)) - resize(c, m->wx, m->wy, m->ww - 2 * c->bw, m->wh - 2 * c->bw, 0); -} +// for (c = m->clients; c; c = c->next) +// if (ISVISIBLE(c)) +// n++; +// if (n > 0) /* override layout symbol */ +// snprintf(m->ltsymbol, sizeof m->ltsymbol, "[%d]", n); +// for (c = nexttiled(m->clients); c; c = nexttiled(c->next)) +// resize(c, m->wx, m->wy, m->ww - 2 * c->bw, m->wh - 2 * c->bw, 0); +//} void motionnotify(XEvent *e) diff --git a/.config/dwm/dwmblocks/blocks.h b/.config/dwm/dwmblocks/blocks.h index 5b44746..f5abf01 100644 --- a/.config/dwm/dwmblocks/blocks.h +++ b/.config/dwm/dwmblocks/blocks.h @@ -3,9 +3,9 @@ static const Block blocks[] = { { " ", "~/.config/dwm/scripts/checkUpdates.sh", 1800, 0 }, { " ", "~/.config/dwm/scripts/kernel_version.sh", 60, 0 }, { " ", "~/.config/dwm/scripts/cpu_info.sh", 2, 0 }, - { " ", "~/.config/dwm/scripts/disk_info.sh", 30, 0 }, { " ", "~/.config/dwm/scripts/mem_info.sh", 5, 0 }, - { "", "date '+ %d/%m/%Y %H:%M%p'", 5, 0 }, + { " ", "~/.config/dwm/scripts/get_volume.sh", 2, 0 }, + { "", "date '+ %d/%m/%Y %H:%M'", 5, 0 }, }; // Sets delimeter between status commands. NULL character ('\0') means no delimeter. diff --git a/.config/dwm/scripts/cpu_info.sh b/.config/dwm/scripts/cpu_info.sh index 02ed8ed..0ca1608 100755 --- a/.config/dwm/scripts/cpu_info.sh +++ b/.config/dwm/scripts/cpu_info.sh @@ -5,16 +5,16 @@ if [ -z "${check_sensor}" ] ; then check_sensor=$(sensors | grep "Tctl:" 2> /dev/null) if [ -z "${check_sensor}" ] ; then CPU_USAGE=$(~/.config/dwm/scripts/cpu_load.sh -p) - echo "$CPU_USAGE" | awk '{ printf(" CPU:%6s \n"), $1, $2 }' + echo "$CPU_USAGE" | awk '{ printf("%6s \n"), $1, $2 }' else TEMP=$(sensors | grep 'Package id 0:\|Tctl' | grep ':[ ]*+[0-9]*.[0-9]*°C' -o | grep '+[0-9]*.[0-9]*°C' -o) #CPU_USAGE=$(mpstat 1 1 | awk '/Average:/ {printf("%s\n", $(NF-9))}') CPU_USAGE=$(~/.config/dwm/scripts/cpu_load.sh -p) - echo "$CPU_USAGE $TEMP" | awk '{ printf(" CPU:%6s @ %s \n"), $1, $2 }' + echo "$CPU_USAGE $TEMP" | awk '{ printf("%6s @ %s \n"), $1, $2 }' fi else TEMP=$(sensors | grep 'Package id 0:\|Tdie' | grep ':[ ]*+[0-9]*.[0-9]*°C' -o | grep '+[0-9]*.[0-9]*°C' -o) #CPU_USAGE=$(mpstat 1 1 | awk '/Average:/ {printf("%s\n", $(NF-9))}') CPU_USAGE=$(~/.config/dwm/scripts/cpu_load.sh -p) - echo "$CPU_USAGE $TEMP" | awk '{ printf(" CPU:%6s @ %s \n"), $1, $2 }' + echo "$CPU_USAGE $TEMP" | awk '{ printf("%6s @ %s \n"), $1, $2 }' fi diff --git a/.config/dwm/scripts/get_volume.sh b/.config/dwm/scripts/get_volume.sh new file mode 100755 index 0000000..bee0121 --- /dev/null +++ b/.config/dwm/scripts/get_volume.sh @@ -0,0 +1,4 @@ +#!/bin/bash + +get_volume=$(amixer | grep "%" | head -1 | cut -d "%" -f 1 | cut -d "[" -f 2) +echo "${get_volume}%" diff --git a/.config/dwm/scripts/kernel_version.sh b/.config/dwm/scripts/kernel_version.sh index 605c986..4bb57a2 100755 --- a/.config/dwm/scripts/kernel_version.sh +++ b/.config/dwm/scripts/kernel_version.sh @@ -30,5 +30,5 @@ kernelVersion=${kernelVersion}${kernelVersionTempDot} #kernelVersion=${kernelVersion}-${archCommand} kernelVersion=${kernelVersion} #echo "Kernel: Linux ${kernelVersion} " -echo "Linux ${kernelVersion} " +echo "${kernelVersion}" diff --git a/.config/dwm/scripts/mem_info.sh b/.config/dwm/scripts/mem_info.sh index d63d126..05ae6cc 100755 --- a/.config/dwm/scripts/mem_info.sh +++ b/.config/dwm/scripts/mem_info.sh @@ -1,4 +1,4 @@ #!/bin/bash -mem_info=$(free -h | awk '/Mem:/ { printf(" %5s / %s \n", $3, $2) }') +mem_info=$(free -h | awk '/Mem:/ { printf("%5s/%s \n", $3, $2) }') echo ${mem_info} diff --git a/.config/dwm/startxrandr.sh b/.config/dwm/startxrandr.sh index 06faa82..6503f6e 100755 --- a/.config/dwm/startxrandr.sh +++ b/.config/dwm/startxrandr.sh @@ -4,11 +4,9 @@ scan_rel=0 sleep 2 while [ ${scan_rel} -eq 0 ] ; do - # Primer monitor + # First monitor xrandr --output DP-1 --mode 1920x1200 -r 59.95 - xrandr --output DisplayPort-0 --mode 1920x1200 -r 59.95 - # Segundo monitor - xrandr --output DP-2 --mode 1280x1024 -r 75.02 --rotate left --right-of DP-1 + # Second monitor xrandr --output DisplayPort-1 --mode 1280x1024 -r 75.02 --rotate left --right-of DisplayPort-0 #xrandr --output DisplayPort-1 --mode 1280x1024 -r 75.02 --scale 1.1x1.1 --rotate left --right-of DisplayPort-0 sleep 2 diff --git a/Dependencies.md b/Dependencies.md index bddf9d0..f2cd4bc 100644 --- a/Dependencies.md +++ b/Dependencies.md @@ -1,11 +1,12 @@ -dotfiles - My tiling Qtile, Spectrwm, i3 & Sway configurations (for Arch/Devuan/Debian) -======================================================================================= +dotfiles - My tiling Qtile, Spectrwm, i3 , Dwm & Sway configurations (for Arch/Devuan/Debian) +============================================================================================= ### My configurations: * [Qtile](README-qtile.md) * [i3](README-i3.md) * [Sway](README-sway.md) +* [Dwm](README-dwm.md) * [Spectrwm](README-spectrwm.md) ### Install dependencies on Arch Linux: diff --git a/README-dwm.md b/README-dwm.md new file mode 100644 index 0000000..49ed10d --- /dev/null +++ b/README-dwm.md @@ -0,0 +1,123 @@ +dotfiles - My tiling Dwm configuration (for Arch/Devuan/Debian) +=============================================================== + +### My configurations: + +* [Qtile](README-qtile.md) +* [i3](README-i3.md) +* [Sway](README-sway.md) +* [Dwm](README-dwm.md) +* [Spectrwm](README-spectrwm.md) + +![dwm](examples/dwm.png) + +### Installation: + + * **`Install dependencies:`** + + * Read [`How install dependencies on Arch and Devuan/Debian`](Dependencies.md) + + * **`Install configuration (dotfiles):`** + + * Clone repository and copy files to your home: + + ```shell + $ git clone https://github.com/q3aql/dotfiles + $ cd dotfiles + $ chmod +x install-config.sh + $ ./install-config.sh + ```` + +### Configuration: + + * **`Network Manager (Connman or NetWorkManager):`** + + * By default is enabled `NetWorkManager` as network manager: + * If you prefer `Connman`, edit the file `~/.config/dwm/autostart.sh`: + + ```shell + #connman-gtk --tray & + nm-applet & + ```` + + * **`Monitor & resolution:`** + + * The configuration load my monitor configuration: + * Use the command `xrandr` for show your config & edit the file `~/.config/dwm/startxrandr.sh`: + + ```shell + xrandr --output DP-1 --mode 1920x1200 -r 59.95 + xrandr --output DisplayPort-1 --mode 1280x1024 -r 75.02 --rotate left --right-of DisplayPort-0 + ```` + + * **`Wallpaper:`** + + * By default, the config load wallpaper on `~/wallpapers/abstract.png`: + * Edit `~/.config/dwm/autostart.sh` for set your favorite wallpaper: + + ```shell + wallpaper_path="${HOME}/wallpapers/archlinux3.png" + sleep 5 && nitrogen --head=0 --set-scaled ${wallpaper_path} & + ```` + + * **`Set Screensaver (Optional):`** + + * The configuration file set `xautolock` with 20 minutes as screensaver: + * You can change the program between `xautolock` and `xscreensaver` editing the file `~/.config/dwm/startscreensaver.sh`: + + ```shell + # Basic configuration variables + ScreensaverProgram="xautolock" # Options: xautolock or xscreensaver + ScreensaverTime="20" # 20 minutes (only for xautolock) + ```` + + * **`Build and install:`** + + * For build and install dwm, uses the following commands: + + ```shell + cd ~/.config/dwm + make + sudo make install + make clean + cd ~/.config/dwm/dwmblocks + make + sudo make install + make clean + cd .. + cp -rfv dwm.desktop /usr/share/xsessions/ + ```` + +### Keys configuration: + +My list of extra combinations: + + - Super + Tab = Next Layout + - Super + Shift + Tab = Previous Layout + - Super + Shift + f = Floating Window + - Super + p = Open Rofi (run mode) + - Super + q = Open Rofi (window mode) + - Super + o = Open Rofi (drun mode) + - Super + b = Open Firefox + - Super + n = Open PCManFM + - Super + t = Open Rofi Theme Selector + - Super + e = Open Geany + - Super + m = Open Telegram + - Super + z = Open Nitrogen + - Super + x = Open LXRandr + - Super + u = Open Xterm + - Super + i = Open LXAppearance + - Super + s = Open Screenshooter + - Volume-Up = Volume +5 + - Volume-Down = Volume -5 + - VolumeMute = Mute Volume + - Super + Shift + q = Kill + +### External links: + +* [Antonio Sarosi](https://github.com/antoniosarosi/dotfiles/) +* [Derek Taylor](https://gitlab.com/dwt1/dotfiles/) +* [TWB0109](https://github.com/TWB0109/PDots) +* [i3-style](https://github.com/altdesktop/i3-style) +* [addy-dclxvi](https://github.com/addy-dclxvi/i3-starterpack) +* [i3-gaps](https://github.com/Airblader/i3) diff --git a/README-i3.md b/README-i3.md index b0a28bb..98b4bde 100644 --- a/README-i3.md +++ b/README-i3.md @@ -6,6 +6,7 @@ dotfiles - My tiling i3 configuration (for Arch/Devuan/Debian) * [Qtile](README-qtile.md) * [i3](README-i3.md) * [Sway](README-sway.md) +* [Dwm](README-dwm.md) * [Spectrwm](README-spectrwm.md) ![i3](examples/i3.png) diff --git a/README-qtile.md b/README-qtile.md index e103163..df15a0c 100644 --- a/README-qtile.md +++ b/README-qtile.md @@ -6,6 +6,7 @@ dotfiles - My tiling Qtile configuration (for Arch/Devuan/Debian) * [Qtile](README-qtile.md) * [i3](README-i3.md) * [Sway](README-sway.md) +* [Dwm](README-dwm.md) * [Spectrwm](README-spectrwm.md) ![qtile](examples/qtile.png) @@ -94,7 +95,7 @@ My list of extra combinations: - Volume-Up = Volume +5 - Volume-Down = Volume -5 - VolumeMute = Mute Volume - - Super + Shift + q = Shutdown + - Super + Shift + q = Kill ### External links: diff --git a/README-spectrwm.md b/README-spectrwm.md index a4b48a5..ac0941f 100644 --- a/README-spectrwm.md +++ b/README-spectrwm.md @@ -6,6 +6,7 @@ dotfiles - My tiling Spectrwm configuration (for Arch/Devuan/Debian) * [Qtile](README-qtile.md) * [i3](README-i3.md) * [Sway](README-sway.md) +* [Dwm](README-dwm.md) * [Spectrwm](README-spectrwm.md) ![spectrwm](examples/spectrwm.png) diff --git a/README-sway.md b/README-sway.md index aa9e96f..f873086 100644 --- a/README-sway.md +++ b/README-sway.md @@ -6,6 +6,7 @@ dotfiles - My tiling Sway configuration (for Arch/Devuan/Debian) * [Qtile](README-qtile.md) * [i3](README-i3.md) * [Sway](README-sway.md) +* [Dwm](README-dwm.md) * [Spectrwm](README-spectrwm.md) ![sway](examples/sway.png) diff --git a/README.md b/README.md index e91b787..fcec76a 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,12 @@ -dotfiles - My tiling Qtile, spectrwm, i3 & sway configurations (for Arch/Devuan/Debian) -======================================================================================= +dotfiles - My tiling Qtile, Spectrwm, i3, Dwm & Sway configurations (for Arch/Devuan/Debian) +============================================================================================ ### My configurations: * [Qtile](README-qtile.md) * [i3](README-i3.md) * [Sway](README-sway.md) +* [Dwm](README-dwm.md) * [Spectrwm](README-spectrwm.md) ![qtile](examples/qtile.png) diff --git a/examples/dwm.png b/examples/dwm.png new file mode 100644 index 0000000..667c516 Binary files /dev/null and b/examples/dwm.png differ