Skip to content

cleaner volume script for extensibility and swayosd integration - #1835

Merged
kRHYME7 merged 17 commits into
prasanthrangan:mainfrom
keth-real:main
Sep 15, 2024
Merged

cleaner volume script for extensibility and swayosd integration#1835
kRHYME7 merged 17 commits into
prasanthrangan:mainfrom
keth-real:main

Conversation

@keth-real

@keth-real keth-real commented Sep 13, 2024

Copy link
Copy Markdown
Contributor

Pull Request

Description

A different approach from this #1818.
This way we can adhere to the original configuration without breaking legacy functions.

The waybar modules,keybindings.conf will not be touched.

Should I add these in ./hyprland.conf too?

exec-once = swayosd-server

exec-once = swayosd-server # enable swayosd service
exec-once = pkexec swayosd-libinput-backend # swayosd service for keyboard input

Needs #1818 to be resolved first.

Should resolve the ff:

./hyprland.conf
 ./custom_app.lst
./restore_cfg.lst

Added
volumecontrol.sh -t to toggle output device from here https://discord.com/channels/1200448076620501063/1283781653310734418/1283851047554781324

Fixes:
The old script do not have the ability to toggle mute a player. This impl should be useful.

Type of change

Please put an x in the boxes that apply:

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update (non-breaking change; modified files are limited to the documentations)
  • Technical debt (a code change that does not fix a bug or add a feature but makes something clearer for devs)
  • Other (provide details below)

Checklist

Please put an x in the boxes that apply:

  • I have read the CONTRIBUTING document.
  • My code follows the code style of this project.
  • My commit message follows the commit guidelines.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added a changelog entry.
  • I have added necessary comments/documentation to my code.
  • I have added tests to cover my changes.
  • I have tested my code locally and it works as expected.
  • All new and existing tests passed.

Screenshots

(if appropriate)

Additional context

This PR is not yet complete and will be discussed here #1818

@kRHYME7

kRHYME7 commented Sep 13, 2024

Copy link
Copy Markdown
Collaborator

damn, another 1.

@rubin @TheyCallMeSecond

Can you alsoe please check this one? This one has a good approach though, without changing the keybindings.conf.

edit: works on my end, can you guys try to test this

@kRHYME7

kRHYME7 commented Sep 13, 2024

Copy link
Copy Markdown
Collaborator

Draft first. Please updraft when ready. Thanks!

@kRHYME7
kRHYME7 marked this pull request as draft September 13, 2024 10:02
Comment thread Configs/.local/share/bin/brightnesscontrol.sh
@keth-real
keth-real marked this pull request as ready for review September 13, 2024 16:35
@keth-real

Copy link
Copy Markdown
Contributor Author

Ready for testing @rubiin @kRHYME7

@rubiin

rubiin commented Sep 13, 2024

Copy link
Copy Markdown
Contributor

When you say extensible is it backward compatible ?

@keth-real

keth-real commented Sep 13, 2024

Copy link
Copy Markdown
Contributor Author

When you say extensible is it backward compatible ?

The existing version supports the older script, (older script can be confusing and difficult for other contributors to understand ). Additionally, I have fixed the -p player option and implemented fixes for the toggle mute for -p. The older script relies on the action_function format, where the function is from another variable, leading to unnecessary confusion.

This also handles if swayosd-client is not installed and swayosd-server is not running it falls back to the default HyDE volume script.

@rubiin

rubiin commented Sep 13, 2024

Copy link
Copy Markdown
Contributor

Cool. Will give it a try tomorrow and get back to you.

@kRHYME7

kRHYME7 commented Sep 13, 2024

Copy link
Copy Markdown
Collaborator
# exec-once = pkexec swayosd-libinput-backend | - # swayosd service for keyboard input. Need to add the '| -' for now so the daemon won't exit 

solves the issue where exec dispatcher just kills the process.

Note we can run the daemon on user level but we need to trick this deamon as this is intended to run using systemctl
We can trick it by piping it somewhere

we can use | something
or we can use && or || or any ways we can execute a subshell while invokinh swayosd-libinput-backend

This way swayosd-libinput stays on the user level.

I'm just amaze with this bug.

@kRHYME7

kRHYME7 commented Sep 14, 2024

Copy link
Copy Markdown
Collaborator

@rubiin This works on my end. Also, swayosd is snappier than other OSD I tried.

@rubiin

rubiin commented Sep 14, 2024

Copy link
Copy Markdown
Contributor

@rubiin This works on my end. Also, swayosd is snappier than other OSD I tried.

works on mine too

@kRHYME7

kRHYME7 commented Sep 15, 2024

Copy link
Copy Markdown
Collaborator

This works as intended and shouldn't give problems if users do not have Swayosd.

We can Merge this first then refine the other PR? How about that?

@rubiin

rubiin commented Sep 15, 2024

Copy link
Copy Markdown
Contributor

Lets get this merged

@kRHYME7 kRHYME7 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💗 Thanks

@kRHYME7
kRHYME7 merged commit 8a702f8 into prasanthrangan:main Sep 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants