Closed kylecarbon closed 6 years ago
I appreciate your kind words! I would love to implement both features, go ahead and submit a PR.
I rewrote the i3lock-next
script in Python on the kcarbon-lookup_lock_image_size
branch, let me know what you think.
I'm personally happier with scripting in Python and your branch/script looks good! I'm about to get on a plane though, so I didn't have a chance to test it out. This is where my ignorance comes up (aerospace background, not software), but how much slower is the Python script versus the bash script? I'd assume not enough to become perceptible to the user?
Also per your comment on the PR, I did use bc
at first but couldn't get the float back to an int. I didn't see a floor
function listed or anything and didn't want to write yet another helper function in bash.
In my expert (read: definitely NOT expert) opinion, Python should be faster than Bash. Getting the image size with Python instead of with C could be slower but in my (very unscientific) testing it didn't seem slower.
Edit: My statement that Python is faster than Bash is just a personal rule-of-thumb and afaik not backed up by any testing.
Got a chance to test your new branch! Comments:
color
contains 3 rows, which causes i3lock
to error out when it's passed in
rstrip
is meant to work with newlines?master
too for _datetimecolor
radius
, I think the division by 2 should be outside the square rootrstrip
removes trailing whitespace, in this case the newline.Okay, I took the the code that prints color
out of the loop (d'oh!), added a config for the clock position and some other options, and fixed the radius calculation. If you could test the latest commit that would be great!
Hey! Sorry, I'm not on holiday anymore and am usually pretty busy during the week. I will definitely get to this by this upcoming Sunday but hopefully sooner.
No problem, I appreciate your help.
Looking pretty sweet! I did run into a couple things
i3lock-next.ini
is located in ~/.config
. Should it maybe go in ~/.config/i3lock-next
?
Just wanted to start by saying thanks for
i3lock-next
! Definitely the fastest locker I've come across so far.I was wondering if it'd be possible to make
i3lock-next
a little more flexible with regards to the lock image, specifically:i3lock-next-helper.c
i3lock-color
I've done step 1 already on my fork and can submit a PR if you're agreeable. Otherwise, I'm curious as to what your thoughts are.