8 ms·
Desk: A lightweight workspace manager for the shell
- such_a_casual 11y agoAm I understanding this right? This is basically just a command to call bash scripts that live in a certain directory? Why not just use: . path/to/ez_lisp.sh ---------------------- or use an alias like: desk() { . path/to/$1 } I'm a newb. So sorry if this is just over my head.
- semi-extrinsic 11y agoLooks like you're right. From TFA (in the Readme): "I have a hard time calling this a "workspace manager" with a straight face -- it's basically just a shell script that sources another shell script in a new shell."
- jobeirne 11y agoYes and no... the details are a little different, because we're using subshells and not sourcing scripts directly in the current process (cleanup is easier that way -- you just `exit`). But in effect, yeah, this is minor window dressing around executing an initializing shell script in a sandbox. I find the interface and the doc surfacing useful. In the nearterm I'm going to be working on supporting imports -- i.e., you `git clone` down a project that has a deskfile at its root, then you're able to import it (maybe as a fancy symlink) into your own deskfiles. That'd give you immediate, programmtic context for working on the project.
- zimbatm 11y agoself plug: http://direnv.net/ http://direnv.net/ does basically the same but without having to start new sub-shells. Just `cd` into a folder, if it has an .envrc file it's loaded. If you `cd` out of the folder all the changed environment variables are restored.
- nitrogen 11y agoDoes it have a trust model to prevent loading a .envrc from unknown origin?
- zimbatm 11y agoYes, the file path+content checksum is verified against a whitelist before execution. Typing `direnv allow [PATH]` adds it to the whitelist.
- jobeirne 11y agoVery cool project -- definitely recommend anyone interested in desk checks this out. From what I can tell, though, desk's design allows for slightly different uses: namely (because desk consolidates configuration into one directory), desk configuration is more easily shareable across computers. In order to recreate your direnv setup on another machine, you'd have to go and symlink all your direnv files manually (unless they're somehow embedded in the repos or folders you're working in). Direnv doesn't (AFAICT) attempt to surface documentation for the shell files it executes, whereas a lot of desk's value is in displaying a quick reference for common tasks within a workspace.
- venning 11y agoI believe this was on the front page of HN 20 days ago. This time the URL has a hash fragment. See here for 9 comments: https://news.ycombinator.com/item?id=10445461 https://news.ycombinator.com/item?id=10445461
- xbeta 11y agoOr just a simple tmux session?
- greggyb 11y agoIt's more than just a tmux session, because it's also setting up an environment for the "workspace" as well. You might even use it with tmux to quickly load the appropriate environment in a new session.
- xbeta 11y agoOr you can save up all of your tmux sessions and setup your environment. There's a way to save tmux session in disk.
- lojack 11y agoWorth checking out tmuxinator which essentially does this. The way I use tmuxinator, I just type 'mux <name>' and it'll load a tmux session with all my panes, directories, and applications loaded and running.
- erikb 11y agoI really want to support open source efforts. But I really can't if there's a project developed without any googling before the first line of code. We have terminal multiplexers. I don't know but I wouldn't be surprised if he had one when computer still meant big tubes and real typewriters being connected to screens. This project doesn't offer anything that screen or tmux can't do, as far as I understand the README. And it also doesn't mention its biggest two competitors. Please, to save your own time and energy (if not the time and energy of other people) search for a solution before you build one. Only if you have found the two or three solutions that the community likes most and you are still unsatisfied, only then start coding. And set yourself a real goal about what your tool should be doing that the others don't. In this example tmux is quite interesting. Screen was around for ages. But a few things were not possible with the screen code base, like splitting your screen in whatever way you want. And some things simply were not really user friendly, like the config. With this in mind a guy named Nicholas Marriott sat down and started coding his alternative. That's how you do it. Stick his picture on your wall. Follow his path. Start with googling for your problem, not with coding. PS: I think the idea of having different desktops in graphical shells in fact came from people wanting to have the terminal multiplexing feature in their graphical environment as well. So Desk is like taking your calculator apart to develop a method to calculate with pen and paper.
- duaneb 11y agoThere's a lot to be said for the features this tool DOESN'T maintain.
- mappu 11y ago>But a few things were not possible with the screen code base, like splitting your screen in whatever way you want. Does tmux improve over screen's `C-a S` / `C-a |` ?
- erikb 11y agoI think in screen you can't have 4 panes in the same window, right? Hope that answers that question, because I'm not sure how to google what your two commands mean.
- deleted 11y ago[deleted]