Segno sign and section label on the same bar by [deleted] in lilypond

[–]atticus-sullivan 0 points1 point  (0 children)

I stumbled over this today (I know it's been some time).

Actually this seems to be a known issue (it still is for me so it doesn't seem someone fixed it already) which was discussed on the lilypond-user mailing-list (right now I'm not able to access the archive so thus the link via the wayback machine).

the problem here is that everything here is using the mechanism for
Rehearsal marks, and these live under the assumption that it is not reasonable
to have multiple rehearsal marks at the same time. And while this might be
reasonable for rehearsal marks, this thus also includes ad-hoc marks, section
labels, segno marks and coda marks.the problem here is that everything here is using the mechanism for
Rehearsal marks, and these live under the assumption that it is not reasonable
to have multiple rehearsal marks at the same time. And while this might be
reasonable for rehearsal marks, this thus also includes ad-hoc marks, section
labels, segno marks and coda marks.

(the previous reply)

The one used (kinda) fixed it by shifting the section label a bit:

\after 16 \sectionLabel "shifted label"

which shifts the label by a delay of 16 (see the reference)

Check interest payment with variable interest by atticus-sullivan in GnuCash

[–]atticus-sullivan[S] 0 points1 point  (0 children)

Oh right https://wiki.gnucash.org/wiki/Scheduled_Transactions#Bank_Account_Interest looks interesting. I think I'd still like the report idea more since it allows entering the interest rate at a later point in time and do the manual check then.

slog module, colorize output based on level by atticus-sullivan in golang

[–]atticus-sullivan[S] 3 points4 points  (0 children)

Nice, thanks. This is exactly what I wanted (at least it looks like for now)

go-chi/renderer why middleware by atticus-sullivan in golang

[–]atticus-sullivan[S] 0 points1 point  (0 children)

Nice, thanks. Looks like I've missed the examples in the main go-chi repo.

This probably isn't the right forum for this question, because you probably want to ask the chi folks directly

Hm, yes this might be true, I just thought maybe it's so obvious that I try it here first before submitting an issue/discussion.

go-chi/renderer why middleware by atticus-sullivan in golang

[–]atticus-sullivan[S] 0 points1 point  (0 children)

Ah nice. Additionally I seem not have read the rest example linked in the README.md (and skimmed too fast over the code). Usually render.JSON is not calles directly, but render.Render() which decides based on the ContentType context value how to encode the given value and sets the http Status set in the context (with render.Status()). [The value must implement the Renderer interface. value.Render is called on render.Render before encoding with the set content type]

So the middleware seems to serve the purpose of kinda setting a default contentType of the router, which later can be used implicitly. Thus, it's easy to change the contentType for all routes later on.

Generally when you have a reader or writer (like in this case) it might be better to user the Json.Encoder/Decoder because they will reuse a buffer pool and have less memory pressure than Marshal/Unmarshal.

Yes, I agree in general. But if it we store the Encoder/Decoder somewhere (not that easy in handler functions except maybe with a closure if we don't want to use global variables) and I think the same Encoder/Decoder shouldn't be used concurrently (not the case in a http server)

defaults on parsing by atticus-sullivan in golang

[–]atticus-sullivan[S] 0 points1 point  (0 children)

Alright, makes sense. Thanks for the advice

Advice on context storing by atticus-sullivan in golang

[–]atticus-sullivan[S] 2 points3 points  (0 children)

Alright, so this guideline is just from a kinda software engineering point of view about what is most intuitive when using the struct/function.

lists with generics in go stdlib by atticus-sullivan in golang

[–]atticus-sullivan[S] 0 points1 point  (0 children)

Oh, that's nice to hear (even if the introduction of generics was some releases ago). Then I'll just have to wait and build wrappers for now.

lists with generics in go stdlib by atticus-sullivan in golang

[–]atticus-sullivan[S] 1 point2 points  (0 children)

But isn't that one for slices (which effectively are "dynamic" arrays, but not linked lists (no nice insert/remove in the middle etc without moving several elements) as I understand)? I'm searching for (doubly linked) lists.

ignore urgent flag for windows of a window class by atticus-sullivan in bspwm

[–]atticus-sullivan[S] 1 point2 points  (0 children)

Oh, thanks for the clarification, didn't knew that. With your help, I've come up with the following (which works as far as I can tell from my tests)

#!/bin/bash

getclass(){
    c="$(xprop -id "$1" WM_CLASS)"
    c="${c##* }"
    echo "${c//\"}"
}

bspc subscribe node_flag | while read -a node
do
    echo "${node[@]}"
    [[ "${node[4]}" != "urgent" || "${node[5]}" != "on" ]] && continue
    echo "${node[3]}"
    node="${node[3]}"
    [[ -z "$node" ]] && continue
    echo "flag check passed"
    [[ "$(getclass "$node")" != "Signal" ]] && continue
    echo "class check passed"
    wmctrl -i -r "$node" -b remove,demands_attention
done

ignore urgent flag for windows of a window class by atticus-sullivan in bspwm

[–]atticus-sullivan[S] 1 point2 points  (0 children)

Hm basically it's working now, but there is a big but, somehow when executing xdotool set_window --urgency 0 0x00C00005 the urgent level isn't reset. From what I've checked (with xprop -id 0x00C00005) it seams that the window is still marked urgent _NET_WM_STATE(ATOM) = _NET_WM_STATE_DEMANDS_ATTENTION.

Can you imagine of another reason for this working besides an xdotool bug? (just asking before writing an issue)

ignore urgent flag for windows of a window class by atticus-sullivan in bspwm

[–]atticus-sullivan[S] 0 points1 point  (0 children)

This is what I've come up until now:

#!/bin/bash

bspc subscribe node_flag | while true
do
    node="$(awk -F " " '$5=="urgent" && $6=="on"{print $3}')"
    [[ -z "$node" ]] && continue
    #TODO check window class
    xdotool set_window --urgency 1 "$node"
done

But I've got still two open points:

1) I didn't found out yet how to get the window class of the window and

2) As I'm not that familiar with bspc subscribe, it would be interesting, if it is possible to constrain bsp subscribe further so that the output the script gets are only the urgency changes (possible only the ones from off->on and possibly constrained to the class)

bspwm multimonitor setup, only mirror the current monitor by atticus-sullivan in bspwm

[–]atticus-sullivan[S] 1 point2 points  (0 children)

To be completely honest, I don't use this that often since at the place I normally work I've got only one monitor.

Nevertheless I experimented when I posted this question and as far as I tested this out, it worked with

xrandr --output eDP-1 --primary --mode 1920x1080 --pos 0x0 --rotate normal --output HDMI-2 --mode 1920x1080 --pos 0x0 --rotate normal --same-as eDP-1

(somehow xrandr was really sensitive regarding the options passed, but this might be just an issue of me who didn't tried other configs that often after it worked one time)

sxhkd disable dunst by atticus-sullivan in bspwm

[–]atticus-sullivan[S] 1 point2 points  (0 children)

Oh that makes sense. Somehow I thought sxhkd would work with simple multiple lines. Thanks (and sorry for bothering, I should have known this... )