mirror of
https://github.com/Horhik/dotfiles.git
synced 2024-11-26 01:51:35 +00:00
update dwm
This commit is contained in:
parent
7a466f891a
commit
44f30cdcf2
|
@ -24,15 +24,16 @@ static const char *const autostart[] = {
|
|||
"firefox", NULL,
|
||||
"variety", NULL,
|
||||
"redshift", NULL,
|
||||
//"picom", "--experimental-backends", "--detect-rounded-corners", NULL,
|
||||
"picom", "--experimental-backends", "--detect-rounded-corners", NULL,
|
||||
"setxkbmap","us,ru,fi",",winkeys","grp:alt_shift_toggle", NULL,
|
||||
"xrandr", "--output", "HDMI1", "--above", "eDP1", NULL,
|
||||
"$HOME/.local/scripts/status/launch", NULL,
|
||||
"pulseaudio","-k", NULL,
|
||||
/* "alacritty", "-t", "sp_volume", "-e", "$HOME/scripts/volume_launch.sh", NULL*/
|
||||
NULL /* terminate */
|
||||
};
|
||||
|
||||
/* tagging */
|
||||
static const char *tags[] = { "ﳎ", "", "", "", "", "", "", "", "龎" };
|
||||
static const char *tags[] = { "ﳎ ", " ", " ", " ", "", "", " ", " ", "龎 " };
|
||||
|
||||
/* launcher commands (They must be NULL terminated) */
|
||||
static const char* surf[] = { "surf", "duckduckgo.com", NULL };
|
||||
|
|
|
@ -24,15 +24,15 @@ static const char *const autostart[] = {
|
|||
"firefox", NULL,
|
||||
"variety", NULL,
|
||||
"redshift", NULL,
|
||||
//"picom", "--experimental-backends", "--detect-rounded-corners", NULL,
|
||||
"picom", "--experimental-backends", "--detect-rounded-corners", NULL,
|
||||
"setxkbmap","us,ru,fi",",winkeys","grp:alt_shift_toggle", NULL,
|
||||
"xrandr", "--output", "HDMI1", "--above", "eDP1", NULL,
|
||||
"pulseaudio","-k", NULL,
|
||||
/* "alacritty", "-t", "sp_volume", "-e", "$HOME/scripts/volume_launch.sh", NULL*/
|
||||
NULL /* terminate */
|
||||
};
|
||||
|
||||
/* tagging */
|
||||
static const char *tags[] = { "ﳎ", "", "", "", "", "", "", "", "龎" };
|
||||
static const char *tags[] = { "ﳎ ", " ", " ", " ", "", "", " ", " ", "龎 " };
|
||||
|
||||
/* launcher commands (They must be NULL terminated) */
|
||||
static const char* surf[] = { "surf", "duckduckgo.com", NULL };
|
||||
|
|
BIN
dwm-6.2/dwm
BIN
dwm-6.2/dwm
Binary file not shown.
93
dwm-6.2/dwm-alternativetags-6.2.diff
Normal file
93
dwm-6.2/dwm-alternativetags-6.2.diff
Normal file
|
@ -0,0 +1,93 @@
|
|||
From 25aa44b5998a2aac840a0eecf9d8a479695b2577 Mon Sep 17 00:00:00 2001
|
||||
From: Piyush Pangtey <gokuvsvegita@gmail.com>
|
||||
Date: Sat, 13 Apr 2019 00:24:23 +0530
|
||||
Subject: [PATCH] alternative tags
|
||||
|
||||
Having icons as tags sure makes dwm look awesome, but having tags number
|
||||
simplifies tags related operations. This patch introduces alternative
|
||||
tags which can be switched on the fly for the sole purpose of providing
|
||||
visual aid.
|
||||
|
||||
Signed-off-by: Piyush Pangtey <gokuvsvegita@gmail.com>
|
||||
---
|
||||
config.def.h | 2 ++
|
||||
dwm.c | 14 ++++++++++++--
|
||||
2 files changed, 14 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/config.def.h b/config.def.h
|
||||
index 1c0b587..e6c2565 100644
|
||||
--- a/config.def.h
|
||||
+++ b/config.def.h
|
||||
@@ -20,6 +20,7 @@ static const char *colors[][3] = {
|
||||
|
||||
/* tagging */
|
||||
static const char *tags[] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" };
|
||||
+static const char *tagsalt[] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" };
|
||||
|
||||
static const Rule rules[] = {
|
||||
/* xprop(1):
|
||||
@@ -84,6 +85,7 @@ static Key keys[] = {
|
||||
{ MODKEY, XK_period, focusmon, {.i = +1 } },
|
||||
{ MODKEY|ShiftMask, XK_comma, tagmon, {.i = -1 } },
|
||||
{ MODKEY|ShiftMask, XK_period, tagmon, {.i = +1 } },
|
||||
+ { MODKEY, XK_n, togglealttag, {0} },
|
||||
TAGKEYS( XK_1, 0)
|
||||
TAGKEYS( XK_2, 1)
|
||||
TAGKEYS( XK_3, 2)
|
||||
diff --git a/dwm.c b/dwm.c
|
||||
index 4465af1..ee292e1 100644
|
||||
--- a/dwm.c
|
||||
+++ b/dwm.c
|
||||
@@ -130,6 +130,7 @@ struct Monitor {
|
||||
Monitor *next;
|
||||
Window barwin;
|
||||
const Layout *lt[2];
|
||||
+ unsigned int alttag;
|
||||
};
|
||||
|
||||
typedef struct {
|
||||
@@ -209,6 +210,7 @@ static void spawn(const Arg *arg);
|
||||
static void tag(const Arg *arg);
|
||||
static void tagmon(const Arg *arg);
|
||||
static void tile(Monitor *);
|
||||
+static void togglealttag();
|
||||
static void togglebar(const Arg *arg);
|
||||
static void togglefloating(const Arg *arg);
|
||||
static void toggletag(const Arg *arg);
|
||||
@@ -695,7 +697,7 @@ dirtomon(int dir)
|
||||
void
|
||||
drawbar(Monitor *m)
|
||||
{
|
||||
- int x, w, sw = 0;
|
||||
+ int x, w, wdelta, sw = 0;
|
||||
int boxs = drw->fonts->h / 9;
|
||||
int boxw = drw->fonts->h / 6 + 2;
|
||||
unsigned int i, occ = 0, urg = 0;
|
||||
@@ -716,8 +718,9 @@ drawbar(Monitor *m)
|
||||
x = 0;
|
||||
for (i = 0; i < LENGTH(tags); i++) {
|
||||
w = TEXTW(tags[i]);
|
||||
+ wdelta = selmon->alttag ? abs(TEXTW(tags[i]) - TEXTW(tagsalt[i])) / 2 : 0;
|
||||
drw_setscheme(drw, scheme[m->tagset[m->seltags] & 1 << i ? SchemeSel : SchemeNorm]);
|
||||
- drw_text(drw, x, 0, w, bh, lrpad / 2, tags[i], urg & 1 << i);
|
||||
+ drw_text(drw, x, 0, w, bh, wdelta + lrpad / 2, (selmon->alttag ? tagsalt[i] : tags[i]), urg & 1 << i);
|
||||
if (occ & 1 << i)
|
||||
drw_rect(drw, x + boxs, boxs, boxw, boxw,
|
||||
m == selmon && selmon->sel && selmon->sel->tags & 1 << i,
|
||||
@@ -1696,6 +1699,13 @@ tile(Monitor *m)
|
||||
}
|
||||
}
|
||||
|
||||
+void
|
||||
+togglealttag()
|
||||
+{
|
||||
+ selmon->alttag = !selmon->alttag;
|
||||
+ drawbar(selmon);
|
||||
+}
|
||||
+
|
||||
void
|
||||
togglebar(const Arg *arg)
|
||||
{
|
||||
--
|
||||
2.21.0
|
||||
|
BIN
dwm-6.2/dwm.o
BIN
dwm-6.2/dwm.o
Binary file not shown.
6
home/scripts/.local/scripts/status/launch
Executable file
6
home/scripts/.local/scripts/status/launch
Executable file
|
@ -0,0 +1,6 @@
|
|||
#!/bin/bash
|
||||
|
||||
while true; do
|
||||
xsetroot -name "$(./statusbar)"
|
||||
sleep 0.5
|
||||
done &
|
|
@ -7,7 +7,7 @@ cd yay
|
|||
makepkg -si
|
||||
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
|
||||
|
||||
yay -S dunst firefox dwm surf dmenu st qutebrowser pulsemixer pkg-config variety alacritty compton-tryone-git ninja meson cmake libev libevdev uthash nerd-fonts-mononoki nerd-fonts tmux feh xorg-xsetroot
|
||||
yay -S dunst firefox dwm surf dmenu st qutebrowser pulsemixer pkg-config variety alacritty compton-tryone-git ninja meson cmake libev libevdev uthash nerd-fonts-mononoki nerd-fonts tmux feh xorg-xsetroot xkblayout-state
|
||||
# setup compositor
|
||||
cd $HOME/Downloads/tmp
|
||||
git clone https://github.com/ibhagwan/picom
|
||||
|
|
Loading…
Reference in a new issue