Compare commits

...

15 Commits

Author SHA1 Message Date
Sravan Balaji
f56f7bb943 Update devenv packages 2025-04-26 08:55:43 -04:00
Sravan Balaji
b4de07558c Merge remote-tracking branch 'upstream/0.7' 2025-03-24 17:39:37 -04:00
Sravan Balaji
090f655271 Add devenv files 2025-03-24 17:38:31 -04:00
Leonardo Hernández Hernández
2783d91611 remove binary before copying to destination
Since Linux 6.11 is possible overwrite a running executable, possibly making it
crash.

Thanks to: movq42rax
Fixes: https://codeberg.org/dwl/dwl/issues/709
References: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=2a010c412853
References: https://lore.kernel.org/stable/CACKH++YAtEMYu2nTLUyfmxZoGO37fqogKMDkBpddmNaz5HE6ng@mail.gmail.com/T/#u

(cherry picked from commit 1d08ade13225343890e3476f7c4003ab87dc266c)
2025-03-13 22:00:48 +01:00
Guido Cella
b2abff8b57 fix a use after free
This line makes dwl crash after closing mpv with the switchtotag patch.

(cherry picked from commit 8206cc8889994b3e9ce3c50abefc19367cf49a8e)
2025-03-13 21:59:55 +01:00
DreamMaoMao
298c6e1839 fix: crash when open some x11 app
(cherry picked from commit e0f531d5087cbd1223577c77262ec7476c157088)
2025-03-13 21:58:14 +01:00
Sravan Balaji
455eedaa60 Fix whitespace 2025-02-09 09:34:44 -05:00
Sravan Balaji
b940c68606 Replace ghostty with foot 2025-01-05 22:25:31 -05:00
Sravan Balaji
6200290c05 Switch from kitty to ghostty terminal 2024-12-30 10:08:04 -05:00
Sravan Balaji
81bb55f185 Idle Inhibitor Active on Startup
- Make killall waybar fail silently if waybar
  isn't already running
- Update launch script to run in foreground
- Use verbose version of waybar CLI args
- Automatically restart waybar if it exits
  with non 143 (SIGTERM) exit code so random
  crashes (e.g., when opening LibreOffice or
  some games) don't persist and bar gets
  restarted
2024-12-29 16:20:39 -05:00
Sravan Balaji
fcee83d388 Fix for media with quotes in metadata 2024-11-07 09:24:24 -05:00
Sravan Balaji
82392f2bba Add window rules to start programs on certain tags 2024-11-03 16:29:43 -05:00
Sravan Balaji
1ff17a3e0b Make a new tag for productivity / email
- Remove the "media" tag
- Add productivity / email tag
2024-11-02 12:09:11 -04:00
Sravan Balaji
a0b20a574d Change dwl focused tag to an underline
- Remove debug from waybar launch
2024-10-18 23:48:43 -04:00
Sravan Balaji
e95d0bf9a9 Rounded widgets with transparent bar 2024-10-18 22:37:29 -04:00
14 changed files with 356 additions and 66 deletions

5
.envrc Normal file
View File

@@ -0,0 +1,5 @@
export DIRENV_WARN_TIMEOUT=20s
eval "$(devenv direnvrc)"
use devenv

10
.gitignore vendored
View File

@@ -4,3 +4,13 @@ dwl
*-protocol.h
.ccls-cache
patches.h
# Devenv
.devenv*
devenv.local.nix
# direnv
.direnv
# pre-commit
.pre-commit-config.yaml

View File

@@ -76,6 +76,7 @@ dist: clean
install: dwl
mkdir -p $(DESTDIR)$(PREFIX)/bin
rm -f $(DESTDIR)$(PREFIX)/bin/dwl
cp -f dwl $(DESTDIR)$(PREFIX)/bin
chmod 755 $(DESTDIR)$(PREFIX)/bin/dwl
mkdir -p $(DESTDIR)$(MANDIR)/man1

View File

@@ -51,7 +51,7 @@
- [[#cpu][CPU]]
- [[#clock][Clock]]
- [[#dunst][Dunst]]
- [[#dwl][dwl]]
- [[#dwl][DWL]]
- [[#disk][Disk]]
- [[#idle-inhibitor][Idle Inhibitor]]
- [[#memory][Memory]]
@@ -340,13 +340,38 @@ static const char *const autostart[] = {
*** Window Rules
#+BEGIN_SRC c :tangle config.h
/* NOTE: ALWAYS keep a rule declared even if you don't use rules (e.g leave at least one example) */
Use ~dwlmsg -w -c~ to get the title and appid of focused clients.
#+BEGIN_EXAMPLE c
/* NOTE: ALWAYS keep a rule declared even if you don't use rules (e.g., leave at least one example) */
static const Rule rules[] = {
/* app_id title tags mask isfloating monitor */
/* app_id title tags mask isfloating monitor */
/* examples: */
{ "Gimp_EXAMPLE", NULL, 0, 1, -1 }, /* Start on currently visible tags floating, not tiled */
{ "firefox_EXAMPLE", NULL, 1 << 8, 0, -1 }, /* Start on ONLY tag "9" */
{ "Gimp_EXAMPLE", NULL, 0, 1, -1 }, /* Start on currently visible tags floating, not tiled */
{ "firefox_EXAMPLE", NULL, 1 << 8, 0, -1 }, /* Start on ONLY tag "9" */
};
#+END_EXAMPLE
#+BEGIN_SRC c :tangle config.h
static const Rule rules[] = {
/* app_id title tags mask isfloating monitor */
{ "thunderbird-esr", NULL, 1 << 0, 0, -1 }, /* Start on ONLY tag "1" */
{ "Beeper", NULL, 1 << 1, 0, -1 }, /* Start on ONLY tag "2" */
{ "zoom", NULL, 1 << 1, 0, -1 }, /* Start on ONLY tag "2" */
{ "Signal", NULL, 1 << 1, 0, -1 }, /* Start on ONLY tag "2" */
{ "discord", NULL, 1 << 1, 0, -1 }, /* Start on ONLY tag "2" */
{ "obsidian", NULL, 1 << 2, 0, -1 }, /* Start on ONLY tag "3" */
{ "pocket-casts-linux", NULL, 1 << 3, 0, -1 }, /* Start on ONLY tag "4" */
{ "Spotify", NULL, 1 << 3, 0, -1 }, /* Start on ONLY tag "4" */
{ "Vivaldi-stable", NULL, 1 << 4, 0, -1 }, /* Start on ONLY tag "5" */
{ "foot", NULL, 1 << 5, 0, -1 }, /* Start on ONLY tag "6" */
{ "Emacs", NULL, 1 << 6, 0, -1 }, /* Start on ONLY tag "7" */
{ "steam", NULL, 1 << 7, 0, -1 }, /* Start on ONLY tag "8" */
{ "lutris", NULL, 1 << 7, 0, -1 }, /* Start on ONLY tag "8" */
{ "net.davidotek.pupgui2", NULL, 1 << 7, 0, -1 }, /* Start on ONLY tag "8" */
{ "gamescope", NULL, 1 << 7, 0, -1 }, /* Start on ONLY tag "8" */
{ "syncthing-gtk", NULL, 1 << 8, 0, -1 }, /* Start on ONLY tag "9" */
{ "openrgb", NULL, 1 << 8, 0, -1 }, /* Start on ONLY tag "9" */
};
#+END_SRC
@@ -472,7 +497,7 @@ static const enum libinput_config_tap_button_map button_map = LIBINPUT_CONFIG_TA
*** Commands
#+BEGIN_SRC c :tangle config.h
static const char *termcmd[] = { "kitty", NULL };
static const char *termcmd[] = { "foot", NULL };
static const char *menucmd[] = { "rofi", "-show", "combi", NULL };
static const Key keys[] = {
@@ -573,11 +598,20 @@ static const Button buttons[] = {
** Launch Script
#+BEGIN_SRC shell :shebang #!/usr/bin/env bash :tangle waybar/launch.sh
killall waybar
killall waybar || true
/usr/bin/waybar \
-c $HOME/.config/dwl/waybar/config.jsonc \
-s $HOME/.config/dwl/waybar/style.css &
until /usr/bin/waybar \
--config $HOME/.config/dwl/waybar/config.jsonc \
--style $HOME/.config/dwl/waybar/style.css;
do
if [ $? -ne 143 ]; then
echo "Dwl Waybar stopped with exit code $?. Respawning..." >&2;
sleep 1;
else
echo "Dwl Waybar manually killed with SIGTERM";
break;
fi
done
#+END_SRC
** Start Configuration
@@ -604,7 +638,9 @@ killall waybar
"reload_style_on_change": true,
"modules-left": [
"group/power-menu",
"group/dwl",
"dwl/tags",
"dwl/window#title",
"dwl/window#layout",
],
"modules-center": [
"tray",
@@ -637,14 +673,6 @@ killall waybar
"click-to-reveal": false,
},
},
"group/dwl": {
"orientation": "inherit",
"modules": [
"dwl/tags",
"dwl/window#title",
"dwl/window#layout",
],
},
"group/media-playing": {
"orientation": "inherit",
"modules": [
@@ -674,15 +702,32 @@ killall waybar
#+BEGIN_SRC css :tangle waybar/style.css
window#waybar {
background: transparent;
}
#window {
padding: 0px 0px;
color: transparent;
background: transparent;
}
widget {
background: #282a36;
border-radius: 25px;
}
label.module {
padding: 0px 10px;
}
button {
border-radius: 0px;
padding: 0px 0px;
}
.module,button {
border-radius: 0px;
padding: 0px 4px;
font-size: 15px;
font-family: Ubuntu Nerd Font;
margin: 0px 0px;
}
#+END_SRC
@@ -720,7 +765,7 @@ window#waybar {
"interval": 5,
"format": " {usage}%",
"tooltip": true,
"on-click-right": "kitty btop",
"on-click-right": "foot btop",
},
#+END_SRC
@@ -810,21 +855,28 @@ window#waybar {
**** Styling
#+BEGIN_SRC css :tangle waybar/style.css
box#dunst {
padding: 0px 10px;
}
#custom-dunst-status {
background: transparent;
color: #50fa7b;
padding: 0px 5px;
}
#custom-dunst-clear {
background: transparent;
color: #50fa7b;
padding: 0px 5px;
}
#custom-dunst-history-view {
background: transparent;
color: #50fa7b;
padding: 0px 5px;
}
#custom-dunst-history-clear {
background: transparent;
color: #50fa7b;
padding: 0px 5px;
}
#+END_SRC
@@ -841,14 +893,14 @@ else
fi
#+END_SRC
*** dwl
*** DWL
**** Configuration
#+BEGIN_SRC jsonc :tangle waybar/config.jsonc
"dwl/tags": {
"num-tags": 9,
"tag-labels": [ "󰍩 ₁", "󰠮 ₂", " ₃", "󰿎 ₄", "󰖟 ₅", " ₆", "󰊢 ₇", "󰊖 ₈", " ₉" ],
"tag-labels": [ "󰻧 ₁", "󰍩 ₂", "󰠮 ₃", " ₄", "󰖟 ₅", " ₆", "󰊢 ₇", "󰊖 ₈", " ₉" ],
"disable-click": false
},
"dwl/window#title": {
@@ -870,9 +922,13 @@ fi
**** Styling
#+BEGIN_SRC css :tangle waybar/style.css
#tags {
padding: 0px 10px;
}
#tags button {
background: transparent;
color: #44475a;
padding: 0px 5px;
}
#tags button.occupied {
background: transparent;
@@ -880,7 +936,7 @@ fi
}
#tags button.focused {
background: transparent;
color: #bd93f9;
box-shadow: inset 0 -3px #bd93f9;
}
#tags button.urgent {
background: transparent;
@@ -889,10 +945,12 @@ fi
#window.title {
background: transparent;
color: #f8f8f2;
padding: 0px 10px;
}
#window.layout {
background: transparent;
color: #50fa7b;
padding: 0px 10px;
}
#+END_SRC
@@ -933,7 +991,7 @@ fi
"tooltip": true,
"tooltip-format-activated": "Idle Inhibitor: {status}",
"tooltip-format-deactivated": "Idle Inhibitor: {status}",
"start-activated": false,
"start-activated": true,
},
#+END_SRC
@@ -960,7 +1018,7 @@ fi
"format": " {percentage}%",
"tooltip": true,
"tooltip-format": "RAM:\n\tUsed: {used} GiB ({percentage}%)\n\tFree: {avail} GiB\n\tTotal: {total} GiB\nSwap:\n\tUsed: {swapUsed} GiB ({swapPercentage}%)\n\tFree: {swapAvail} GiB\n\tTotal: {swapTotal} GiB",
"on-click-right": "kitty btop",
"on-click-right": "foot btop",
},
#+END_SRC
@@ -1006,21 +1064,28 @@ fi
**** Styling
#+BEGIN_SRC css :tangle waybar/style.css
box#media-playing {
padding: 0px 10px;
}
#custom-media-playing-source {
background: transparent;
color: #ff5555;
padding: 0px 5px;
}
#custom-media-playing-prev {
background: transparent;
color: #ff5555;
padding: 0px 5px;
}
#custom-media-playing-play-pause {
background: transparent;
color: #ff5555;
padding: 0px 5px;
}
#custom-media-playing-next {
background: transparent;
color: #ff5555;
padding: 0px 5px;
}
#+END_SRC
@@ -1113,7 +1178,7 @@ else
fi
fi
echo '{"text":"'$mediaSourceIcon'","tooltip":"󰝚\t'$title'\r󰠃\t'$artist'\r󰀥\t'$album'\r󰐎\t'$status'"}'
echo '{"text":"'$mediaSourceIcon'","tooltip":"󰝚\t'${title//'"'/'\"'}'\r󰠃\t'${artist//'"'/'\"'}'\r󰀥\t'${album//'"'/'\"'}'\r󰐎\t'${status//'"'/'\"'}'"}'
#+END_SRC
*** Power Menu
@@ -1163,29 +1228,38 @@ echo '{"text":"'$mediaSourceIcon'","tooltip":"󰝚\t'$title'\r󰠃\t'$artist'\r
**** Styling
#+BEGIN_SRC css :tangle waybar/style.css
box#power-menu {
padding: 0px 10px;
}
#custom-power-menu-launcher {
background: transparent;
color: #8be9fd;
padding: 0px 5px;
}
#custom-power-menu-shutdown {
background: transparent;
color: #ff5555;
padding: 0px 5px;
}
#custom-power-menu-reboot {
background: transparent;
color: #50fa7b;
padding: 0px 5px;
}
#custom-power-menu-sleep {
background: transparent;
color: #f1fa8c;
padding: 0px 5px;
}
#custom-power-menu-lock {
background: transparent;
color: #ff79c6;
padding: 0px 5px;
}
#custom-power-menu-logout {
background: transparent;
color: #ffb86c;
padding: 0px 5px;
}
#+END_SRC
@@ -1278,6 +1352,7 @@ echo '{"text":"󰢮 '$graphics'","tooltip":"󰢮\t'$graphics'\r󰐥\t'$graphicsP
#+BEGIN_SRC css :tangle waybar/style.css
#tray {
background: transparent;
padding: 0px 10px;
}
#+END_SRC

View File

@@ -53,12 +53,25 @@ static const char *const autostart[] = {
};
#endif // AUTOSTART_PATCH
/* NOTE: ALWAYS keep a rule declared even if you don't use rules (e.g leave at least one example) */
static const Rule rules[] = {
/* app_id title tags mask isfloating monitor */
/* examples: */
{ "Gimp_EXAMPLE", NULL, 0, 1, -1 }, /* Start on currently visible tags floating, not tiled */
{ "firefox_EXAMPLE", NULL, 1 << 8, 0, -1 }, /* Start on ONLY tag "9" */
/* app_id title tags mask isfloating monitor */
{ "thunderbird-esr", NULL, 1 << 0, 0, -1 }, /* Start on ONLY tag "1" */
{ "Beeper", NULL, 1 << 1, 0, -1 }, /* Start on ONLY tag "2" */
{ "zoom", NULL, 1 << 1, 0, -1 }, /* Start on ONLY tag "2" */
{ "Signal", NULL, 1 << 1, 0, -1 }, /* Start on ONLY tag "2" */
{ "discord", NULL, 1 << 1, 0, -1 }, /* Start on ONLY tag "2" */
{ "obsidian", NULL, 1 << 2, 0, -1 }, /* Start on ONLY tag "3" */
{ "pocket-casts-linux", NULL, 1 << 3, 0, -1 }, /* Start on ONLY tag "4" */
{ "Spotify", NULL, 1 << 3, 0, -1 }, /* Start on ONLY tag "4" */
{ "Vivaldi-stable", NULL, 1 << 4, 0, -1 }, /* Start on ONLY tag "5" */
{ "foot", NULL, 1 << 5, 0, -1 }, /* Start on ONLY tag "6" */
{ "Emacs", NULL, 1 << 6, 0, -1 }, /* Start on ONLY tag "7" */
{ "steam", NULL, 1 << 7, 0, -1 }, /* Start on ONLY tag "8" */
{ "lutris", NULL, 1 << 7, 0, -1 }, /* Start on ONLY tag "8" */
{ "net.davidotek.pupgui2", NULL, 1 << 7, 0, -1 }, /* Start on ONLY tag "8" */
{ "gamescope", NULL, 1 << 7, 0, -1 }, /* Start on ONLY tag "8" */
{ "syncthing-gtk", NULL, 1 << 8, 0, -1 }, /* Start on ONLY tag "9" */
{ "openrgb", NULL, 1 << 8, 0, -1 }, /* Start on ONLY tag "9" */
};
static const Layout layouts[] = {
@@ -160,7 +173,7 @@ static const enum libinput_config_tap_button_map button_map = LIBINPUT_CONFIG_TA
/* helper for spawning shell commands in the pre dwm-5.0 fashion */
#define SHCMD(cmd) { .v = (const char*[]){ "/bin/sh", "-c", cmd, NULL } }
static const char *termcmd[] = { "kitty", NULL };
static const char *termcmd[] = { "foot", NULL };
static const char *menucmd[] = { "rofi", "-show", "combi", NULL };
static const Key keys[] = {

103
devenv.lock Normal file
View File

@@ -0,0 +1,103 @@
{
"nodes": {
"devenv": {
"locked": {
"dir": "src/modules",
"lastModified": 1745604263,
"owner": "cachix",
"repo": "devenv",
"rev": "36807c727e743e7a00999922e7f737a0cc4e05ac",
"type": "github"
},
"original": {
"dir": "src/modules",
"owner": "cachix",
"repo": "devenv",
"type": "github"
}
},
"flake-compat": {
"flake": false,
"locked": {
"lastModified": 1733328505,
"owner": "edolstra",
"repo": "flake-compat",
"rev": "ff81ac966bb2cae68946d5ed5fc4994f96d0ffec",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"git-hooks": {
"inputs": {
"flake-compat": "flake-compat",
"gitignore": "gitignore",
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1742649964,
"owner": "cachix",
"repo": "git-hooks.nix",
"rev": "dcf5072734cb576d2b0c59b2ac44f5050b5eac82",
"type": "github"
},
"original": {
"owner": "cachix",
"repo": "git-hooks.nix",
"type": "github"
}
},
"gitignore": {
"inputs": {
"nixpkgs": [
"git-hooks",
"nixpkgs"
]
},
"locked": {
"lastModified": 1709087332,
"owner": "hercules-ci",
"repo": "gitignore.nix",
"rev": "637db329424fd7e46cf4185293b9cc8c88c95394",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "gitignore.nix",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1733477122,
"owner": "cachix",
"repo": "devenv-nixpkgs",
"rev": "7bd9e84d0452f6d2e63b6e6da29fe73fac951857",
"type": "github"
},
"original": {
"owner": "cachix",
"ref": "rolling",
"repo": "devenv-nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"devenv": "devenv",
"git-hooks": "git-hooks",
"nixpkgs": "nixpkgs",
"pre-commit-hooks": [
"git-hooks"
]
}
}
},
"root": "root",
"version": 7
}

19
devenv.nix Normal file
View File

@@ -0,0 +1,19 @@
{ pkgs, lib, config, inputs, ... }:
{
# https://devenv.sh/packages/
packages = [
pkgs.git
pkgs.yaml-language-server
pkgs.gdb
];
# https://devenv.sh/languages/
languages.c = {
enable = true;
debugger = pkgs.gdb;
};
languages.cplusplus = {
enable = true;
};
}

15
devenv.yaml Normal file
View File

@@ -0,0 +1,15 @@
# yaml-language-server: $schema=https://devenv.sh/devenv.schema.json
inputs:
nixpkgs:
url: github:cachix/devenv-nixpkgs/rolling
# If you're using non-OSS software, you can set allowUnfree to true.
# allowUnfree: true
# If you're willing to use a package that's vulnerable
# permittedInsecurePackages:
# - "openssl-1.1.1w"
# If you have more than one devenv you can merge them
#imports:
# - ./backend

5
dwl.c
View File

@@ -1506,7 +1506,6 @@ void
destroydecoration(struct wl_listener *listener, void *data)
{
Client *c = wl_container_of(listener, c, destroy_decoration);
c->decoration = NULL;
wl_list_remove(&c->destroy_decoration.link);
wl_list_remove(&c->set_decoration_mode.link);
@@ -3356,7 +3355,7 @@ setfloating(Client *c, int floating)
(p && p->isfullscreen) ? LyrFS
: c->isfloating ? LyrFloat : LyrTile]);
#if FLOAT_UNFOCUSED_BORDER_COLOR_PATCH
if (!grabc && floating)
if (!grabc && floating)
for (int i = 0; i < 4; i++) {
wlr_scene_rect_set_color(c->border[i], floatcolor);
wlr_scene_node_lower_to_bottom(&c->border[i]->node);
@@ -4476,7 +4475,7 @@ sethints(struct wl_listener *listener, void *data)
{
Client *c = wl_container_of(listener, c, set_hints);
struct wlr_surface *surface = client_surface(c);
if (c == focustop(selmon))
if (c == focustop(selmon) || !c->surface.xwayland->hints)
return;
c->isurgent = xcb_icccm_wm_hints_get_urgency(c->surface.xwayland->hints);

10
util.c
View File

@@ -38,14 +38,14 @@ ecalloc(size_t nmemb, size_t size)
int
fd_set_nonblock(int fd) {
int flags = fcntl(fd, F_GETFL);
if (flags < 0) {
if (flags < 0) {
perror("fcntl(F_GETFL):");
return -1;
}
if (fcntl(fd, F_SETFL, flags | O_NONBLOCK) < 0) {
return -1;
}
if (fcntl(fd, F_SETFL, flags | O_NONBLOCK) < 0) {
perror("fcntl(F_SETFL):");
return -1;
}
}
return 0;
}

View File

@@ -13,7 +13,9 @@
"reload_style_on_change": true,
"modules-left": [
"group/power-menu",
"group/dwl",
"dwl/tags",
"dwl/window#title",
"dwl/window#layout",
],
"modules-center": [
"tray",
@@ -46,14 +48,6 @@
"click-to-reveal": false,
},
},
"group/dwl": {
"orientation": "inherit",
"modules": [
"dwl/tags",
"dwl/window#title",
"dwl/window#layout",
],
},
"group/media-playing": {
"orientation": "inherit",
"modules": [
@@ -90,7 +84,7 @@
"interval": 5,
"format": " {usage}%",
"tooltip": true,
"on-click-right": "kitty btop",
"on-click-right": "foot btop",
},
"clock": {
@@ -148,7 +142,7 @@
"dwl/tags": {
"num-tags": 9,
"tag-labels": [ "󰍩 ₁", "󰠮 ₂", " ₃", "󰿎 ₄", "󰖟 ₅", " ₆", "󰊢 ₇", "󰊖 ₈", " ₉" ],
"tag-labels": [ "󰻧 ₁", "󰍩 ₂", "󰠮 ₃", " ₄", "󰖟 ₅", " ₆", "󰊢 ₇", "󰊖 ₈", " ₉" ],
"disable-click": false
},
"dwl/window#title": {
@@ -183,7 +177,7 @@
"tooltip": true,
"tooltip-format-activated": "Idle Inhibitor: {status}",
"tooltip-format-deactivated": "Idle Inhibitor: {status}",
"start-activated": false,
"start-activated": true,
},
"memory": {
@@ -191,7 +185,7 @@
"format": " {percentage}%",
"tooltip": true,
"tooltip-format": "RAM:\n\tUsed: {used} GiB ({percentage}%)\n\tFree: {avail} GiB\n\tTotal: {total} GiB\nSwap:\n\tUsed: {swapUsed} GiB ({swapPercentage}%)\n\tFree: {swapAvail} GiB\n\tTotal: {swapTotal} GiB",
"on-click-right": "kitty btop",
"on-click-right": "foot btop",
},
"custom/media-playing-source": {

View File

@@ -1,6 +1,15 @@
#!/usr/bin/env bash
killall waybar
killall waybar || true
/usr/bin/waybar \
-c $HOME/.config/dwl/waybar/config.jsonc \
-s $HOME/.config/dwl/waybar/style.css &
until /usr/bin/waybar \
--config $HOME/.config/dwl/waybar/config.jsonc \
--style $HOME/.config/dwl/waybar/style.css;
do
if [ $? -ne 143 ]; then
echo "Dwl Waybar stopped with exit code $?. Respawning..." >&2;
sleep 1;
else
echo "Dwl Waybar manually killed with SIGTERM";
break;
fi
done

View File

@@ -30,4 +30,4 @@ else
fi
fi
echo '{"text":"'$mediaSourceIcon'","tooltip":"󰝚\t'$title'\r󰠃\t'$artist'\r󰀥\t'$album'\r󰐎\t'$status'"}'
echo '{"text":"'$mediaSourceIcon'","tooltip":"󰝚\t'${title//'"'/'\"'}'\r󰠃\t'${artist//'"'/'\"'}'\r󰀥\t'${album//'"'/'\"'}'\r󰐎\t'${status//'"'/'\"'}'"}'

View File

@@ -1,13 +1,30 @@
window#waybar {
background: transparent;
}
#window {
padding: 0px 0px;
color: transparent;
background: transparent;
}
widget {
background: #282a36;
border-radius: 25px;
}
label.module {
padding: 0px 10px;
}
button {
border-radius: 0px;
padding: 0px 0px;
}
.module,button {
border-radius: 0px;
padding: 0px 4px;
font-size: 15px;
font-family: Ubuntu Nerd Font;
margin: 0px 0px;
}
#battery {
@@ -25,26 +42,37 @@ window#waybar {
color: #bd93f9;
}
box#dunst {
padding: 0px 10px;
}
#custom-dunst-status {
background: transparent;
color: #50fa7b;
padding: 0px 5px;
}
#custom-dunst-clear {
background: transparent;
color: #50fa7b;
padding: 0px 5px;
}
#custom-dunst-history-view {
background: transparent;
color: #50fa7b;
padding: 0px 5px;
}
#custom-dunst-history-clear {
background: transparent;
color: #50fa7b;
padding: 0px 5px;
}
#tags {
padding: 0px 10px;
}
#tags button {
background: transparent;
color: #44475a;
padding: 0px 5px;
}
#tags button.occupied {
background: transparent;
@@ -52,7 +80,7 @@ window#waybar {
}
#tags button.focused {
background: transparent;
color: #bd93f9;
box-shadow: inset 0 -3px #bd93f9;
}
#tags button.urgent {
background: transparent;
@@ -61,10 +89,12 @@ window#waybar {
#window.title {
background: transparent;
color: #f8f8f2;
padding: 0px 10px;
}
#window.layout {
background: transparent;
color: #50fa7b;
padding: 0px 10px;
}
#disk {
@@ -86,46 +116,62 @@ window#waybar {
color: #8be9fd;
}
box#media-playing {
padding: 0px 10px;
}
#custom-media-playing-source {
background: transparent;
color: #ff5555;
padding: 0px 5px;
}
#custom-media-playing-prev {
background: transparent;
color: #ff5555;
padding: 0px 5px;
}
#custom-media-playing-play-pause {
background: transparent;
color: #ff5555;
padding: 0px 5px;
}
#custom-media-playing-next {
background: transparent;
color: #ff5555;
padding: 0px 5px;
}
box#power-menu {
padding: 0px 10px;
}
#custom-power-menu-launcher {
background: transparent;
color: #8be9fd;
padding: 0px 5px;
}
#custom-power-menu-shutdown {
background: transparent;
color: #ff5555;
padding: 0px 5px;
}
#custom-power-menu-reboot {
background: transparent;
color: #50fa7b;
padding: 0px 5px;
}
#custom-power-menu-sleep {
background: transparent;
color: #f1fa8c;
padding: 0px 5px;
}
#custom-power-menu-lock {
background: transparent;
color: #ff79c6;
padding: 0px 5px;
}
#custom-power-menu-logout {
background: transparent;
color: #ffb86c;
padding: 0px 5px;
}
#pulseaudio {
@@ -140,4 +186,5 @@ window#waybar {
#tray {
background: transparent;
padding: 0px 10px;
}