sfwbar icon indicating copy to clipboard operation
sfwbar copied to clipboard

Per-app volume sliders

Open Ithvr opened this issue 2 years ago • 15 comments

Hi, I am wondering if it is possible to get per-app volume sliders in the PulseAudio module? I have seen some standalone solution, but they start more like a desktop application rather then a volume mixer so I'm hoping it solvable inside of sfwbar.

Ithvr avatar Feb 23 '24 20:02 Ithvr

It should be possible to add support for this. Fundamentally it's not too different from the sink volume, but will need some wiring up.

On Fri, 23 Feb 2024, 20:37 Ithvr, @.***> wrote:

Hi, I am wondering if it is possible to get per-app volume sliders in the PulseAudio module? I have seen some standalone solution, but they start more like a desktop application rather then a volume mixer so I'm hoping it solvable inside of sfwbar.

— Reply to this email directly, view it on GitHub https://github.com/LBCrion/sfwbar/issues/150, or unsubscribe https://github.com/notifications/unsubscribe-auth/ASHPFFF2DKIIJQBFMOWZN6DYVD4ZHAVCNFSM6AAAAABDXJ76VWVHI2DSMVQWIX3LMV43ASLTON2WKOZSGE2TCNZWGE3DANY . You are receiving this because you are subscribed to this thread.Message ID: @.***>

LBCrion avatar Feb 24 '24 17:02 LBCrion

If it helps I saw that nwg-panel added this feature in their 0.9.18 release. Both of you are using gtk, but I don't know how much help that is for you.

Ithvr avatar Feb 24 '24 20:02 Ithvr

Here's what I have so far. The controls work, including control of individual channels for clients.

20240227_18h29m21s_grim

LBCrion avatar Feb 27 '24 18:02 LBCrion

I pushed the initial support for client volume controls into the main git branch. Give it a try if you get a chance and see if this is what you're looking for.

On Sat, Feb 24, 2024 at 8:10 PM Ithvr @.***> wrote:

If it helps I saw that nwg-panel added this feature in their 0.9.18 release. Both of you are using gtk, but I don't know how much help that is for you.

— Reply to this email directly, view it on GitHub https://github.com/LBCrion/sfwbar/issues/150#issuecomment-1962694393, or unsubscribe https://github.com/notifications/unsubscribe-auth/ASHPFFBIXCTPWFOGURTKACTYVJCMTAVCNFSM6AAAAABDXJ76VWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNRSGY4TIMZZGM . You are receiving this because you commented.Message ID: @.***>

LBCrion avatar Feb 28 '24 08:02 LBCrion

I'm impressed how quick you are. Can't say I feel solid in my compiling knowledge to test an application. I guess I will see how well this works on the next release.

Ithvr avatar Feb 28 '24 16:02 Ithvr

I tested it, and it works great. The only thing that bugs me is that the volume widget (as well as the wifi one, for that matter) doesn't automatically close when I click off.

pocco81 avatar Mar 03 '24 16:03 pocco81

@pocco81, thank you for testing!

You have a couple of ways to set the pulse volume control window to close on a click outside of it:

  1. You can copy pulse-module.widget to your config directory and add AutoClose = true setting to PopUp "XVolumeWindow" section.
  2. You can override it from your config by adding Config "PopUp 'XVolumeWindow' { AutoClose = true }" to Function("SfwbarInit")

Alas, the config for the volume control will likely change as I'm planning to create a single volume control interface implemented by multiple modules (i.e. pulse, alsa and hopefully wireplumber in the future).

One question I have is: would it be useful to allow changing the sink for a given client (i.e. have a button next to a client volume control to allow selecting which sink the sound should go to?)

LBCrion avatar Mar 03 '24 18:03 LBCrion

One question I have is: would it be useful to allow changing the sink for a given client (i.e. have a button next to a client volume control to allow selecting which sink the sound should go to?)

That sounds awesome. Maybe it could depend on the amount of detected sinks, e.g. if there is just one sink anyway the option doesn't really make sense.

Consolatis avatar Mar 03 '24 18:03 Consolatis

I added support for sink switching in the latest git. It's not conditional on the number of sinks yet, but that should be easy to implement. I would appreciate testing if anyone wants to give it a whirl.

LBCrion avatar Mar 05 '24 18:03 LBCrion

That was easier than I expected. Menu should be conditional on sink count > 1 now.

LBCrion avatar Mar 05 '24 18:03 LBCrion

That was easier than I expected. Menu should be conditional on sink count > 1 now.

Doesn't work for me, it still shows even though I only have 1 sink. Also can't seem to collapse the channel volume sliders. (Btw, is there a way to collapse them by default? I don't really care about the channel volume) It only reduces the space around the normal volume slider. Any idea whats going on there?

Screenshot

Edit: Ah, I disabled the useless HDMI sink of my display via wireplumber, that could be related?

Flrian avatar Mar 19 '24 12:03 Flrian

Can I just check that you're using the git version if the latest git version of the pulsectl.so module and of volume.widget? (since we now have a volume control interface, there is a unified config for alsactl and pulsectl).

If you're still seeing these with the latest config and module, can you please post the output of sfwbar -d -g XVolumeControlTmpl

LBCrion avatar Mar 19 '24 16:03 LBCrion

Yeah, I should be on the latest everything. I just changed to include("volume.widget") yesterday I think, but I'm pretty sure I have the same problem on older versions with the pulse module too.

log
❯  sfwbar -d -g XVolumeControlTmpl
18:28:23.44 app_id: 'foot', title ' sfwbar -d -g XVolumeControlTmpl'
18:28:24.56 scanner: $XVolumeControlTmpl = "
grid 'volume_section_@DEVICE_IFACE@' {
  grid '@DEVICE_ID@' {
    style = 'volume_grid'
    image '@DEVICE_ID@_mute' {
      value = If(Volume('@DEVICE_IFACE@-mute','@DEVICE_ID@'),
            $XVolumeMutedIcon,
            Lookup(Volume('@DEVICE_IFACE@-volume','@DEVICE_ID@'),
              80, $XVolumeHighIcon,
              50, $XVolumeMediumIcon,
              0, $XVolumeLowIcon,
              $XVolumeMutedIcon))
      style = 'volume_mute'
      action = VolumeCtl '@DEVICE_ID@', '@DEVICE_IFACE@-mute toggle'
      trigger = 'volume'
      loc (1,1,1,1)
    }
    image '@DEVICE_ID@_expand' {
      value = 'pan-end'
      style = 'volume_control_expander'
      tooltip = 'expand/collapse channels'
      action = Function 'XVolumeToggleChannels'
      loc(2,1,1,1)
    }
    label '@DEVICE_ID@_name' {
      style = 'volume_device_name'
      value = VolumeInfo('@DEVICE_IFACE@-description','@DEVICE_ID@')
      trigger = 'volume'
      loc (3,1,1,1)
    }
    grid {
      loc(4,1,1,1)
      image '@DEVICE_ID@_set_default' {
        value = If(Volume('@DEVICE_IFACE@-is-default','@DEVICE_ID@'),
            'checkbox-checked', 'checkbox')
        style = If('@DEVICE_IFACE@' = 'sink' & Volume('sink-count')>1,
            'volume_default', 'hidden')
        tooltip = 'set as default @DEVICE_IFACE@'
        trigger = 'volume'
        action = VolumeCtl '@DEVICE_IFACE@-set-default @DEVICE_ID@'
      }
      image '@DEVICE_ID@_menu' {
        value = 'open-menu'
        style = If('@DEVICE_IFACE@' = 'client' & Volume('sink-count')>1,
            'volume_client_menu', 'hidden')
        tooltip = 'route to sink'
        action = Menu 'XVolumeSinkMenu'
        trigger = 'volume'
      }
    }
    scale '@DEVICE_ID@_volume' {
      style = 'volume_scale'
      value = Volume('@DEVICE_IFACE@-volume','@DEVICE_ID@')/100
      action[1] = VolumeCtl '@DEVICE_ID@',
        '@DEVICE_IFACE@-volume ' + Str(GtkEvent('dir') * 100)
      trigger = 'volume'
      loc (1,2,4,1)
    }
    grid '@DEVICE_ID@_channels' {
      style = 'hidden'
      loc(1,3,4,1)
      label '@DEVICE_ID@-@CHANNEL_ID@_label' {
        value = '@CHANNEL_NAME@'
        style = 'volume_channel_name'
        loc(1,@CHANNEL_NUM@,1,1)
      }
      scale '@DEVICE_ID@-@CHANNEL_ID@_scale' {
        style = 'volume_scale'
        value = Volume('@DEVICE_IFACE@-volume','@DEVICE_ID@:@CHANNEL_ID@')/100
        action[1] = VolumeCtl '@DEVICE_ID@:@CHANNEL_ID@',
          '@DEVICE_IFACE@-volume ' + Str(GtkEvent('dir') * 100)
        trigger = 'volume'
        loc(2,@CHANNEL_NUM@,1,1)
      }
    }
  }
}" (vstate: 1)
18:28:24.56 expr: "If(VolumeConf("Interface")!="sink"&VolumeConf("interface")!="client","",ReplaceAll($XVolumeControlTmpl,"@DEVICE_ID@",VolumeConf("device"),"@CHANNEL_NAME@",VolumeConf("name"),"@CHANNEL_ID@",VolumeConf("id"),"@CHANNEL_NUM@",VolumeConf("index"),"@DEVICE_IFACE@",VolumeConf("interface")))" = "
grid 'volume_section_sink' {
  grid '@pulse-sink-43' {
    style = 'volume_grid'
    image '@pulse-sink-43_mute' {
      value = If(Volume('sink-mute','@pulse-sink-43'),
            $XVolumeMutedIcon,
            Lookup(Volume('sink-volume','@pulse-sink-43'),
              80, $XVolumeHighIcon,
              50, $XVolumeMediumIcon,
              0, $XVolumeLowIcon,
              $XVolumeMutedIcon))
      style = 'volume_mute'
      action = VolumeCtl '@pulse-sink-43', 'sink-mute toggle'
      trigger = 'volume'
      loc (1,1,1,1)
    }
    image '@pulse-sink-43_expand' {
      value = 'pan-end'
      style = 'volume_control_expander'
      tooltip = 'expand/collapse channels'
      action = Function 'XVolumeToggleChannels'
      loc(2,1,1,1)
    }
    label '@pulse-sink-43_name' {
      style = 'volume_device_name'
      value = VolumeInfo('sink-description','@pulse-sink-43')
      trigger = 'volume'
      loc (3,1,1,1)
    }
    grid {
      loc(4,1,1,1)
      image '@pulse-sink-43_set_default' {
        value = If(Volume('sink-is-default','@pulse-sink-43'),
            'checkbox-checked', 'checkbox')
        style = If('sink' = 'sink' & Volume('sink-count')>1,
            'volume_default', 'hidden')
        tooltip = 'set as default sink'
        trigger = 'volume'
        action = VolumeCtl 'sink-set-default @pulse-sink-43'
      }
      image '@pulse-sink-43_menu' {
        value = 'open-menu'
        style = If('sink' = 'client' & Volume('sink-count')>1,
            'volume_client_menu', 'hidden')
        tooltip = 'route to sink'
        action = Menu 'XVolumeSinkMenu'
        trigger = 'volume'
      }
    }
    scale '@pulse-sink-43_volume' {
      style = 'volume_scale'
      value = Volume('sink-volume','@pulse-sink-43')/100
      action[1] = VolumeCtl '@pulse-sink-43',
        'sink-volume ' + Str(GtkEvent('dir') * 100)
      trigger = 'volume'
      loc (1,2,4,1)
    }
    grid '@pulse-sink-43_channels' {
      style = 'hidden'
      loc(1,3,4,1)
      label '@pulse-sink-43-front-left_label' {
        value = 'front-left'
        style = 'volume_channel_name'
        loc(1,0,1,1)
      }
      scale '@pulse-sink-43-front-left_scale' {
        style = 'volume_scale'
        value = Volume('sink-volume','@pulse-sink-43:front-left')/100
        action[1] = VolumeCtl '@pulse-sink-43:front-left',
          'sink-volume ' + Str(GtkEvent('dir') * 100)
        trigger = 'volume'
        loc(2,0,1,1)
      }
    }
  }
}" (vstate: 1)
18:28:24.56 action: Config '(null)', '
grid 'volume_section_sink' {
  grid '@pulse-sink-43' {
    style = 'volume_grid'
    image '@pulse-sink-43_mute' {
      value = If(Volume('sink-mute','@pulse-sink-43'),
            $XVolumeMutedIcon,
            Lookup(Volume('sink-volume','@pulse-sink-43'),
              80, $XVolumeHighIcon,
              50, $XVolumeMediumIcon,
              0, $XVolumeLowIcon,
              $XVolumeMutedIcon))
      style = 'volume_mute'
      action = VolumeCtl '@pulse-sink-43', 'sink-mute toggle'
      trigger = 'volume'
      loc (1,1,1,1)
    }
    image '@pulse-sink-43_expand' {
      value = 'pan-end'
      style = 'volume_control_expander'
      tooltip = 'expand/collapse channels'
      action = Function 'XVolumeToggleChannels'
      loc(2,1,1,1)
    }
    label '@pulse-sink-43_name' {
      style = 'volume_device_name'
      value = VolumeInfo('sink-description','@pulse-sink-43')
      trigger = 'volume'
      loc (3,1,1,1)
    }
    grid {
      loc(4,1,1,1)
      image '@pulse-sink-43_set_default' {
        value = If(Volume('sink-is-default','@pulse-sink-43'),
            'checkbox-checked', 'checkbox')
        style = If('sink' = 'sink' & Volume('sink-count')>1,
            'volume_default', 'hidden')
        tooltip = 'set as default sink'
        trigger = 'volume'
        action = VolumeCtl 'sink-set-default @pulse-sink-43'
      }
      image '@pulse-sink-43_menu' {
        value = 'open-menu'
        style = If('sink' = 'client' & Volume('sink-count')>1,
            'volume_client_menu', 'hidden')
        tooltip = 'route to sink'
        action = Menu 'XVolumeSinkMenu'
        trigger = 'volume'
      }
    }
    scale '@pulse-sink-43_volume' {
      style = 'volume_scale'
      value = Volume('sink-volume','@pulse-sink-43')/100
      action[1] = VolumeCtl '@pulse-sink-43',
        'sink-volume ' + Str(GtkEvent('dir') * 100)
      trigger = 'volume'
      loc (1,2,4,1)
    }
    grid '@pulse-sink-43_channels' {
      style = 'hidden'
      loc(1,3,4,1)
      label '@pulse-sink-43-front-left_label' {
        value = 'front-left'
        style = 'volume_channel_name'
        loc(1,0,1,1)
      }
      scale '@pulse-sink-43-front-left_scale' {
        style = 'volume_scale'
        value = Volume('sink-volume','@pulse-sink-43:front-left')/100
        action[1] = VolumeCtl '@pulse-sink-43:front-left',
          'sink-volume ' + Str(GtkEvent('dir') * 100)
        trigger = 'volume'
        loc(2,0,1,1)
      }
    }
  }
}', widget=(nil), win=0 from '(null)', 'If(VolumeConf("Interface")!="sink"&VolumeConf("interface")!="client","",ReplaceAll($XVolumeControlTmpl,"@DEVICE_ID@",VolumeConf("device"),"@CHANNEL_NAME@",VolumeConf("name"),"@CHANNEL_ID@",VolumeConf("id"),"@CHANNEL_NUM@",VolumeConf("index"),"@DEVICE_IFACE@",VolumeConf("interface")))'
18:28:24.57 scanner: $XVolumeControlTmpl = "
grid 'volume_section_@DEVICE_IFACE@' {
  grid '@DEVICE_ID@' {
    style = 'volume_grid'
    image '@DEVICE_ID@_mute' {
      value = If(Volume('@DEVICE_IFACE@-mute','@DEVICE_ID@'),
            $XVolumeMutedIcon,
            Lookup(Volume('@DEVICE_IFACE@-volume','@DEVICE_ID@'),
              80, $XVolumeHighIcon,
              50, $XVolumeMediumIcon,
              0, $XVolumeLowIcon,
              $XVolumeMutedIcon))
      style = 'volume_mute'
      action = VolumeCtl '@DEVICE_ID@', '@DEVICE_IFACE@-mute toggle'
      trigger = 'volume'
      loc (1,1,1,1)
    }
    image '@DEVICE_ID@_expand' {
      value = 'pan-end'
      style = 'volume_control_expander'
      tooltip = 'expand/collapse channels'
      action = Function 'XVolumeToggleChannels'
      loc(2,1,1,1)
    }
    label '@DEVICE_ID@_name' {
      style = 'volume_device_name'
      value = VolumeInfo('@DEVICE_IFACE@-description','@DEVICE_ID@')
      trigger = 'volume'
      loc (3,1,1,1)
    }
    grid {
      loc(4,1,1,1)
      image '@DEVICE_ID@_set_default' {
        value = If(Volume('@DEVICE_IFACE@-is-default','@DEVICE_ID@'),
            'checkbox-checked', 'checkbox')
        style = If('@DEVICE_IFACE@' = 'sink' & Volume('sink-count')>1,
            'volume_default', 'hidden')
        tooltip = 'set as default @DEVICE_IFACE@'
        trigger = 'volume'
        action = VolumeCtl '@DEVICE_IFACE@-set-default @DEVICE_ID@'
      }
      image '@DEVICE_ID@_menu' {
        value = 'open-menu'
        style = If('@DEVICE_IFACE@' = 'client' & Volume('sink-count')>1,
            'volume_client_menu', 'hidden')
        tooltip = 'route to sink'
        action = Menu 'XVolumeSinkMenu'
        trigger = 'volume'
      }
    }
    scale '@DEVICE_ID@_volume' {
      style = 'volume_scale'
      value = Volume('@DEVICE_IFACE@-volume','@DEVICE_ID@')/100
      action[1] = VolumeCtl '@DEVICE_ID@',
        '@DEVICE_IFACE@-volume ' + Str(GtkEvent('dir') * 100)
      trigger = 'volume'
      loc (1,2,4,1)
    }
    grid '@DEVICE_ID@_channels' {
      style = 'hidden'
      loc(1,3,4,1)
      label '@DEVICE_ID@-@CHANNEL_ID@_label' {
        value = '@CHANNEL_NAME@'
        style = 'volume_channel_name'
        loc(1,@CHANNEL_NUM@,1,1)
      }
      scale '@DEVICE_ID@-@CHANNEL_ID@_scale' {
        style = 'volume_scale'
        value = Volume('@DEVICE_IFACE@-volume','@DEVICE_ID@:@CHANNEL_ID@')/100
        action[1] = VolumeCtl '@DEVICE_ID@:@CHANNEL_ID@',
          '@DEVICE_IFACE@-volume ' + Str(GtkEvent('dir') * 100)
        trigger = 'volume'
        loc(2,@CHANNEL_NUM@,1,1)
      }
    }
  }
}" (vstate: 1)
18:28:24.57 expr: "If(VolumeConf("Interface")!="sink"&VolumeConf("interface")!="client","",ReplaceAll($XVolumeControlTmpl,"@DEVICE_ID@",VolumeConf("device"),"@CHANNEL_NAME@",VolumeConf("name"),"@CHANNEL_ID@",VolumeConf("id"),"@CHANNEL_NUM@",VolumeConf("index"),"@DEVICE_IFACE@",VolumeConf("interface")))" = "
grid 'volume_section_sink' {
  grid '@pulse-sink-43' {
    style = 'volume_grid'
    image '@pulse-sink-43_mute' {
      value = If(Volume('sink-mute','@pulse-sink-43'),
            $XVolumeMutedIcon,
            Lookup(Volume('sink-volume','@pulse-sink-43'),
              80, $XVolumeHighIcon,
              50, $XVolumeMediumIcon,
              0, $XVolumeLowIcon,
              $XVolumeMutedIcon))
      style = 'volume_mute'
      action = VolumeCtl '@pulse-sink-43', 'sink-mute toggle'
      trigger = 'volume'
      loc (1,1,1,1)
    }
    image '@pulse-sink-43_expand' {
      value = 'pan-end'
      style = 'volume_control_expander'
      tooltip = 'expand/collapse channels'
      action = Function 'XVolumeToggleChannels'
      loc(2,1,1,1)
    }
    label '@pulse-sink-43_name' {
      style = 'volume_device_name'
      value = VolumeInfo('sink-description','@pulse-sink-43')
      trigger = 'volume'
      loc (3,1,1,1)
    }
    grid {
      loc(4,1,1,1)
      image '@pulse-sink-43_set_default' {
        value = If(Volume('sink-is-default','@pulse-sink-43'),
            'checkbox-checked', 'checkbox')
        style = If('sink' = 'sink' & Volume('sink-count')>1,
            'volume_default', 'hidden')
        tooltip = 'set as default sink'
        trigger = 'volume'
        action = VolumeCtl 'sink-set-default @pulse-sink-43'
      }
      image '@pulse-sink-43_menu' {
        value = 'open-menu'
        style = If('sink' = 'client' & Volume('sink-count')>1,
            'volume_client_menu', 'hidden')
        tooltip = 'route to sink'
        action = Menu 'XVolumeSinkMenu'
        trigger = 'volume'
      }
    }
    scale '@pulse-sink-43_volume' {
      style = 'volume_scale'
      value = Volume('sink-volume','@pulse-sink-43')/100
      action[1] = VolumeCtl '@pulse-sink-43',
        'sink-volume ' + Str(GtkEvent('dir') * 100)
      trigger = 'volume'
      loc (1,2,4,1)
    }
    grid '@pulse-sink-43_channels' {
      style = 'hidden'
      loc(1,3,4,1)
      label '@pulse-sink-43-front-right_label' {
        value = 'front-right'
        style = 'volume_channel_name'
        loc(1,1,1,1)
      }
      scale '@pulse-sink-43-front-right_scale' {
        style = 'volume_scale'
        value = Volume('sink-volume','@pulse-sink-43:front-right')/100
        action[1] = VolumeCtl '@pulse-sink-43:front-right',
          'sink-volume ' + Str(GtkEvent('dir') * 100)
        trigger = 'volume'
        loc(2,1,1,1)
      }
    }
  }
}" (vstate: 1)
18:28:24.57 action: Config '(null)', '
grid 'volume_section_sink' {
  grid '@pulse-sink-43' {
    style = 'volume_grid'
    image '@pulse-sink-43_mute' {
      value = If(Volume('sink-mute','@pulse-sink-43'),
            $XVolumeMutedIcon,
            Lookup(Volume('sink-volume','@pulse-sink-43'),
              80, $XVolumeHighIcon,
              50, $XVolumeMediumIcon,
              0, $XVolumeLowIcon,
              $XVolumeMutedIcon))
      style = 'volume_mute'
      action = VolumeCtl '@pulse-sink-43', 'sink-mute toggle'
      trigger = 'volume'
      loc (1,1,1,1)
    }
    image '@pulse-sink-43_expand' {
      value = 'pan-end'
      style = 'volume_control_expander'
      tooltip = 'expand/collapse channels'
      action = Function 'XVolumeToggleChannels'
      loc(2,1,1,1)
    }
    label '@pulse-sink-43_name' {
      style = 'volume_device_name'
      value = VolumeInfo('sink-description','@pulse-sink-43')
      trigger = 'volume'
      loc (3,1,1,1)
    }
    grid {
      loc(4,1,1,1)
      image '@pulse-sink-43_set_default' {
        value = If(Volume('sink-is-default','@pulse-sink-43'),
            'checkbox-checked', 'checkbox')
        style = If('sink' = 'sink' & Volume('sink-count')>1,
            'volume_default', 'hidden')
        tooltip = 'set as default sink'
        trigger = 'volume'
        action = VolumeCtl 'sink-set-default @pulse-sink-43'
      }
      image '@pulse-sink-43_menu' {
        value = 'open-menu'
        style = If('sink' = 'client' & Volume('sink-count')>1,
            'volume_client_menu', 'hidden')
        tooltip = 'route to sink'
        action = Menu 'XVolumeSinkMenu'
        trigger = 'volume'
      }
    }
    scale '@pulse-sink-43_volume' {
      style = 'volume_scale'
      value = Volume('sink-volume','@pulse-sink-43')/100
      action[1] = VolumeCtl '@pulse-sink-43',
        'sink-volume ' + Str(GtkEvent('dir') * 100)
      trigger = 'volume'
      loc (1,2,4,1)
    }
    grid '@pulse-sink-43_channels' {
      style = 'hidden'
      loc(1,3,4,1)
      label '@pulse-sink-43-front-right_label' {
        value = 'front-right'
        style = 'volume_channel_name'
        loc(1,1,1,1)
      }
      scale '@pulse-sink-43-front-right_scale' {
        style = 'volume_scale'
        value = Volume('sink-volume','@pulse-sink-43:front-right')/100
        action[1] = VolumeCtl '@pulse-sink-43:front-right',
          'sink-volume ' + Str(GtkEvent('dir') * 100)
        trigger = 'volume'
        loc(2,1,1,1)
      }
    }
  }
}', widget=(nil), win=0 from '(null)', 'If(VolumeConf("Interface")!="sink"&VolumeConf("interface")!="client","",ReplaceAll($XVolumeControlTmpl,"@DEVICE_ID@",VolumeConf("device"),"@CHANNEL_NAME@",VolumeConf("name"),"@CHANNEL_ID@",VolumeConf("id"),"@CHANNEL_NUM@",VolumeConf("index"),"@DEVICE_IFACE@",VolumeConf("interface")))'
18:28:24.57 scanner: $XVolumeControlTmpl = "
grid 'volume_section_@DEVICE_IFACE@' {
  grid '@DEVICE_ID@' {
    style = 'volume_grid'
    image '@DEVICE_ID@_mute' {
      value = If(Volume('@DEVICE_IFACE@-mute','@DEVICE_ID@'),
            $XVolumeMutedIcon,
            Lookup(Volume('@DEVICE_IFACE@-volume','@DEVICE_ID@'),
              80, $XVolumeHighIcon,
              50, $XVolumeMediumIcon,
              0, $XVolumeLowIcon,
              $XVolumeMutedIcon))
      style = 'volume_mute'
      action = VolumeCtl '@DEVICE_ID@', '@DEVICE_IFACE@-mute toggle'
      trigger = 'volume'
      loc (1,1,1,1)
    }
    image '@DEVICE_ID@_expand' {
      value = 'pan-end'
      style = 'volume_control_expander'
      tooltip = 'expand/collapse channels'
      action = Function 'XVolumeToggleChannels'
      loc(2,1,1,1)
    }
    label '@DEVICE_ID@_name' {
      style = 'volume_device_name'
      value = VolumeInfo('@DEVICE_IFACE@-description','@DEVICE_ID@')
      trigger = 'volume'
      loc (3,1,1,1)
    }
    grid {
      loc(4,1,1,1)
      image '@DEVICE_ID@_set_default' {
        value = If(Volume('@DEVICE_IFACE@-is-default','@DEVICE_ID@'),
            'checkbox-checked', 'checkbox')
        style = If('@DEVICE_IFACE@' = 'sink' & Volume('sink-count')>1,
            'volume_default', 'hidden')
        tooltip = 'set as default @DEVICE_IFACE@'
        trigger = 'volume'
        action = VolumeCtl '@DEVICE_IFACE@-set-default @DEVICE_ID@'
      }
      image '@DEVICE_ID@_menu' {
        value = 'open-menu'
        style = If('@DEVICE_IFACE@' = 'client' & Volume('sink-count')>1,
            'volume_client_menu', 'hidden')
        tooltip = 'route to sink'
        action = Menu 'XVolumeSinkMenu'
        trigger = 'volume'
      }
    }
    scale '@DEVICE_ID@_volume' {
      style = 'volume_scale'
      value = Volume('@DEVICE_IFACE@-volume','@DEVICE_ID@')/100
      action[1] = VolumeCtl '@DEVICE_ID@',
        '@DEVICE_IFACE@-volume ' + Str(GtkEvent('dir') * 100)
      trigger = 'volume'
      loc (1,2,4,1)
    }
    grid '@DEVICE_ID@_channels' {
      style = 'hidden'
      loc(1,3,4,1)
      label '@DEVICE_ID@-@CHANNEL_ID@_label' {
        value = '@CHANNEL_NAME@'
        style = 'volume_channel_name'
        loc(1,@CHANNEL_NUM@,1,1)
      }
      scale '@DEVICE_ID@-@CHANNEL_ID@_scale' {
        style = 'volume_scale'
        value = Volume('@DEVICE_IFACE@-volume','@DEVICE_ID@:@CHANNEL_ID@')/100
        action[1] = VolumeCtl '@DEVICE_ID@:@CHANNEL_ID@',
          '@DEVICE_IFACE@-volume ' + Str(GtkEvent('dir') * 100)
        trigger = 'volume'
        loc(2,@CHANNEL_NUM@,1,1)
      }
    }
  }
}" (vstate: 1)
18:28:24.57 expr: "If(VolumeConf("Interface")!="sink"&VolumeConf("interface")!="client","",ReplaceAll($XVolumeControlTmpl,"@DEVICE_ID@",VolumeConf("device"),"@CHANNEL_NAME@",VolumeConf("name"),"@CHANNEL_ID@",VolumeConf("id"),"@CHANNEL_NUM@",VolumeConf("index"),"@DEVICE_IFACE@",VolumeConf("interface")))" = "
grid 'volume_section_client' {
  grid '@pulse-client-249' {
    style = 'volume_grid'
    image '@pulse-client-249_mute' {
      value = If(Volume('client-mute','@pulse-client-249'),
            $XVolumeMutedIcon,
            Lookup(Volume('client-volume','@pulse-client-249'),
              80, $XVolumeHighIcon,
              50, $XVolumeMediumIcon,
              0, $XVolumeLowIcon,
              $XVolumeMutedIcon))
      style = 'volume_mute'
      action = VolumeCtl '@pulse-client-249', 'client-mute toggle'
      trigger = 'volume'
      loc (1,1,1,1)
    }
    image '@pulse-client-249_expand' {
      value = 'pan-end'
      style = 'volume_control_expander'
      tooltip = 'expand/collapse channels'
      action = Function 'XVolumeToggleChannels'
      loc(2,1,1,1)
    }
    label '@pulse-client-249_name' {
      style = 'volume_device_name'
      value = VolumeInfo('client-description','@pulse-client-249')
      trigger = 'volume'
      loc (3,1,1,1)
    }
    grid {
      loc(4,1,1,1)
      image '@pulse-client-249_set_default' {
        value = If(Volume('client-is-default','@pulse-client-249'),
            'checkbox-checked', 'checkbox')
        style = If('client' = 'sink' & Volume('sink-count')>1,
            'volume_default', 'hidden')
        tooltip = 'set as default client'
        trigger = 'volume'
        action = VolumeCtl 'client-set-default @pulse-client-249'
      }
      image '@pulse-client-249_menu' {
        value = 'open-menu'
        style = If('client' = 'client' & Volume('sink-count')>1,
            'volume_client_menu', 'hidden')
        tooltip = 'route to sink'
        action = Menu 'XVolumeSinkMenu'
        trigger = 'volume'
      }
    }
    scale '@pulse-client-249_volume' {
      style = 'volume_scale'
      value = Volume('client-volume','@pulse-client-249')/100
      action[1] = VolumeCtl '@pulse-client-249',
        'client-volume ' + Str(GtkEvent('dir') * 100)
      trigger = 'volume'
      loc (1,2,4,1)
    }
    grid '@pulse-client-249_channels' {
      style = 'hidden'
      loc(1,3,4,1)
      label '@pulse-client-249-front-left_label' {
        value = 'front-left'
        style = 'volume_channel_name'
        loc(1,0,1,1)
      }
      scale '@pulse-client-249-front-left_scale' {
        style = 'volume_scale'
        value = Volume('client-volume','@pulse-client-249:front-left')/100
        action[1] = VolumeCtl '@pulse-client-249:front-left',
          'client-volume ' + Str(GtkEvent('dir') * 100)
        trigger = 'volume'
        loc(2,0,1,1)
      }
    }
  }
}" (vstate: 1)
18:28:24.57 action: Config '(null)', '
grid 'volume_section_client' {
  grid '@pulse-client-249' {
    style = 'volume_grid'
    image '@pulse-client-249_mute' {
      value = If(Volume('client-mute','@pulse-client-249'),
            $XVolumeMutedIcon,
            Lookup(Volume('client-volume','@pulse-client-249'),
              80, $XVolumeHighIcon,
              50, $XVolumeMediumIcon,
              0, $XVolumeLowIcon,
              $XVolumeMutedIcon))
      style = 'volume_mute'
      action = VolumeCtl '@pulse-client-249', 'client-mute toggle'
      trigger = 'volume'
      loc (1,1,1,1)
    }
    image '@pulse-client-249_expand' {
      value = 'pan-end'
      style = 'volume_control_expander'
      tooltip = 'expand/collapse channels'
      action = Function 'XVolumeToggleChannels'
      loc(2,1,1,1)
    }
    label '@pulse-client-249_name' {
      style = 'volume_device_name'
      value = VolumeInfo('client-description','@pulse-client-249')
      trigger = 'volume'
      loc (3,1,1,1)
    }
    grid {
      loc(4,1,1,1)
      image '@pulse-client-249_set_default' {
        value = If(Volume('client-is-default','@pulse-client-249'),
            'checkbox-checked', 'checkbox')
        style = If('client' = 'sink' & Volume('sink-count')>1,
            'volume_default', 'hidden')
        tooltip = 'set as default client'
        trigger = 'volume'
        action = VolumeCtl 'client-set-default @pulse-client-249'
      }
      image '@pulse-client-249_menu' {
        value = 'open-menu'
        style = If('client' = 'client' & Volume('sink-count')>1,
            'volume_client_menu', 'hidden')
        tooltip = 'route to sink'
        action = Menu 'XVolumeSinkMenu'
        trigger = 'volume'
      }
    }
    scale '@pulse-client-249_volume' {
      style = 'volume_scale'
      value = Volume('client-volume','@pulse-client-249')/100
      action[1] = VolumeCtl '@pulse-client-249',
        'client-volume ' + Str(GtkEvent('dir') * 100)
      trigger = 'volume'
      loc (1,2,4,1)
    }
    grid '@pulse-client-249_channels' {
      style = 'hidden'
      loc(1,3,4,1)
      label '@pulse-client-249-front-left_label' {
        value = 'front-left'
        style = 'volume_channel_name'
        loc(1,0,1,1)
      }
      scale '@pulse-client-249-front-left_scale' {
        style = 'volume_scale'
        value = Volume('client-volume','@pulse-client-249:front-left')/100
        action[1] = VolumeCtl '@pulse-client-249:front-left',
          'client-volume ' + Str(GtkEvent('dir') * 100)
        trigger = 'volume'
        loc(2,0,1,1)
      }
    }
  }
}', widget=(nil), win=0 from '(null)', 'If(VolumeConf("Interface")!="sink"&VolumeConf("interface")!="client","",ReplaceAll($XVolumeControlTmpl,"@DEVICE_ID@",VolumeConf("device"),"@CHANNEL_NAME@",VolumeConf("name"),"@CHANNEL_ID@",VolumeConf("id"),"@CHANNEL_NUM@",VolumeConf("index"),"@DEVICE_IFACE@",VolumeConf("interface")))'
18:28:24.57 scanner: $XVolumeControlTmpl = "
grid 'volume_section_@DEVICE_IFACE@' {
  grid '@DEVICE_ID@' {
    style = 'volume_grid'
    image '@DEVICE_ID@_mute' {
      value = If(Volume('@DEVICE_IFACE@-mute','@DEVICE_ID@'),
            $XVolumeMutedIcon,
            Lookup(Volume('@DEVICE_IFACE@-volume','@DEVICE_ID@'),
              80, $XVolumeHighIcon,
              50, $XVolumeMediumIcon,
              0, $XVolumeLowIcon,
              $XVolumeMutedIcon))
      style = 'volume_mute'
      action = VolumeCtl '@DEVICE_ID@', '@DEVICE_IFACE@-mute toggle'
      trigger = 'volume'
      loc (1,1,1,1)
    }
    image '@DEVICE_ID@_expand' {
      value = 'pan-end'
      style = 'volume_control_expander'
      tooltip = 'expand/collapse channels'
      action = Function 'XVolumeToggleChannels'
      loc(2,1,1,1)
    }
    label '@DEVICE_ID@_name' {
      style = 'volume_device_name'
      value = VolumeInfo('@DEVICE_IFACE@-description','@DEVICE_ID@')
      trigger = 'volume'
      loc (3,1,1,1)
    }
    grid {
      loc(4,1,1,1)
      image '@DEVICE_ID@_set_default' {
        value = If(Volume('@DEVICE_IFACE@-is-default','@DEVICE_ID@'),
            'checkbox-checked', 'checkbox')
        style = If('@DEVICE_IFACE@' = 'sink' & Volume('sink-count')>1,
            'volume_default', 'hidden')
        tooltip = 'set as default @DEVICE_IFACE@'
        trigger = 'volume'
        action = VolumeCtl '@DEVICE_IFACE@-set-default @DEVICE_ID@'
      }
      image '@DEVICE_ID@_menu' {
        value = 'open-menu'
        style = If('@DEVICE_IFACE@' = 'client' & Volume('sink-count')>1,
            'volume_client_menu', 'hidden')
        tooltip = 'route to sink'
        action = Menu 'XVolumeSinkMenu'
        trigger = 'volume'
      }
    }
    scale '@DEVICE_ID@_volume' {
      style = 'volume_scale'
      value = Volume('@DEVICE_IFACE@-volume','@DEVICE_ID@')/100
      action[1] = VolumeCtl '@DEVICE_ID@',
        '@DEVICE_IFACE@-volume ' + Str(GtkEvent('dir') * 100)
      trigger = 'volume'
      loc (1,2,4,1)
    }
    grid '@DEVICE_ID@_channels' {
      style = 'hidden'
      loc(1,3,4,1)
      label '@DEVICE_ID@-@CHANNEL_ID@_label' {
        value = '@CHANNEL_NAME@'
        style = 'volume_channel_name'
        loc(1,@CHANNEL_NUM@,1,1)
      }
      scale '@DEVICE_ID@-@CHANNEL_ID@_scale' {
        style = 'volume_scale'
        value = Volume('@DEVICE_IFACE@-volume','@DEVICE_ID@:@CHANNEL_ID@')/100
        action[1] = VolumeCtl '@DEVICE_ID@:@CHANNEL_ID@',
          '@DEVICE_IFACE@-volume ' + Str(GtkEvent('dir') * 100)
        trigger = 'volume'
        loc(2,@CHANNEL_NUM@,1,1)
      }
    }
  }
}" (vstate: 1)
18:28:24.57 expr: "If(VolumeConf("Interface")!="sink"&VolumeConf("interface")!="client","",ReplaceAll($XVolumeControlTmpl,"@DEVICE_ID@",VolumeConf("device"),"@CHANNEL_NAME@",VolumeConf("name"),"@CHANNEL_ID@",VolumeConf("id"),"@CHANNEL_NUM@",VolumeConf("index"),"@DEVICE_IFACE@",VolumeConf("interface")))" = "
grid 'volume_section_client' {
  grid '@pulse-client-249' {
    style = 'volume_grid'
    image '@pulse-client-249_mute' {
      value = If(Volume('client-mute','@pulse-client-249'),
            $XVolumeMutedIcon,
            Lookup(Volume('client-volume','@pulse-client-249'),
              80, $XVolumeHighIcon,
              50, $XVolumeMediumIcon,
              0, $XVolumeLowIcon,
              $XVolumeMutedIcon))
      style = 'volume_mute'
      action = VolumeCtl '@pulse-client-249', 'client-mute toggle'
      trigger = 'volume'
      loc (1,1,1,1)
    }
    image '@pulse-client-249_expand' {
      value = 'pan-end'
      style = 'volume_control_expander'
      tooltip = 'expand/collapse channels'
      action = Function 'XVolumeToggleChannels'
      loc(2,1,1,1)
    }
    label '@pulse-client-249_name' {
      style = 'volume_device_name'
      value = VolumeInfo('client-description','@pulse-client-249')
      trigger = 'volume'
      loc (3,1,1,1)
    }
    grid {
      loc(4,1,1,1)
      image '@pulse-client-249_set_default' {
        value = If(Volume('client-is-default','@pulse-client-249'),
            'checkbox-checked', 'checkbox')
        style = If('client' = 'sink' & Volume('sink-count')>1,
            'volume_default', 'hidden')
        tooltip = 'set as default client'
        trigger = 'volume'
        action = VolumeCtl 'client-set-default @pulse-client-249'
      }
      image '@pulse-client-249_menu' {
        value = 'open-menu'
        style = If('client' = 'client' & Volume('sink-count')>1,
            'volume_client_menu', 'hidden')
        tooltip = 'route to sink'
        action = Menu 'XVolumeSinkMenu'
        trigger = 'volume'
      }
    }
    scale '@pulse-client-249_volume' {
      style = 'volume_scale'
      value = Volume('client-volume','@pulse-client-249')/100
      action[1] = VolumeCtl '@pulse-client-249',
        'client-volume ' + Str(GtkEvent('dir') * 100)
      trigger = 'volume'
      loc (1,2,4,1)
    }
    grid '@pulse-client-249_channels' {
      style = 'hidden'
      loc(1,3,4,1)
      label '@pulse-client-249-front-right_label' {
        value = 'front-right'
        style = 'volume_channel_name'
        loc(1,1,1,1)
      }
      scale '@pulse-client-249-front-right_scale' {
        style = 'volume_scale'
        value = Volume('client-volume','@pulse-client-249:front-right')/100
        action[1] = VolumeCtl '@pulse-client-249:front-right',
          'client-volume ' + Str(GtkEvent('dir') * 100)
        trigger = 'volume'
        loc(2,1,1,1)
      }
    }
  }
}" (vstate: 1)
18:28:24.57 action: Config '(null)', '
grid 'volume_section_client' {
  grid '@pulse-client-249' {
    style = 'volume_grid'
    image '@pulse-client-249_mute' {
      value = If(Volume('client-mute','@pulse-client-249'),
            $XVolumeMutedIcon,
            Lookup(Volume('client-volume','@pulse-client-249'),
              80, $XVolumeHighIcon,
              50, $XVolumeMediumIcon,
              0, $XVolumeLowIcon,
              $XVolumeMutedIcon))
      style = 'volume_mute'
      action = VolumeCtl '@pulse-client-249', 'client-mute toggle'
      trigger = 'volume'
      loc (1,1,1,1)
    }
    image '@pulse-client-249_expand' {
      value = 'pan-end'
      style = 'volume_control_expander'
      tooltip = 'expand/collapse channels'
      action = Function 'XVolumeToggleChannels'
      loc(2,1,1,1)
    }
    label '@pulse-client-249_name' {
      style = 'volume_device_name'
      value = VolumeInfo('client-description','@pulse-client-249')
      trigger = 'volume'
      loc (3,1,1,1)
    }
    grid {
      loc(4,1,1,1)
      image '@pulse-client-249_set_default' {
        value = If(Volume('client-is-default','@pulse-client-249'),
            'checkbox-checked', 'checkbox')
        style = If('client' = 'sink' & Volume('sink-count')>1,
            'volume_default', 'hidden')
        tooltip = 'set as default client'
        trigger = 'volume'
        action = VolumeCtl 'client-set-default @pulse-client-249'
      }
      image '@pulse-client-249_menu' {
        value = 'open-menu'
        style = If('client' = 'client' & Volume('sink-count')>1,
            'volume_client_menu', 'hidden')
        tooltip = 'route to sink'
        action = Menu 'XVolumeSinkMenu'
        trigger = 'volume'
      }
    }
    scale '@pulse-client-249_volume' {
      style = 'volume_scale'
      value = Volume('client-volume','@pulse-client-249')/100
      action[1] = VolumeCtl '@pulse-client-249',
        'client-volume ' + Str(GtkEvent('dir') * 100)
      trigger = 'volume'
      loc (1,2,4,1)
    }
    grid '@pulse-client-249_channels' {
      style = 'hidden'
      loc(1,3,4,1)
      label '@pulse-client-249-front-right_label' {
        value = 'front-right'
        style = 'volume_channel_name'
        loc(1,1,1,1)
      }
      scale '@pulse-client-249-front-right_scale' {
        style = 'volume_scale'
        value = Volume('client-volume','@pulse-client-249:front-right')/100
        action[1] = VolumeCtl '@pulse-client-249:front-right',
          'client-volume ' + Str(GtkEvent('dir') * 100)
        trigger = 'volume'
        loc(2,1,1,1)
      }
    }
  }
}', widget=(nil), win=0 from '(null)', 'If(VolumeConf("Interface")!="sink"&VolumeConf("interface")!="client","",ReplaceAll($XVolumeControlTmpl,"@DEVICE_ID@",VolumeConf("device"),"@CHANNEL_NAME@",VolumeConf("name"),"@CHANNEL_ID@",VolumeConf("id"),"@CHANNEL_NUM@",VolumeConf("index"),"@DEVICE_IFACE@",VolumeConf("interface")))'

Flrian avatar Mar 19 '24 17:03 Flrian

Can you try adding this snippet to the #CSS section of volume.widget?

#hidden { -GtkWidget-visible: false; }

On Tue, 19 Mar 2024, 17:38 Florian, @.***> wrote:

Yeah, I should be on the latest everything. I just changed to include("volume.widget") yesterday I think, but I'm pretty sure I have the same problem on older versions with the pulse module too. log

❯ sfwbar -d -g XVolumeControlTmpl 18:28:23.44 app_id: 'foot', title ' sfwbar -d -g XVolumeControlTmpl' 18:28:24.56 scanner: $XVolumeControlTmpl = " grid @._IFACE@' { grid @._ID@' { style = 'volume_grid' image @._ID@_mute' { value = @.@.@._ID@'), $XVolumeMutedIcon, @.@.@._ID@'), 80, $XVolumeHighIcon, 50, $XVolumeMediumIcon, 0, $XVolumeLowIcon, $XVolumeMutedIcon)) style = 'volume_mute' action = VolumeCtl @._ID@', @.@. toggle' trigger = 'volume' loc (1,1,1,1) } image @._ID@_expand' { value = 'pan-end' style = 'volume_control_expander' tooltip = 'expand/collapse channels' action = Function 'XVolumeToggleChannels' loc(2,1,1,1) } label @._ID@_name' { style = 'volume_device_name' value = @.@.@._ID@') trigger = 'volume' loc (3,1,1,1) } grid { loc(4,1,1,1) image @._ID@_set_default' { value = @.@.@._ID@'), 'checkbox-checked', 'checkbox') style = @._IFACE@' = 'sink' & Volume('sink-count')>1, 'volume_default', 'hidden') tooltip = 'set as default @DEVICE_IFACE@' trigger = 'volume' action = VolumeCtl @.@. @DEVICE_ID@' } image @._ID@_menu' { value = 'open-menu' style = @._IFACE@' = 'client' & Volume('sink-count')>1, 'volume_client_menu', 'hidden') tooltip = 'route to sink' action = Menu 'XVolumeSinkMenu' trigger = 'volume' } } scale @._ID@_volume' { style = 'volume_scale' value = @.@.@._ID@')/100 action[1] = VolumeCtl @._ID@', @.@.*** ' + Str(GtkEvent('dir') * 100) trigger = 'volume' loc (1,2,4,1) } grid @._ID@_channels' { style = 'hidden' loc(1,3,4,1) label @.@.@CHANNEL_ID@_label' { value = @._NAME@' style = 'volume_channel_name' @._NUM@,1,1) } scale @.@.@CHANNEL_ID@_scale' { style = 'volume_scale' value = @.@.@._ID@@._ID@')/100 action[1] = VolumeCtl @._ID@@._ID@', @.@.*** ' + Str(GtkEvent('dir') * 100) trigger = 'volume' @._NUM@,1,1) } } } }" (vstate: 1) 18:28:24.56 expr: @._ID@@._NAME@@._ID@@._NUM@@._IFACE@",VolumeConf("interface")))" = " grid 'volume_section_sink' { grid @.' { style = 'volume_grid' image @._mute' { value = @.'), $XVolumeMutedIcon, @.'), 80, $XVolumeHighIcon, 50, $XVolumeMediumIcon, 0, $XVolumeLowIcon, $XVolumeMutedIcon)) style = 'volume_mute' action = VolumeCtl @.', 'sink-mute toggle' trigger = 'volume' loc (1,1,1,1) } image @._expand' { value = 'pan-end' style = 'volume_control_expander' tooltip = 'expand/collapse channels' action = Function 'XVolumeToggleChannels' loc(2,1,1,1) } label @._name' { style = 'volume_device_name' value = @.') trigger = 'volume' loc (3,1,1,1) } grid { loc(4,1,1,1) image @._set_default' { value = @.'), 'checkbox-checked', 'checkbox') style = If('sink' = 'sink' & Volume('sink-count')>1, 'volume_default', 'hidden') tooltip = 'set as default sink' trigger = 'volume' action = VolumeCtl 'sink-set-default @pulse-sink-43' } image @._menu' { value = 'open-menu' style = If('sink' = 'client' & Volume('sink-count')>1, 'volume_client_menu', 'hidden') tooltip = 'route to sink' action = Menu 'XVolumeSinkMenu' trigger = 'volume' } } scale @._volume' { style = 'volume_scale' value = @.')/100 action[1] = VolumeCtl @.', 'sink-volume ' + Str(GtkEvent('dir') * 100) trigger = 'volume' loc (1,2,4,1) } grid @._channels' { style = 'hidden' loc(1,3,4,1) label @._label' { value = 'front-left' style = 'volume_channel_name' loc(1,0,1,1) } scale @._scale' { style = 'volume_scale' value = @.:front-left')/100 action[1] = VolumeCtl @.:front-left', 'sink-volume ' + Str(GtkEvent('dir') * 100) trigger = 'volume' loc(2,0,1,1) } } } }" (vstate: 1) 18:28:24.56 action: Config '(null)', ' grid 'volume_section_sink' { grid @.' { style = 'volume_grid' image @._mute' { value = @.'), $XVolumeMutedIcon, @.'), 80, $XVolumeHighIcon, 50, $XVolumeMediumIcon, 0, $XVolumeLowIcon, $XVolumeMutedIcon)) style = 'volume_mute' action = VolumeCtl @.', 'sink-mute toggle' trigger = 'volume' loc (1,1,1,1) } image @._expand' { value = 'pan-end' style = 'volume_control_expander' tooltip = 'expand/collapse channels' action = Function 'XVolumeToggleChannels' loc(2,1,1,1) } label @._name' { style = 'volume_device_name' value = @.') trigger = 'volume' loc (3,1,1,1) } grid { loc(4,1,1,1) image @._set_default' { value = @.'), 'checkbox-checked', 'checkbox') style = If('sink' = 'sink' & Volume('sink-count')>1, 'volume_default', 'hidden') tooltip = 'set as default sink' trigger = 'volume' action = VolumeCtl 'sink-set-default @pulse-sink-43' } image @._menu' { value = 'open-menu' style = If('sink' = 'client' & Volume('sink-count')>1, 'volume_client_menu', 'hidden') tooltip = 'route to sink' action = Menu 'XVolumeSinkMenu' trigger = 'volume' } } scale @._volume' { style = 'volume_scale' value = @.')/100 action[1] = VolumeCtl @.', 'sink-volume ' + Str(GtkEvent('dir') * 100) trigger = 'volume' loc (1,2,4,1) } grid @._channels' { style = 'hidden' loc(1,3,4,1) label @._label' { value = 'front-left' style = 'volume_channel_name' loc(1,0,1,1) } scale @._scale' { style = 'volume_scale' value = @.:front-left')/100 action[1] = VolumeCtl @.:front-left', 'sink-volume ' + Str(GtkEvent('dir') * 100) trigger = 'volume' loc(2,0,1,1) } } } }', widget=(nil), win=0 from '(null)', @._ID@@._NAME@@._ID@@._NUM@@._IFACE@",VolumeConf("interface")))' 18:28:24.57 scanner: $XVolumeControlTmpl = " grid @._IFACE@' { grid @._ID@' { style = 'volume_grid' image @._ID@_mute' { value = @.@.@._ID@'), $XVolumeMutedIcon, @.@.@._ID@'), 80, $XVolumeHighIcon, 50, $XVolumeMediumIcon, 0, $XVolumeLowIcon, $XVolumeMutedIcon)) style = 'volume_mute' action = VolumeCtl @._ID@', @.@.*** toggle' trigger = 'volume' loc (1,1,1,1) } image @._ID@_expand' { value = 'pan-end' style = 'volume_control_expander' tooltip = 'expand/collapse channels' action = Function 'XVolumeToggleChannels' loc(2,1,1,1) } label @._ID@_name' { style = 'volume_device_name' value = @.@.@._ID@') trigger = 'volume' loc (3,1,1,1) } grid { loc(4,1,1,1) image @._ID@_set_default' { value = @.@.@._ID@'), 'checkbox-checked', 'checkbox') style = @._IFACE@' = 'sink' & Volume('sink-count')>1, 'volume_default', 'hidden') tooltip = 'set as default @DEVICE_IFACE@' trigger = 'volume' action = VolumeCtl @.@. @DEVICE_ID@' } image @._ID@_menu' { value = 'open-menu' style = @._IFACE@' = 'client' & Volume('sink-count')>1, 'volume_client_menu', 'hidden') tooltip = 'route to sink' action = Menu 'XVolumeSinkMenu' trigger = 'volume' } } scale @._ID@_volume' { style = 'volume_scale' value = @.@.@._ID@')/100 action[1] = VolumeCtl @._ID@', @.@.*** ' + Str(GtkEvent('dir') * 100) trigger = 'volume' loc (1,2,4,1) } grid @._ID@_channels' { style = 'hidden' loc(1,3,4,1) label @.@.@CHANNEL_ID@_label' { value = @._NAME@' style = 'volume_channel_name' @._NUM@,1,1) } scale @.@.@CHANNEL_ID@_scale' { style = 'volume_scale' value = @.@.@._ID@@._ID@')/100 action[1] = VolumeCtl @._ID@@._ID@', @.@.*** ' + Str(GtkEvent('dir') * 100) trigger = 'volume' @._NUM@,1,1) } } } }" (vstate: 1) 18:28:24.57 expr: @._ID@@._NAME@@._ID@@._NUM@@._IFACE@",VolumeConf("interface")))" = " grid 'volume_section_sink' { grid @.' { style = 'volume_grid' image @._mute' { value = @.'), $XVolumeMutedIcon, @.'), 80, $XVolumeHighIcon, 50, $XVolumeMediumIcon, 0, $XVolumeLowIcon, $XVolumeMutedIcon)) style = 'volume_mute' action = VolumeCtl @.', 'sink-mute toggle' trigger = 'volume' loc (1,1,1,1) } image @._expand' { value = 'pan-end' style = 'volume_control_expander' tooltip = 'expand/collapse channels' action = Function 'XVolumeToggleChannels' loc(2,1,1,1) } label @._name' { style = 'volume_device_name' value = @.') trigger = 'volume' loc (3,1,1,1) } grid { loc(4,1,1,1) image @._set_default' { value = @.'), 'checkbox-checked', 'checkbox') style = If('sink' = 'sink' & Volume('sink-count')>1, 'volume_default', 'hidden') tooltip = 'set as default sink' trigger = 'volume' action = VolumeCtl 'sink-set-default @pulse-sink-43' } image @._menu' { value = 'open-menu' style = If('sink' = 'client' & Volume('sink-count')>1, 'volume_client_menu', 'hidden') tooltip = 'route to sink' action = Menu 'XVolumeSinkMenu' trigger = 'volume' } } scale @._volume' { style = 'volume_scale' value = @.')/100 action[1] = VolumeCtl @.', 'sink-volume ' + Str(GtkEvent('dir') * 100) trigger = 'volume' loc (1,2,4,1) } grid @._channels' { style = 'hidden' loc(1,3,4,1) label @._label' { value = 'front-right' style = 'volume_channel_name' loc(1,1,1,1) } scale @._scale' { style = 'volume_scale' value = @.:front-right')/100 action[1] = VolumeCtl @.:front-right', 'sink-volume ' + Str(GtkEvent('dir') * 100) trigger = 'volume' loc(2,1,1,1) } } } }" (vstate: 1) 18:28:24.57 action: Config '(null)', ' grid 'volume_section_sink' { grid @.' { style = 'volume_grid' image @._mute' { value = @.'), $XVolumeMutedIcon, @.'), 80, $XVolumeHighIcon, 50, $XVolumeMediumIcon, 0, $XVolumeLowIcon, $XVolumeMutedIcon)) style = 'volume_mute' action = VolumeCtl @.', 'sink-mute toggle' trigger = 'volume' loc (1,1,1,1) } image @._expand' { value = 'pan-end' style = 'volume_control_expander' tooltip = 'expand/collapse channels' action = Function 'XVolumeToggleChannels' loc(2,1,1,1) } label @._name' { style = 'volume_device_name' value = @.') trigger = 'volume' loc (3,1,1,1) } grid { loc(4,1,1,1) image @._set_default' { value = @.'), 'checkbox-checked', 'checkbox') style = If('sink' = 'sink' & Volume('sink-count')>1, 'volume_default', 'hidden') tooltip = 'set as default sink' trigger = 'volume' action = VolumeCtl 'sink-set-default @pulse-sink-43' } image @._menu' { value = 'open-menu' style = If('sink' = 'client' & Volume('sink-count')>1, 'volume_client_menu', 'hidden') tooltip = 'route to sink' action = Menu 'XVolumeSinkMenu' trigger = 'volume' } } scale @._volume' { style = 'volume_scale' value = @.')/100 action[1] = VolumeCtl @.', 'sink-volume ' + Str(GtkEvent('dir') * 100) trigger = 'volume' loc (1,2,4,1) } grid @._channels' { style = 'hidden' loc(1,3,4,1) label @._label' { value = 'front-right' style = 'volume_channel_name' loc(1,1,1,1) } scale @._scale' { style = 'volume_scale' value = @.:front-right')/100 action[1] = VolumeCtl @.:front-right', 'sink-volume ' + Str(GtkEvent('dir') * 100) trigger = 'volume' loc(2,1,1,1) } } } }', widget=(nil), win=0 from '(null)', @._ID@@._NAME@@._ID@@._NUM@@._IFACE@",VolumeConf("interface")))' 18:28:24.57 scanner: $XVolumeControlTmpl = " grid @._IFACE@' { grid @._ID@' { style = 'volume_grid' image @._ID@_mute' { value = @.@.@._ID@'), $XVolumeMutedIcon, @.@.@._ID@'), 80, $XVolumeHighIcon, 50, $XVolumeMediumIcon, 0, $XVolumeLowIcon, $XVolumeMutedIcon)) style = 'volume_mute' action = VolumeCtl @._ID@', @.@.*** toggle' trigger = 'volume' loc (1,1,1,1) } image @._ID@_expand' { value = 'pan-end' style = 'volume_control_expander' tooltip = 'expand/collapse channels' action = Function 'XVolumeToggleChannels' loc(2,1,1,1) } label @._ID@_name' { style = 'volume_device_name' value = @.@.@._ID@') trigger = 'volume' loc (3,1,1,1) } grid { loc(4,1,1,1) image @._ID@_set_default' { value = @.@.@._ID@'), 'checkbox-checked', 'checkbox') style = @._IFACE@' = 'sink' & Volume('sink-count')>1, 'volume_default', 'hidden') tooltip = 'set as default @DEVICE_IFACE@' trigger = 'volume' action = VolumeCtl @.@. @DEVICE_ID@' } image @._ID@_menu' { value = 'open-menu' style = @._IFACE@' = 'client' & Volume('sink-count')>1, 'volume_client_menu', 'hidden') tooltip = 'route to sink' action = Menu 'XVolumeSinkMenu' trigger = 'volume' } } scale @._ID@_volume' { style = 'volume_scale' value = @.@.@._ID@')/100 action[1] = VolumeCtl @._ID@', @.@.*** ' + Str(GtkEvent('dir') * 100) trigger = 'volume' loc (1,2,4,1) } grid @._ID@_channels' { style = 'hidden' loc(1,3,4,1) label @.@.@CHANNEL_ID@_label' { value = @._NAME@' style = 'volume_channel_name' @._NUM@,1,1) } scale @.@.@CHANNEL_ID@_scale' { style = 'volume_scale' value = @.@.@._ID@@._ID@')/100 action[1] = VolumeCtl @._ID@@._ID@', @.@.*** ' + Str(GtkEvent('dir') * 100) trigger = 'volume' @._NUM@,1,1) } } } }" (vstate: 1) 18:28:24.57 expr: @._ID@@._NAME@@._ID@@._NUM@@._IFACE@",VolumeConf("interface")))" = " grid 'volume_section_client' { grid @.' { style = 'volume_grid' image @._mute' { value = @.'), $XVolumeMutedIcon, @.'), 80, $XVolumeHighIcon, 50, $XVolumeMediumIcon, 0, $XVolumeLowIcon, $XVolumeMutedIcon)) style = 'volume_mute' action = VolumeCtl @.', 'client-mute toggle' trigger = 'volume' loc (1,1,1,1) } image @._expand' { value = 'pan-end' style = 'volume_control_expander' tooltip = 'expand/collapse channels' action = Function 'XVolumeToggleChannels' loc(2,1,1,1) } label @._name' { style = 'volume_device_name' value = @.') trigger = 'volume' loc (3,1,1,1) } grid { loc(4,1,1,1) image @._set_default' { value = @.'), 'checkbox-checked', 'checkbox') style = If('client' = 'sink' & Volume('sink-count')>1, 'volume_default', 'hidden') tooltip = 'set as default client' trigger = 'volume' action = VolumeCtl 'client-set-default @pulse-client-249' } image @._menu' { value = 'open-menu' style = If('client' = 'client' & Volume('sink-count')>1, 'volume_client_menu', 'hidden') tooltip = 'route to sink' action = Menu 'XVolumeSinkMenu' trigger = 'volume' } } scale @._volume' { style = 'volume_scale' value = @.')/100 action[1] = VolumeCtl @.', 'client-volume ' + Str(GtkEvent('dir') * 100) trigger = 'volume' loc (1,2,4,1) } grid @._channels' { style = 'hidden' loc(1,3,4,1) label @._label' { value = 'front-left' style = 'volume_channel_name' loc(1,0,1,1) } scale @._scale' { style = 'volume_scale' value = @.:front-left')/100 action[1] = VolumeCtl @.:front-left', 'client-volume ' + Str(GtkEvent('dir') * 100) trigger = 'volume' loc(2,0,1,1) } } } }" (vstate: 1) 18:28:24.57 action: Config '(null)', ' grid 'volume_section_client' { grid @.' { style = 'volume_grid' image @._mute' { value = @.'), $XVolumeMutedIcon, @.'), 80, $XVolumeHighIcon, 50, $XVolumeMediumIcon, 0, $XVolumeLowIcon, $XVolumeMutedIcon)) style = 'volume_mute' action = VolumeCtl @.', 'client-mute toggle' trigger = 'volume' loc (1,1,1,1) } image @._expand' { value = 'pan-end' style = 'volume_control_expander' tooltip = 'expand/collapse channels' action = Function 'XVolumeToggleChannels' loc(2,1,1,1) } label @._name' { style = 'volume_device_name' value = @.') trigger = 'volume' loc (3,1,1,1) } grid { loc(4,1,1,1) image @._set_default' { value = @.'), 'checkbox-checked', 'checkbox') style = If('client' = 'sink' & Volume('sink-count')>1, 'volume_default', 'hidden') tooltip = 'set as default client' trigger = 'volume' action = VolumeCtl 'client-set-default @pulse-client-249' } image @._menu' { value = 'open-menu' style = If('client' = 'client' & Volume('sink-count')>1, 'volume_client_menu', 'hidden') tooltip = 'route to sink' action = Menu 'XVolumeSinkMenu' trigger = 'volume' } } scale @._volume' { style = 'volume_scale' value = @.')/100 action[1] = VolumeCtl @.', 'client-volume ' + Str(GtkEvent('dir') * 100) trigger = 'volume' loc (1,2,4,1) } grid @._channels' { style = 'hidden' loc(1,3,4,1) label @._label' { value = 'front-left' style = 'volume_channel_name' loc(1,0,1,1) } scale @._scale' { style = 'volume_scale' value = @.:front-left')/100 action[1] = VolumeCtl @.:front-left', 'client-volume ' + Str(GtkEvent('dir') * 100) trigger = 'volume' loc(2,0,1,1) } } } }', widget=(nil), win=0 from '(null)', @._ID@@._NAME@@._ID@@._NUM@@._IFACE@",VolumeConf("interface")))' 18:28:24.57 scanner: $XVolumeControlTmpl = " grid @._IFACE@' { grid @._ID@' { style = 'volume_grid' image @._ID@_mute' { value = @.@.@._ID@'), $XVolumeMutedIcon, @.@.@._ID@'), 80, $XVolumeHighIcon, 50, $XVolumeMediumIcon, 0, $XVolumeLowIcon, $XVolumeMutedIcon)) style = 'volume_mute' action = VolumeCtl @._ID@', @.@.*** toggle' trigger = 'volume' loc (1,1,1,1) } image @._ID@_expand' { value = 'pan-end' style = 'volume_control_expander' tooltip = 'expand/collapse channels' action = Function 'XVolumeToggleChannels' loc(2,1,1,1) } label @._ID@_name' { style = 'volume_device_name' value = @.@.@._ID@') trigger = 'volume' loc (3,1,1,1) } grid { loc(4,1,1,1) image @._ID@_set_default' { value = @.@.@._ID@'), 'checkbox-checked', 'checkbox') style = @._IFACE@' = 'sink' & Volume('sink-count')>1, 'volume_default', 'hidden') tooltip = 'set as default @DEVICE_IFACE@' trigger = 'volume' action = VolumeCtl @.@. @DEVICE_ID@' } image @._ID@_menu' { value = 'open-menu' style = @._IFACE@' = 'client' & Volume('sink-count')>1, 'volume_client_menu', 'hidden') tooltip = 'route to sink' action = Menu 'XVolumeSinkMenu' trigger = 'volume' } } scale @._ID@_volume' { style = 'volume_scale' value = @.@.@._ID@')/100 action[1] = VolumeCtl @._ID@', @.@.*** ' + Str(GtkEvent('dir') * 100) trigger = 'volume' loc (1,2,4,1) } grid @._ID@_channels' { style = 'hidden' loc(1,3,4,1) label @.@.@CHANNEL_ID@_label' { value = @._NAME@' style = 'volume_channel_name' @._NUM@,1,1) } scale @.@.@CHANNEL_ID@_scale' { style = 'volume_scale' value = @.@.@._ID@@._ID@')/100 action[1] = VolumeCtl @._ID@@._ID@', @.@.*** ' + Str(GtkEvent('dir') * 100) trigger = 'volume' @._NUM@,1,1) } } } }" (vstate: 1) 18:28:24.57 expr: @._ID@@._NAME@@._ID@@._NUM@@._IFACE@",VolumeConf("interface")))" = " grid 'volume_section_client' { grid @.' { style = 'volume_grid' image @._mute' { value = @.'), $XVolumeMutedIcon, @.'), 80, $XVolumeHighIcon, 50, $XVolumeMediumIcon, 0, $XVolumeLowIcon, $XVolumeMutedIcon)) style = 'volume_mute' action = VolumeCtl @.', 'client-mute toggle' trigger = 'volume' loc (1,1,1,1) } image @._expand' { value = 'pan-end' style = 'volume_control_expander' tooltip = 'expand/collapse channels' action = Function 'XVolumeToggleChannels' loc(2,1,1,1) } label @._name' { style = 'volume_device_name' value = @.') trigger = 'volume' loc (3,1,1,1) } grid { loc(4,1,1,1) image @._set_default' { value = @.'), 'checkbox-checked', 'checkbox') style = If('client' = 'sink' & Volume('sink-count')>1, 'volume_default', 'hidden') tooltip = 'set as default client' trigger = 'volume' action = VolumeCtl 'client-set-default @pulse-client-249' } image @._menu' { value = 'open-menu' style = If('client' = 'client' & Volume('sink-count')>1, 'volume_client_menu', 'hidden') tooltip = 'route to sink' action = Menu 'XVolumeSinkMenu' trigger = 'volume' } } scale @._volume' { style = 'volume_scale' value = @.')/100 action[1] = VolumeCtl @.', 'client-volume ' + Str(GtkEvent('dir') * 100) trigger = 'volume' loc (1,2,4,1) } grid @._channels' { style = 'hidden' loc(1,3,4,1) label @._label' { value = 'front-right' style = 'volume_channel_name' loc(1,1,1,1) } scale @._scale' { style = 'volume_scale' value = @.:front-right')/100 action[1] = VolumeCtl @.:front-right', 'client-volume ' + Str(GtkEvent('dir') * 100) trigger = 'volume' loc(2,1,1,1) } } } }" (vstate: 1) 18:28:24.57 action: Config '(null)', ' grid 'volume_section_client' { grid @.' { style = 'volume_grid' image @._mute' { value = @.'), $XVolumeMutedIcon, @.'), 80, $XVolumeHighIcon, 50, $XVolumeMediumIcon, 0, $XVolumeLowIcon, $XVolumeMutedIcon)) style = 'volume_mute' action = VolumeCtl @.', 'client-mute toggle' trigger = 'volume' loc (1,1,1,1) } image @._expand' { value = 'pan-end' style = 'volume_control_expander' tooltip = 'expand/collapse channels' action = Function 'XVolumeToggleChannels' loc(2,1,1,1) } label @._name' { style = 'volume_device_name' value = @.') trigger = 'volume' loc (3,1,1,1) } grid { loc(4,1,1,1) image @._set_default' { value = @.'), 'checkbox-checked', 'checkbox') style = If('client' = 'sink' & Volume('sink-count')>1, 'volume_default', 'hidden') tooltip = 'set as default client' trigger = 'volume' action = VolumeCtl 'client-set-default @pulse-client-249' } image @._menu' { value = 'open-menu' style = If('client' = 'client' & Volume('sink-count')>1, 'volume_client_menu', 'hidden') tooltip = 'route to sink' action = Menu 'XVolumeSinkMenu' trigger = 'volume' } } scale @._volume' { style = 'volume_scale' value = @.')/100 action[1] = VolumeCtl @.', 'client-volume ' + Str(GtkEvent('dir') * 100) trigger = 'volume' loc (1,2,4,1) } grid @._channels' { style = 'hidden' loc(1,3,4,1) label @._label' { value = 'front-right' style = 'volume_channel_name' loc(1,1,1,1) } scale @._scale' { style = 'volume_scale' value = @.:front-right')/100 action[1] = VolumeCtl @.:front-right', 'client-volume ' + Str(GtkEvent('dir') * 100) trigger = 'volume' loc(2,1,1,1) } } } }', widget=(nil), win=0 from '(null)', @._ID@@._NAME@@._ID@@._NUM@@.***_IFACE@",VolumeConf("interface")))'

— Reply to this email directly, view it on GitHub https://github.com/LBCrion/sfwbar/issues/150#issuecomment-2007772917, or unsubscribe https://github.com/notifications/unsubscribe-auth/ASHPFFGLYJ7KUKRFLTC6LITYZBZYFAVCNFSM6AAAAABDXJ76VWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMBXG43TEOJRG4 . You are receiving this because you commented.Message ID: @.***>

LBCrion avatar Mar 19 '24 17:03 LBCrion

That solved my problems. I think I had that in my config at one point too, but must have removed it when I tried to clean it up. Turns out it was there for a reason? 😄

Thank you for the quick help as always, and sorry for the noise!

Flrian avatar Mar 19 '24 18:03 Flrian