Code Monkey home page Code Monkey logo

Comments (8)

hastinbe avatar hastinbe commented on June 1, 2024 1

The name is what's recognized by xmodmap, but I'm guessing (forward) slash comes first because it precedes the backslash historically and it was just called slash at that time as backslash didn't exist yet

from i3-volume.

hastinbe avatar hastinbe commented on June 1, 2024

You'd have to bind some other key or key combination to run the script. Since you're using i3wm you can set that up in its config file. Using the examples on the page you linked, you could change the volume keybindings to something like this, which would use your modifier key + comma, period, and slash to increase, decrease, or mute the volume

bindsym $mod+comma exec --no-startup-id $volumepath/volume -n -t $statuscmd -u $statussig up $volumestep
bindsym $mod+period exec --no-startup-id $volumepath/volume -n -t $statuscmd -u $statussig down $volumestep
bindsym $mod+slash exec --no-startup-id $volumepath/volume -n -t $statuscmd -u $statussig mute 

from i3-volume.

hongyi-zhao avatar hongyi-zhao commented on June 1, 2024

Thank you very much. It does the trick. BTW, there are forward and backward slashes. Why can the slash keysym name call forward slash by default?

from i3-volume.

hongyi-zhao avatar hongyi-zhao commented on June 1, 2024

Some additional comments: I also tried the following settings adapted from the code snippet found here, which did exactly the same job as i3-volume:

# Use pactl to adjust volume in PulseAudio.
set $refresh_i3status killall -SIGUSR1 i3status
bindsym $mod+comma exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +10% && $refresh_i3status
bindsym $mod+period exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -10% && $refresh_i3status
bindsym $mod+slash exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle && $refresh_i3status
bindsym $mod+backslash exec --no-startup-id pactl set-source-mute @DEFAULT_SOURCE@ toggle && $refresh_i3status

So, I wonder why you prefer to create this project instead of using i3wm's local options.

from i3-volume.

hastinbe avatar hastinbe commented on June 1, 2024

It's true, you only need a single command to change your volume. There no need for this script if all you want is for your volume keys to work. But if you're the kind of person who wants to customize their desktop with different notification systems, status bars, audio platforms, or even access volume info from command line, this script tries to make that easier.

from i3-volume.

hongyi-zhao avatar hongyi-zhao commented on June 1, 2024

Another question: it seems that i3-volume doesn't have Mic relevant configurations. Any more hints?

from i3-volume.

hastinbe avatar hastinbe commented on June 1, 2024

This script doesn't provide any specific features for microphones. But you could do it like this: pactl set-source-mute <card> toggle, replacing <card> with the index of your mic you can get with pacmd list-sources

from i3-volume.

hongyi-zhao avatar hongyi-zhao commented on June 1, 2024

Got it. Thank you again.

from i3-volume.

Related Issues (18)

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.