You should not need to name the script package-updates.sh. It's fine to do so as long as you use the same name in the config file, but unnecessary. The shebang at the top of the script itself determines what shell it will be executed with.
I've also included updated versions of two of the files below. I believe the original versions will still work but the polybar-msg syntax is technically deprecated.
For a Systemd user service to interact correctly with the notification daemon, you will need to either source /etc/X11/xinit/xinitrc.d/50-systemd-user.sh or just add the following lines to your .xinitrc:
Checkout xpub if you need to do the same thing from a system service or udev rule instead. I mention udev because that would be preferable to a polling based approach if your battery supports the correct events.
It's smaller and simpler. sudo actually has a ton of features that most people don't make use of. In theory, this means the potential attack surface is a lot bigger. For what it's worth though, I think doas takes its minimalism a bit too far. Some of sudo's supposed 'bloat' is actually pretty useful. Specifically, I miss the timestamp_timeout and pwfeedback options.
Ah, I do have one gripe with the experience. The CLI insists on creating files with Windows line endings so I always have to run dos2unix over a project before I can start :(
Avalonia. I remember trying it a couple years ago and not even being able to get one of the demo apps to build properly. This time (~3 months ago) things pretty much worked out of the box. Only issue I had was the open file dialog missing some features I was used to.
I write CLIs and web apps with F# and .NET Core on Arch. I've generally had a good experience with it. I've also dabbled with Avalonia.FuncUI and while there were definitely some issues that would prevent me from using it on a larger project for now, I was pleasantly surprised at how straightforward it was to get a .NET GUI running on Linux.
I think the difference is in the defaults. In Windows, programs will autostart themselves by default. You either have to add a program to you init script, enable a service, or install something implementing the XDG Autostart specification on Arch. There's arguments to be made in favor of both approaches, but I personally prefer the control that comes with Arch's more manual approach.
Build 19041. Having the ability to set the time for updates is a great feature for people who want automatic updates. You have to leave at least a 6 hour time frame open though, so if Windows wants to update it's gonna do it.
I know about the settings you mentioned, but they don't actually apply to all updates. Unless they've changed it in the last couple of years you can only pause updates for 35 days and even then Windows might still automatically reboot for certain security updates. You can use group policy to actually stop automatic updates but that only works if you have a pro version of Windows.
Back when I was a regular Windows user I also tried to do my updates in a timely manner by manually checking for them...then I found out that Microsoft actually tracks whether users push the check for updates button or not. Those who do will have certain updates rolled out sooner than general users, essentially making you part of a beta program you didn't knowingly sign up for.
Windows restarted the machine while the program I was debugging was still running because it wanted to do updates and gosh darn it knows better than me. It booted into Arch. Then I restarted and logged into Windows.
I agree with your point on login managers. They add so much extra complexity that just isn't needed on a single user system. startx from the console is the way to go. You can even make it run automatically from your shell's startup script depending on which TTY you've logged in on.
I don't actually make backups as often as I probably should. Every week or two I'd say. I'd set the script up to run on a timer, but this is a laptop, so I don't actually have the external hard drive connected most of the time. rsync makes it quite easy to transfer files over the network though, so I've considered connecting the hard drive to a Raspberry Pi and running my backups over the network. I'd have to see how long they took though. At any rate, I don't worry about it too much because 90% of what I do on my laptop is surfing the web or programming, so most of the stuff I care about is synced with my GitHub anyway.
You never need to do a full backup after the first time. The script is using hard links, so files that haven't changed show up in each backup folder but don't take up any additional space. The only real files in each backup are the ones that have changed. The previous versions of those files are still available as well unless you go out of your way to delete them. The same is true for deleted files; they are still accessible unless you delete all the backups that referenced them. I also want to clarify that the backup is incremental, but not the files themselves. What I mean is that each backup only copies files that have changed. However, the whole file is copied each time. So the entirety of SOME_FILE (version A) and SOME_FILE (version B) are both stored on the external hard drive, not the diff between the versions. That's why there's no real point in creating a new full backup unless you're pressed on space and want to remove files that no longer exist on your computer from the backup as well. Hopefully that makes sense, the semantics of hard links can be a bit difficult to grasp at first.
I keep separate branches of my dot files for each machine I use. That way I can track the differences in configuration depending on what I'm using that device for. I can also make changes on one machine and easily propagate them to others by pulling and merging.
Sometimes I come across something that looks silly and I can't figure out why I did things that way. I can look through my commit messages to see what the context was (perhaps I was working around a bug in some program). Also, there are times when I make a change which I end up not liking. Git makes it easy to revert my config files to a previous state.
Subscribe to arch-announce to get a heads up on updates that require manual intervention. Install mlocate and then run locate pacnew after an update to find any config files you need to tend to. rsync is a very flexible tool you can use to transfer files or create backups. I use this script to create incremental backups of my home directory to an external hard drive.
#!/bin/bash
dir="/mnt/seagate/snapshots/"
date="$(date --iso-8601=seconds)"
lastBackup="$dir/last"
newBackup="$dir/$date/"
mkdir -p "$XDG_DATA_HOME/rsync"
# Errors can be found by grepping for 'rsync:' in log file
t0="$(date +'%s')"
rsync \
--archive \
--partial \
--info progress2 \
--human-readable \
--link-dest="$lastBackup" \
--log-file="$XDG_DATA_HOME/rsync/log" \
--filter "-/ $XDG_CACHE_HOME/" \
--filter "- .local/bin/" \
--filter "- .local/lib/" \
--filter "-/ $XDG_DATA_HOME/Trash/" \
--filter "-/ $XDG_DATA_HOME/manga/*/*/" \
--filter "-/ $HOME/videos/" \
--filter "-/ $XDG_DATA_HOME/gallery-dl/" \
"$HOME/" \
"$newBackup"
rm -f "$lastBackup"
# Use a relative link
ln -s "$date" "$lastBackup"
t1="$(date +'%s')"
dt="$(bc <<< "($t1 - $t0) / 60")"
notify-send --expire-time 0 "Backup completed in $dt minutes."
You could also use a file system with built in snapshotting like Btrfs. I keep all my configuration files under source control with git. I additionally keep a list of all explicitly installed packages on my system as well as customizations to system configuration files here. It contains a script which is more or less capable of rebuilding my system from the ground up. It doesn't handle the installation, just the post-install configuration. etckeeper and aconfmgr are two tools which try to automate system level configuration tracking. Neither of them fit my needs exactly, but they might work well for you. Another useful tool is downgrade which can be used to restore a previous version of a broken package.
A few more tips. Consider keeping an LTS version of the kernel installed as kernel updates do sometimes cause problems with certain hardware. Also keep a flash drive with the Arch Linux ISO or a system rescue distro on hand so that you can fix things in situations where your computer won't boot. I've also found systemd-boot to be much simpler and less error prone than GRUB for boot loading, but that's just my two cents. When you think an update broke your system, look through /var/log/pacman.log to find what has changed recently. Start at the end and work backwards. Also make good use of systemctl status and journalctl to diagnose failing services.
Although it's definitely possible to screw things up, there should very rarely if ever be a situation that requires you to wipe your hard drive and reinstall Arch. Assuming you follow the manual interventions mentioned on the mailing list, most broken things will be the result of a change you made somewhere that doesn't take effect until you restart. I've shot myself in the foot plenty of times. But tracking down the source of the problem and figuring out how to fix it will help you learn more about how your system actually works, so I thinks it's worth it in the end.
The icon issue is probably because Nerd Fonts moved the material design icons to different code points. See the release notes for more details: https://github.com/ryanoasis/nerd-fonts/releases/tag/v3.0.0.
You should not need to name the script
package-updates.sh. It's fine to do so as long as you use the same name in the config file, but unnecessary. The shebang at the top of the script itself determines what shell it will be executed with.I've also included updated versions of two of the files below. I believe the original versions will still work but the
polybar-msgsyntax is technically deprecated.~/.config/polybar/config
/etc/pacman.d/hooks/polybar.hook
wireplumber is a more advanced replacement for pipewire-media-session. You can only use one or the other.
For a Systemd user service to interact correctly with the notification daemon, you will need to either source
/etc/X11/xinit/xinitrc.d/50-systemd-user.shor just add the following lines to your.xinitrc:Checkout xpub if you need to do the same thing from a system service or udev rule instead. I mention udev because that would be preferable to a polling based approach if your battery supports the correct events.
It's smaller and simpler.
sudoactually has a ton of features that most people don't make use of. In theory, this means the potential attack surface is a lot bigger. For what it's worth though, I thinkdoastakes its minimalism a bit too far. Some ofsudo's supposed 'bloat' is actually pretty useful. Specifically, I miss thetimestamp_timeoutandpwfeedbackoptions.I use polybar and Discord will show the badge when I get a notification but then it just stays there forever even though I've viewed the message.
I'm experiencing the same. Chrome won't work but Firefox is fine.
Ah, I do have one gripe with the experience. The CLI insists on creating files with Windows line endings so I always have to run
dos2unixover a project before I can start :(dotnet 5 and previews of 6 are in the AUR.
Avalonia. I remember trying it a couple years ago and not even being able to get one of the demo apps to build properly. This time (~3 months ago) things pretty much worked out of the box. Only issue I had was the open file dialog missing some features I was used to.
I write CLIs and web apps with F# and .NET Core on Arch. I've generally had a good experience with it. I've also dabbled with Avalonia.FuncUI and while there were definitely some issues that would prevent me from using it on a larger project for now, I was pleasantly surprised at how straightforward it was to get a .NET GUI running on Linux.
Honestly XFCE and Cinnamon both feel closer to the classic Windows 7 desktop experience I grew up with than Windows 10 does.
I have plenty of beefs with systemd, but its speed has never been one of them.
I think the difference is in the defaults. In Windows, programs will autostart themselves by default. You either have to add a program to you init script, enable a service, or install something implementing the XDG Autostart specification on Arch. There's arguments to be made in favor of both approaches, but I personally prefer the control that comes with Arch's more manual approach.
Build 19041. Having the ability to set the time for updates is a great feature for people who want automatic updates. You have to leave at least a 6 hour time frame open though, so if Windows wants to update it's gonna do it.
I know about the settings you mentioned, but they don't actually apply to all updates. Unless they've changed it in the last couple of years you can only pause updates for 35 days and even then Windows might still automatically reboot for certain security updates. You can use group policy to actually stop automatic updates but that only works if you have a pro version of Windows.
Oh, god, I noticed that too. Stupid little warning icon in the taskbar.
Back when I was a regular Windows user I also tried to do my updates in a timely manner by manually checking for them...then I found out that Microsoft actually tracks whether users push the check for updates button or not. Those who do will have certain updates rolled out sooner than general users, essentially making you part of a beta program you didn't knowingly sign up for.
Windows restarted the machine while the program I was debugging was still running because it wanted to do updates and gosh darn it knows better than me. It booted into Arch. Then I restarted and logged into Windows.
No, arch is my first option. I guess it would have been more accurate to say that windows restarted the computer.
Yeah, muscle memory is hard to fight. Super+N for each workspace versus Alt+Tab to switch windows really threw me for a loop.
It's not dumb. And the answer is no. You have to pass the
--develflag or setdevelto true in the config file.I agree with your point on login managers. They add so much extra complexity that just isn't needed on a single user system.
startxfrom the console is the way to go. You can even make it run automatically from your shell's startup script depending on which TTY you've logged in on.I don't actually make backups as often as I probably should. Every week or two I'd say. I'd set the script up to run on a timer, but this is a laptop, so I don't actually have the external hard drive connected most of the time.
rsyncmakes it quite easy to transfer files over the network though, so I've considered connecting the hard drive to a Raspberry Pi and running my backups over the network. I'd have to see how long they took though. At any rate, I don't worry about it too much because 90% of what I do on my laptop is surfing the web or programming, so most of the stuff I care about is synced with my GitHub anyway.You never need to do a full backup after the first time. The script is using hard links, so files that haven't changed show up in each backup folder but don't take up any additional space. The only real files in each backup are the ones that have changed. The previous versions of those files are still available as well unless you go out of your way to delete them. The same is true for deleted files; they are still accessible unless you delete all the backups that referenced them. I also want to clarify that the backup is incremental, but not the files themselves. What I mean is that each backup only copies files that have changed. However, the whole file is copied each time. So the entirety of SOME_FILE (version A) and SOME_FILE (version B) are both stored on the external hard drive, not the diff between the versions. That's why there's no real point in creating a new full backup unless you're pressed on space and want to remove files that no longer exist on your computer from the backup as well. Hopefully that makes sense, the semantics of hard links can be a bit difficult to grasp at first.
I keep separate branches of my dot files for each machine I use. That way I can track the differences in configuration depending on what I'm using that device for. I can also make changes on one machine and easily propagate them to others by pulling and merging. Sometimes I come across something that looks silly and I can't figure out why I did things that way. I can look through my commit messages to see what the context was (perhaps I was working around a bug in some program). Also, there are times when I make a change which I end up not liking. Git makes it easy to revert my config files to a previous state.
Subscribe to arch-announce to get a heads up on updates that require manual intervention. Install
mlocateand then runlocate pacnewafter an update to find any config files you need to tend to.rsyncis a very flexible tool you can use to transfer files or create backups. I use this script to create incremental backups of my home directory to an external hard drive.You could also use a file system with built in snapshotting like Btrfs. I keep all my configuration files under source control with
git. I additionally keep a list of all explicitly installed packages on my system as well as customizations to system configuration files here. It contains a script which is more or less capable of rebuilding my system from the ground up. It doesn't handle the installation, just the post-install configuration.etckeeperandaconfmgrare two tools which try to automate system level configuration tracking. Neither of them fit my needs exactly, but they might work well for you. Another useful tool isdowngradewhich can be used to restore a previous version of a broken package.A few more tips. Consider keeping an LTS version of the kernel installed as kernel updates do sometimes cause problems with certain hardware. Also keep a flash drive with the Arch Linux ISO or a system rescue distro on hand so that you can fix things in situations where your computer won't boot. I've also found
systemd-bootto be much simpler and less error prone thanGRUBfor boot loading, but that's just my two cents. When you think an update broke your system, look through/var/log/pacman.logto find what has changed recently. Start at the end and work backwards. Also make good use ofsystemctl statusandjournalctlto diagnose failing services.Although it's definitely possible to screw things up, there should very rarely if ever be a situation that requires you to wipe your hard drive and reinstall Arch. Assuming you follow the manual interventions mentioned on the mailing list, most broken things will be the result of a change you made somewhere that doesn't take effect until you restart. I've shot myself in the foot plenty of times. But tracking down the source of the problem and figuring out how to fix it will help you learn more about how your system actually works, so I thinks it's worth it in the end.
Great to hear you figured it out.