Compare commits
15 Commits
07c8cc46d3
...
main
Author | SHA1 | Date | |
---|---|---|---|
|
f56f7bb943 | ||
|
b4de07558c | ||
|
090f655271 | ||
|
2783d91611 | ||
|
b2abff8b57 | ||
|
298c6e1839 | ||
|
455eedaa60 | ||
|
b940c68606 | ||
|
6200290c05 | ||
|
81bb55f185 | ||
|
fcee83d388 | ||
|
82392f2bba | ||
|
1ff17a3e0b | ||
|
a0b20a574d | ||
|
e95d0bf9a9 |
5
.envrc
Normal file
5
.envrc
Normal file
@@ -0,0 +1,5 @@
|
||||
export DIRENV_WARN_TIMEOUT=20s
|
||||
|
||||
eval "$(devenv direnvrc)"
|
||||
|
||||
use devenv
|
10
.gitignore
vendored
10
.gitignore
vendored
@@ -4,3 +4,13 @@ dwl
|
||||
*-protocol.h
|
||||
.ccls-cache
|
||||
patches.h
|
||||
|
||||
# Devenv
|
||||
.devenv*
|
||||
devenv.local.nix
|
||||
|
||||
# direnv
|
||||
.direnv
|
||||
|
||||
# pre-commit
|
||||
.pre-commit-config.yaml
|
||||
|
1
Makefile
1
Makefile
@@ -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
|
||||
|
135
README.org
135
README.org
@@ -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
|
||||
|
||||
|
25
config.h
25
config.h
@@ -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
103
devenv.lock
Normal 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
19
devenv.nix
Normal 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
15
devenv.yaml
Normal 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
5
dwl.c
@@ -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
10
util.c
@@ -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;
|
||||
}
|
||||
|
@@ -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": {
|
||||
|
@@ -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
|
||||
|
@@ -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//'"'/'\"'}'"}'
|
||||
|
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user