-
Notifications
You must be signed in to change notification settings - Fork 5
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
No way to pass font name with space in DMENU_CMD #7
Comments
Thanks for creating an issue! I've fixed this now (4d8d591), available on master or tag 2.0.5. Your above command should now work. |
I tried but still same result. I tried 3 versions, with single quotes, with escaped double quotes, and with escaped spaces, none worked. FWIW, I have the same command working in i3 config. |
Hmm... It works for me with single quotes. What happens? Is there any error or otherwise? |
I only get dmenu usage as output, which seems a side effect of passing broken params:
I also tried reversing quotes and using outer single quotes and inner double quotes, didn't work either. |
Ah, it's working, the issue now lies in the colors with |
Okay, found the fix. Putting the color constants in single quotes fixes the issue, but maybe this change broke previous way of passing colors? |
Possibly. I switched from Interpretation of the command is up to the shell, so if it doesn't work in a prompt (unquoted hashes don't for me), it probably won't work in the script. |
It seems like it broke when stopping recording. I'm now getting the same dmenu usage output. |
Oops! Looks like I missed a few |
Now fixed in aa40672 (2.0.6). Please let me know if there's anything else. Thanks for your patience! |
Working fine now, thx! |
I'm hesitant about introducing dependencies that aren't available in most standard repos. Also, |
yeah I agree, but I view it as optional. It is still able to produce short timed gifs of high quality. I've patched slip locally to use it instead of the ffmpeg approach. |
--- /usr/bin/slip 2020-10-26 23:08:08.000000000 -0300
+++ /home/francisco/.local/bin/slip 2020-10-30 12:58:51.618134779 -0300
@@ -175,22 +175,12 @@
function convert_to_gif() {
local tfn=$1
- local pfn=$2
- local fn=$3
- local wh=$4 # 0 = width larger than height, 1 = height larger than width
-
- local ratio
- # If the width is larger than the height, we want to scale with the width, otherwise scale with the height.
- if [ $wh -eq 0 ]; then
- ratio="$GIF_SCALE:-1"
- else
- ratio="-1:$GIF_SCALE"
- fi
+ local fn=$2
+ local wh=$3 # 0 = width larger than height, 1 = height larger than width
notify "Converting to gif…"
# Give enough time to save the file.
- sleep 1 && ffmpeg -i "$tfn" -loglevel quiet -vf fps=$GIF_FPS,scale="$ratio":flags=lanczos,palettegen "$pfn" &&
- ffmpeg -i "$tfn" -i "$pfn" -loglevel quiet -filter_complex "fps=$GIF_FPS,scale=$ratio:flags=lanczos[x];[x][1:v]paletteuse" "$fn" &&
+ sleep 1 && gifski --quiet --width "$GIF_SCALE" -o "$fn" "$tfn" &&
echo "$fn"
}
@@ -201,7 +191,6 @@
local pid=$1 # Process id (for killing ffmpeg).
local tfn=$3 # Temp file name (for gifs).
local fn=$4 # File name for the gif/vid we're saving.
- local pfn="${tfn}-palette.png" # Palette file name (for gif rendering).
# Stop recording.
kill_ffmpeg "$pid"
@@ -211,7 +200,7 @@
# the .gif file.
# Is this actually a good idea? We could just store the .mkv instead, but then we lose the ability to store .gif.
if [ "$2" = "gif" ]; then
- fn=$(convert_to_gif "$tfn" "$pfn" "$fn" "$5")
+ fn=$(convert_to_gif "$tfn" "$fn" "$5")
size=$(du -k $fn | cut -f1)
if [ $NOUPLOAD == 0 ]; then I have built |
Thanks for documenting this. I've added it to the readme. |
I'm trying to set font for the menu but seems there's no way to set font with spaces?
DMENU_CMD="dmenu -f -p slip -fn 'BigBlue_TerminalPlus Nerd Font-16:regular' -i -y 520 -x 192 -w 1536 -h 40 -nb #444B6A -sb #444B6A -nf #F7768E -sf #E0AF68"
The text was updated successfully, but these errors were encountered: