~tsdh

near Koblenz, Germany

https://www.tsdh.org/

Free software hacker, Emacs addict, hobbyist beekeeper and chicken farmer

Trackers

~tsdh/swayr

Last active 18 days ago

~tsdh/rdictcc

Last active 2 months ago

~tsdh/highlight-parentheses.el

Last active 11 months ago

~tsdh/switchy-window

Last active 1 year, 11 months ago

~tsdh/svgrep

Last active 3 years ago

#46 Brightness Module 18 days ago

enhancement added by ~tsdh on ~tsdh/swayr

#46 Brightness Module 18 days ago

swayrbar added by ~tsdh on ~tsdh/swayr

#46 Brightness Module 18 days ago

Comment by ~tsdh on ~tsdh/swayr

I think it wouldn't take much, probably a good first-contribution task.

The difference to the pactl and wpctl modules is that those audio modules control some default source and sink but there is no default output (display) to control the brightness of. So I think it would be sensible to add one instance of a future brightnessctl module per display you use. If the display of one such module isn't plugged right now, it'll just return the empty string, otherwise the brightness value. Then you can define different on-click-behavior per instance to change the brightness of a certain display.

That said, I think you can already use the generic cmd module to achive what you want to do. But of course, a custom module which works out of the box would be nice.

#45 Support "index mode" for more beautiful menus a month ago

Comment by ~tsdh on ~tsdh/swayr

Ah, indeed, one thing I missed is that when the display string ends in this \0icon... thingy, then the uniquifying number has to go before the icon escape sequence. Should be fixed now.

#45 Support "index mode" for more beautiful menus a month ago

Comment by ~tsdh on ~tsdh/swayr

Tassilo Horn referenced this ticket in commit f03a0fb.

RESOLVED IMPLEMENTED RESOLVED IMPLEMENTED

#45 Support "index mode" for more beautiful menus a month ago

Comment by ~tsdh on ~tsdh/swayr

I've implemented that, please test.

Note that it doesn't add the sway con ID to uniquify textually identical choices but just an increasing number. The reason is that the switcher function is generic: it might be used to choose a window, a swayr command, a swaymsg command, or something else. The list of items to choose from just have to implement a certain trait which is very simple but doesn't allow poking in the details of each concrete type.

#45 Support "index mode" for more beautiful menus a month ago

Comment by ~tsdh on ~tsdh/swayr

Tassilo Horn referenced this ticket in commit d74355b.

REPORTED RESOLVED IMPLEMENTED

#45 Support "index mode" for more beautiful menus a month ago

Comment by ~tsdh on ~tsdh/swayr

No, thank you. I don't think it's worth it to add so much complexity for a few reasons.

  1. As you say, it's only supported by few pickers whereas the current variant is the absolute minimum requirement one can have with a picker and therefore works with all of them.
  2. It provides a likely way to shot yourself in the foot, i.e., the new setting menu.index_mode would need to be in sync with menu.args. That is, if and only if you want to use this new index-mode with fuzzel, you need to make sure that "--index" is in menu.args.
  3. Being able to omit the {id} (the so-called con id in sway parlance) in formats doesn't strike me as important. Depending on the picker you use, you might be able to make that text invisible, e.g., using pango markup with wofi.
  4. You can already omit the {id} in your formats and it will be fine except in the edge case where you have many windows of the same application with the same title on the same workspace. But that would be problematic with your approach, too, in that the user cannot distinguish between those windows.

What could work without any complex changes was dynamically adding some sequence number to what's displayed in the picker only in the case that multiple candidates have the very same display string. For example, say you have 3 foot terminal windows with the same title ~, those would be displayed in the picker as:

  • ~ -- foot
  • ~ -- foot 2
  • ~ -- foot 3

Would that be fine, too?

#45 Support "index mode" for more beautiful menus a month ago

swayr added by ~tsdh on ~tsdh/swayr

#45 Support "index mode" for more beautiful menus a month ago

enhancement added by ~tsdh on ~tsdh/swayr