Dotfiles config update (2022-05-01)

This commit is contained in:
q3aql 2022-05-01 11:58:42 +02:00
parent 739e30d373
commit ef3d06c649
17 changed files with 182 additions and 59 deletions

View File

@ -17,12 +17,10 @@ pnmixer -t &
#compton & #compton &
#sleep 15 && picom & #sleep 15 && picom &
kitty &
kitty &
# Configure wallpaper # Configure wallpaper
sleep 3 && nitrogen --head=0 --set-scaled ~/wallpapers/archlinux2.jpg & wallpaper_path="${HOME}/wallpapers/archlinux3.png"
sleep 3 && nitrogen --head=1 --set-zoom-fill ~/wallpapers/archlinux2.jpg & #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 # Configure screensaver
~/.config/dwm/startscreensaver.sh & ~/.config/dwm/startscreensaver.sh &

View File

@ -15,13 +15,13 @@ static const int systraypinningfailfirst = 1;
// 0 means no systray // 0 means no systray
static const int showsystray = 1; static const int showsystray = 1;
// 0 means no bar // 0 means no bar
static const int showbar = 1; static const int showbar = 5;
// 0 means bottom bar // 0 means bottom bar
static const int topbar = 1; static const int topbar = 5;
// ---------------------------------- Fonts ------------------------------------ // ---------------------------------- 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"; static const char dmenufont[] = "UbuntuMono Nerd Font:size=12:antialias=true:autohint=true";
// ---------------------------------- Colors ----------------------------------- // ---------------------------------- Colors -----------------------------------
@ -104,10 +104,10 @@ static const int resizehints = 1; // 1 means respect size hints in tiled resizal
static const Layout layouts[] = { static const Layout layouts[] = {
// symbol arrange function // symbol arrange function
{ "[]", tile }, // first entry is default { "[]", tile }, // first entry is default
{ "[F]", NULL }, // no layout function means floating behavior //{ "[M]", monocle },
{ "[M]", monocle },
{ "[C]", tcl }, { "[C]", tcl },
{ "[G]", grid }, { "[F]", NULL }, // no layout function means floating behavior
//{ "[G]", grid },
{ NULL, NULL }, { NULL, NULL },
}; };
@ -179,7 +179,7 @@ static Key keys[] = {
{ MODKEY, XK_Right, schemeCycle, {0} }, { MODKEY, XK_Right, schemeCycle, {0} },
// Kill window // Kill window
{ MODKEY, XK_w, killclient, {0} }, { MODKEY|ShiftMask, XK_q, killclient, {0} },
// Restart dwm // Restart dwm
{ MODKEY|ControlMask, XK_r, quit, {1} }, { MODKEY|ControlMask, XK_r, quit, {1} },
@ -204,27 +204,21 @@ static Key keys[] = {
// dmenu // dmenu
{ MODKEY|ShiftMask, XK_Return, spawn, {.v = dmenucmd } }, { MODKEY|ShiftMask, XK_Return, spawn, {.v = dmenucmd } },
// rofi { MODKEY, XK_o, spawn, SHCMD("rofi -show drun") },
{ MODKEY, XK_m, spawn, SHCMD("rofi -show drun") }, { MODKEY, XK_p, spawn, SHCMD("rofi -show run") },
{ MODKEY|ShiftMask, XK_w, spawn, SHCMD("rofi -show") },
// Window nav (rofi)
{ MODKEY|ShiftMask, XK_m, spawn, SHCMD("rofi -show") },
// Terminal
{ MODKEY, XK_Return, spawn, SHCMD("kitty") }, { MODKEY, XK_Return, spawn, SHCMD("kitty") },
{ MODKEY, XK_n, spawn, SHCMD("pcmanfm") },
// File explorer
{ MODKEY, XK_e, spawn, SHCMD("pcmanfm") },
// Browser
{ MODKEY, XK_b, spawn, SHCMD("firefox") }, { MODKEY, XK_b, spawn, SHCMD("firefox") },
{ MODKEY, XK_e, spawn, SHCMD("geany") },
// Redshift { MODKEY, XK_m, spawn, SHCMD("telegram") },
{ MODKEY, XK_r, spawn, SHCMD("redshift -O 2400") }, { MODKEY, XK_z, spawn, SHCMD("nitrogen") },
{ MODKEY|ShiftMask, XK_r, spawn, SHCMD("redshift -x") }, { MODKEY, XK_u, spawn, SHCMD("xterm") },
{ MODKEY, XK_t, spawn, SHCMD("rofi-theme-selector") },
{ MODKEY, XK_i, spawn, SHCMD("lxappearance") },
// Screenshot // Screenshot
{ MODKEY, XK_s, spawn, SHCMD("scrot") }, { MODKEY, XK_s, spawn, SHCMD("xfce4-screenshooter") },
{ MODKEY|ShiftMask, XK_s, spawn, SHCMD("scrot -s") }, { MODKEY|ShiftMask, XK_s, spawn, SHCMD("scrot -s") },
// ----------------- Hardware ------------------ // ----------------- Hardware ------------------

View File

@ -214,7 +214,7 @@ static void killclient(const Arg *arg);
static void manage(Window w, XWindowAttributes *wa); static void manage(Window w, XWindowAttributes *wa);
static void mappingnotify(XEvent *e); static void mappingnotify(XEvent *e);
static void maprequest(XEvent *e); static void maprequest(XEvent *e);
static void monocle(Monitor *m); //static void monocle(Monitor *m);
static void motionnotify(XEvent *e); static void motionnotify(XEvent *e);
static void movemouse(const Arg *arg); static void movemouse(const Arg *arg);
static Client *nexttagged(Client *c); static Client *nexttagged(Client *c);
@ -1330,20 +1330,20 @@ maprequest(XEvent *e)
manage(ev->window, &wa); manage(ev->window, &wa);
} }
void //void
monocle(Monitor *m) //monocle(Monitor *m)
{ //{
unsigned int n = 0; // unsigned int n = 0;
Client *c; // Client *c;
for (c = m->clients; c; c = c->next) // for (c = m->clients; c; c = c->next)
if (ISVISIBLE(c)) // if (ISVISIBLE(c))
n++; // n++;
if (n > 0) /* override layout symbol */ // if (n > 0) /* override layout symbol */
snprintf(m->ltsymbol, sizeof m->ltsymbol, "[%d]", n); // snprintf(m->ltsymbol, sizeof m->ltsymbol, "[%d]", n);
for (c = nexttiled(m->clients); c; c = nexttiled(c->next)) // 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); // resize(c, m->wx, m->wy, m->ww - 2 * c->bw, m->wh - 2 * c->bw, 0);
} //}
void void
motionnotify(XEvent *e) motionnotify(XEvent *e)

View File

@ -3,9 +3,9 @@ static const Block blocks[] = {
{ "", "~/.config/dwm/scripts/checkUpdates.sh", 1800, 0 }, { "", "~/.config/dwm/scripts/checkUpdates.sh", 1800, 0 },
{ "", "~/.config/dwm/scripts/kernel_version.sh", 60, 0 }, { "", "~/.config/dwm/scripts/kernel_version.sh", 60, 0 },
{ "", "~/.config/dwm/scripts/cpu_info.sh", 2, 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 }, { "", "~/.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. // Sets delimeter between status commands. NULL character ('\0') means no delimeter.

View File

@ -5,16 +5,16 @@ if [ -z "${check_sensor}" ] ; then
check_sensor=$(sensors | grep "Tctl:" 2> /dev/null) check_sensor=$(sensors | grep "Tctl:" 2> /dev/null)
if [ -z "${check_sensor}" ] ; then if [ -z "${check_sensor}" ] ; then
CPU_USAGE=$(~/.config/dwm/scripts/cpu_load.sh -p) 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 else
TEMP=$(sensors | grep 'Package id 0:\|Tctl' | grep ':[ ]*+[0-9]*.[0-9]*°C' -o | grep '+[0-9]*.[0-9]*°C' -o) 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=$(mpstat 1 1 | awk '/Average:/ {printf("%s\n", $(NF-9))}')
CPU_USAGE=$(~/.config/dwm/scripts/cpu_load.sh -p) 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 fi
else else
TEMP=$(sensors | grep 'Package id 0:\|Tdie' | grep ':[ ]*+[0-9]*.[0-9]*°C' -o | grep '+[0-9]*.[0-9]*°C' -o) 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=$(mpstat 1 1 | awk '/Average:/ {printf("%s\n", $(NF-9))}')
CPU_USAGE=$(~/.config/dwm/scripts/cpu_load.sh -p) 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 fi

View File

@ -0,0 +1,4 @@
#!/bin/bash
get_volume=$(amixer | grep "%" | head -1 | cut -d "%" -f 1 | cut -d "[" -f 2)
echo "${get_volume}%"

View File

@ -30,5 +30,5 @@ kernelVersion=${kernelVersion}${kernelVersionTempDot}
#kernelVersion=${kernelVersion}-${archCommand} #kernelVersion=${kernelVersion}-${archCommand}
kernelVersion=${kernelVersion} kernelVersion=${kernelVersion}
#echo "Kernel: Linux ${kernelVersion} " #echo "Kernel: Linux ${kernelVersion} "
echo "Linux ${kernelVersion} " echo "${kernelVersion}"

View File

@ -1,4 +1,4 @@
#!/bin/bash #!/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} echo ${mem_info}

View File

@ -4,11 +4,9 @@ scan_rel=0
sleep 2 sleep 2
while [ ${scan_rel} -eq 0 ] ; do while [ ${scan_rel} -eq 0 ] ; do
# Primer monitor # First monitor
xrandr --output DP-1 --mode 1920x1200 -r 59.95 xrandr --output DP-1 --mode 1920x1200 -r 59.95
xrandr --output DisplayPort-0 --mode 1920x1200 -r 59.95 # Second monitor
# Segundo monitor
xrandr --output DP-2 --mode 1280x1024 -r 75.02 --rotate left --right-of DP-1
xrandr --output DisplayPort-1 --mode 1280x1024 -r 75.02 --rotate left --right-of DisplayPort-0 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 #xrandr --output DisplayPort-1 --mode 1280x1024 -r 75.02 --scale 1.1x1.1 --rotate left --right-of DisplayPort-0
sleep 2 sleep 2

View File

@ -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: ### My configurations:
* [Qtile](README-qtile.md) * [Qtile](README-qtile.md)
* [i3](README-i3.md) * [i3](README-i3.md)
* [Sway](README-sway.md) * [Sway](README-sway.md)
* [Dwm](README-dwm.md)
* [Spectrwm](README-spectrwm.md) * [Spectrwm](README-spectrwm.md)
### Install dependencies on Arch Linux: ### Install dependencies on Arch Linux:

123
README-dwm.md Normal file
View File

@ -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)

View File

@ -6,6 +6,7 @@ dotfiles - My tiling i3 configuration (for Arch/Devuan/Debian)
* [Qtile](README-qtile.md) * [Qtile](README-qtile.md)
* [i3](README-i3.md) * [i3](README-i3.md)
* [Sway](README-sway.md) * [Sway](README-sway.md)
* [Dwm](README-dwm.md)
* [Spectrwm](README-spectrwm.md) * [Spectrwm](README-spectrwm.md)
![i3](examples/i3.png) ![i3](examples/i3.png)

View File

@ -6,6 +6,7 @@ dotfiles - My tiling Qtile configuration (for Arch/Devuan/Debian)
* [Qtile](README-qtile.md) * [Qtile](README-qtile.md)
* [i3](README-i3.md) * [i3](README-i3.md)
* [Sway](README-sway.md) * [Sway](README-sway.md)
* [Dwm](README-dwm.md)
* [Spectrwm](README-spectrwm.md) * [Spectrwm](README-spectrwm.md)
![qtile](examples/qtile.png) ![qtile](examples/qtile.png)
@ -94,7 +95,7 @@ My list of extra combinations:
- Volume-Up = Volume +5 - Volume-Up = Volume +5
- Volume-Down = Volume -5 - Volume-Down = Volume -5
- VolumeMute = Mute Volume - VolumeMute = Mute Volume
- Super + Shift + q = Shutdown - Super + Shift + q = Kill
### External links: ### External links:

View File

@ -6,6 +6,7 @@ dotfiles - My tiling Spectrwm configuration (for Arch/Devuan/Debian)
* [Qtile](README-qtile.md) * [Qtile](README-qtile.md)
* [i3](README-i3.md) * [i3](README-i3.md)
* [Sway](README-sway.md) * [Sway](README-sway.md)
* [Dwm](README-dwm.md)
* [Spectrwm](README-spectrwm.md) * [Spectrwm](README-spectrwm.md)
![spectrwm](examples/spectrwm.png) ![spectrwm](examples/spectrwm.png)

View File

@ -6,6 +6,7 @@ dotfiles - My tiling Sway configuration (for Arch/Devuan/Debian)
* [Qtile](README-qtile.md) * [Qtile](README-qtile.md)
* [i3](README-i3.md) * [i3](README-i3.md)
* [Sway](README-sway.md) * [Sway](README-sway.md)
* [Dwm](README-dwm.md)
* [Spectrwm](README-spectrwm.md) * [Spectrwm](README-spectrwm.md)
![sway](examples/sway.png) ![sway](examples/sway.png)

View File

@ -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: ### My configurations:
* [Qtile](README-qtile.md) * [Qtile](README-qtile.md)
* [i3](README-i3.md) * [i3](README-i3.md)
* [Sway](README-sway.md) * [Sway](README-sway.md)
* [Dwm](README-dwm.md)
* [Spectrwm](README-spectrwm.md) * [Spectrwm](README-spectrwm.md)
![qtile](examples/qtile.png) ![qtile](examples/qtile.png)

BIN
examples/dwm.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 77 KiB