NEVER lose dotfiles again with GNU Stow

  Рет қаралды 58,797

typecraft

typecraft

Күн бұрын

Пікірлер: 212
@Nuada2723
@Nuada2723 5 ай бұрын
Usually you provide better explanations that are more clear and accurate. This might provide a little clarification for some: Early on you mix concepts of stow and git and use them almost interchangeably, which isn't at all how they work. Stow and git are two separate tools. Symlinks are not what allow you to push changes to your GitHub repo, that's just git. You describe symlinks in a way that implies data is copied and both sets of data are simply mirrored/synchronized, but you earlier correctly described symlinks as pointers. You aren't changing the symlink when you edit it in vim, you're only changing what the symlink points to. Stow doesn't care what you call things. That's dependent on the package/application. You also don't need the "package" subdirectories in your stow source directory. The target to place symlinks is not your home directory. The default target is the parent directory from where you ran stow. This feels like just a longer version of DreamsOfCode/DreamsOfAutonomy video on stow.
@bassamsaleh8034
@bassamsaleh8034 5 ай бұрын
would you please elaborate with example regarding the target to place symlinks (like for nvim config)?
@Shizaru2723
@Shizaru2723 5 ай бұрын
@@bassamsaleh8034 Sure. Stow's default behavior is to place symlinks in the parent directory of wherever you choose to run the "stow" command. When you feed stow the directory you want symlinks for, in this case the nvmin "package directory" as typecraft called it in the video, it will create symlinks for everything within that folder, and place them in the parent folder of your current location. So let's say I start out when I log in at my home directly (~)... I would then cd to where my dotfile repo is stored, which when using stow defaults should be in your home directory (because it will place things in the parent directory remember). cd .dotfiles stow nvim this will place symlinks for everything in the nvim directory in my home directory. It follows the same directory structure that you have in the nvim directory. Notice in the video that most of typecraft's "package" directories have everything in them in a .config directory. This is because the respective application expects its configuration files to be in ~/.config. So stow makes symlinks for everything in nvim in your home directory, and anything in the .dotfiles/nvim/.config/ directory goes into ~/.config/ You can simplify this process a bit by not using the "package" directories within your .dotfiles directory/repository. You have a bit less granular control over selecting which files get copied by default, but instead of running stow dirName for everything, you can just run stow . to symlink everything in .dotfiles all at once. You can of course modify stow's behavior with flags and configuration settings, etc so you don't have to set things up exactly like typecraft or I have described. It's just a bit simpler to use the defaults and have one less thing you need to configure or remember what flags you need when you may not use it that often. It's a lot easier to remember if you keep it simple. I hope that helped your understanding. If you have any more questions, feel free to ask and I'll try my best to answer them thoroughly.
@bassamsaleh8034
@bassamsaleh8034 5 ай бұрын
@@Shizaru2723 Thanks a lot, that indeed clarify things especially the parent dir thing when calling stow.
@insidemordecai
@insidemordecai 5 ай бұрын
Dream of Autonomy's videos was pretty great. I personally learnt about it about 2 years ago through Jake Wiesler's video. It was informative, well researched and if I remember he had the same guide on his blog for those who prefer to read.
@zwerko
@zwerko 5 ай бұрын
Also, one does not need stow to disseminate their dot file configs across machines, git is perfectly capable of doing that without symlinks. What stow allows, in such a setting, is to keep a set of configs that you can choose to stow or not, in the same repo, targeting the same set of directories. I personally don't have a need for such granularity and I've been syncing my home folder across machines via git for more than a decade, never once utilizing stow for that...
@xiiniius2716
@xiiniius2716 5 ай бұрын
Im just obsessed with your youtube channel
@cprn.
@cprn. 2 ай бұрын
The issue with `stow` is that it's an extra dependency, and while you don't even need `git` to download a repository and `unzip` is guaranteed to come with every distro, the probability of `stow` being already installed is next to zero. Since you cannot guarantee `stow` availability, you need to download it every time or keep it as a binary in your dotfiles repo, both are meh. And to have a true one-command-install of your entire environment, you still need a custom script that calls it underneath. Not only that, but said script should also ask for credentials to gain access to your private repository, because a real life setup requires two - one for general config files, and a separate one for secrets (e.g. API & SSH keys). Depending on how you store voulnerable data, symbolic link might not be an option. At this point, `stow` becomes a constraint, and it's easier to just write a function or two to replace it.
@Hid4ri
@Hid4ri Ай бұрын
what is a better alternative so you can do a one command install of all your files? this is all new to me and I am learning so sorry in advanced for the stupid question.
@cprn.
@cprn. Ай бұрын
@@Hid4ri As I said in the comment. A custom script. You need it for `stow` any way (unless you want to call things like `wget`, `git` or `zip` by hand every time), so why not just make it do everything you want. It's the most flexible solution, writing it is fun, and you end up with something you know thoroughly and deeply - no guessing what the author of a yet another 3rd party tool had in mind. And when you do write it, it turns out `stow` is a very small step of the entire bootstrapping process you've created. So small, you can actually replace it with a few lines of your own code, and guarantee yourself a smooth experience on systems that don't come with `stow`. Which is like 99% of all distros.
@Hid4ri
@Hid4ri Ай бұрын
@@cprn. ah ok cool. So is using chezmoi like I am seeing others talk about, like an better advanced way of doing this and running scripts? especially useful if you are deploying to different machine types like a laptop and desktop?
@cprn.
@cprn. Ай бұрын
@@Hid4ri I never used `chezmoi`, but I can imagine it's something you have to script anyway to do what you want. IMHO, just learn `git` (which is a useful tool for a spectrum of cases, not just keeping your environment the same on every machine) and write a simple script that downloads your repository of files and puts them where the operating system and the software you use expect them to be. This way, when in a pickle on a new environment, you just need to run that one script to pull and set up everything for you, and you don't even need `sudo` access (which you might not have as a mere user).
@KevinVinck
@KevinVinck 2 ай бұрын
One important thing I don't think you mentioned is that stow by default does not put the symlinks in your home directory, it puts them in the parent directory of the current directory. You just happened to have your dotfiles directory in your home directory. But I put mine in ~/git/dotfiles and couldn't figure out why running stow nvim wasn't linking them in my home directory until I read the stow docs.
@abhijeetbodas2001
@abhijeetbodas2001 7 күн бұрын
To be more explicit, the exact option is "stow -t ~ nvim" This will use the home directory irrespective of wherever you are stowing from
@LinuxEssentials79
@LinuxEssentials79 5 ай бұрын
By the way, with all my L❤VE for your work, at 6:42 you mention that the "-l" flag of the "ls" command will show links. Precisely, the "-l" flag of the "ls" command will display a long listing format, in which we will have the permission string as well as a lot more information. 😉
@sp3ctum
@sp3ctum 5 ай бұрын
This is a really cool setup. I set up the exact same thing and it works perfectly - literally have had 0 issues.
@drumpf4all
@drumpf4all 4 ай бұрын
This is the most concise and well explained video on Gnu/Stow I have ever seen. Thank you.
@art3m_t1mofeev
@art3m_t1mofeev 5 ай бұрын
With nix, you don't have to manage your dotfiles separately, nor use any additional tools. Everything related to your OS setup is neatly located in one place, written with same language and uses one tool (though with home-manager addon, and optionally something like agenix if you need secret management).
@mtgmonkey9657
@mtgmonkey9657 3 ай бұрын
w NixOS! With flakes ofc
@ziggyshea
@ziggyshea 5 ай бұрын
I can see the advantage of the more granular control that the package naming approach would give you, but I've found that (for me), just breaking my dotfiles folder into target hardware folders works best. For example, my desktop is running KDE, but my laptop is running Hyprland, so in my dotfiles folder i have a "desktop" folder and a "laptop" folder which each have the config files unique to them, and then a "common" folder for config files that are the same for both (such as neovim and tmux). Then I just run "stow common", and "stow laptop" or "stow desktop" depending on what machine I'm using.
@misterkite
@misterkite 3 ай бұрын
I made a Makefile that calls stow as well as git pull, etc. It would be trivial to make custom targets.
@ziggyshea
@ziggyshea 3 ай бұрын
@@misterkite yeah lately I've been considering doing something like that. I realized that if I get a Macbook from work, I'd probably just want my tmux and nvim configs, which my current setup doesn't really support easily.
@Sin-cy
@Sin-cy 5 ай бұрын
This video explains it so well with the examples that make sense. I had to understand this stow thing on my own going through so many symlinks mistake which was so terrible. This video is gonna help so many people getting into GNU stow. Great vid for sure !!!
@sotiriosmantziaris6097
@sotiriosmantziaris6097 5 ай бұрын
Have you tried chezmoi? not as simple as stow but with templating support
@mattwilcoxuk
@mattwilcoxuk 5 ай бұрын
Started using Stow a few weeks ago. Love it. Great thing to be introducing people to.
@MattBidewell
@MattBidewell 4 ай бұрын
top tip you can use a target path for stow For example, Imagine you have a config repo like and a Mac source machine: gitrepo:config ├── vscode │ └── settings.json The command: stow -t ~/Library/Application\ Support/Code/User vscode Will add a sym link in your vscode user settings directing to your settings.json thats held in your git repo! VScode is a bad example as it's a repo that allows for cross device setting management, but the same logic can be applied to most other apps with customisable settings.
@CalvinB_
@CalvinB_ 5 ай бұрын
I just use a basic gitrepo with a simlink bash script, and I find that works just fine. Bit of a DIY solution but simple and reliable.
@kurshadqaya1684
@kurshadqaya1684 5 ай бұрын
So do I.
@jaimeFaithBasedOne
@jaimeFaithBasedOne 4 ай бұрын
I use the python pip ‘dotfiles’ package with git for versioning and syncthing to keep things synced between computers
@theesquag
@theesquag 5 ай бұрын
chez moi is bit more intricate but the templating makes it a lot stronger if you have os dependent configs
@christinwhite4876
@christinwhite4876 5 ай бұрын
Yeah, I recently switched to it and it's fantastic, I love the password manager integration too so I never have to worry about accidently pushing secrets to my repo.
@ilyeshammadi7278
@ilyeshammadi7278 5 ай бұрын
GNU Stow is nice, but Chezmoi is far more superior for dotfiles management in my opinion.
@Reducer
@Reducer 5 ай бұрын
Yeah, +1 for Chezmoi. The only downside is that I ended up not having my nvim directory in there but as a separate repo instead, given how frequently it's modified and it is a little bit of a hassle to `chezmoi add` changed stuff. But for files that aren't changed that frequently, chezmoi is awesome.
@xalium
@xalium 5 ай бұрын
If it’s just modified, I usually just run ‘cz re-add’ without specifying any dirs
@Reducer
@Reducer 5 ай бұрын
Aha! TIL.
@dimus63
@dimus63 2 ай бұрын
I use chezmoi for several years, love it
@hotlinefrenzy
@hotlinefrenzy Ай бұрын
I am noob. what's the difference with stow?
@TheSaltMine
@TheSaltMine 4 ай бұрын
yesssss oh man you made this whole setup SO much easier to understand, thank you! I've been enjoying your other videos, and I'm really glad you talked about this.
@CristianHeredia0
@CristianHeredia0 5 ай бұрын
Arch + stow is slippery road to NixOS + home manger. I’m looking forward to seeing that.
@mtgmonkey9657
@mtgmonkey9657 3 ай бұрын
w NixOS! Don't forget flakes
@homeape.
@homeape. Ай бұрын
nixos mentioned
@Caminante-blanco
@Caminante-blanco 5 ай бұрын
This is why text configuration files are superior
@benbrastmckie
@benbrastmckie 5 ай бұрын
It’s a bit more of a commitment than just installing software but I feel like NixOS would fit well with this channel. The home manager for dot files is amazing. I prefer that to configuring NeoVim in Nix though that is an option.
@GoldenBeholden
@GoldenBeholden 5 ай бұрын
I've used NixOS for almost a year now, but never got into HomeManager because I don't understand the point. Is it just putting all the dotfiles into a single file, or is it doing something special?
@simquinoa2030
@simquinoa2030 5 ай бұрын
Don’t worry he’ll eventually arrive at Nix. It’s a pipeline
@simquinoa2030
@simquinoa2030 5 ай бұрын
@@GoldenBeholdenwell getting your dot files set up is just one part of setting up your system. Home manager can go much farther including setting up your git config, or better yet, installing all of the programs your dotfiles rely on (In non nix os context)
@solvecode
@solvecode 5 ай бұрын
I've been so inspired by your that I made my first video myself. You made it so simple to use arch, i3, nvim, tmux And im eveusing catppuccin. Thanks for your efforts! Also commented on "why i love programming" but I guess you dont view comments on old vids 😅
@abdulalimmahir
@abdulalimmahir 5 ай бұрын
I could've been a nerd but you abundant that series.
@bigl9527
@bigl9527 5 ай бұрын
Next: Never loose your system again with NixOS
@Rednunzio
@Rednunzio 5 ай бұрын
very interesting because I was about to do something similar by hand but if I understand correctly you could have problems if you use it with computers that for some reason (macOS Linux distro) have different positions of the various dot files. Right ?
@_svnset
@_svnset 5 ай бұрын
Next level: Maintaining a small ansible project to bootstrap not only dotfiles but entire system configurations. Doing that for a few years now on all of my private systems, never looking back. If you keep the playbooks/roles modular you can easily choose between just updating dotfiles, installing base-packages etc. I just use plain git with a simple config file that ansible reads to know which dotfiles to take care of, but you can easily use stow or any other dotfile handling tool with ansible as well.
@gadgetboyplaysmc
@gadgetboyplaysmc 5 ай бұрын
Found you because of Anthony GG. What camera do you use man? It's pretty goood.
@loutrea
@loutrea 5 ай бұрын
Using `stow` since a year. So neat and so simple, so GNU.
@DarrylHebbes
@DarrylHebbes 5 ай бұрын
How would this differ to bash script with a set of symlinks committed to git?
@noahjoyner8232
@noahjoyner8232 5 ай бұрын
it doesn't really, it just automates it. it includes a variety of command line arguments that negate the tedium of having to write a script, which he really did not go into in this video
@Dronkwors97
@Dronkwors97 5 ай бұрын
This is very easy and useful. Thanks for simplifying it to us noobs
@Alex_online
@Alex_online 5 ай бұрын
Just use nix and home manager. I use it to manage my work Mac, my NixOS desktop, my Ubuntu WSL instance, and my NixOS home server. One config, 4 machines.
@benarcher372
@benarcher372 5 ай бұрын
I have started using Stow! Works fine
@DJRanoia
@DJRanoia 5 ай бұрын
Reminder to push your dotfiles to your gitgub. My favorite new way to push and and pull them to other devices. On top of that I do, dotfiles/common or dotfiles/mac or dotfiles/Linux depending on the app
@noahjoyner8232
@noahjoyner8232 5 ай бұрын
I advocate for sharing your dotfiles publicly, but I wouldn't say "reminder". There are multiple ways to deploy git servers that are more private and secure than GitHub... there are competitive reposit sites, but I recommend self hosting a git server... It's really easy
@Malix_Labs
@Malix_Labs 4 ай бұрын
Waiting for your transition to nix's home-manager in a few
@ficolas2
@ficolas2 5 ай бұрын
Am I weird if I just have a git repo, and two scripts, one to install software and another one to set up symlinks?
@minecraftpufferfish9066
@minecraftpufferfish9066 28 күн бұрын
No. It's a simple and reliable solution 👍
@-abhinab
@-abhinab 5 ай бұрын
I have a question, is it similar to Docker if yes, why should I prefer GNU SNOW over Docker
@WinterSchwartz-q2j
@WinterSchwartz-q2j 5 ай бұрын
I kid you not I was just about to do this and I saw this video. This is a sign to actually get around to doing this!
@hadfgjkserwihuy
@hadfgjkserwihuy 3 ай бұрын
McConaughey from true detective talking about gnu stuff.
@typecraft_dev
@typecraft_dev 3 ай бұрын
hah!
@xdevchris
@xdevchris 5 ай бұрын
Personally, I put all files in the root of my dotfiles repository, and add a stow ignore file. this way I just have to run stow . and not on every folders, this is much cleaner as we can put everything in the .config folder
@115breno
@115breno 22 күн бұрын
so you're just cloning your repo and symlinking the dotfiles?
@_Holy_Lance_
@_Holy_Lance_ 5 ай бұрын
Stow seems to be minimalistic and simple, which is good, but what about chezmoi?
@typecraft_dev
@typecraft_dev 5 ай бұрын
I’ll have to check it out!
@_Holy_Lance_
@_Holy_Lance_ 5 ай бұрын
​​@@typecraft_dev Thank you, I have read (a little) more about chezmoi and even though it seems to be a more complete/versatile solution, I will use gnu stow, it's simpler and does exactly what I need.
@restagner99
@restagner99 5 ай бұрын
Great demonstration of stow. I used to use stow, but recently transitioned to yadm. Why? Well yadm offers me more of the features I need -- like file encryption
@jjpp1993
@jjpp1993 3 ай бұрын
I don't remember if you mentioned this at some point. but the dotfiles directory has to be in $HOME
@evgensilkov2340
@evgensilkov2340 5 ай бұрын
Name of the program behind your shoulders at 1:31 is awesome
@gmabber
@gmabber 5 ай бұрын
Great video! I finally got around to using stow and it's awesome!
@_PulpoPaul
@_PulpoPaul 5 ай бұрын
Your channel is amazing
@typecraft_dev
@typecraft_dev 5 ай бұрын
you're amazing
@MaxLothaire
@MaxLothaire Ай бұрын
One thing I just saw while Reading The Friendly Manual is the --dotfiles option. It replace "dot-" in file or directory name by a "." so ~/.zshrc will like to stow_dir/zsh/dot-zshrc or ~/.config/nvim to stow_dir/nvim/dot-config/nvim. Useful if you do not want your repository to be filled by hidden files.
@izzikora6751
@izzikora6751 5 ай бұрын
Do you share the code for your prompt anywhere? Would love to check it out if so.
@sonalita_
@sonalita_ 5 ай бұрын
I was wondering why the heck we need something to manage dot files, don;t you just include them in backups? Then I watched the video. Now I have stow and a dotfile repo.... I am a believer. I had to refactor my bashrc script to include tokens from a separate unmanaged file but I should have done that anyway from day 1.
@alexstone691
@alexstone691 5 ай бұрын
So i am a bit crazy about dotfiles, and have used many things out of boredom from chezmoi, custom utilities, and now im at ansible.. yes it is crazy but at the same time it sets up the whole device, and i kinda like it but i kept my dotfiles inside a single directory so i could use stow or anything if i ever wanted to
@XxZeldaxXXxLinkxX
@XxZeldaxXXxLinkxX 5 ай бұрын
Sounds like an amputated nix package manager
@TrueGamerX14
@TrueGamerX14 5 ай бұрын
been using this for a long time, simplest is sometimes the best haha
@typecraft_dev
@typecraft_dev 5 ай бұрын
I agree
@pillmuncher67
@pillmuncher67 5 ай бұрын
@@typecraft_dev If you want simple, just use the _git bare_ method. Look it up. It doesn't require you to move files around or create symlinks.
@isabelroses_
@isabelroses_ 5 ай бұрын
I thought this was going to be a nix plug
@noahjoyner8232
@noahjoyner8232 5 ай бұрын
lol half the commenters here need a nix plug...
@and2win
@and2win 12 күн бұрын
In my opinion, the topic has not been fully addressed. It is not clear where/what is the power of Stow? Why I need to use Stow to create a symlink. What is the problem with creating my own repository and using the ln -s ... command instead. How Stow can help if I have different configs for different computers?
@ezswan
@ezswan 3 ай бұрын
ok but how did you get your terminal to look like tha
@ferhoodler
@ferhoodler 5 ай бұрын
great video i was looking for this kind of tool. glad i found this video .
@apscandy
@apscandy 5 ай бұрын
I can confirm stow works with wsl I have 2 windows machines running wsl and a MacBook all using the same stow
@rikhardfsoss
@rikhardfsoss 4 ай бұрын
can you please do a video about git bare and dotfiles?
@voiceoftreason1760
@voiceoftreason1760 5 ай бұрын
it's written in perl though. I will find something else, maybe chez moi or just a bare git repo
@AqgvP07r-hq3vu
@AqgvP07r-hq3vu 4 ай бұрын
So helpful you saved my job
@sophiaonyoutube
@sophiaonyoutube 22 күн бұрын
Thanks a lot! Now I don’t have to manually create symlinks to each of my config files
@no_name4796
@no_name4796 5 ай бұрын
i just wrote a script to manage my dotfiles (i basically have a file where i list all file/directory where my config files to save are, and then the script copies all the file in a directory, and then i save the directory basically. And it also allows me to restore them on a new machine very easily, needing only git as a depency. i am really proud of my script)
@Lars-ce4rd
@Lars-ce4rd 5 ай бұрын
You can achieve the same without a script using stow, so you shouldn't really be proud. You did the same thing with extra steps.
@no_name4796
@no_name4796 5 ай бұрын
​@@Lars-ce4rd I just want something which i give a list of files to save, it goes through them, and if they are not uptodate, it will copy them. I want no symlinks, neither do i want a git bare repo in my home directory, and i want it to just work. Also, i have some options like seeing the diff of the backed up file from the orignial ones, copying backuped files to replace the original ones (ie allowing me to rollback or to restore a backup on a fresh install) If i there is a tool that can do the exact same, without being absurdly complex, i am all for it. Sadly None of the tools i ever tried do all of this
@Lars-ce4rd
@Lars-ce4rd 5 ай бұрын
​@@no_name4796 Symlinks have a big advantage: they let you edit your configuration files in place. Any changes you make are reflected in your git repo, so you don't need to manually copy files around. Using git with stow can simplify things a lot. You get your diff checking and rollback capabilities with git, and stow handles scaffolding your configuration files with symlinks. But if you think your script fits your needs better, that's cool. Just wondering why you're so eager to avoid symlinks? (I do understand with for example neovim config, where symlinks are broken by package manager, at least if you use lazy.nvim. That's why I have a seperate repo for neovim config.) Also, you might want to check out "chezmoi", if you haven't. I don't really know much about it personally, it seems more complex than using stow so I haven't taken the time yet, but I hear people praising it and calling it the superior and best option for managing dotfiles.
@VieiraBBX
@VieiraBBX 2 ай бұрын
thanks, so simple and easy to work with
@luca-dallavalle
@luca-dallavalle 5 ай бұрын
Love your content man! Keep it up!
@carstenschlegel6975
@carstenschlegel6975 5 ай бұрын
Thanks a lot - stow is so helpful - I love it.
@Viken43
@Viken43 5 ай бұрын
We need to know how to link with git? Then it will truly be a great way to have all your amazing configs on any machine, anywhere....
@tsukinoko_kun
@tsukinoko_kun 5 ай бұрын
This broke some configs because they don't like symlinks. The tool replaced the symlinks with a normal file.
@theagainagain
@theagainagain Ай бұрын
How is this better than just writing a shell script that does the sym links?
@siuyutpang2335
@siuyutpang2335 5 ай бұрын
It’s really crazy to see so many symlink files in home config directory, so I just only use git to manage my dotfiles 😂
@sho6501
@sho6501 5 ай бұрын
I needed this thank you so much
@BessedDrest
@BessedDrest 3 ай бұрын
Stow isn't really doing anything special besides creating the symlink, correct? The directory naming convention basically just allows you to take your config out of its original location and allow you to use stow cli to create those symlinks? The convenience here is you don't have to git init your home dir and maintain a huge .git ignore file?
@the_yugandharr
@the_yugandharr 19 күн бұрын
amazing very well explained
@Terminux
@Terminux 28 күн бұрын
Great content!
@sabbirahamedmaruf1446
@sabbirahamedmaruf1446 5 ай бұрын
Awesome explanation.
@o_q
@o_q 5 ай бұрын
Yes! GNU stow is awesome!
@MatthieuPETIOT
@MatthieuPETIOT 5 ай бұрын
I prefer using git work-tree et git-dir way with a specific alias to handle all this.
@zrxmax_
@zrxmax_ 5 ай бұрын
so everything stow actually does is just uses "ln -s" command?
@rodrigopim7693
@rodrigopim7693 5 ай бұрын
I already use Stow, but I didn't use it very well. Thanks for the great explanation of the tool.
@bassamsaleh8034
@bassamsaleh8034 5 ай бұрын
thanks for the video.
@markos9644
@markos9644 5 ай бұрын
When is the next linux for newbs dropping?
@dereklomax161
@dereklomax161 5 ай бұрын
Unfortunately no Windows support. I maintain a Windows and arch compatible dotfiles using git bare repos. I use powershell 7 as my FOSS cross platform shell
@noahjoyner8232
@noahjoyner8232 5 ай бұрын
not sure why this is a problem... stow is a gnu tool, so why don't you utilize stow for your gnu based machines alongside the bare repo, then the bare repo method can be implemented for windows. I think stow is better for Linux since there are more programs that utilize config directories , whereas with windows it's really only the programs you have configs for
@kennethjevans
@kennethjevans 5 ай бұрын
This isn't the intended use of stow the developers had in mind. It was meant for people who compile their software. For instance when you manually compile most software, by default it wants to install everything to /usr/local; executables in /usr/local/bin, man pages in /usr/local/man, etc. But most people override the default for say Apache and have it install to /usr/local/http-2.x.x instead. Why? So they can quickly remove the software without having to dig through multiple directories. This poses a problem in that now you need to either edit configuration files to modify variables like PATH and MANPATH so the shell can find executables, and the man executable can find man pages, etc. Or you have to symlink everything under /usr/local/httpd-2.x.x to the corresponding directories under /usr/local that are already included in those variables. Again most people compiling their own software are going to symlink it because they want easy removal/upgrades. If I remove the custom Apache install under /usr/local/httpd-2.x.x the symlinks break, but they also don't take up a lot of space and are really easy to identify. Most terminals will highlight broken symlinks in red. I can also upgrade the software by compiling the next version and resymlinking everything. If it doesn't work, I just symlink to the older version. Stow just handles the symlinking for you. This is a novel use case though and I never thought of using it this way.
@vikingthedude
@vikingthedude 5 ай бұрын
Stow tip: use the -no-folding flag with stow so that only the files are symlinked, not the folders. This will save your ass
@sumirandahal76
@sumirandahal76 5 ай бұрын
Another day thanks giving to Linus Torvals 🎉❤
@minecraftpufferfish9066
@minecraftpufferfish9066 28 күн бұрын
Man, I have to be honest with you on this one. This is not a good explanation of symlinks and GNU Stow at all. If I didn't already know about them prior to watching this video, I wouldn't have any clue after. Symlinks can be best described as portals. The data is stored in a certain location, and the symlink is like a portal that allows you to teleport to that location; this is why both files change - you're actually accessing the original file. The best way to use Stow is to just create a an exact copy of everything config-related in a directory, and then run stow to symlink to ~. Let's say you want to symlink ~/.config and ~/.zshrc. Create ~/dotfiles/.config and ~/dotfiles/.zshrc. Then run the stow command inside ~/dotfiles, and it will symlink everything to its parent directory, which is ~. You can also specify the source and target directories using flags; this can be useful if you, for example, want to keep the dotfiles directory somewhere other than your home directory.
@sweep-
@sweep- 5 ай бұрын
I’ve been using a Bare git repository and I’m trying to decide if stow is better… hmm…
@noahjoyner8232
@noahjoyner8232 5 ай бұрын
if I am understanding you correct, you are linking your bare repo straight to your .config?? If so, here is why stow is better... Let's say I have 6 programs that use the standard config dir, and I only care about 2. instead of having useless/redundant files on my repo, I can use a repo to only keep track of the configs I care about. Then I use stow to link ONLY those files. If you think it would be helpful I can link my git repo for my dotfiles
@sweep-
@sweep- 5 ай бұрын
@@noahjoyner8232 its a bare repo in my home folder and it works similarly to stow, in that, you opt in on what files to add. Someone wrote an article on how to do this method, “Dotfiles: Best way to store in a bare git repository”. I’m not affiliated with the author at all, but this is what I’ve been doing. But I’m trying to decide if the stow workflow feels better.
@CarlosReyes-ku6ub
@CarlosReyes-ku6ub 5 ай бұрын
EMACS mentioned... still waiting from day one... XD
@DGDG0000000
@DGDG0000000 2 ай бұрын
or Ansible to run a yaml file designed to install anything in any consddition from anywhere onto anything else.
@RahulGotrekiya
@RahulGotrekiya 5 ай бұрын
Thanks man 😊!!!!!
@mesteryui
@mesteryui 5 ай бұрын
But if I want to put all The files in same time
@noahjoyner8232
@noahjoyner8232 5 ай бұрын
?
@ErikOnNoobTube
@ErikOnNoobTube 5 ай бұрын
stow */
@jhonyortiz5
@jhonyortiz5 5 ай бұрын
Na man, chezmoi is the way. It can handle differences really well. NixOS is too muchz and ansible is just too verbose for something like this. Stow is just barely above just using a few bash scripts. Chezmoi is the perfect amount of configurability and complexity.
@dmferrari
@dmferrari 5 ай бұрын
Take that, windows registry!
@Patterner
@Patterner 5 ай бұрын
"Fri Jun 7 12:13:33 1996" "created stow" :
@ViperLarry-v7p
@ViperLarry-v7p 5 ай бұрын
Home-manager is the way to go, works on mac as well.
@oalfodr
@oalfodr 5 ай бұрын
Hi nerd. You have left me confused. I do not get why would you use this program instead of simply initiating git in your home, ignoring all and then make whitelist or ignore stuff you do not want. I am doing it the second way on all my machines and it has added benefit of tracking my whole user-space (apart from ignored parts) so I can see if some app left some junk somewhere. The only reasons I see for using stow are if you have conflicting configs between machines or you simply do not want to have in your dotfiles everything that you keep in stow
@IainSimmons
@IainSimmons 5 ай бұрын
This works, and I did this for a while, but it's a royal pain to basically manage things via a gitignore. It's a lot cleaner to have the git repo in a dotfiles directory and be explicit about what is included. But hey, whatever works for you!
@ErikOnNoobTube
@ErikOnNoobTube 5 ай бұрын
for me personally i have a lot of shit in .config that i dont care about, far easier to just have everything i care about in a separate folder and then just - stow */
@oalfodr
@oalfodr 5 ай бұрын
​@@IainSimmons Of course everyone should use whatever is best for them, I was just trying to understand the appeal of stow. I do not find it hard to add new stuff to exclude list and I really like having everything new show up so I can audit if I want to start tracking it, ignore it or delete. I use lazygit and I only need to press "i" key to exclude
@RazoBeckett.
@RazoBeckett. 5 ай бұрын
I use yadm, btw.
@AlameenAdeyemi
@AlameenAdeyemi 5 ай бұрын
I just lost my dot files 😭
@typecraft_dev
@typecraft_dev 5 ай бұрын
Awww crap!
@j_t_eklund
@j_t_eklund 5 ай бұрын
Sort of disagree. IMO nothing beats following setup! Locally hosted git (NAS or dedicated device) and Nix(OS) with flakes and home-manager on the system you work on.
@byte.raccoon
@byte.raccoon 5 ай бұрын
I thought that nix is the best way to manage my config.. hm
@ViperLarry-v7p
@ViperLarry-v7p 5 ай бұрын
It is
@Back2Nix
@Back2Nix 5 ай бұрын
Maybe just switch to NixOS?
@laughingvampire7555
@laughingvampire7555 3 ай бұрын
chezmoi and dotdrop are superior options to stow.
Мама у нас строгая
00:20
VAVAN
Рет қаралды 11 МЛН
Gymnastics, but at the end  I play with different stuff 
7:26
Brooklyn🥳
Рет қаралды 25 М.
Programming Is Cooked
9:30
ThePrimeTime
Рет қаралды 290 М.
I ranked EVERY terminal emulator. It was nuts
20:35
typecraft
Рет қаралды 139 М.
Creating Your Own Programming Language - Computerphile
21:15
Computerphile
Рет қаралды 129 М.
30 Vim commands you NEED TO KNOW (in just 10 minutes)
10:27
typecraft
Рет қаралды 122 М.
18 Weird and Wonderful ways I use Docker
26:18
NetworkChuck
Рет қаралды 400 М.
The Painful world of Linux Ricing | A Hyprland story
13:01
typecraft
Рет қаралды 68 М.
Tmux will SKYROCKET your productivity - here’s how
10:02
typecraft
Рет қаралды 111 М.
Why More People Dont Use Linux
18:51
ThePrimeTime
Рет қаралды 317 М.
~/.dotfiles in 100 Seconds
13:54
Fireship
Рет қаралды 426 М.
Мама у нас строгая
00:20
VAVAN
Рет қаралды 11 МЛН