Coder Social home page Coder Social logo

avizo's Introduction

Avizo

Avizo is a simple notification daemon, mainly intended to be used for multimedia keys for example with Sway.

Screenshot of Avizo's volume notification

Configuration

Avizo can be configured using the configuration file and CLI options.

avizo-client looks for configuration file avizo/config.ini in the standard XDG directories XDG_CONFIG_HOME (defaults to ~/.config) and XDG_CONFIG_DIRS (defaults to /etc/xdg), in that order. The first found file is used. Missing configuration file is not an error.

The configuration file must be in INI format and should define keys in section named default. Names of the configuration keys correspond to the CLI options (e.g. block-height).

Any configuration key can be overridden by corresponding CLI option (i.e. CLI options take precedence).

Helper scripts

volumectl

Adjust the sound or mic volume and show Avizo notification.

Requirements:

  • POSIX-sh compatible shell (e.g. Busybox ash, dash, ZSH, bash, …)
  • common *nix userland (BSD, Busybox or GNU)
  • pamixer
  • pactl for the -p option (currently playing sink/source) if pamixer is older than 1.6

lightctl

Adjust (display) brightness and show Avizo notification.

Requirements:

  • POSIX-sh compatible shell (e.g. Busybox ash, dash, ZSH, bash, …)
  • common *nix userland (BSD, Busybox or GNU)
  • brightnessctl or light

Sway config

bindsym XF86AudioRaiseVolume exec volumectl -u up
bindsym XF86AudioLowerVolume exec volumectl -u down
bindsym XF86AudioMute exec volumectl toggle-mute
bindsym XF86AudioMicMute exec volumectl -m toggle-mute

bindsym XF86MonBrightnessUp exec lightctl up
bindsym XF86MonBrightnessDown exec lightctl down

exec "avizo-service"

Install

From package repository

Avizo is available in the following repositories:

Packaging status

Manually

meson build
ninja -C build install

You may want to specify the installation directory (the above default to /usr/local/bin). In such case you may use

meson -Dprefix=<your/installation/path> build
ninja -C build install

In some cases (like if you want to install the results to /usr/bin), the last command needs to be run with root privileges.

Arch User Repository

A package called avizo is also available in the Arch Linux User Repository.

avizo's People

Contributors

heyjuvi avatar jirutka avatar sivecano avatar berbiche avatar blallo avatar zsolt-donca avatar baltevl avatar edgararaj avatar erikreider avatar kianmeng avatar arminius-smh avatar properlypurple avatar pinnouse avatar

Stargazers

Nitrrine avatar Yushi_61 avatar  avatar Štěpán Žák avatar Patrick G avatar Igor Guerrero avatar Rafael Escobar avatar Erik Isidore avatar nebu avatar Ninaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa avatar raf avatar ALEZ avatar  avatar Christos Veligkos avatar Alessandra Cristina avatar  avatar Yunus avatar James Birtles avatar Vinicius Lopes avatar  avatar Kara avatar チェリー ブルボン avatar  avatar Vera Rei avatar Andrew Prentice avatar  avatar Christopher Cadek avatar Mohamed Walid avatar  avatar Floatyboy avatar Gustavo Joaquin avatar Clayton Castro avatar  avatar Edouard Jubert avatar Aniket Teredesai avatar Coddo avatar Trayambak Rai avatar Daniel avatar Ulf Volmer avatar  avatar Timon Schelling avatar cailong avatar Lura Skye avatar wund0r avatar Stepan Zhukovsky avatar Hayake avatar Omi avatar Mateusz Bałasz avatar Ross avatar Jeff Workman avatar Andrew Moore avatar j1nxie avatar Trévis Morvany avatar Ulises Alexander Arguelles Monjaraz avatar Lélahel avatar  avatar Matthew Kosarek avatar  avatar  avatar Kiran Wells avatar Shaun Chong avatar Nikodem Rabuliński avatar Andrey Kovalev avatar  avatar Sukaretto avatar Marco Antônio avatar Luiz Felipe Gonçalves avatar Hesam Yusefpur avatar  avatar Emma avatar  avatar Alexander Huck avatar Tomohiro Hashidate avatar Martin Kinoo avatar Alejandro avatar Joe Maples  avatar DreamingOak avatar  avatar  avatar ERAGON avatar Yiğid BALABAN avatar Benjamin Brassart avatar Samyak Jain avatar Arnesh Roychowdhury avatar krpnt avatar Ayush Raj avatar A avatar André Freitas avatar Ibrahim Kasem avatar  avatar Palmer Larson avatar Malik Haris Ali avatar Mark Lansky avatar Anish Pallati avatar Will Hopkins avatar zjw57 avatar  avatar The Darsh avatar Antoine Leudière avatar Marek Ľach avatar

Watchers

 avatar Scott Werner avatar Kenn avatar  avatar  avatar Sandiko avatar  avatar DreamingOak avatar

avizo's Issues

Error message when avizo-service is not running

When I run volumectl raise or any other command while the avizo-service is not running, the error it outputs is this:

** (avizo-client:15885): CRITICAL **: 13:14:04.397: file src/avizo-client.p/avizo_client.c: line 2004: uncaught error: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.danb.avizo.service was not provided by any .service files (g-dbus-error-quark, 2)

Can this be changed to something more helpful, like: "avizo-service is not running." ?

lightctl not work correctly

grimshoot-slurp-2019-12-02-03-23-11
any else, when i increase or decrease the light, simultaneously the indicator not following. thank for reply

How to specify a custom image?

Hi,

I'm trying to define a custom notification for the play-pause button, I didn't undestand how to pass an image to display.

Reading the help command output, I saw that there are two parameters --image-base-dir=PATH and --image-path=PATH.
I tried to pass both, the absolute path without the base-dir, and the relavite one.

I also tried to understand where the already given images are stored, but I suspect that are deployed inside the elf.

Can you give me some advice about it?
Thank you

Feature request: Allow to raise the volume above 100%

Pavucontrol allows to raise the volume up to 153%.
Since some computers have a low volume with Linux (mainly laptops), would be great to have the option to allow raising over 100%.

e.g.

volumectl --allow-overraise up

# or

volumectl --max=150 up

undefined reference to 'wl_proxy_add_listener' and DSO issue

Hello,

I have the following issue building avizo:

ninja: Entering directory `build'
[4/12] Compiling Vala source src/config.vala ../src/avizo_client.vala
../src/avizo_client.vala:79.14-80.73: warning: unhandled error `GLib.IOError'
../src/avizo_client.vala:191.3-191.22: warning: unhandled error `GLib.DBusError'
		_service.show(_time);
		^^^^^^^^^^^^^^^^^^^^
../src/avizo_client.vala:191.3-191.22: warning: unhandled error `GLib.IOError'
		_service.show(_time);
		^^^^^^^^^^^^^^^^^^^^
Compilation succeeded - 3 warning(s)
[11/12] Linking target src/avizo-service
FAILED: src/avizo-service 
cc  -o src/avizo-service src/avizo-service.p/meson-generated_.._.._avizo-resources.c.o src/avizo-service.p/meson-generated_config.c.o src/avizo-service.p/meson-generated_avizo_service.c.o -Wl,--as-needed -Wl,--no-undefined -Wl,--start-group /usr/lib64/libglib-2.0.so /usr/lib64/libgtk-3.so /usr/lib64/libgdk-3.so /usr/lib64/libz.so /usr/lib64/libpangocairo-1.0.so /usr/lib64/libpango-1.0.so /usr/lib64/libharfbuzz.so /usr/lib64/libatk-1.0.so /usr/lib64/libcairo-gobject.so /usr/lib64/libcairo.so /usr/lib64/libgdk_pixbuf-2.0.so /usr/lib64/libgio-2.0.so /usr/lib64/libgobject-2.0.so /usr/lib64/libgirepository-1.0.so -lgtk-layer-shell -lm -Wl,--end-group
/usr/bin/ld: /usr/lib64/libgdk-3.so: undefined reference to symbol 'wl_proxy_add_listener'
/usr/bin/ld: /usr/lib64/libwayland-client.so.0: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.

However the configure went smoothly:

The Meson build system
Version: 0.58.1
Source dir: /tmp/avizo
Build dir: /tmp/avizo/build
Build type: native build
Project name: avizo
Project version: 1.1
C compiler for the host machine: ccache cc (gcc 11.2.0 "cc (GCC) 11.2.0")
C linker for the host machine: cc ld.bfd 2.36.1-slack15
Vala compiler for the host machine: valac (valac 0.52.4)
Host machine cpu family: x86_64
Host machine cpu: x86_64
Found pkg-config: /usr/bin/pkg-config (0.29.2)
Program glib-compile-resources found: YES (/usr/bin/glib-compile-resources)
Found pkg-config: /usr/bin/pkg-config (0.29.2)
Run-time dependency glib-2.0 found: YES 2.70.1
Run-time dependency gtk+-3.0 found: YES 3.24.29
Run-time dependency gobject-2.0 found: YES 2.70.1
Run-time dependency gobject-introspection-1.0 found: YES 1.68.0
Configuring config.vala using configuration
Library gtk-layer-shell found: YES
Library m found: YES
Build targets in project: 4

Found ninja-1.10.2 at /usr/bin/ninja

Do you know how I can fix my issue ?

update the readme file to use app_id

otherwise the rules on the README apply to my konsole when I'm in the avizo directory.

for_window [app_id="avizo-service"] border pixel 0
for_window [app_id="avizo-service"] sticky toggle
no_focus [app_id="avizo-service"]

Migrate to GTK4

GTK4 has become stable. Avizo should be migrated and maybe some of the new features come in handy.

lightctl does not show notification with light

$ lightctl raise returns:
lightctl: light returned invalid brigtness: '100.00'
My guess is that light -G always returns a float value but lightctl always checks for an integer and there for quits before showing the notification.

[Feature Request] Command to show current brightness value without changing it

Hi, I'm using hyprland. Even if I don't set any key binding for brightness up or down my fn keys always work. So when I set keybindings lightctl up and lightctl down to FN keys it increases or decreases brightness by 20% instead 10% and shows current brightness inaccurately. It works perfectly when using command line (not using FN keys). So is there any way to use lightctl without changing brightness but showing current brightness?

Ubuntu: Converting , to .

You should add this to lightctl and volume ctl under 'progress':

volumectl
progress=$(echo "$volume" | awk '{ printf "%.2f", ($1 > 100 ? 1 : $1 / 100) }' | sed 's/,/./g')

lightctl:
progress=$(echo "$light" | awk '{ printf "%.2f", $1 / 100 }' | sed 's/,/./g')

On ubuntu, the return is a comma seperated float. 0,30, however the avizo-client requires a punctuation instead. 0.30 This would fix that issue.

I couldnt open a pr.

volumectl cannot unmute

I can mute sound with volumectl mute but then I am not able to unmute it neither with volumectl mute nor with volumectl unmute despite the indicator showing that it's unmuting. It can still be unmuted directly with pactl as shown bellow at the end.

➜  ~ pactl list sinks | grep Mute
	Mute: no
➜  ~ volumectl mute
➜  ~ pactl list sinks | grep Mute
	Mute: yes
➜  ~ volumectl mute
.43
➜  ~ pactl list sinks | grep Mute
	Mute: yes
➜  ~ volumectl unmute
.43
➜  ~ pactl list sinks | grep Mute
	Mute: yes
➜  ~ pactl set-sink-mute $(pactl list short sinks | awk '/RUNNING/{print $1}') no
➜  ~ pactl list sinks | grep Mute
	Mute: no

I am running avizo 1.0-1 from AUR.

Dark image mic too big

Dark image too big,

and also i don't know how to change image source,

have tried image-base-dir = ~/.config/avizo/icons/ not working

`volumectl` doesn't work due to critical error

Attempted both AUR and manual install.

$ volumectl -u down

** (avizo-client:582066): CRITICAL **: 20:19:21.661: file ../src/avizo_client.vala: line 212: uncaught error: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.danb.avizo.service was not provided by any .service files (g-dbus-error-quark, 2)

[Feature request] x-offset

Pretty self explanatory. I was configuring and was looking to place the notification on the right of my screen, but saw that the x-offset key did not change anything, would be cool to see implemented!

When I get the chance I will take a look at the code to see if I can get it working myself.

Thanks for maintaining this!

Make AvizoWindow never having focus

Is it possible to make Gtk/Gdk Tell the compositor that the AvizoWindow must Not bei focussed, so all Inputs are captured by the window that was focussed before?

missing in some dependence ?

of each gtk app i got some love message

test by vala-panel

vala-panel:24418): Gdk-CRITICAL **: 09:45:38.993: gdk_monitor_get_geometry: assertion 'GDK_IS_MONITOR (monitor)' failed

test by volumectl and lightctl

** (avizo-client:24911): CRITICAL **: 09:53:12.070: file ../src/avizo_client.vala: line 151: uncaught error: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.danb.avizo.service was not provided by any .service files (g-dbus-error-quark, 2)

as above , what ive missing ?

Notification is sometimes not in the center of the screen

Usually, the notification would appear in the middle of the screen. But sometimes it is moved a bit as seen here. The only way I found to fix this was to restart the service. It could probably also be related to a window manager (I use i3wm) or other things but I have not found any direct cause yet.

Version in meson.build is incorrect

Hey 👋

Packager for AUR here. The version in meson.build was never updated for version 1.2. I suggest to make a new release 1.2.1 with correct versioning.

Thanks!

Caps / nums lock indicator

Consider adding caps/num lock indicators in addition to brightness and volume, this will help a lot with keyboards with no light indicators tysm for the work you have already done!

Use layer shell

Since this is only useful on wlroots based compositors, it makes sense to use layer shell.

Option to draw to all monitors

Hi

Thanks for this great tool - looks great out of the box and easy to set up. I'm using it with Sway.

It would be great if I could pass an option to avizo to get it to draw to all monitors simultaneously in a multi output configuration.

Often I adjust the system volume while looking at an unfocused monitor. For example, I could have my music player open on desktop 1, and I'm working on desktop 2, but I glance at 1 to see what's playing and adjust the volume with the keyboard. Since the focus is on 2, avizo opens over there, but I don't notice it because I'm looking at the unfocused monitor!

I had a quick look at the code but since I've never done anything with Vala or GTK I didn't get very far!

Hope that makes some sense.

Cheers
Jeff

border doesnt appear to work

here is my config, i am prob being an idiot, but it appears that border-color doesn't work

[default]
background = rgb(40, 42, 54)
border-color = rgba(98, 114, 164, 0.8)
bar-fg-color = rgb(189, 147, 249)
border-width = 5
border-radius = 5

Allow to change position/alignment of the notification

Currently, the notification box is displayed at the center of the screen. I’d like to place it horizontally at e.g. 1/3 of the screen height from the bottom. Unfortunately, I’m not familiar with GTK and cannot figure out how to do that.

@misterdanb, can you please consider this feature or give me some hints how to proceed with implementing this feature?

Blur background

A blurred background would bei wonderful. Is this possible with Wayland + GTK+4?

Cannot build latest version

This is what the latest build from AUR, based on the lastest code, shows:

  • exec meson setup --prefix /usr --libexecdir lib --sbindir bin --buildtype plain --auto-features enabled --wrap-mode nodownload -D b_lto=true -D b_pie=true avizo build
    The Meson build system
    Version: 0.59.1
    Source dir: /home/user/.local/cache/paru/clone/avizo/src/avizo
    Build dir: /home/user/.local/cache/paru/clone/avizo/src/build
    Build type: native build
    Project name: avizo
    Project version: 0.0
    C compiler for the host machine: ccache cc (gcc 11.1.0 "cc (GCC) 11.1.0")
    C linker for the host machine: cc ld.bfd 2.36.1
    Vala compiler for the host machine: valac (valac 0.52.5)
    Host machine cpu family: x86_64
    Host machine cpu: x86_64
    Found pkg-config: /usr/bin/pkg-config (1.7.3)
    Program glib-compile-resources found: YES (/usr/bin/glib-compile-resources)
    Found pkg-config: /usr/bin/pkg-config (1.7.3)
    Run-time dependency glib-2.0 found: YES 2.68.4
    Run-time dependency gtk+-3.0 found: YES 3.24.30
    Run-time dependency gobject-2.0 found: YES 2.68.4
    Library gtk-layer-shell found: YES
    Build targets in project: 4

Found ninja-1.10.2 at /usr/bin/ninja
ninja: Entering directory build' [4/9] Compiling Vala source ../avizo/src/avizo_service.vala FAILED: src/avizo-service.p/avizo_service.c valac -C --target-glib=2.38 --pkg gobject-2.0 --pkg gtk+-3.0 --pkg glib-2.0 --color=always --directory src/avizo-service.p --basedir ../avizo/src --gresources=../avizo/avizo.gresource.xml --pkg=GtkLayerShell-0.1 ../avizo/src/avizo_service.vala error: Package xlib-2.0' not found in specified Vala API directories or GObject-Introspection GIR directories
error: Package GObject-2.0' not found in specified Vala API directories or GObject-Introspection GIR directories error: Package Gio-2.0' not found in specified Vala API directories or GObject-Introspection GIR directories
error: Package cairo-1.0' not found in specified Vala API directories or GObject-Introspection GIR directories error: Package GModule-2.0' not found in specified Vala API directories or GObject-Introspection GIR directories
error: Package Gio-2.0' not found in specified Vala API directories or GObject-Introspection GIR directories error: Package GObject-2.0' not found in specified Vala API directories or GObject-Introspection GIR directories
error: Package cairo-1.0' not found in specified Vala API directories or GObject-Introspection GIR directories error: Package GObject-2.0' not found in specified Vala API directories or GObject-Introspection GIR directories
Compilation failed: 9 error(s), 0 warning(s)
[5/9] Compiling Vala source ../avizo/src/avizo_client.vala
../avizo/src/avizo_client.vala:66.14-67.73: warning: unhandled error GLib.IOError' ../avizo/src/avizo_client.vala:153.3-153.22: warning: unhandled error GLib.DBusError'
_service.show(_time);
^^^^^^^^^^^^^^^^^^^^
../avizo/src/avizo_client.vala:153.3-153.22: warning: unhandled error `GLib.IOError'
_service.show(_time);
^^^^^^^^^^^^^^^^^^^^
Compilation succeeded - 3 warning(s)
ninja: build stopped: subcommand failed.

Thanks!

Add app_id

I want to add blur to Avizo, but for this I need an app_id, it currently has "gtk-layer-shell" and as a title "Layer Shell".That is too generic, it would be incredible something like app_id "avizo", title "Avizo".

app_id and title
This is a capture of the app_id and title values

Add input control/UI

Hello!

This is amazing and I appreciate the effort!

Would it be much work to add input volume control including a graphical display?

I could potentially contribute the control portion as I'm very familiar with shell scripting, but Vala is still new and scary to me so I wouldn't be much help there yet.

Styling/config

It would be nice to be able to have a config file, or a css file, to style the window. It looks like gtk, so it should be possible to style using some css.

Lightctl doesn't change brightness, brightnessctl does work

When I run lightctl the brightness never changes. The overlay is shown.

lightctl raise
lightctl lower

But when I use brightnessctl it does work, but doesn't show the overlay of course.

brightnessctl s +5%
brightnessctl s 5%-

Any way I can debug this? Or have avizo listen to brightnessctl instead?

Running arch on a frame.work laptop

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.