-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
lowfi rice help #68
Comments
Oh, yeah, two more things: there isn't a way to make text bold (like lowfi title) and no way to set keybind with modifier ( |
currently not possible, will be planning to add it.
Played around with it, just remove the container and it should just jump. {
"type": "container",
"children": [
{
"type": "button",
"text": "$status-text",
"action": "play_pause()"
},
{ "type": "empty", "size": 1 },
{ "type": "label", "text": "$title" }
]
},
this is actually cool! currently, not possible but i will planing on adding it. plan is, just having a single |
what about volume thing, can we have space "reserved" on left too? |
wdym by space reserved? if u meant a similar thing on number 2 where u dont need a container for containing the text, then the workaround for now is to remove the parent container of that volume label and make the type become button. i guess ill just make it so by default, label will also just reserve its content length width instead of taking the available space entirely. it will only take up space entirely if u set the align property to either center or right |
currently not possible to have a "reserved" space for a widget currently. |
@danielwerg btw can u like test the padding thing? |
Is this about #73 (comment)? "border": true,
"padding": [1, 1], on root, yields: I'm assuming that's not how you suppose to use it. config{
"players": ["lowfi"],
"keybinds": {
"s;S": "next()",
"n;N": "next()",
"p;P": "play_pause()",
"-;_;down": "volume(-5)",
"left": "volume(-1)",
"+;=;up": "volume(+5)",
"right": "volume(+1)",
"q;Q": "quit()"
},
"width": 45,
"height": 3,
// TODO https://github.com/qxb3/fum/pull/73, missing padding
"border": true,
"padding": [1, 1],
"layout": [
{
"type": "container",
"direction": "vertical",
"children": [
{
"type": "container",
"children": [
{
"type": "container",
"width": 7,
"children": [
{
"type": "button",
"text": "$status-text",
"action": "play_pause()"
}
]
},
{ "type": "empty", "size": 1 },
{ "type": "label", "text": "$title", "bold": true }
]
},
{
"type": "container",
"children": [
{ "type": "empty", "size": 1 },
{
"type": "container",
"children": [
{ "type": "button", "text": "[" },
{
"type": "progress",
"progress": { "char": "/" },
"empty": { "char": " " }
},
{ "type": "button", "text": "]" }
]
},
{ "type": "empty", "size": 1 },
{
"type": "container",
"width": 11,
"children": [
{ "type": "button", "text": "$position" },
{ "type": "button", "text": "/" },
{
"type": "button",
"text": "var($length-style, $length)",
"action": "toggle($length-style, $length, $remaining-length)"
}
]
}
]
},
{
"type": "container",
"children": [
{ "type": "empty", "size": 1 },
{
"type": "container",
"width": 7,
"children": [{ "type": "label", "text": "volume:" }]
},
{ "type": "empty", "size": 1 },
{
"type": "container",
"children": [
{ "type": "button", "text": "[" },
{
"type": "volume",
"volume": { "char": "/" },
"empty": { "char": " " }
},
{ "type": "button", "text": "]" }
]
},
{ "type": "empty", "size": 1 },
{
"type": "container",
"width": 4,
"children": [{ "type": "label", "text": "$volume%" }]
}
]
}
]
}
]
} |
u still need to adjust the width and height since nothing really is calculated |
So I ran into flex/element alignment issues again. I notices that lowfi makes part inside squire brackets bold (ex: "[s]" in "[s]kip") Knowing that fum doesn't have a way to make part of the text bold I thought I could use containers: config{
"players": ["lowfi"],
"keybinds": {
"s;S": "next()",
"n;N": "next()",
"p;P": "play_pause()",
"-;_;down": "volume(-5)",
"left": "volume(-1)",
"+;=;up": "volume(+5)",
"right": "volume(+1)",
"q;Q": "quit()"
},
"width": 31,
"height": 5,
"border": true,
"padding": [2, 1],
"layout": [
{
"type": "container",
"direction": "vertical",
"children": [
{
"type": "container",
"children": [
{
"type": "container",
"width": 7,
"children": [
{
"type": "button",
"text": "$status-text",
"action": "play_pause()"
}
]
},
{ "type": "empty", "size": 1 },
{ "type": "label", "text": "$title", "bold": true }
]
},
{
"type": "container",
"children": [
{ "type": "empty", "size": 1 },
{
"type": "container",
"children": [
{ "type": "button", "text": "[" },
{
"type": "progress",
"progress": { "char": "/" },
"empty": { "char": " " }
},
{ "type": "button", "text": "]" }
]
},
{ "type": "empty", "size": 1 },
{
"type": "container",
"width": 11,
"children": [
{ "type": "button", "text": "$position" },
{ "type": "button", "text": "/" },
{
"type": "button",
"text": "var($length-style, $length)",
"action": "toggle($length-style, $length, $remaining-length)"
}
]
}
]
},
{
"type": "container",
"children": [
{ "type": "empty", "size": 1 },
{
"type": "container",
"width": 7,
"children": [{ "type": "label", "text": "volume:" }]
},
{ "type": "empty", "size": 1 },
{
"type": "container",
"children": [
{ "type": "button", "text": "[" },
{
"type": "volume",
"volume": { "char": "/" },
"empty": { "char": " " }
},
{ "type": "button", "text": "]" }
]
},
{ "type": "empty", "size": 1 },
{
"type": "container",
"width": 4,
"children": [{ "type": "label", "text": "$volume%" }]
}
]
},
{
"type": "container",
"flex": "space-between",
"children": [
// { "type": "button", "text": "[s]kip", "action": "next()" },
// { "type": "button", "text": "[p]ause", "action": "play_pause()" },
// { "type": "button", "text": "[q]uit", "action": "quit()" }
{
"type": "container",
"children": [
{
"type": "button",
"text": "[s]",
"action": "next()",
"bold": true
},
{ "type": "button", "text": "kip", "action": "next()" }
]
},
{
"type": "container",
"children": [
{
"type": "button",
"text": "[p]",
"action": "play_pause()",
"bold": true
},
{ "type": "button", "text": "ause", "action": "play_pause()" }
]
},
{
"type": "container",
"children": [
{
"type": "button",
"text": "[q]",
"action": "quit()",
"bold": true
},
{ "type": "button", "text": "uit", "action": "quit()" }
]
}
]
}
]
}
]
}
(fum at the top) "flex" doesn't seems to apply to containers elements or it applied wrong |
what does setting the bg of the main container of this buttons result to? maybe the main container is like not taking up the rest of the space? |
i see i think its because container again by default will take up the available space that flex doesnt really have any effect on it since there is no space. ig the work around for this is just setting the container of the button to have a |
I tried that earlier and it didn't work... I guess I made a typo it should be: 6 7 6 |
can u send the latest config here along with a good screenshot of it, i want to update the wiki |
lowfi clone aka spot the difference Caveats:
config{
"players": ["lowfi"],
"keybinds": {
"s;S": "next()",
"n;N": "next()",
"p;P": "play_pause()",
"-;_;down": "volume(-5)",
"left": "volume(-1)",
"+;=;up": "volume(+5)",
"right": "volume(+1)",
"q;Q": "quit()"
},
"width": 31,
"height": 5,
"border": true,
"padding": [2, 1],
"layout": [
{
"type": "container",
"direction": "vertical",
"children": [
{
"type": "container",
"children": [
{
"type": "container",
"width": 7,
"children": [
{
"type": "button",
"text": "$status-text",
"action": "play_pause()"
}
]
},
{ "type": "empty", "size": 1 },
{ "type": "label", "text": "$title", "bold": true }
]
},
{
"type": "container",
"children": [
{ "type": "empty", "size": 1 },
{
"type": "container",
"children": [
{ "type": "button", "text": "[" },
{
"type": "progress",
"progress": { "char": "/" },
"empty": { "char": " " }
},
{ "type": "button", "text": "]" }
]
},
{ "type": "empty", "size": 1 },
{
"type": "container",
"width": 11,
"children": [
{ "type": "button", "text": "$position" },
{ "type": "button", "text": "/" },
{
"type": "button",
"text": "var($length-style, $length)",
"action": "toggle($length-style, $length, $remaining-length)"
}
]
}
]
},
{
"type": "container",
"children": [
{ "type": "empty", "size": 1 },
{
"type": "container",
"width": 7,
"children": [{ "type": "label", "text": "volume:" }]
},
{ "type": "empty", "size": 1 },
{
"type": "container",
"children": [
{ "type": "button", "text": "[" },
{
"type": "volume",
"volume": { "char": "/" },
"empty": { "char": " " }
},
{ "type": "button", "text": "]" }
]
},
{ "type": "empty", "size": 1 },
{
"type": "container",
"width": 4,
"children": [{ "type": "label", "text": "$volume%" }]
}
]
},
{
"type": "container",
"flex": "space-between",
"children": [
// { "type": "button", "text": "[s]kip", "action": "next()" },
// { "type": "button", "text": "[p]ause", "action": "play_pause()" },
// { "type": "button", "text": "[q]uit", "action": "quit()" }
{
"type": "container",
"width": 6,
"children": [
{
"type": "button",
"text": "[s]",
"action": "next()",
"bold": true
},
{ "type": "button", "text": "kip", "action": "next()" }
]
},
{
"type": "container",
"width": 7,
"children": [
{
"type": "button",
"text": "[p]",
"action": "play_pause()",
"bold": true
},
{ "type": "button", "text": "ause", "action": "play_pause()" }
]
},
{
"type": "container",
"width": 6,
"children": [
{
"type": "button",
"text": "[q]",
"action": "quit()",
"bold": true
},
{ "type": "button", "text": "uit", "action": "quit()" }
]
}
]
}
]
}
]
}
|
will be closing this since its all good now |
@qxb3 is this no longer planned? |
@danielwerg oh yea, forgot about that. we'll see. i kinda don't want to break stuff now. |
After #65 I got excited about this again.
Right now there is only 3 differences between my rice and actual lowfi:
Expand
I prefer to not have it most of the times, so I never tried implementing it in fum
related: talwat/lowfi#51
Expand
You could see
title
"jump" or double space, not 100% which I prefer but I think fum's way better.2025-02-06_05-33-10.mp4
I've been using trick you showed me with
container
, but it isn't perfect since I have to set thewidth
which could be dynamic. You could see me setwidth
explicitly in several place in my config.fum reserves space to the right, lowfi to left to prevent
%
jumping:2025-02-06_05-08-48.mp4
would be nice to have both options
Expand
lowfi switches progress bar with volume bar when volume manipulated:
2025-02-06_05-37-46.mp4
Videos reference: top: fum, bottom: lowfi
My config thus far
The text was updated successfully, but these errors were encountered: