mirror of
https://codeberg.org/dnkl/yambar.git
synced 2025-06-16 16:25:39 +02:00
particle: on-click: tilde expansion
We now do tilde expansion of the *first* argument in on-click handlers. That is: ~/bin/foobar.sh ~/arg1 is expanded to $HOME/bin/foobar.sh ~/arg1 (meaning, the handler will most likely *not* do what you’d expect) Related to #307
This commit is contained in:
parent
f948b9f8f9
commit
d6e7710a7e
6 changed files with 77 additions and 21 deletions
|
@ -30,7 +30,7 @@ particle_default_destroy(struct particle *particle)
|
|||
|
||||
struct particle *
|
||||
particle_common_new(int left_margin, int right_margin,
|
||||
const char **on_click_templates,
|
||||
char **on_click_templates,
|
||||
struct fcft_font *font, enum font_shaping font_shaping,
|
||||
pixman_color_t foreground, struct deco *deco)
|
||||
{
|
||||
|
@ -46,7 +46,7 @@ particle_common_new(int left_margin, int right_margin,
|
|||
for (size_t i = 0; i < MOUSE_BTN_COUNT; i++) {
|
||||
if (on_click_templates[i] != NULL) {
|
||||
p->have_on_click_template = true;
|
||||
p->on_click_templates[i] = strdup(on_click_templates[i]);
|
||||
p->on_click_templates[i] = on_click_templates[i];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue