Skip to content

u/rofic

In this archive from Apr 2016 to Dec 2022

62
posts
105
comments
1
media
1.5k
score
3 saved before deletion

Is there any reason not to install dash since Arch by default symlinks sh to bash? dash offers better performance and is more POSIX.

I basically only write scripts in bash but will use #!/usr/bin/sh when possible (when shellcheck doesn't complain about non-sh stuff) just because it's more portable (even though I pretty much never need portability, this is apparently "good practice" as long as shellcheck doesn't complain).

Prior, as a Linux noob I was under the assumption that a simple #!/usr/bin/sh means it is POSIX-compliant as long as shellcheck doesn't complain. So this is not true and it is only POSIX-compliant if /usr/bin/sh points to a POSIX-compliant shell like dash and shellcheck doesn't complain, or is it still true?

3 points

Is there ever a case where a symlinked config is not suitable and the actual config is necessary? I seem to recall coming across such a warning for one of the configs in /etc but I can't remember which file. I am considering whether I should use stow + git for tracking config outside of $HOME (not sure how I feel about things like yadm and etckeeper which seem too much like a wrapper for git to not be worth the added complexity or potential bugs/behaviors).

1 points

Any chrony users? I'm looking to use chrony for security/accuracy (previously used systemd-timesyncd for a quick solution).

Is the example chrony.conf suitable for desktop installations? Arch does not generally touch upstream configs and just pass them for the user (so they shouldn't always assume the example configs are sensible for desktop users), right? It looks like I just need to comment out NTP servers and use NTS-supported ones instead. One can host a NTS server on their own, but I assume there is no real benefits to this since most people tend to use servers elsewhere? I can't find the one that Fedora uses (I assume that would be a decent one to reference).

Concerns are battery life (e.g. I'm sure you can configure settings to be more secure but presumably that means a trade-off for battery life--otherwise, why wouldn't you use the most secure settings available given all it's responsible for is maintaining accurate time for a desktop system).

P.S. Is the offline option for the server directive appropriate for laptops that are not necessarily always connected to the internet?

1 points

I want to find all Electron-based apps installed on my system. I do pacman -Qi electron and it tab completes to electron4. Install Reason says it's installed as a dependency for another package but the Required By shows no apps.

Does this mean it's only a build dependency? Does this mean I have no Electron apps? I use signal-desktop, which I thought was Electron-based. I want to know which applications I'm using that are Electorn-based so I can define --enable-features=UseOzonePlatform --ozone-platform=wayland (I know I can define them for all apps via a config file but I'm just curious).

2 points

I see why I got the impression it was running on each package--the script sends a signal to waybar to update the count, which will call the script again, which will send a signal to waybar, and repeat. Added an argument to the script that exits without sending the signal for waybar to use.

Thanks.

1 points

Can you do tabs or open windows in pre-defined direction like i3wm? Is there an equivalent of a scratchpad for quickly bringing up a window and then hiding it back? Those seem like useful features but last time I looked in bspwm (many years ago) it didn't have these features. Maybe there's there's alternative approaches bspwm does.

1 points

I assume you're 2 ft from the monitor? I think you would prefer 2 27" 1440p screens or even an ultrawide as they don't need scaling and offer comparable screen real estate. I'm thinking of 16:10 or 21:10 aspect ratios too for the vertical space.

1 points

/proc/spl/kstat/zfs/arcstats:

c                               4    2616545728
c_max                       4    4152233984
size                            4    2604691792

How should I interpret this? Also curious if it's practical or meaningful to exclude cache memory when determining how much RAM is used for the user. For example, it's nice that unused memory is used for cache, but it might be generally more important to know how much free RAM is available to claim by applications (unless used cache is not released fast enough for applications to use immediately when needed).

At the moment, I don't really have a good way of knowing if an instance of an application will exceed my RAM usage so I've been a lot more conservative on how many instances I'm running. I suppose swap serves as a buffer in this case and I can monitor that instead? Slow performance probably means swap is used and that should be my indication of restricting the number of instances of running apps.

Or I could lower the cache limit, which is of course not ideal since unused memory is wasted.

1 points

I'm currently considering either nnn or lf as my file manager for a more performant alternative to ranger.

  • Previews are important (seeing contents of a directory when the cursor is on it) and it looks like nnn recently supports this. I've just tried preview-tui and performance seems to be pretty bad--there's 1-2 seconds delay to show the contents of the directories as well as the contents of text file.

In comparison, lf's previews have no delay whatsoever and at most there's a 1 second delay when loading a massive media directory.

Is anyone else experiencing this? The previews are running on my alacritty terminal and I've tried to get tmux working (it is installed) to see if it would make a difference, but it refuses to use it for some reason. I'm on Arch Linux.

  • Because lf has ranger-style multi-column display, traversing through directories 1 step at a time seems to be more fluid. Knowing the contents of the parent directory and the subdirectory of the current directory seems essential--is there a way reason why nnn avoids this seemingly superior design? I know nnn has some strict philosophy to keep it the Unix way (to be fair, lf does too) and I'm asking this as a humble noob.

I want to give nnn a real shot as it seems significantly more popular than lf, which itself is not that important but it looks like the framework is better designed and more plugins are available as a result. Also, nnn is in the default repo and I would need to compile lf every time there's an update on Arch (not that big of a deal).

/u/sablal

1 points

Is it possible to toggle transparency of e.g. terminal window? I think compton is intended to run in the background and not really intended to be started/stopped, so I guess having 2 config files (one with transparency enabled and one without) and replacing symlinks to ~/.config/compton.conf then restarting compton is not ideal.

A better option (not tested) might be to have a script which launches a transparent window (set terminal window name to one that triggers transparency) if a /tmp/transparency_on file exists and deletes that file. Then running it a second time will see that this file does not exist and launch the terminal window with a window name that does not trigger transparency.

Is there an obvious and/or simpler way to accomplish this?

0 points

Wasting space of majority just so that minority won't "waste" cpu cycles on double compression is silly.

I'm not suggesting the defaults be changed at all. I'm just asking if disabling OS compression to let transparent compression handle it from the filesystem is ideal for Arch users of ZFS. The Arch Wiki typically provides or recommends optimizations for setups where possible, but ZFS is (understandably) not that popular with Arch and some information seems to be lacking for those who run it on root.

12 points

You could, but you couldn't enforce it being read only to root (i.e. pacman).

What makes bind mounting /home/custompkgs to /var/cache/pacman/custom and making /var/cache/pacman/custom read-only enforceable to root (i.e. pacman) as opposed to just making varcache/pacman/custom then?

keep everything nicely and tidily below $HOME

Is keeping user-built packages under $HOME more conventional/appropriate than e.g. /var/cache/pacman/custom? I was surprised the example in the man used /home/custompkgs.

Lastly, which method do you prefer--add repo path as second CacheDir and setting CleanMethod = KeepCurrent where a careless pacman -Scc could wipe everything or using a bind mount which would cause pacman -Scc to fail(?)? The differences aren't significant and mostly preferential but I'm just curious.

Thanks and nice tip with the local rebuild naming scheme.

2 points

Keyboard shortcuts

Move and act

jork
Next / previous post or comment
Enteroro
Open the post
f
Open the media viewer
s
Save
h
Hide (the toast has Undo)
Tab
Right after an action: the toast's Undo
x
Collapse the comment
v
Next layout: cards, compact, grid

Go to

/
Search
gthenh
Home
gthena
All
gthens
Subreddits
gthenl
Library
?
This list
Esc
Close a menu or this list

In the viewer

←or→
Previous / next file
↑or↓
Previous / next post
korj
Previous / next post
Space
Play / pause
m
Mute
z
Zoom
s
Save
o
Open the post (on its own page: back to it)
Esc
Close

Keys do nothing while you type in a box.