2019-11-30T00:08:21 #kisslinux bye bye lxqt-panel, it's been a good ride but the lib you dep decided to be an ass 2019-11-30T03:17:24 #kisslinux I was able to replace all instances of test in bf.sh without abusing case with my let implementation: https://github.com/Crestwave/snippets/commit/38909a28bac305e326a5a810aa6fb96ba2cd69ed 2019-11-30T03:17:35 #kisslinux Pretty nifty, although I won't be using it in the main program 2019-11-30T03:19:03 #kisslinux By the way, isn't `echo "$var"` unportable in POSIX (used in bud)? 2019-11-30T03:26:10 #kisslinux I haven't looked much into the program to see if it was intended, but you could be making the same mistake as before with trapping INT in pash (preventing the program from exiting on it)? 2019-11-30T03:29:24 #kisslinux Also, just as an FYI, I had a discussion before about the use of hash and type instead of command -v in POSIX 2019-11-30T03:30:23 #kisslinux Their exit codes apparently aren't as explicitly defined; command says it exits >0 if "The command_name could not be found or an error occurred.", but hash/type just say if an error occurred 2019-11-30T03:31:29 #kisslinux However, I would think it should be considered an error if hash doesn't find the command, since its use is to add it to the hash table 2019-11-30T03:31:56 #kisslinux Just an FYI 2019-11-30T03:35:02 #kisslinux Oh, and someone mentioned that hash (not type) exited with 0 in one implementation/circumstance where the command wasn't found, but no examples were given, so I'm guessing that it had a slash, which is undefined in POSIX. 2019-11-30T07:30:37 #kisslinux Crestwave: Fixed both. Thanks 2019-11-30T07:31:12 #kisslinux Someone also told me not to do: 'printf %s "$var" | gpg' as a non-builtin printf will leak the password. 2019-11-30T07:31:22 #kisslinux He recommended I use heredocs instead. 2019-11-30T07:31:26 #kisslinux But... 2019-11-30T07:31:30 #kisslinux They use temporary files. 2019-11-30T07:48:32 #kisslinux Are they plainly readable by another process, though? Is how they work even specified by POSIX? 2019-11-30T07:50:03 #kisslinux tldp says "Here documents create temporary files, but these files are deleted after opening and are not accessible to any other process", but that's Bash 2019-11-30T07:51:52 #kisslinux I don't see the problem with a system `printf` though. 2019-11-30T07:52:38 #kisslinux Also see this comment and my reply: https://old.reddit.com/r/commandline/comments/e3esvn/pash_a_simple_password_manager_written_in_posix_sh/f93wsad/ 2019-11-30T08:11:24 #kisslinux Crestwave: https://termbin.com/tfo2 2019-11-30T08:11:26 #kisslinux Thoughts? 2019-11-30T08:11:43 #kisslinux (Timeout will be configurable of course) 2019-11-30T08:12:06 #kisslinux This uses the same selection command but feeds it nothing as a means of clearing the clipboard when the timer finishes. 2019-11-30T08:38:41 #kisslinux Any reason for not using Would 'printf '' |' not be more portable? The password command is configurable and I'm unsure if they all handle /dev/null correctly. 2019-11-30T08:39:57 #kisslinux Braces could work too. 2019-11-30T08:42:06 #kisslinux Is there something that it needs to handle with /dev/null? Don't both of those just give it EOF? 2019-11-30T08:42:17 #kisslinux You're right. 2019-11-30T08:42:48 #kisslinux Fixed. 2019-11-30T08:43:09 #kisslinux See: https://github.com/dylanaraps/pash/pull/10/files#diff-426a6214d30516f30c74e9a881cec101 2019-11-30T08:47:45 #kisslinux i think the problem with a system `printf` is the arguments will show up in /proc/$PID/cmdline (and ps -ef output) 2019-11-30T08:48:38 #kisslinux Ah 2019-11-30T08:48:40 #kisslinux Noted. 2019-11-30T08:48:59 #kisslinux Nice `kill 0` trick 2019-11-30T08:49:45 #kisslinux Yeah 2019-11-30T08:49:59 #kisslinux So the question is, heredocs or the risk of system printf? 2019-11-30T08:50:59 #kisslinux See: https://trac.torproject.org/projects/tor/ticket/24755 2019-11-30T09:00:14 #kisslinux Another solution is to figure out what printing commands exist in the current shell. 2019-11-30T09:00:33 #kisslinux By parsing `type` most likely. 2019-11-30T09:03:43 #kisslinux Hang on. 2019-11-30T09:03:46 #kisslinux It doesn't leak. 2019-11-30T09:04:45 #kisslinux I changed the printf of the password to /bin/printf and inspected /proc. 2019-11-30T09:05:20 #kisslinux Even if gpg hangs waiting for input (for example), the printf won't leak the password as it executes in 0ms. 2019-11-30T09:06:30 #kisslinux There's a tiny chance that you *could* grab the password of course but I don't think it can realistically happen. 2019-11-30T09:15:01 #kisslinux i think heredoc is still slightly better, since it seems they are commonly implemented with a pipe and fork, or a temporary file created with mkstemp, so there is no window where the password is visible to other users 2019-11-30T09:16:25 #kisslinux Will do. 2019-11-30T09:28:38 #kisslinux mforney: https://github.com/dylanaraps/pash/commit/638a011f2a58a64b10ae932e57e0ae62ce765524 2019-11-30T09:28:40 #kisslinux :) 2019-11-30T09:31:44 #kisslinux nice 2019-11-30T09:47:46 #kisslinux https://github.com/dylanaraps/pash/releases/tag/2.2.0 2019-11-30T09:47:55 #kisslinux Clipboard timeout has been implemented too. :) 2019-11-30T09:49:16 #kisslinux nice 2019-11-30T09:49:36 #kisslinux can we add our own custom passwords? 2019-11-30T09:50:01 #kisslinux and what about multiline entries? 2019-11-30T09:50:35 #kisslinux qtpie: You can add your own password by running `pash add test` and selecting `n` at the prompt. 2019-11-30T09:51:27 #kisslinux i see 2019-11-30T09:51:55 #kisslinux qtpie: There's no multiline support, however pash should be 100% compatible with `pass`'s database so you can use existing entries. 2019-11-30T09:52:15 #kisslinux Support just needs to be implemented for *adding* multiline entries basically. 2019-11-30T09:52:46 #kisslinux pash is a password manager though. It's only intended to store and manage single line passwords. 2019-11-30T09:54:14 #kisslinux I use multiline entries for storing bank related data as well but I get your point 2019-11-30T09:54:33 #kisslinux shouldn't be an issue though becuase as you said it's compatible with pass 2019-11-30T09:56:13 #kisslinux Yeah, your existing entries should work just fine with pash. 2019-11-30T09:57:13 #kisslinux If it's simple to add multi-line input, I may implement it. 2019-11-30T09:57:31 #kisslinux You could also write your own code for this, see: https://github.com/dylanaraps/pash#how-can-i-extend-pash 2019-11-30T09:59:05 #kisslinux very nice 2019-11-30T09:59:47 #kisslinux dylanaraps, regarding the firefox issue, I installed FF69.0.3 on arch install and the that is stuttering as well 2019-11-30T10:00:15 #kisslinux I am starting to think it's related to video drivers 2019-11-30T10:00:57 #kisslinux Huh 2019-11-30T10:01:00 #kisslinux Interesting. 2019-11-30T10:01:07 #kisslinux I'm not using xf86-video-intel though. 2019-11-30T10:01:25 #kisslinux here https://pst.moe/paste/balqve 2019-11-30T10:01:32 #kisslinux i found some threads on r/archlinux 2019-11-30T10:03:47 #kisslinux Fixed an oops: https://github.com/dylanaraps/pash/releases/tag/2.2.1 2019-11-30T10:04:26 #kisslinux Tried the LTS kernel? 2019-11-30T10:05:58 #kisslinux nope. I don't have the time right now really 2019-11-30T10:06:19 #kisslinux btw i just installed compton/picom and the stuttering seems to be have been fixed for now atleast 2019-11-30T12:11:18 #kisslinux hey 2019-11-30T12:29:51 #kisslinux Hello 2019-11-30T12:33:26 #kisslinux dylanara1, I've been running FFv71 on KISS along with picom/compton for a couple of hours now. Didn't have any freezes so far 2019-11-30T12:33:55 #kisslinux will report If I get any freezes 2019-11-30T12:33:56 #kisslinux qtpie: Nice will try a compositor. 2019-11-30T13:38:02 #kisslinux Crestwave: https://github.com/dylanaraps/pash/pull/11/files 2019-11-30T13:38:16 #kisslinux Pure POSIX sh tree implementation (minus find of course). :D 2019-11-30T13:47:36 #kisslinux pash made it onto lobsters huh? 2019-11-30T13:50:07 #kisslinux Oops, need to fix an issue with my tree version. 2019-11-30T14:01:06 #kisslinux huh, pash looks nice, piqued my interest 2019-11-30T14:01:17 #kisslinux Thanks 2019-11-30T14:01:22 #kisslinux btw, have you heard about iwd? 2019-11-30T14:01:39 #kisslinux I have, yeah. 2019-11-30T14:01:48 #kisslinux Sadly, it has a mandatory dependency on dbus. 2019-11-30T14:02:35 #kisslinux can it run with nobus? 2019-11-30T14:03:00 #kisslinux I doubt it as iwd is built around dbus. 2019-11-30T14:03:45 #kisslinux iwd compiles fine without dbus installed fyi but it won't work at runtime as it tries to connect to the dbus daemon. 2019-11-30T14:04:02 #kisslinux i see 2019-11-30T14:04:05 #kisslinux yea, shame 2019-11-30T14:04:38 #kisslinux otherwise it looked like a pretty interesting alternative to the whatever+wpa_supplicant+dhcpcd stack when talking WiFi 2019-11-30T14:04:50 #kisslinux I just use wpa_supplicant and dhcpcd. 2019-11-30T14:05:53 #kisslinux wpa_supplicant just works 2019-11-30T14:06:01 #kisslinux so do I on KISS, yea 2019-11-30T14:06:33 #kisslinux the only thing I don't like about it is that it doesn't automatically switches to a higer priority network automatically 2019-11-30T14:06:48 #kisslinux You could package dbus and iwd and share your repository if you like. 2019-11-30T14:06:52 #kisslinux it isn't a big deal though because wpa_cli makes it easier 2019-11-30T14:07:09 #kisslinux qtpie: There might be a config option for that? 2019-11-30T14:07:55 #kisslinux I looked for it online but couldn't find one. Some guys suggested adding a 'wpa_roam' option in /etc/interfaces but this method is deprecated afaik 2019-11-30T14:08:36 #kisslinux wpa_cli isn't that bad tbh. takes me like a few seconds to change networks 2019-11-30T14:09:03 #kisslinux Tried adding 'priority=N' to each network? 2019-11-30T14:09:51 #kisslinux yes 2019-11-30T14:10:04 #kisslinux Ah 2019-11-30T14:10:21 #kisslinux I have 3 networks configured and all of them have different priorities 2019-11-30T14:16:17 #kisslinux hmm, I am poking around in the iwd source-code 2019-11-30T14:17:00 #kisslinux and the dbus functionality looks pretty isolated and pretty eloquent code 2019-11-30T14:17:30 #kisslinux Are you sure? I've tried patching the source (was a while ago) 2019-11-30T14:18:00 #kisslinux their dbus api is src/dbus.c and src/dbus.h, looks like the entire project just uses what's defined there 2019-11-30T14:18:41 #kisslinux although it is required to yeet the tests and unit tests 2019-11-30T14:18:44 #kisslinux and some tools as well 2019-11-30T14:20:24 #kisslinux huh, there's apparently some code for wired connections as well 2019-11-30T14:20:26 #kisslinux interesting 2019-11-30T14:20:52 #kisslinux Yup 2019-11-30T14:20:56 #kisslinux Supports wired too. 2019-11-30T14:21:26 #kisslinux given that it has built-in thin dhcpcd, it could be pretty interesting 2019-11-30T14:22:41 #kisslinux I will see if I can rewrite the "dbus" api to use something like unix sockets or if I can introduce a little bit of corrosion and use `ipc-channel` 2019-11-30T14:23:13 #kisslinux What's funny is that dbus uses sockets underneath. 2019-11-30T14:23:38 #kisslinux I have a feeling that we'll eventually have BUS1 in the kernel. 2019-11-30T14:24:21 #kisslinux Which *is* far better designed than dbus thanks to the anal nature of kernel critique. 2019-11-30T14:24:42 #kisslinux Also doesn't need a userspace daemon thank god. 2019-11-30T14:25:07 #kisslinux yea, anything to get rid of that pos demon 2019-11-30T14:30:20 #kisslinux damn, I really hate when packages don't list autotools as their dependency 2019-11-30T14:30:32 #kisslinux gets me everytime I try to build any AUR package 2019-11-30T14:30:43 #kisslinux Re. tree: Cool. I thought that you would need a command separator between that IFS=/ and set, though? But I haven't tried it and I'm going to go to bed so if it works, it works, I guess? 2019-11-30T14:36:02 #kisslinux Crestwave: It works. 2019-11-30T14:44:34 #kisslinux dylanaraps, an alternative to the heredoc in pash would be using awk to print an environment variable 2019-11-30T14:45:08 #kisslinux but Im not sure if /proc//environ is always only readable by owner 2019-11-30T14:45:40 #kisslinux It's not an environment variable though. We're passing a shell variable (containing the generated or inputted password) to 'gpg' to encrypt and store. 2019-11-30T14:45:41 #kisslinux dylanara1: ^ 2019-11-30T14:46:16 #kisslinux Sorry, I keep disconnecting and sometimes reconnect as this nick. 2019-11-30T14:46:17 #kisslinux pass=$pass awk 'BEGIN { print ENVIRON["pass"] }' | $gpg ... 2019-11-30T14:46:35 #kisslinux That would expand into /proc no? 2019-11-30T14:46:56 #kisslinux It's then no different to 'printf %s "$pass" | gpg'. 2019-11-30T14:47:12 #kisslinux not in cmdline, no 2019-11-30T14:48:09 #kisslinux but not sure if that is default behaviour, portable etc. 2019-11-30T14:48:57 #kisslinux Oh, I see. 2019-11-30T14:49:11 #kisslinux I read it as 'awk -v pass=pass 2019-11-30T14:49:19 #kisslinux '* 2019-11-30T14:50:09 #kisslinux heh, Im smarter than that :> 2019-11-30T14:54:47 #kisslinux Oh, I misunderstood the use of the set. I thought for some reason it would immediately get `a/b` but you use `find` so of course it's `a` then `a/b`; I should really be sleeping now. So what's happening is that it sets IFS=/ when it's on `a`, which is then utilized in the later loops. Works, but it's misleading. 2019-11-30T14:55:35 #kisslinux Huh 2019-11-30T14:55:47 #kisslinux It is a/b. 2019-11-30T14:56:07 #kisslinux the awk ENVIRON array is not POSIX apparently 2019-11-30T14:57:29 #kisslinux dylanara1: What do you mean? It does use `a/b` later, but it always iterates over `a` first, right? 2019-11-30T15:00:10 #kisslinux The entire path is split on '/' and 'shift' is then used to drop the 'a' as we need the separator count and not the path item count. 2019-11-30T15:00:48 #kisslinux Yes, but it iterates over the root first before the full path 2019-11-30T15:01:17 #kisslinux So when it's iterating over the root, it sets IFS=/ for the future iterations, which is why you don't notice anything 2019-11-30T15:01:55 #kisslinux Gotcha 2019-11-30T15:02:04 #kisslinux Will fix it. 2019-11-30T15:02:18 #kisslinux Hang on. 2019-11-30T15:02:26 #kisslinux I set '-mindepth 1' no? 2019-11-30T15:02:30 #kisslinux This skips the root. 2019-11-30T15:02:44 #kisslinux Yu 2019-11-30T15:02:46 #kisslinux Yup* 2019-11-30T15:03:22 #kisslinux By root I mean the first directory like `a` not '.` 2019-11-30T15:03:32 #kisslinux This is a "bug" then as the first 'set' will split on normal 'IFS'. 2019-11-30T15:03:55 #kisslinux But it's actually fine as the first nest level will never be deeper than a single level. 2019-11-30T15:04:01 #kisslinux Will fix it anyway of course 2019-11-30T15:04:06 #kisslinux That's what I'm saying 2019-11-30T15:04:25 #kisslinux I understand now :P 2019-11-30T15:04:38 #kisslinux (Referring to the fact that the first nest level will never be deeper than a single level) 2019-11-30T15:05:39 #kisslinux You may have been confused by the fact that POSIX sets variables set for builtins for the current environment, unlike Bash (in non-POSIX mode). 2019-11-30T15:05:49 #kisslinux Anyway, going to sleep for real now. Ciao 2019-11-30T15:05:52 #kisslinux Fixed 2019-11-30T15:05:54 #kisslinux Ciao