Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ jobs:
- hyprprop
- try_swap_workspace
- hdrop
- hyprosd-mako

steps:
- uses: actions/checkout@v4
Expand Down
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Changelog

### 2025-12-07
hyprosd-mako: add OSD scripts for volume, brightness, and microphone

### 2025-11-29

grimblast: remove superfluous use of external commands on test setup
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Community scripts and utilities for Hypr projects
| [try_swap_workspace](./try_swap_workspace) | Binding to mimic the 'arbitrary workspace on arbitrary monitor' behavior | @schievel1 |
| [scratchpad](./scratchpad) | A Bash script that instantly sends focused window to a special workspace named `scratchpad` and makes it easier to retrieve the window back to the current workspace | @niksingh710 |
| [hdrop](./hdrop) | Run, show and hide programs via keybind. Emulates [tdrop](https://github.com/noctuid/tdrop) in Hyprland | @Schweber |
| [hyprosd-mako](./hyprosd-mako) | Lightweight Mako-based OSD scripts for volume, brightness, and microphone state | @KevynValladares21 |

# Installing

Expand Down
1 change: 1 addition & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
overlays.default = _: prev: {
grimblast = prev.callPackage ./grimblast {hyprland = null;};
hdrop = prev.callPackage ./hdrop {hyprland = null;};
hyprosd-mako = prev.callPackage ./hyprosd-mako {};
hyprprop = prev.callPackage ./hyprprop {};
scratchpad = prev.callPackage ./scratchpad {hyprland = null;};
shellevents = prev.callPackage ./shellevents {hyprland = null;};
Expand Down
21 changes: 21 additions & 0 deletions hyprosd-mako/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
DESTDIR ?= /
PREFIX ?= $(DESTDIR)usr/local
EXEC_PREFIX ?= $(PREFIX)
DATAROOTDIR ?= $(PREFIX)/share
BINDIR ?= $(EXEC_PREFIX)/bin

SCRIPTS = brightness-notify mic-notify volume-notify

all:
@echo "Nothing to build."

install:
@for s in $(SCRIPTS); do \
install -v -D -m 0755 $$s "$(BINDIR)/$$s"; \
done

uninstall:
@for s in $(SCRIPTS); do \
rm -v "$(BINDIR)/$$s"; \
done

48 changes: 48 additions & 0 deletions hyprosd-mako/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# hyprosd-mako

Lightweight OSD (On-Screen Display) notifications for Hyprland using Mako.

Provides:
- Volume change OSD (`volume-notify`)
- Brightness change OSD (`brightness-notify`)
- Microphone mute/unmute OSD (`mic-notify`)

## Dependencies
- mako + makoctl
- notify-send
- PipeWire (`wpctl`)
- brightnessctl

## Installation
```
make
sudo make install
```

## Uninstall
```
sudo make uninstall
```

## Usage (Hyprland binds)
Add these to your Hyprland config:

```
# Volume
bindel = ,XF86AudioRaiseVolume, exec, wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 5%+ && volume-notify
bindel = ,XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%- && volume-notify
bindel = ,XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle && volume-notify
# Brightness
bindel = ,XF86MonBrightnessUp, exec, brightnessctl set +5% && brightness-notify
bindel = ,XF86MonBrightnessDown, exec, brightnessctl set 5%- && brightness-notify
# Microphone
bindel = $mainMod, M, exec, wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle && mic-notify
```

## Why this helps
Hyprland has no built-in OSD with Mako.
This provides a minimal, fast, Wayland-native alternative with almost no dependencies.

## Notes
Tested on Arch Linux with Hyprland and Mako.
Should work on any distribution with the required dependencies.
12 changes: 12 additions & 0 deletions hyprosd-mako/brightness-notify
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/usr/bin/env bash

CUR=$(brightnessctl g)
MAX=$(brightnessctl m)
PCT=$((CUR * 100 / MAX))

makoctl list | awk '/Brightness/ {id=$2; sub(":", "", id); system("makoctl dismiss " id)}'

notify-send -u low "Brightness" "${PCT}%" --hint=int:value:"$PCT"

# Optional icons (requires a Nerd Font)
# BRIGHTNESS_ICONS=("" "" "")
45 changes: 45 additions & 0 deletions hyprosd-mako/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{
lib,
stdenvNoCC,
makeWrapper,
brightnessctl,
coreutils,
libnotify,
mako,
wireplumber,
}:
stdenvNoCC.mkDerivation {
pname = "hyprosd-mako";
version = "0.1";

src = ./.;

nativeBuildInputs = [
makeWrapper
];

makeFlags = [ "PREFIX=$(out)" ];

postInstall = ''
for i in {volume,brightness,mic}; do
wrapProgram "$out/bin/$i-notify" --prefix PATH ':' \
"${
lib.makeBinPath ([
coreutils
mako
wireplumber
brightnessctl
libnotify
])
}"
done
'';

meta = with lib; {
description = "Lightweight OSD notifications for Hyprland using Mako";
license = licenses.mit;
platforms = platforms.unix;
maintainers = with maintainers; [ ];
mainProgram = "volume-notify";
};
}
14 changes: 14 additions & 0 deletions hyprosd-mako/mic-notify
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/usr/bin/env bash

STATE=$(wpctl get-volume @DEFAULT_AUDIO_SOURCE@ | grep -o MUTED)

makoctl list | awk '/Microphone/ {id=$2; sub(":", "", id); system("makoctl dismiss " id)}'

if [ "$STATE" ]; then
notify-send -u low "Microphone" "Muted" --hint=int:value:0
else
notify-send -u low "Microphone" "Unmuted" --hint=int:value:100
fi

# Optional icons (requires a Nerd Font)
# MICROPHONE_ICONS=("","")
16 changes: 16 additions & 0 deletions hyprosd-mako/volume-notify
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/usr/bin/env bash

VOL_INFO=$(wpctl get-volume @DEFAULT_AUDIO_SINK@)
VOL=$(echo "$VOL_INFO" | awk '{print int($2*100)}')
MUTED=$(echo "$VOL_INFO" | grep -o MUTED)

makoctl list | awk '/Volume/ {id=$2; sub(":", "", id); system("makoctl dismiss " id)}'

if [ "$MUTED" ]; then
notify-send -u low "Volume" "Muted" --hint=int:value:0
else
notify-send -u low "Volume" "${VOL}%" --hint=int:value:"$VOL"
fi

# Optional icons (requires a Nerd Font)
# VOLUME_ICONS=("" "" "")