You are not logged in.
Pango indeed.
Offline
Installed tint2 0.12.3 to utilise taskbar_hide_inactive_tasks.
First time using git or make but everything went smoothly.
@o9000: Thank you for the new features/fixes and easy to follow instructions.
Offline
@ohnonot
I finally had a bit of free time to merge tint2conf support for the executor plugin. Just pushed it to master. BTW gosh, tint2conf is so ugly... but it does the job.
@ALI3N
I'm glad it works well for you. Just to understand a little better the use case, may I ask how you use that option?
I know of only one other user, who wanted to use 2 panels, a normal one at the bottom and a top one with a huge task button to display the current window title on a top bar. This was the feature request: https://gitlab.com/o9000/tint2/issues/458
Offline
^I'm using a 17px panel for tint2, conky and dmenu. Tint2 displays current desktop and current window title.
GIF: https://scrot.moe/image/avXa
Scrolling up/down on the taskbar button switches to previous/next task. Scrolling on the taskbar name or conky switches desktops. Left-click on taskbar button to iconify. Right-click and middle-click on tint2 or conky calls Openbox menu and Openbox desktops.
## https://gitlab.com/o9000/tint2/wikis/home
##
## simple-taskbar.tint2rc
## Backgrounds and borders
# ID 1
rounded = 0
border_width = 0
background_color = #202020 100
## Panel
panel_items = T
panel_monitor = all
panel_position = top left horizontal
panel_size = 806 17
panel_margin = 0 0
panel_padding = 0 0 0
panel_background_id = 1
wm_menu = 1
panel_dock = 0
panel_layer = top
strut_policy = follow_size
disable_transparency = 1
## Taskbar / Pager
taskbar_mode = single_desktop
taskbar_padding = 0 0 5
taskbar_background_id = 1
taskbar_active_background_id = 1
taskbar_hide_inactive_tasks = 1
task_align = left
taskbar_name = 1
taskbar_name_padding = 5 0
taskbar_name_background_id = 1
taskbar_name_font = Monospace bold 9.5
taskbar_name_font_color = #6699cc 100
taskbar_name_active_background_id = 1
taskbar_name_active_font_color = #6699cc 100
## Taskbar buttons
task_icon = 0
task_text = 1
task_centered = 0
task_tooltip = 0
task_maximum_size = 760
task_padding = 0 0
urgent_nb_of_blink = 0
task_font = Droid Sans bold 10
task_font_color = #c0c0c0 100
task_background_id = 1
task_active_font_color = #c0c0c0 100
task_active_background_id = 1
task_urgent_font_color = #e17b71 100
task_urgent_background_id = 1
## Mouse actions for taskbar buttons
mouse_middle = none
mouse_right = none
mouse_scroll_up = prev_task
mouse_scroll_down = next_task
# End of config
Thank you for your continuing work.
Last edited by AL13N (2015-12-28 20:43:00)
Offline
Looks nice!
Offline
i took the time to rewrite my script from post #1, make it more generic so that it works in other contexts too, added proper option parsing... it grew to almost 300 lines!
it also has a continuous option.
and i prepared it so that adding support for other media players should be fairly easy, separated mediaplayer-specific functions.
Usage: mpi-panel [options]
-l int Output will be split into this many lines. Default: 1
Must be between 1 and 1000.
-x Return the exact number of lines requested, even if it means
outputting empty lines, and even if nothing at all would be output
otherwise.
-w int Width = maximum length of the complete string before it gets split
into lines. Default: 60 - Must be between 10 and 1000.
-t Indicates that elapsed/remaining time shall be appended.
-c int Will run the script in a continuous loop with int seconds delay
between updates. E.g. the tint2 panel supports this. Disabled by
default. Must be between 1 and 1000.
-p str Media player to query. Currently only mocp is supported.
Default: mocp
-i dir Path to a directory containing icons to display, with these exact
names: play.*, pause.*, stop.*, unknown.*, uptime.*. If an icon
does not exist, the text "unknown icon" is returned, so that
tint2 does not get confused. Supported formats:
png svg gif PNG jpg jpeg GIF JPG JPEG
Not specifying this option disables icon display.
-u Output uptime when media player is not running.
Otherwise, don't output anything.
-1 Will make (fairly) sure only one script instance is running.
-h Display this message
Last edited by ohnonot (2021-07-04 06:36:19)
Offline
Great. Thank you! I'll give it a try.
Offline
Since you guys are using the exec plugin in non-trivial ways, I'm kindly asking for your feedback on this issue: https://gitlab.com/o9000/tint2/issues/586
The problem is the following. Let's assume we have a script scheduled to execute either at an interval or just once at tint2 startup (non-continuous executor). What we want is that when it is clicked, a custom command is executed and then the executor element should be updated immediately, by executing the default command.
Currently tint2 executes a custom command on click, but does not reexecute the default command to update the executor element.
Thus the desired behavior is only possible using continuous output executors, and the two different processes (the default one and the custom one) synchronizing somehow. This requires quite a bit of boilerplate, as it can be seen in ohnonot's mpi-panel script.
It would be easier for the user if tint2 reexecuted the default command when the custom command exits if the executor is non-continuous. Then no synchronization code is needed in the user scripts.
Of course, continuous executors remain unchanged.
What do you think? Would this cause any problems to your scripts?
Offline
i'm not sure i understand; my script needs to update continuously, so that media player track/ title changes are displayed.
right now the only advantage i see from your suggested addition, would be that it wouldn't take $interval to reflect the new state after clicking on the plugins panel space (un/pausing the media player, mostly).
or am i misunderstanding?
Offline
For continuous scripts, there would be no change at all. It is not even possible to make this change actually.
The change would affect non-continuous scripts, making the programming a bit easier, with the downside that the interval at which the script is called is not predictable (although that was already the case since clicks without custom commands trigger updates anyways).
Offline
I pushed the change to master. If it causes any problems, let me know.
Offline
The new behavior is wonderull! (I guess that is not in Stretch yet?)
Question: Is there something like execp_tooltip_command (That would run some script)?
Last edited by brontosaurusrex (2017-05-31 20:00:36)
Offline
The new behavior is wonderull! (I guess that is not in Stretch yet?)
...
Hey bronto, haven't you realised yet that BL is cutting edge (nearly) as regards tint2? Our backported tint2 is waaay ahead of stretch
(And anyway it is easy to build the latest from github sources)
Be Excellent to Each Other...
The Bunsenlabs Lithium Desktop » Here
FORUM RULES and posting guidelines «» Help page for forum post formatting
Artwork on DeviantArt «» BunsenLabs on DeviantArt
Offline
The new behavior is wonderull! (I guess that is not in Stretch yet?)
Question: Is there something like execp_tooltip_command (That would run some script)?
Run some script when? On mouse over?
Or are you talking about setting the tooltip dynamically from a script?
Offline
09000; yes.
Another thing I just noticed: "execp_interval must be an integer >= 1" error is probably wrong?
Offline
Answer not clear Is it the first case or the second? Yes is not a valid answer
With what config did you get the error?
Offline
The 1st yes, run script on mouse over that is.
The error (that is an error error) config
https://github.com/brontosaurusrex/post … c.printVol
Last edited by brontosaurusrex (2017-05-31 21:01:13)
Offline
The error is harmless. Thanks for pointing it out, will be fixed.
What exactly would you like to do on mouse over?
Offline
What exactly would you like to do on mouse over?
For example echo out current master volume (either a command or a script).
p.s. Backstory would be trying to do a master volume alsa slider of some sort (which is especially interesting due to an option to get rid of volumeicon and such).
Last edited by brontosaurusrex (2017-05-31 21:13:50)
Offline
You mean into the tooltip, or sill in the executor?
Edit: sorry for asking silly questions, I want to be sure I understand this well since it's about extending the config, and that must be done with care.
Last edited by o9000 (2017-05-31 21:14:47)
Offline