diff --git a/.alacritty.yml b/.alacritty.yml index d242681..50e3ae4 100644 --- a/.alacritty.yml +++ b/.alacritty.yml @@ -1,11 +1,9 @@ shell: - program: /Users/daniel/.nix-profile/bin/fish + program: /opt/homebrew/bin/fish args: - --login - -C - - "tmux-attach-to-first-unattached-session-or-create" - -alt_send_esc: false + - "tmux new-session -A -s main" window: decorations: "none" diff --git a/.bin/tmux-attach-to-first-unattached-session-or-create b/.bin/tmux-attach-to-first-unattached-session-or-create deleted file mode 100755 index 0b8fcbf..0000000 --- a/.bin/tmux-attach-to-first-unattached-session-or-create +++ /dev/null @@ -1,8 +0,0 @@ -#!/usr/bin/env sh - -# Credit: https://unix.stackexchange.com/a/529049 - -# Attach to the first tmux session that has no attached clients. -# If there are no unattached sessions, then create a new session. -tmux attach -t tmux-name-of-first-unattached-session 2> /dev/null || tmux - diff --git a/.bin/tmux-name-of-first-unattached-session b/.bin/tmux-name-of-first-unattached-session deleted file mode 100755 index d469e8e..0000000 --- a/.bin/tmux-name-of-first-unattached-session +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/env sh - -# Credit: https://unix.stackexchange.com/a/529049 - -# Print the name of the first tmux session that has no clients attached. -tmux ls -F '#{session_name}|#{?session_attached,attached,not attached}' 2>/dev/null | grep 'not attached$' | tail -n 1 | cut -d '|' -f1 diff --git a/.brew/Brewfile b/.brew/Brewfile index 597016e..88654ab 100644 --- a/.brew/Brewfile +++ b/.brew/Brewfile @@ -1,23 +1,40 @@ -# This should only be used for applications with graphical user interfaces until -# https://github.com/nix-community/home-manager/issues/1341 is resolved. - -# Install: brew bundle install -# Remove surplus packages: brew bundle cleanup -f -# Overwrite: brew bundle dump - tap "dnjstrom/git-select-branch" tap "homebrew/bundle" -tap "homebrew/cask" tap "homebrew/cask-fonts" -tap "homebrew/core" - +brew "ctop" +brew "fish" +brew "fisher" +brew "gh" +brew "grc" +brew "htop" +brew "jq" +brew "n" +brew "neovim" +brew "reattach-to-user-namespace" +brew "rust" +brew "starship" +brew "tmux" +brew "tpm" +brew "tree" brew "dnjstrom/git-select-branch/git-select-branch" - +cask "1password" cask "alacritty" cask "docker" +cask "figma" cask "font-fira-code" cask "google-chrome" cask "messenger" cask "phoenix" +cask "slack" cask "spotify" cask "visual-studio-code" +vscode "christian-kohler.npm-intellisense" +vscode "christian-kohler.path-intellisense" +vscode "dbaeumer.vscode-eslint" +vscode "EditorConfig.EditorConfig" +vscode "esbenp.prettier-vscode" +vscode "formulahendry.auto-close-tag" +vscode "formulahendry.auto-rename-tag" +vscode "mikestead.dotenv" +vscode "ms-azuretools.vscode-docker" +vscode "vscodevim.vim" diff --git a/.brew/README.md b/.brew/README.md new file mode 100644 index 0000000..7d51785 --- /dev/null +++ b/.brew/README.md @@ -0,0 +1,8 @@ +# Install + brew bundle install + +# Remove surplus packages + brew bundle cleanup -f + +# Overwrite + brew bundle dump \ No newline at end of file diff --git a/.config/fish/README.md b/.config/fish/README.md new file mode 100644 index 0000000..01e97bf --- /dev/null +++ b/.config/fish/README.md @@ -0,0 +1,3 @@ +# Install fish plugins + + fisher update \ No newline at end of file diff --git a/.fishrc.fish b/.config/fish/config.fish similarity index 83% rename from .fishrc.fish rename to .config/fish/config.fish index 89a2a7a..d50a701 100644 --- a/.fishrc.fish +++ b/.config/fish/config.fish @@ -1,26 +1,19 @@ # Clear greeting message on startup -set fish_greeting +set -g fish_greeting # Environment variables # Set english locale set -x LC_ALL en_US.UTF-8 set -x LANG en_US.UTF-8 set -x EDITOR nvim -set -x PATH $PATH ~/.bin -set -x PATH $PATH ~/.nix-profile/bin -set -x PATH $PATH ~/Code/dotfiles/bin +set -x N_PREFIX $HOME/.local +set -x PATH $PATH /opt/homebrew/bin +set -x PATH $PATH $HOME/.local/bin -# Set up secret environment variables -# source ~/.dotfiles/fish/config.secret.fish -# Load nix environment -if test -e /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh - fenv source /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh -end -if test -e /nix/var/nix/profiles/default/etc/profile.d/nix.sh - fenv source /nix/var/nix/profiles/default/etc/profile.d/nix.sh -end +# Set up secret environment variables +# source ~/.dotfiles/fish/config.secret.fish # Alias for managing config files alias cfg='git --git-dir=$HOME/Code/dotfiles/ --work-tree=$HOME' @@ -94,5 +87,4 @@ set -u fish_color_quote green starship init fish | source -direnv hook fish | source brew shellenv | source diff --git a/.config/fish/fish_plugins b/.config/fish/fish_plugins new file mode 100644 index 0000000..0b30811 --- /dev/null +++ b/.config/fish/fish_plugins @@ -0,0 +1,4 @@ +oh-my-fish/plugin-foreign-env +jorgebucaran/autopair.fish +oh-my-fish/plugin-grc +jethrokuan/z diff --git a/.config/home-manager/home.nix b/.config/home-manager/home.nix deleted file mode 100644 index 2e8a47c..0000000 --- a/.config/home-manager/home.nix +++ /dev/null @@ -1,59 +0,0 @@ -{ config, pkgs, lib, ... }: - -{ - # Home Manager needs a bit of information about you and the - # paths it should manage. - home.username = "daniel"; - home.homeDirectory = "/Users/daniel"; - - - # This value determines the Home Manager release that your - # configuration is compatible with. This helps avoid breakage - # when a new Home Manager release introduces backwards - # incompatible changes. - # - # You can update Home Manager without changing this value. See - # the Home Manager release notes for a list of state version - # changes in each release. - home.stateVersion = "23.05"; - - # Let Home Manager install and manage itself. - programs.home-manager.enable = true; - - - home.packages = [ - pkgs.ctop - pkgs.direnv - pkgs.fish - pkgs.git - pkgs.grc - pkgs.htop - pkgs.jq - pkgs.neovim - pkgs.reattach-to-user-namespace - pkgs.starship - pkgs.tmux - pkgs.tree - ]; - - programs.fish = { - enable = true; - - plugins = [ - { name = "foreign-env"; src = pkgs.fishPlugins.foreign-env.src; } - { name = "autopair-fish"; src = pkgs.fishPlugins.autopair-fish.src; } - { name = "grc"; src = pkgs.fishPlugins.grc.src; } - { - name = "z"; - src = pkgs.fetchFromGitHub { - owner = "jethrokuan"; - repo = "z"; - rev = "85f863f20f24faf675827fb00f3a4e15c7838d76"; - sha256 = "sha256-+FUBM7CodtZrYKqU542fQD+ZDGrd2438trKM0tIESs0="; - }; - } - ]; - - shellInit = "source $HOME/.fishrc.fish"; - }; -} diff --git a/.config/nixpkgs/config.nix b/.config/nixpkgs/config.nix deleted file mode 100644 index 1dd1750..0000000 --- a/.config/nixpkgs/config.nix +++ /dev/null @@ -1,3 +0,0 @@ -{ - allowUnfree = true; -} diff --git a/.github/README.md b/.github/README.md index 8a81edc..801ec14 100644 --- a/.github/README.md +++ b/.github/README.md @@ -36,21 +36,16 @@ cd ~/.brew brew bundle install ``` -#### Install Nix +##### Install tmux plugins -https://nixos.org/download.html#nix-install-macos + tmux + # Type -``` -sh <(curl -L https://nixos.org/nix/install) -``` +##### Install fish plugins -#### Install Home manager + fisher update -https://rycee.gitlab.io/home-manager/index.html#sec-install-standalone +##### Install vim plugins -``` -nix-channel --add https://github.com/nix-community/home-manager/archive/master.tar.gz home-manager -nix-channel --update -nix-shell '' -A install -home-manager switch -``` + vim + :PlugInstall \ No newline at end of file diff --git a/.tmux.conf b/.tmux.conf index ae6a69d..6d9bd10 100644 --- a/.tmux.conf +++ b/.tmux.conf @@ -14,8 +14,8 @@ set -g @plugin 'tmux-plugins/tmux-open' # Use fish shell -set -g default-command /Users/daniel/.nix-profile/bin/fish -set -g default-shell /Users/daniel/.nix-profile/bin/fish +set -g default-command /opt/homebrew/bin/fish +set -g default-shell /opt/homebrew/bin/fish # Add truecolor support set-option -ga terminal-overrides ",xterm-256color:Tc" @@ -83,7 +83,7 @@ set -ga status-right '#{?client_prefix,#[fg=yellow],#[fg=blue]}#{?client_pref # Install tmux plugin manager and plugins, if not already available if "test ! -d ~/.tmux/plugins/tpm" \ - "run 'git clone https://github.com/tmux-plugins/tpm; ~/.tmux/plugins/tpm; ~/.tmux/plugins/tpm/bin/install_plugins'" + "run 'git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm; ~/.tmux/plugins/tpm/bin/install_plugins'" # Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf) # Press prefix + I (capital I, as in Install) to fetch the plugin.