Giter VIP home page Giter VIP logo

bevry / dorothy Goto Github PK

View Code? Open in Web Editor NEW
255.0 11.0 21.0 6.66 MB

πŸ§™πŸ»β€β™€οΈ Bring your dotfile commands and configuration to any shell. Sensible defaults and hundreds of commands preloaded. Supports Bash, Zsh, Fish, Nu, Xonsh, Elvish, Dash, KornShell, macOS, Linux, Windows.

License: Other

Shell 98.99% JavaScript 0.02% Python 0.10% TypeScript 0.01% Nushell 0.31% Xonsh 0.30% Elvish 0.28%
dotfiles zsh bash fish-shell shell linux macos cli fish dotfiles-linux dotfiles-macos terminal dotfiles-manager unix dotfiles-automation productivity shell-script ubuntu wsl-ubuntu nushell

dorothy's Introduction

Dorothy

Status of the GitHub Workflow: dorothy-workflow
GitHub Sponsors donate button ThanksDev donate button Liberapay donate button Buy Me A Coffee donate button Open Collective donate button crypto donate button PayPal donate button
Discord server badge Twitch community badge

Dorothy is a dotfile ecosystem featuring:

  • seamless support for Bash, Zsh, Fish, Nu, Xonsh, Elvish, Dash, KSH
  • seamless support for multiple operating systems and architectures
  • seamless support for your favorite terminal and GUI editors
  • automatic configuration of your environment variables for what you have installed on your system
  • automatic installation and updating of your specified packages
  • automatic Git, SSH, and GPG configuration based on what your system supports and your configuration
  • hundreds of commands to improve your productivity
  • completely extensible and configurable with your own user repository
  • all this together, allows you to go from zero to hero within minutes, instead of days, on a brand new machine

Introduction

Watch the 2023 November Presentation to see what Dorothy can do!

Screenshot of the 2022 April Presentation

Setup

Supported Platforms

Operating System Architecture Support
🍏 macOS 🍏 Apple Silicon (ARM64) πŸ‘Œ Daily Driver
🍏 macOS 🍏 Apple on Intel (x86_64) πŸ‘Œ Daily Driver, πŸ€– CI
🍏 macOS 🍏 Apple Silicon with HOMEBREW_ARCH="x86_64" πŸŒ— Monthly Driver
πŸͺŸ Windows 10/11 WSL2 Ubuntu πŸ‘” Intel/AMD (x86_64) πŸ‘Œ Daily Driver
πŸ“ Raspberry Pi OS with Desktop πŸ“ Raspberry Pi 4/400/5 (ARM64) πŸ‘Œ Daily Driver
πŸ“ Raspberry Pi OS Lite πŸ“ Raspberry Pi 4/400/5 (ARM64) πŸŒ— Monthly Driver
⭕️ Ubuntu Desktop πŸ“ Raspberry Pi 4/400/5 (ARM64) πŸ‘Œ Daily Driver
⭕️ Ubuntu Desktop πŸ‘” Intel/AMD (x86_64) πŸ‘Œ Daily Driver
⭕️ Ubuntu Server πŸ“ Raspberry Pi 4/400/5 (ARM64) πŸ‘Œ Daily Driver
⭕️ Ubuntu Server πŸ‘” Intel/AMD (x86_64) πŸ‘Œ Daily Driver, πŸ€– CI
⭕️ Ubuntu Server 5️⃣ StarFive’s VisionFive (RISC-V) πŸŒ— Monthly Driver
β–² Manjaro / Arch πŸ‘” Intel/AMD (x86_64) πŸ‘Œ Daily Driver, πŸ€– CI
∞ Fedora Workstation πŸ‘” Intel/AMD (x84_64) πŸŒ— Monthly Driver, πŸ€– CI
🦎 OpenSUSE Leap & Tumbleweed πŸ‘” Intel/AMD (x84_64) πŸŒ— Monthly Driver, πŸ€– CI
β›° Alpine πŸ‘” Intel/AMD (x84_64) πŸŒ— Monthly Driver, πŸ€– CI
β›° Alpine 🍏 Apple Silicon (ARM64) πŸŒ— Monthly Driver
πŸ‰ Kali πŸ‘” Intel/AMD (x84_64) πŸŒ— Monthly Driver, πŸ€– CI

Other platforms may or may not be supported. Mageia, Nix, Gentoo are unsupported.

Prerequisites

macOS:

xcode-select --install

Windows 10/11:

# [Install WSL.](https://learn.microsoft.com/en-au/windows/wsl/install)
wsl --install
wsl --set-default-version 2
# note that [wsl --version] does not report WSL2, you need to do [wsl -l -v]

Ubuntu / Debian / Kali:

sudo apt-get update
sudo apt-get install bash curl

Fedora:

dnf check-update
dnf --refresh --best install bash curl

OpenSUSE / SUSE:

zypper --gpg-auto-import-keys refresh
zypper install bash curl

Alpine:

doas apk update
doas apk add bash curl grep

Manjaro:

pamac install bash curl

Arch:

pacman-key --init
pacman --refresh --sync --needed bash curl

Void:

xbps-install --sync --update xbps
xbps-install --sync bash curl

Try

You can trial Dorothy commands without configuring your shell.

To run a specific command in/from the Dorothy environment, enter the following, swapping out everything after the double-dash (--) with whatever command to run:

bash -ic "$(curl -fsSL https://dorothy.bevry.me/run)" -- echo-verbose -- a b c
# if your shell doesn't recognize any of the above syntax, run `bash -i` then try again

To run multiple commands in/from a Dorothy-configured REPL, enter the following line by line:

bash -ic "$(curl -fsSL https://dorothy.bevry.me/repl)"
# if your shell doesn't recognize any of the above syntax, run `bash -i` then try again

# now you can run whatever and how many commands as you'd like, such as:
echo-verbose -- a b c
echo-style --success=awesome

# once you are done, exit the trial environment
exit

Install

To install Dorothy enter the following in your favorite terminal application:

bash -ic "$(curl -fsSL https://dorothy.bevry.me/install)"
# if your shell doesn't recognize any of the above syntax, run `bash -i` then try again

During installation, Dorothy will ask you to create a repository to store your user configuration, such as a dotfiles repository. If you already have a dotfiles repository, you can use that, or make another.

Verify the installation worked by selecting a theme for Dorothy by running:

# you must open a new terminal instance first
dorothy theme
# then open a new terminal

To select your login shell, run setup-shell.

Troubleshooting

If packages are failing to install, go back to the "Prerequisites" section.

If your shell doesn't recognize any of the Dorothy commands (you get a command not found error, or an undefined/unbound variable error), then it could be that:

If you see unrecognised symbols, you probably require fonts. Once Dorothy is loaded, run setup-util-noto-emoji which installed Noto Emoji, a font for enabling emojis inside your terminal. For rendering glyphs, run setup-util-nerd-fonts which will prompt you for which Nerd Font to install. You may need to update your terminal preferences the installed fonts.

Overview

Dorothy Core

Dorothy installs itself to $DOROTHY, which defaults to the XDG location of ~/.local/share/dorothy, and consists of the following:

  • commands directory contains executable commands of super-stable quality, they are actively used within the Dorothy core and by the users of Dorothy.
  • commands.beta directory contains executable commands of beta quality, these are commands that require more usage or possible breaking changes before promotion to commands.
  • config directory contains default configuration
  • sources directory contains scripts that are loaded into the shell environment
  • themes directory contains themes that you can select via the DOROTHY_THEME environment variable
  • user directory is your own github repository for your custom configuration

For each shell that you configured during the Dorothy installation (can be reconfigured via the dorothy install command), the configured shell performs the following steps when you open a new shell instance via your terminal:

  1. The shell loads Dorothy's initialization script:

  2. The initialization script will:

    1. Ensure the DOROTHY environment variable is set to the location of the Dorothy installation.

    2. If a login shell, it loads our login script sources/login.(bash|dash|elv|fish|ksh|nu|xsh|zsh), which will:

      1. Apply any configuration changes necessary for that login shell

      2. Load our environment script sources/environment.(bash|dash|elv|fish|ksh|nu|xsh|zsh), which will:

        1. Invoke commands/setup-environment-commands which determines and applies all necessary environment configuration changes to the shell. It loads your user/config(.local)/environment.bash configuration script for your own custom environment configuration that will be applied to all your login shells.
    3. If a login and interactive shell, it loads our interactive script sources/interactive.(bash|dash|elv|fish|ksh|nu|xsh|zsh), which will:

      1. Load your own user/config(.local)/interactive.(sh|bash|dash|elv|fish|ksh|nu|xsh|zsh) configuration script for your own interactive login shell configuration.
        • Elvish will only load interactive.elv if it exists.
        • Fish will load interactive.fish if it exists, otherwise it will load interactive.sh.
        • Nu will only load interactive.nu and it must exist.
        • Xonsh will only load interactive.xsh if it exists.
        • POSIX shells (Bash, Zsh, Dash, KSH, etc) will load their interactive.(bash|zsh|...etc) file if it exists, otherwise they will load interactive.sh if exists.
      2. Load any common alias and function utilities.
      3. Load our theme configuration.
      4. Load our ssh configuration.
      5. Load our autocomplete configuration.

This is the foundation that enables Dorothy's hundreds of commands to work across hundreds of machines, across dozens of operating system and shell combinations, seamlessly.

Dorothy User Configuration

Your user configuration goes to the XDG location of ~/.local/config/dorothy which Dorothy symlinks to ~/.local/share/dorothy/user, your user configuration consists of the following:

  • commands directory, for public commands
  • commands.local directory, for private commands (git ignored by default)
  • config directory, for public configuration
  • config.local directory, for private configuration (git ignored by default)

The order of preference within Dorothy is (commands|config).local first, then (commands|config), then Dorothy's own (commands|config) then everything else.

You can find the various configuration files that are available to you by browsing Dorothy's default config directory.

Showcase

Use these sources to find inspiration for your own user commands and configuration.

After installing Dorothy, there will now a plethora of commands available to you. You can invoke any stable command with --help to learn more about it. The most prominent commands are noted below.

Stable commands:

  • setup-system

    • setup-system install correctly setup your system to your prompted preferences
    • setup-system update correctly update your system to your existing preferences

    This is done via these commands:

    • setup-linux correctly setup your Linux system, and its various packaging systems, as desired

    • setup-mac correctly setup your macOS system, including its homebrew and Mac App Store installations, as desired

    • setup-bin correctly setup available CLI utilities from installed GUI Applications

    • setup-git correctly setup Git on your system, including your profile, SSH, GPG, and 1Password configurations, as desired.

      Related commands:

    • setup-go correctly setup GoLang on your system if desired or if required for your desired packages

    • setup-node correctly setup Node.js on your system if desired or if required for your desired packages

    • setup-python correctly setup Python on your system if desired or if required for your desired packages

    • setup-ruby correctly setup Ruby on your system if desired or if required for your desired packages

    • setup-rust correctly setup Rust on your system if desired or if required for your desired packages

    • setup-utils correctly setup your selected setup-util-* utilities as desired

  • setup-util is an intelligent wrapper around every package system, allowing a cross-compatible way to install, upgrade, and uninstall utilities.

    It is used by the hundreds of setup-util-* commands, which enable installing a utility as easy as invoking setup-util-<utility>

    If you don't know which command you need to call, you can use get-installer to get which command you will need to invoke to install a utility/binary/application.

  • setup-shell correctly configure your desired shell to be your default shell.

    By default, your terminal application will use the login shell configured for the system, as well as maintain a whitelist of available shells that can function as login shells.

  • edit quickly open a file in your preferred editor, respecting terminal, SSH, and desktop environments.

  • down download a file with the best available utility on your computer.

  • github-download download files from GitHub without the tedium.

  • secret stops you from leaking your env secrets to the world when a malicious program sends your shell environment variables to a remote server. Instead, secret will use 1Password to securely expose your secrets to just the command that needs them. Specifically:

    • secrets are fetched directly from 1Password, with a short lived session
    • secrets are cached securely for speed and convenience, only root/sudo has access to the cache (cache can be made optional if you want)
    • secrets are not added to the global environment, only the secrets that are desired for the command are loaded for the command's environment only
  • setup-dns correctly configures your systems DNS to your preferences

    A large security concern these days of using the internet, is the leaking, and potential of modification of your DNS queries. A DNS query is what turns google.com to say 172.217.167.110. With un-encrypted DNS (the default), your ISP, or say that public Wifi provider, can intercept these queries to find out what websites you are visiting, and they can even rewrite these queries, to direct you elsewhere. This is how many public Wifi providers offer their service for free, by selling the data they collect on you, or worse.

    The solution to this is encrypted DNS. Some VPN providers already include it within their service, however most don't. And if you have encrypted DNS, then you get the benefits of preventing eavesdropping without the need for expensive VPN, and the risk of your VPN provider eavesdropping on you.

    Dorothy supports configuring your DNS to encrypted DNS via the setup-dns command, which includes installation and configuration for any of these:

    • AdGuard Home
    • Cloudflared
    • DNSCrypt

    Related commands:

    • flush-dns lets you easily flush your DNS anytime, any system.
    • setup-hosts lets you easily select from a variety of HOSTS files for security and privacy, while maintaining your customizations.
  • mount-helper lets you easily, correctly, and safely mount, unmount, automount, various devices, filesystems, network shares, gocryptfs vaults, etc, on any system.

    Related commands:

  • Dorothy also provides commands for writing commands, such as:

Beta commands:

  • mail-sync helps you migrate all your emails from one cloud provider to another.

macOS

Stable commands:

  • alias-helper helps you manage your macOS aliases, and if desired, convert them into symlinks.
  • macos-drive helps you turn a macOS installer into a bootable USB drive.
  • macos-installer fetches the latest macOS installer.
  • sparse-vault lets you easily, and for free, create secure encrypted password-protected vaults on your mac, for securing those super secret data.

Beta commands:

  • eject-all eject all removable drives safely.
  • icloud-helper can free up space for time machine by evicting local iCloud caches.
  • itunes-owners generates a table of who legally owns what inside your iTunes Media Library β€” which is useful for debugging certain iTunes Store authorization issues, which can occur upon backup restorations.
  • macos-settings helps configure macOS to your preferred system preferences.
  • macos-state helps you backup and restore your various application and system preferences, from time machine backups, local directories, and sftp locations. This makes setting up clean installs easy, as even the configuration is automated. And it also helps you never forget an important file, like your env secrets ever again.
  • macos-theme helps you change your macOS theme to your preference, including your wallpaper and editor.
  • tmutil-helper can free up space for bootcamp by evicting local Time Machine caches.

media

Beta commands:

Community

Join the Bevry Software community to stay up-to-date on the latest Dorothy developments and to get in touch with the rest of the community.

Backers

Code

Discover how to contribute via the CONTRIBUTING.md file.

Authors

Maintainers

Contributors

Finances

GitHub Sponsors donate button ThanksDev donate button Liberapay donate button Buy Me A Coffee donate button Open Collective donate button crypto donate button PayPal donate button

Sponsors

  • Andrew Nesbitt β€” Software engineer and researcher
  • Codecov β€” Empower developers with tools to improve code quality and testing.
  • Frontend Masters β€” The training platform for web app engineering skills – from front-end to full-stack! πŸš€
  • Poonacha Medappa
  • Rob Morris
  • Sentry β€” Real-time crash reporting for your web apps, mobile apps, and games.
  • Syntax β€” Syntax Podcast

Donors

License

Unless stated otherwise all works are:

and licensed under:

dorothy's People

Contributors

balupton avatar bevryme avatar bjreplay avatar molleweide avatar sumitrai avatar wasdee avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dorothy's Issues

Improvement: have new login shell instances output sponsors, funders, contributors

It would be nice to say thank you to Bevry's sponsors, funders, and contributors.

For sponsors, funders, and contributors, there would be an easy command to run to opt out of this. Otherwise there will be a non-documented ability to opt out.

Ideas for when to display this:

  • opening a new terminal, limited to once a day
  • upon setup-dorothy, limited to once a day

GPG Pinentry on macOS

For what it seems gpg with pinentry is not working properly for me on
macOS. Personally, I have read through the setup-git command and feel like
I understand it fyi. But I have to read through it a couple more times
to really feel like I understand everything.

I searched for neovim pinentry and found this plugin issue. Maybe it
will reveal some interesting information:

resources

jamessan/vim-gnupg#32
https://github.com/jamessan/vim-gnupg
https://gist.github.com/troyfontaine/18c9146295168ee9ca2b30c00bd1b41e

macos-intel: goinstall command not found

i am just documenting what happnes when I run scripts.

β•°ο‘  setup-go

Ensuring go is installed...
The [go] utility is already installed because [go] is present. All good. βœ…

Reload paths to ensure go is detected...

Installing 1 go packages...
changkun.de/x/rmtrash imports
        flag: package flag is not in GOROOT (/usr/local/Cellar/go/1.16.3/libexec/src/flag)
changkun.de/x/rmtrash imports
        fmt: package fmt is not in GOROOT (/usr/local/Cellar/go/1.16.3/libexec/src/fmt)
changkun.de/x/rmtrash imports
        os: package os is not in GOROOT (/usr/local/Cellar/go/1.16.3/libexec/src/os)
changkun.de/x/rmtrash imports
        os/user: package os/user is not in GOROOT (/usr/local/Cellar/go/1.16.3/libexec/src/os/user)
changkun.de/x/rmtrash imports
        path/filepath: package path/filepath is not in GOROOT (/usr/local/Cellar/go/1.16.3/libexec/src/path/filepath)
changkun.de/x/rmtrash imports
        time: package time is not in GOROOT (/usr/local/Cellar/go/1.16.3/libexec/src/time)
The [go:changkun.de/x/rmtrash] utility was unable to be installed. ❌

Update all go packages? (y/N)
go get: cannot match "all": go.mod file not found in current directory or any parent directory; see 'go help modules'

Install go linting packages? (y/N)
/Users/hjalmarjakobsson/.local/share/dorothy/commands/setup-go: line 61: goinstall: command not found

i haven't really used go so I am familiar yet with some of these error messages etc. but I am posting here just so you
can see what the output is.

organisation configuration repositories

Dorothy is robust enough to allow an organisation to create its own configuration repository and have it shared and utilised amongst its employees.

The steps would be like so:

  1. clone your org's dotfiles to $DOROTHY_USER_HOME/org
  2. source them in your config files
  3. add echo_var_add PATH "$DOROTHY_USER_HOME/org/commands" to your config/environment.bash

If there is an organisation that would like to share configuration in such a way, then grab a support call with @balupton and we'll get you setup.

Eventually, tooling could be provided to streamline such, and allow multiple repositories to be easily sourced and shared.

allow editor configurations to be customisable by the user

Currently vim, atom, and vscode configurations are mine and there isn't a way to customise them besides forking.

Possible Proposal:

  • have .vimrc, .atom, and .vscode symlink inside .scripts/users/$(whoami)/
  • change .scripts/users/balupton.sh to .scripts/users/balupton/source.sh
  • update the dotfile installation script to symlink the directory, instead of its current approach

Complete styling changes

I've updated several commands, but there are still a lot to go.

Completed:

  • alias-*
  • is-same
  • setup-go
  • setup-mac
  • setup-mac-brew
  • setup-util
  • setup-utils
  • setup-util-gocryptfs

We should start with the setup-* workflow and work backwards from there.

setup-util: output progress as it happens, then compress successes

The changes for #74 of 0f4feb1#diff-ead7a0488f9916b329702cc9a9ff126556efc9810270a9382051adebeb0d4e12 has made it so that logs do not happen as they happen, but only after they have finished. This means say running setup-util-tealdeer on a linux arm machine, where tldr doesn't exist, will try two options that are quick, and then do cargo. Cargo takes forever, and there is no output of progress to the user.

As such, we should use the alt tty stuff, (... or something else ...) to make it so that current progress is output to the tty, that is then cleared upon completion, with only significant logs being retained.

XDG Base Directories

https://wiki.archlinux.org/title/XDG_Base_Directory

Any of these seem the way it could be done:

  • ~/.dorothy including user goes to ${XDG_DATA_HOME:-"$HOME/.local/share"}

  • ~/.dorothy goes to ${XDG_DATA_HOME:-"$HOME/.local/share"} and user goes to ${XDG_CONFIG_HOME :-"$HOME/.config"}

However, perhaps we use this an opportunity to rethink the user part #22, and the config part #17 of dorothy.

If directories are split, then we would need to provide a VSCode Workspace which ties in all the directories together, so make working on dorothy easy.

Another approach to this would be to ask the user in setup-dorothy where they want Dorothy to go, which then determines where dorothy is cloned to and where the login shell init script configuration point to.

In the meantime, one could mv Dorothy to ${XDG_DATA_HOME:-"$HOME/.local/share"}/dorothy and update the login shell configuration to load that, and it all should just work, as DOROTHY unless set manually will be determined from wherever the init script resides.

Installation not working because of dependency on `choose-option`

I don't know if I'm doing something wrong but the instructions both for trying out dorothy and for installing it seems to depend on choose-option (which obviously does not exist without dorothy installed)

 ! ξ‚° ~ ξ‚° bash -ic "$(curl -fsSL https://dorothy.bevry.workers.dev/commands/what-is-my-ip)"                                                                                       3021ms ξ‚³ Mon Mar 28 16:46:54 2022
bash: choose-option: command not found

! ξ‚° ~ ξ‚° bash -ilc "$(curl -fsSL https://raw.githubusercontent.com/bevry/dorothy/master/commands/dorothy)"                                                                        281ms ξ‚³ Mon Mar 28 16:48:29 2022
bash: choose-option: command not found

Platform details (I don't think it is relevant): Tried on macOS w/ Apple Silicon 12.3 with fish and bash.

`setup-mac-brew` error: `fatal: --unshallow on a complete repository does not make sense`

β•°ο‘  setup-mac-brew

Homebrew is installed.

Updating homebrew...
fatal: --unshallow on a complete repository does not make sense
fatal: --unshallow on a complete repository does not make sense
fatal: --unshallow on a complete repository does not make sense
fatal: --unshallow on a complete repository does not make sense
fatal: --unshallow on a complete repository does not make sense

l ran the command earlier today and then everything seems to have install pretty much.

full stdout

β•°ο‘  setup-mac-brew

Homebrew is installed.

Updating homebrew...
fatal: --unshallow on a complete repository does not make sense
fatal: --unshallow on a complete repository does not make sense
fatal: --unshallow on a complete repository does not make sense
fatal: --unshallow on a complete repository does not make sense
fatal: --unshallow on a complete repository does not make sense
Updated 1 tap (homebrew/core).
No changes to formulae.
==> Casks with 'auto_updates true' or 'version :latest' will not be upgraded; pass `--greedy` to upgrade them.
==> Upgrading 5 outdated packages:
criptext latest -> 0.31.0,2.0.82
drawio 13.0.3 -> 15.4.0
keepassxc 2.5.4 -> 2.6.6
reaper 6.38 -> 6.40
teensy latest -> 1.52
==> Upgrading criptext
==> Downloading https://cdn.criptext.com/Criptext-Email-Desktop/mac/Criptext-latest.dmg
Already downloaded: /Users/hjalmarjakobsson/Library/Caches/Homebrew/downloads/bd6e0fcb366006e5044fd7b38e06562c34dd1a316eeccbe7f2a592c5b3f82bb5--Criptext-latest.dmg
Warning: No checksum defined for cask 'criptext', skipping verification.
==> Purging files for version 0.31.0,2.0.82 of Cask criptext
==> Upgrading drawio
==> Downloading https://github.com/jgraph/drawio-desktop/releases/download/v15.4.0/draw.io-x64-15.4.0.dmg
Already downloaded: /Users/hjalmarjakobsson/Library/Caches/Homebrew/downloads/a8cbe9b1b0b8e98a138e3484edac0d18c4615975939f4cb4e18798fdb92699a9--draw.io-x64-15.4.0.dmg
==> Purging files for version 15.4.0 of Cask drawio
==> Upgrading keepassxc
==> Downloading https://github.com/keepassxreboot/keepassxc/releases/download/2.6.6/KeePassXC-2.6.6-x86_64.dmg
Already downloaded: /Users/hjalmarjakobsson/Library/Caches/Homebrew/downloads/20540289404e2e1b827e38fa1344f1beb52e4d8fdbb0b948190e1d0ff1a79c59--KeePassXC-2.6.6-x86_64.dmg
==> Purging files for version 2.6.6 of Cask keepassxc
==> Upgrading reaper
==> Downloading https://www.reaper.fm/files/6.x/reaper640_x86_64_catalina.dmg
Already downloaded: /Users/hjalmarjakobsson/Library/Caches/Homebrew/downloads/9d8f7dbc63baad5af5f82f55a3df5a785808850f32c6e17f00b10afb1c3e3177--reaper640_x86_64_catalina.dmg
==> Purging files for version 6.40 of Cask reaper
==> Upgrading teensy
==> Downloading https://www.pjrc.com/teensy/teensy.dmg
Already downloaded: /Users/hjalmarjakobsson/Library/Caches/Homebrew/downloads/c578eda858c81809f9e4afc923f88f090d5c666de34faa2c8112f7d39ea87e14--teensy.dmg
Warning: No checksum defined for cask 'teensy', skipping verification.
==> Purging files for version 1.52 of Cask teensy
Error: Problems with multiple casks:
criptext: It seems there is already an App at '/usr/local/Caskroom/criptext/latest/Criptext.app'.
drawio: It seems there is already an App at '/usr/local/Caskroom/drawio/13.0.3/draw.io.app'.
keepassxc: It seems there is already an App at '/usr/local/Caskroom/keepassxc/2.5.4/KeePassXC.app'.
reaper: It seems the App source '/Users/hjalmarjakobsson/reaper/app/RPPTEST/REAPER.app' is not there.
teensy: It seems there is already an App at '/usr/local/Caskroom/teensy/latest/teensy.app'.

user commands that extend dorothy commands

Dorothy prefers user commands to its own commands, allowing users to extend the functionality of the built in dorothy commands.

For instance, if you want to display a whisper emote before silencing output with silent, you can:

touch "$DOROTHY_USER_HOME/commands/silent"
chmod +x "$DOROTHY_USER_HOME/commands/silent"
edit "$DOROTHY_USER_HOME/commands/silent"

then set it to

#!/usr/bin/env bash
echo '🀫' > /dev/tty
"$DOROTHY/commands/silent" "$@"

then run it just like before:

silent echo 'do you hear me?'

`--help` flags for each of the commands

Remaining help text to be applied:

  • echo-*
  • is-*
  • eval-no-color multi args
  • eval-on-empty-stdin multi args
  • eval-on-not-empty-stdin multi args
  • expand-path multi args
  • expand-path-bash multi args
  • fs-join two args
  • fs-volume-join two args - moved into macos-state where it is used
  • get-arch no args
  • get-array single arg
  • get-command special args
  • get-line-count zero args, only stdin
  • get-local-to-remote single arg
  • openssl-helper needs help text filled in
  • setup-*

Feel free to send PRs

separate Cloudflared Tunnel from Cloudflared DNS Proxy

Several of my ubuntu server machines are using custom DNS, yet need Cloudflare Tunnels, so either:

  1. Use cloudflared to proxy to the custom DNS upstream
  2. Use cloudflared to proxy to the custom DNS upstream in addition to the local custom DNS service
  3. Separate cloudflared tunnel functionality from the setup-dns stuff

disable terminal bell

I had

# disable the annoying terminal bell
# http://superuser.com/a/1123198/32418
local TERMINAL_PLIST
local TERMINAL_THEME
TERMINAL_PLIST="$HOME/Library/Preferences/com.apple.Terminal.plist"
TERMINAL_THEME=$(/usr/libexec/PlistBuddy -c "Print 'Default Window Settings'" "$TERMINAL_PLIST")
/usr/libexec/PlistBuddy -c "Set 'Window Settings':$TERMINAL_THEME:Bell false" "$TERMINAL_PLIST"
/usr/libexec/PlistBuddy -c "Set 'Window Settings':$TERMINAL_THEME:VisualBellOnlyWhenMuted false" "$TERMINAL_PLIST"

But it produces:

Set: Entry, "Window Settings:Basic:Bell", Does Not Exist
Set: Entry, "Window Settings:Basic:VisualBellOnlyWhenMuted", Does Not Exist		

On new machines, should remove it until I figure out a solution that works.

`setup-git` gpg failed to sign

Next step for me is also to trouble shoot this. After running setup-git I gets;

error: gpg failed to sign the data
fatal: failed to write commit object

when commiting which means that commiting doesn't work at all.

I could probably go into my user configs and un check this for now.

It was a while ago that I read up on gpg so Β I have to refresh my memory on that. I do know however, that I have
a valid master key that exists. I have to walk through the code also to see how you use gpg in dorothy.

Move out gocryptfs vault upgrade code from `sharebox` command

A signficant portion of the sharebox command is dealing with safely upgrading a gocryptfs vault from one version to another - notably ensuring everything is unmounted and whatnot. However, for the actual upgrade code, we could abstract that out into something more generic, such as gocryptfs-upgrade [vault location] which is then called by the sharebox command.

make it so that other users can get updates without needing to fork and merge

currently the dotfiles are customised specifically to my desired apps and configurations for them, leaving other users needing to fork and merge to customise their own setups

if the following is done, then the forking and merging would no longer be necessary, making adoption easier and more streamlined:

  • move desired apps to be installed into env vars
  • move desired editor extensions to be installed into env vars
  • move desired ruby, node, python apps into env vars
  • move shell preference into env vars
  • have my env vars preinstalled by default, which users can easily opt out of or inherit
    • users/balupton.sh which is sourced via the init scripts using source "users/$(whoami).sh"
    • prompted to inherit it at install time

Streamlined Arch Support

I was able to get Dorothy running on Arch today, however what has been committed was just the end result. There were also manual adjustments here and there, that I need to review the CLI history and make note of, to see what can be automated.

One aspect of automation here would be to re-add the automatic installation of dependencies, rather than having them listed in the README.md file.

Redo `echo-lines` backlashes with `<<-EOF`

This trims indentation:

	cat <<-EOF
		NAME
		     transcrypt -- transparently encrypt files within a git repository
		EOF

This does not trim indentation:

	cat << EOF
		NAME
		     transcrypt -- transparently encrypt files within a git repository
EOF

While we are at it, we could also replace stderr with >&2 perhaps.

Create new `dorothy` command

Task to track the following changes:

  • create commands/dorothy
  • setup-dorothy -> dorothy setup, dorothy install, dorothy update, dorothy trial
  • setup-dorothy-permissions -> dorothy perms
  • edit-dorothy -> dorothy edit, dorothy review
  • select-theme -> dorothy theme
  • dorothy trial [shell=zsh|bash|fish] will create an interactive trial subshell

Other ecosystem tasks:

  • ensure the trial mode cloudflare worker is updated to reflect the move
  • ensure the install instructions is updated to reflect the move

If a `SETUP_UTILS` item is missing, the error is not helpful.

when running setup-utils for some packages in setup.bash it returns this:

/Users/hjalmarjakobsson/.local/share/dorothy/commands/setup-utils: line 12: setup-util-lua: command not found

What does this mean. I mean, lua is found on my system so what does this message indicate. I am thinking that I should probably put these commands under brew. But I thought the purpose of setup-utils was to install stuff that should go with any package manager available kind of, I'm not hundred sure.

Adoption Support

Hi there,

First of all I want to say that I am very happy that I found this project and it looks amazing!
I found it when searching for a better reason differentiate between intel mac and M1 in bash.
I saw that you are using uname -a which is cool!

Question: Can I use this project on arch based linux distros. Have you tested it on that?

Currently I am a mac user myself but I am very much looking into migrating over to arch for various reasons.

xps2pdf: "ERROR: invalid date/time" workaround (comment out a few lines on macos)...

On macos 10.14 I got ctime error:


bash-3.2$ brew install ghostscript

bash-3.2$ which gxps
/usr/local/bin/gxps
bash-3.2$ gxps --version
Unrecognized switch: --version
Usage: gxps [option* file]+...
Options: -dNOPAUSE -E[#] -h -L<PCL|PCLXL> -K<maxK> -l<PCL5C|PCL5E|RTL> -Z...
         -sDEVICE=<dev> -g<W>x<H> -r<X>[x<Y>] -d{First|Last}Page=<#>
         -H<l>x<b>x<r>x<t> -dNOCACHE
         -sOutputFile=<file> (-s<option>=<string> | -d<option>[=<value>])*
         -J<PJL commands>
Version: 9.27...

$ xps2pdf.bash mb09.xps 
converting 1 files
converting mb09.xps to mb09.pdf
setting creation time
/usr/local/bin/xps2pdf.bash: line 57: local: can only be used in a function
ERROR: invalid date/time

Workaround was to comment out these lines. (To preserve file dates maybe rewrite with touch)

#	if command_exists GetFileInfo && command_exists SetFile; then
#		echo "setting creation time"
#		local ctime=$(GetFileInfo -m "$xps")
#		SetFile -d "$ctime" "$pdf"
#	fi

Now it works fine even with non-fatal warning on mb07.xps (which was saved from Word 2007).

bash-3.2$ xps2pdf.bash *.xps
converting 9 files
converting mb01.xps to mb01.pdf
converting mb02.xps to mb02.pdf
converting mb03.xps to mb03.pdf
converting mb04.xps to mb04.pdf
converting mb05.xps to mb05.pdf
converting mb06.xps to mb06.pdf
converting mb07.xps to mb07.pdf
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: cHRM chunk does not match sRGB
converting mb08.xps to mb08.pdf
converting mb09.xps to mb09.pdf
bash3-2$ . open  mb07.pdf 

The 9 xps test files are free from https://www.qualitylogic.com/knowledge-center/news-events/free-sample-xps-files/ if you provide an email, then send you link to download a 14meg zip file with them as "Free XPS test files.zip"

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.