Compare commits

...

2 Commits

51 changed files with 778 additions and 204 deletions

2
.stowrc Normal file
View File

@@ -0,0 +1,2 @@
--target=~/
--dir=home

View File

@@ -1,29 +1,8 @@
Tony's DotFiles
===============
# Tony's DotFiles
This is a collection of all the files that I want very easily available on any new machine that I sit down at. The install script is designed to be run either from the cloned repository or as a stand-alone script through curl. See the usage details for examples.
## Scripts
WARNING
-------
`install-packages.sh` is not really meant to be run automatically, and is instead mostly just documentation of what packages I have installed and how they were added.
The install script provided with these dotfiles is destructive and will overwrite files without asking. To ensure that you do not lose anything important please backup your .bashrc, .gitconfig, .gitignore, .inputrc, .tmux.conf, and .vimrc files in your home directory.
I can not be held responsible if you lose any important data.
Usage
-----
**Method 1**
The first method requires cloning the repository and running the install script manually.
git clone ssh://git@git.grosinger.net:22322/tgrosinger/dotfiles.git ~/.dotfiles
cd ~/.dotfiles
./install.sh
**Method 2**
The second method does not require cloning the repository however it does require that Git and Curl is installed on the target machine.
\curl -sSL https://git.grosinger.net/tgrosinger/dotfiles/raw/branch/main/install.sh | bash
`run-stow.sh` just links the dotfiles from this repo into their correct locations.

View File

@@ -1,13 +0,0 @@
# https://docs.atuin.sh/configuration/config/
workspaces = true
keymap_mode = "auto"
enter_accept = true
history_filter = [
"^cd$",
"^lg$",
"^ls$",
"^clear$",
"^vim$",
]

View File

View File

@@ -304,4 +304,4 @@
"command": "workbench.action.navigateForward",
"when": "canNavigateForward && editorTextFocus && vim.active"
}
]
]

View File

@@ -280,5 +280,7 @@
"typescript.inlayHints.propertyDeclarationTypes.enabled": true,
"typescript.inlayHints.variableTypes.enabled": true,
"editor.inlayHints.fontFamily": "Sriracha",
"github.copilot.nextEditSuggestions.enabled": true
"github.copilot.nextEditSuggestions.enabled": true,
"gitlens.ai.model": "vscode",
"gitlens.ai.vscode.model": "copilot:gpt-4.1"
}

View File

@@ -0,0 +1,10 @@
[general]
import = [
"~/.config/alacritty/themes/catppuccin_latte.toml"
]
[font]
normal = { family = "JetBrainsMonoNerdFontMono", style = "Regular" }
bold = { family = "JetBrainsMonoNerdFontMono", style = "Bold" }
italic = { family = "JetBrainsMonoNerdFontMono", style = "Italic" }
bold_italic = { family = "JetBrainsMonoNerdFontMono", style = "BoldItalic" }

View File

@@ -0,0 +1,76 @@
# Default colors
[colors.primary]
background = '#EFF1F5' # base
foreground = '#4C4F69' # text
# Bright and dim foreground colors
dim_foreground = '#4C4F69' # text
bright_foreground = '#4C4F69' # text
# Cursor colors
[colors.cursor]
text = '#EFF1F5' # base
cursor = '#DC8A78' # rosewater
[colors.vi_mode_cursor]
text = '#EFF1F5' # base
cursor = '#7287FD' # lavender
# Search colors
[colors.search.matches]
foreground = '#EFF1F5' # base
background = '#6C6F85' # subtext0
[colors.search.focused_match]
foreground = '#EFF1F5' # base
background = '#40A02B' # green
[colors.footer_bar]
foreground = '#EFF1F5' # base
background = '#6C6F85' # subtext0
# Keyboard regex hints
[colors.hints.start]
foreground = '#EFF1F5' # base
background = '#DF8E1D' # yellow
[colors.hints.end]
foreground = '#EFF1F5' # base
background = '#6C6F85' # subtext0
# Selection colors
[colors.selection]
text = '#EFF1F5' # base
background = '#DC8A78' # rosewater
# Normal colors
[colors.normal]
black = '#5C5F77' # subtext1
red = '#D20F39' # red
green = '#40A02B' # green
yellow = '#DF8E1D' # yellow
blue = '#1E66F5' # blue
magenta = '#EA76CB' # pink
cyan = '#179299' # teal
white = '#ACB0BE' # surface2
# Bright colors
[colors.bright]
black = '#6C6F85' # subtext0
red = '#D20F39' # red
green = '#40A02B' # green
yellow = '#DF8E1D' # yellow
blue = '#1E66F5' # blue
magenta = '#EA76CB' # pink
cyan = '#179299' # teal
white = '#BCC0CC' # surface1
# Dim colors
[colors.dim]
black = '#5C5F77' # subtext1
red = '#D20F39' # red
green = '#40A02B' # green
yellow = '#DF8E1D' # yellow
blue = '#1E66F5' # blue
magenta = '#EA76CB' # pink
cyan = '#179299' # teal
white = '#ACB0BE' # surface2

View File

@@ -0,0 +1,20 @@
# https://docs.atuin.sh/configuration/config/
workspaces = true
keymap_mode = "auto"
enter_accept = true
history_filter = [
"^cd$",
"^lg$",
"^ls$",
"^clear$",
"^vim$",
]
[search]
## The list of enabled filter modes, in order of priority.
## The "workspace" mode is skipped when not in a workspace or workspaces = false.
## Default filter mode can be overridden with the filter_mode setting.
#filters = [ "global", "host", "session", "session-preload", "workspace", "directory" ]
filters = [ "global", "workspace", "directory" ]

View File

@@ -0,0 +1,235 @@
# fish completion for devbox -*- shell-script -*-
function __devbox_debug
set -l file "$BASH_COMP_DEBUG_FILE"
if test -n "$file"
echo "$argv" >> $file
end
end
function __devbox_perform_completion
__devbox_debug "Starting __devbox_perform_completion"
# Extract all args except the last one
set -l args (commandline -opc)
# Extract the last arg and escape it in case it is a space
set -l lastArg (string escape -- (commandline -ct))
__devbox_debug "args: $args"
__devbox_debug "last arg: $lastArg"
# Disable ActiveHelp which is not supported for fish shell
set -l requestComp "DEVBOX_ACTIVE_HELP=0 $args[1] __complete $args[2..-1] $lastArg"
__devbox_debug "Calling $requestComp"
set -l results (eval $requestComp 2> /dev/null)
# Some programs may output extra empty lines after the directive.
# Let's ignore them or else it will break completion.
# Ref: https://github.com/spf13/cobra/issues/1279
for line in $results[-1..1]
if test (string trim -- $line) = ""
# Found an empty line, remove it
set results $results[1..-2]
else
# Found non-empty line, we have our proper output
break
end
end
set -l comps $results[1..-2]
set -l directiveLine $results[-1]
# For Fish, when completing a flag with an = (e.g., <program> -n=<TAB>)
# completions must be prefixed with the flag
set -l flagPrefix (string match -r -- '-.*=' "$lastArg")
__devbox_debug "Comps: $comps"
__devbox_debug "DirectiveLine: $directiveLine"
__devbox_debug "flagPrefix: $flagPrefix"
for comp in $comps
printf "%s%s\n" "$flagPrefix" "$comp"
end
printf "%s\n" "$directiveLine"
end
# this function limits calls to __devbox_perform_completion, by caching the result behind $__devbox_perform_completion_once_result
function __devbox_perform_completion_once
__devbox_debug "Starting __devbox_perform_completion_once"
if test -n "$__devbox_perform_completion_once_result"
__devbox_debug "Seems like a valid result already exists, skipping __devbox_perform_completion"
return 0
end
set --global __devbox_perform_completion_once_result (__devbox_perform_completion)
if test -z "$__devbox_perform_completion_once_result"
__devbox_debug "No completions, probably due to a failure"
return 1
end
__devbox_debug "Performed completions and set __devbox_perform_completion_once_result"
return 0
end
# this function is used to clear the $__devbox_perform_completion_once_result variable after completions are run
function __devbox_clear_perform_completion_once_result
__devbox_debug ""
__devbox_debug "========= clearing previously set __devbox_perform_completion_once_result variable =========="
set --erase __devbox_perform_completion_once_result
__devbox_debug "Successfully erased the variable __devbox_perform_completion_once_result"
end
function __devbox_requires_order_preservation
__devbox_debug ""
__devbox_debug "========= checking if order preservation is required =========="
__devbox_perform_completion_once
if test -z "$__devbox_perform_completion_once_result"
__devbox_debug "Error determining if order preservation is required"
return 1
end
set -l directive (string sub --start 2 $__devbox_perform_completion_once_result[-1])
__devbox_debug "Directive is: $directive"
set -l shellCompDirectiveKeepOrder 32
set -l keeporder (math (math --scale 0 $directive / $shellCompDirectiveKeepOrder) % 2)
__devbox_debug "Keeporder is: $keeporder"
if test $keeporder -ne 0
__devbox_debug "This does require order preservation"
return 0
end
__devbox_debug "This doesn't require order preservation"
return 1
end
# This function does two things:
# - Obtain the completions and store them in the global __devbox_comp_results
# - Return false if file completion should be performed
function __devbox_prepare_completions
__devbox_debug ""
__devbox_debug "========= starting completion logic =========="
# Start fresh
set --erase __devbox_comp_results
__devbox_perform_completion_once
__devbox_debug "Completion results: $__devbox_perform_completion_once_result"
if test -z "$__devbox_perform_completion_once_result"
__devbox_debug "No completion, probably due to a failure"
# Might as well do file completion, in case it helps
return 1
end
set -l directive (string sub --start 2 $__devbox_perform_completion_once_result[-1])
set --global __devbox_comp_results $__devbox_perform_completion_once_result[1..-2]
__devbox_debug "Completions are: $__devbox_comp_results"
__devbox_debug "Directive is: $directive"
set -l shellCompDirectiveError 1
set -l shellCompDirectiveNoSpace 2
set -l shellCompDirectiveNoFileComp 4
set -l shellCompDirectiveFilterFileExt 8
set -l shellCompDirectiveFilterDirs 16
if test -z "$directive"
set directive 0
end
set -l compErr (math (math --scale 0 $directive / $shellCompDirectiveError) % 2)
if test $compErr -eq 1
__devbox_debug "Received error directive: aborting."
# Might as well do file completion, in case it helps
return 1
end
set -l filefilter (math (math --scale 0 $directive / $shellCompDirectiveFilterFileExt) % 2)
set -l dirfilter (math (math --scale 0 $directive / $shellCompDirectiveFilterDirs) % 2)
if test $filefilter -eq 1; or test $dirfilter -eq 1
__devbox_debug "File extension filtering or directory filtering not supported"
# Do full file completion instead
return 1
end
set -l nospace (math (math --scale 0 $directive / $shellCompDirectiveNoSpace) % 2)
set -l nofiles (math (math --scale 0 $directive / $shellCompDirectiveNoFileComp) % 2)
__devbox_debug "nospace: $nospace, nofiles: $nofiles"
# If we want to prevent a space, or if file completion is NOT disabled,
# we need to count the number of valid completions.
# To do so, we will filter on prefix as the completions we have received
# may not already be filtered so as to allow fish to match on different
# criteria than the prefix.
if test $nospace -ne 0; or test $nofiles -eq 0
set -l prefix (commandline -t | string escape --style=regex)
__devbox_debug "prefix: $prefix"
set -l completions (string match -r -- "^$prefix.*" $__devbox_comp_results)
set --global __devbox_comp_results $completions
__devbox_debug "Filtered completions are: $__devbox_comp_results"
# Important not to quote the variable for count to work
set -l numComps (count $__devbox_comp_results)
__devbox_debug "numComps: $numComps"
if test $numComps -eq 1; and test $nospace -ne 0
# We must first split on \t to get rid of the descriptions to be
# able to check what the actual completion will be.
# We don't need descriptions anyway since there is only a single
# real completion which the shell will expand immediately.
set -l split (string split --max 1 \t $__devbox_comp_results[1])
# Fish won't add a space if the completion ends with any
# of the following characters: @=/:.,
set -l lastChar (string sub -s -1 -- $split)
if not string match -r -q "[@=/:.,]" -- "$lastChar"
# In other cases, to support the "nospace" directive we trick the shell
# by outputting an extra, longer completion.
__devbox_debug "Adding second completion to perform nospace directive"
set --global __devbox_comp_results $split[1] $split[1].
__devbox_debug "Completions are now: $__devbox_comp_results"
end
end
if test $numComps -eq 0; and test $nofiles -eq 0
# To be consistent with bash and zsh, we only trigger file
# completion when there are no other completions
__devbox_debug "Requesting file completion"
return 1
end
end
return 0
end
# Since Fish completions are only loaded once the user triggers them, we trigger them ourselves
# so we can properly delete any completions provided by another script.
# Only do this if the program can be found, or else fish may print some errors; besides,
# the existing completions will only be loaded if the program can be found.
if type -q "devbox"
# The space after the program name is essential to trigger completion for the program
# and not completion of the program name itself.
# Also, we use '> /dev/null 2>&1' since '&>' is not supported in older versions of fish.
complete --do-complete "devbox " > /dev/null 2>&1
end
# Remove any pre-existing completions for the program since we will be handling all of them.
complete -c devbox -e
# this will get called after the two calls below and clear the $__devbox_perform_completion_once_result global
complete -c devbox -n '__devbox_clear_perform_completion_once_result'
# The call to __devbox_prepare_completions will setup __devbox_comp_results
# which provides the program's completion choices.
# If this doesn't require order preservation, we don't use the -k flag
complete -c devbox -n 'not __devbox_requires_order_preservation && __devbox_prepare_completions' -f -a '$__devbox_comp_results'
# otherwise we use the -k flag
complete -k -c devbox -n '__devbox_requires_order_preservation && __devbox_prepare_completions' -f -a '$__devbox_comp_results'

View File

@@ -0,0 +1,26 @@
if status is-interactive
# Commands to run in interactive sessions can go here
# Disable the welcome message
# https://fishshell.com/docs/current/cmds/fish_greeting.html
set -g fish_greeting
if test -f /home/linuxbrew/.linuxbrew/bin/brew
/home/linuxbrew/.linuxbrew/bin/brew shellenv | source
end
if test -f $(which atuin)
atuin init fish | source
end
# Override globals
set -gx EDITOR nvim
# Aliases
alias vim="nvim"
alias dc="podman compose"
alias lg="lazygit"
alias la="eza --long --header --git --group --time-style long-iso -a"
# Set Path
fish_add_path -p /home/tgrosinger/.dotfiles/bin/linux
end

View File

@@ -0,0 +1,43 @@
# This file contains fish universal variable definitions.
# VERSION: 3.0
SETUVAR __fish_initialized:3800
SETUVAR fish_color_autosuggestion:9ca0b0
SETUVAR fish_color_cancel:d20f39
SETUVAR fish_color_command:1e66f5
SETUVAR fish_color_comment:8c8fa1
SETUVAR fish_color_cwd:df8e1d
SETUVAR fish_color_cwd_root:red
SETUVAR fish_color_end:fe640b
SETUVAR fish_color_error:d20f39
SETUVAR fish_color_escape:e64553
SETUVAR fish_color_gray:9ca0b0
SETUVAR fish_color_history_current:\x2d\x2dbold
SETUVAR fish_color_host:1e66f5
SETUVAR fish_color_host_remote:40a02b
SETUVAR fish_color_keyword:8839ef
SETUVAR fish_color_normal:4c4f69
SETUVAR fish_color_operator:ea76cb
SETUVAR fish_color_option:40a02b
SETUVAR fish_color_param:dd7878
SETUVAR fish_color_quote:40a02b
SETUVAR fish_color_redirection:ea76cb
SETUVAR fish_color_search_match:\x2d\x2dbackground\x3dccd0da
SETUVAR fish_color_selection:\x2d\x2dbackground\x3dccd0da
SETUVAR fish_color_status:d20f39
SETUVAR fish_color_user:179299
SETUVAR fish_color_valid_path:\x2d\x2dunderline
SETUVAR fish_key_bindings:fish_vi_key_bindings
SETUVAR fish_pager_color_background:\x1d
SETUVAR fish_pager_color_completion:4c4f69
SETUVAR fish_pager_color_description:9ca0b0
SETUVAR fish_pager_color_prefix:ea76cb
SETUVAR fish_pager_color_progress:9ca0b0
SETUVAR fish_pager_color_secondary_background:\x1d
SETUVAR fish_pager_color_secondary_completion:\x1d
SETUVAR fish_pager_color_secondary_description:\x1d
SETUVAR fish_pager_color_secondary_prefix:\x1d
SETUVAR fish_pager_color_selected_background:\x1d
SETUVAR fish_pager_color_selected_completion:\x1d
SETUVAR fish_pager_color_selected_description:\x1d
SETUVAR fish_pager_color_selected_prefix:\x1d
SETUVAR fish_user_paths:/home/tgrosinger/\x2edotfiles/bin/linux

View File

@@ -0,0 +1,24 @@
function fish_prompt
set -l __last_command_exit_status $status
set -l cyan (set_color -o cyan)
set -l yellow (set_color -o yellow)
set -l red (set_color -o red)
set -l green (set_color -o green)
set -l blue (set_color -o blue)
set -l normal (set_color normal)
set -l arrow_color "$green"
if test $__last_command_exit_status != 0
set arrow_color "$red"
end
set -l arrow "$arrow_color"
if fish_is_root_user
set arrow "$arrow_color# "
end
set -l cwd $cyan(prompt_pwd | path basename)
echo -n -s $arrow ' '$cwd $repo_info $normal ' '
end

View File

@@ -0,0 +1,30 @@
# name: 'Catppuccin Latte'
# url: 'https://github.com/catppuccin/fish'
# preferred_background: eff1f5
fish_color_normal 4c4f69
fish_color_command 1e66f5
fish_color_param dd7878
fish_color_keyword 8839ef
fish_color_quote 40a02b
fish_color_redirection ea76cb
fish_color_end fe640b
fish_color_comment 8c8fa1
fish_color_error d20f39
fish_color_gray 9ca0b0
fish_color_selection --background=ccd0da
fish_color_search_match --background=ccd0da
fish_color_option 40a02b
fish_color_operator ea76cb
fish_color_escape e64553
fish_color_autosuggestion 9ca0b0
fish_color_cancel d20f39
fish_color_cwd df8e1d
fish_color_user 179299
fish_color_host 1e66f5
fish_color_host_remote 40a02b
fish_color_status d20f39
fish_pager_color_progress 9ca0b0
fish_pager_color_prefix ea76cb
fish_pager_color_completion 4c4f69
fish_pager_color_description 9ca0b0

222
home/.config/sway/config Normal file
View File

@@ -0,0 +1,222 @@
# Default config for sway
# Read `man 5 sway` for a complete reference.
### Variables
#
# Logo key. Use Mod1 for Alt.
set $mod Mod4
# Home row direction keys, like vim
set $left h
set $down j
set $up k
set $right l
# Your preferred terminal emulator
set $term alacritty
# Your preferred application launcher
# Note: pass the final command to swaymsg so that the resulting window can be opened
# on the original workspace that the command was run on.
# Recommends: rofi-wayland
set $rofi_cmd rofi \
-terminal '$term'
# Shows a combined list of the applications with desktop files and
# executables from PATH.
# TODO: add window with the next release of rofi-wayland
set $menu $rofi_cmd -show combi -combi-modes drun#run -modes combi
### Output configuration
#
# Default wallpaper (more resolutions are available in /usr/share/backgrounds/sway/)
# Requires: desktop-backgrounds-compat, swaybg, jxl-pixbuf-loader
output * bg /usr/share/backgrounds/default.jxl fill
#
# Example configuration:
#
# output HDMI-A-1 resolution 1920x1080 position 1920,0
#
# You can get the names of your outputs by running: swaymsg -t get_outputs
### Idle configuration
#
# Example configuration:
#
# exec swayidle -w \
# timeout 300 'swaylock -f -c 000000' \
# timeout 600 'swaymsg "output * power off"' resume 'swaymsg "output * power on"' \
# before-sleep 'swaylock -f -c 000000'
#
# This will lock your screen after 300 seconds of inactivity, then turn off
# your displays after another 300 seconds, and turn your screens back on when
# resumed. It will also lock your screen before your computer goes to sleep.
### Input configuration
# You can get the names of your inputs by running: swaymsg -t get_inputs
# Read `man 5 sway-input` for more information about this section.
input "2362:628:PIXA3854:00_093A:0274_Touchpad" {
# Allow clicking by tapping.
tap enabled
# Moving fingers up moves the display down, like a phone.
natural_scroll enabled
# Two fingers is right click.
click_method clickfinger
}
### Key bindings
#
# Basics:
#
# Start a terminal
bindsym $mod+Return exec $term
# Kill focused window
bindsym $mod+Shift+q kill
# Start your launcher
bindsym $mod+d exec $menu
# Drag floating windows by holding down $mod and left mouse button.
# Resize them with right mouse button + $mod.
# Despite the name, also works for non-floating windows.
# Change normal to inverse to use left mouse button for resizing and right
# mouse button for dragging.
floating_modifier $mod normal
# Reload the configuration file
bindsym $mod+Shift+c reload
# Exit sway (logs you out of your Wayland session)
bindsym $mod+Shift+e exec swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -B 'Yes, exit sway' 'swaymsg exit'
#
# Moving around:
#
# Move your focus around
bindsym $mod+$left focus left
bindsym $mod+$down focus down
bindsym $mod+$up focus up
bindsym $mod+$right focus right
# Or use $mod+[up|down|left|right]
bindsym $mod+Left focus left
bindsym $mod+Down focus down
bindsym $mod+Up focus up
bindsym $mod+Right focus right
# Move the focused window with the same, but add Shift
bindsym $mod+Shift+$left move left
bindsym $mod+Shift+$down move down
bindsym $mod+Shift+$up move up
bindsym $mod+Shift+$right move right
# Ditto, with arrow keys
bindsym $mod+Shift+Left move left
bindsym $mod+Shift+Down move down
bindsym $mod+Shift+Up move up
bindsym $mod+Shift+Right move right
#
# Workspaces:
#
# Switch to workspace
bindsym $mod+1 workspace number 1
bindsym $mod+2 workspace number 2
bindsym $mod+3 workspace number 3
bindsym $mod+4 workspace number 4
bindsym $mod+5 workspace number 5
bindsym $mod+6 workspace number 6
bindsym $mod+7 workspace number 7
bindsym $mod+8 workspace number 8
bindsym $mod+9 workspace number 9
bindsym $mod+0 workspace number 10
# Move focused container to workspace
bindsym $mod+Shift+1 move container to workspace number 1
bindsym $mod+Shift+2 move container to workspace number 2
bindsym $mod+Shift+3 move container to workspace number 3
bindsym $mod+Shift+4 move container to workspace number 4
bindsym $mod+Shift+5 move container to workspace number 5
bindsym $mod+Shift+6 move container to workspace number 6
bindsym $mod+Shift+7 move container to workspace number 7
bindsym $mod+Shift+8 move container to workspace number 8
bindsym $mod+Shift+9 move container to workspace number 9
bindsym $mod+Shift+0 move container to workspace number 10
# Note: workspaces can have any name you want, not just numbers.
# We just use 1-10 as the default.
#
# Layout stuff:
#
# You can "split" the current object of your focus with
# $mod+b or $mod+v, for horizontal and vertical splits
# respectively.
bindsym $mod+b splith
bindsym $mod+v splitv
# Switch the current container between different layout styles
bindsym $mod+s layout stacking
bindsym $mod+w layout tabbed
bindsym $mod+e layout toggle split
# Make the current focus fullscreen
bindsym $mod+f fullscreen
# Toggle the current focus between tiling and floating mode
bindsym $mod+Shift+space floating toggle
# Swap focus between the tiling area and the floating area
bindsym $mod+space focus mode_toggle
# Move focus to the parent container
bindsym $mod+a focus parent
#
# Scratchpad:
#
# Sway has a "scratchpad", which is a bag of holding for windows.
# You can send windows there and get them back later.
# Move the currently focused window to the scratchpad
bindsym $mod+Shift+minus move scratchpad
# Show the next scratchpad window or hide the focused scratchpad window.
# If there are multiple scratchpad windows, this command cycles through them.
bindsym $mod+minus scratchpad show
#
# Resizing containers:
#
mode "resize" {
# left will shrink the containers width
# right will grow the containers width
# up will shrink the containers height
# down will grow the containers height
bindsym $left resize shrink width 10px
bindsym $down resize grow height 10px
bindsym $up resize shrink height 10px
bindsym $right resize grow width 10px
# Ditto, with arrow keys
bindsym Left resize shrink width 10px
bindsym Down resize grow height 10px
bindsym Up resize shrink height 10px
bindsym Right resize grow width 10px
# Return to default mode
bindsym Return mode "default"
bindsym Escape mode "default"
}
bindsym $mod+r mode "resize"
# Include configs from 3 locations:
# - /usr/share/sway/config.d
# - /etc/sway/config.d
# - $XDG_CONFIG_HOME/sway/config.d ($HOME/.config/sway/config.d)
#
# If multiple directories contain the files with the same name, the later
# directory takes precedence; `$XDG_CONFIG_HOME/sway/config.d/20-swayidle.conf`
# will always be loaded instead of `/usr/share/sway/config.d/20-swayidle.conf`
# or `/etc/sway/config.d/20-swayidle.conf`
#
# This mechanism permits overriding our default configuration per-system
# (/etc) or per-user ($XDG_CONFIG_HOME) basis. Just create the file you
# want to modify/override in the higher-level directory.
#
# For example, to disable the default bar from Fedora configs, you'll need to
# $ echo -n > "$HOME/.config/sway/config.d/90-bar.conf"
#
# Note the quoting, the $() and the arguments quoting. All the parts are equally
# important to make the magic work. And if you want to learn the secret behind
# the trick, it's all in the `wordexp(3)`.
#
include '$(/usr/libexec/sway/layered-include "/usr/share/sway/config.d/*.conf" "/etc/sway/config.d/*.conf" "${XDG_CONFIG_HOME:-$HOME/.config}/sway/config.d/*.conf")'

View File

72
install-packages.sh Executable file
View File

@@ -0,0 +1,72 @@
# Install homebrew dependencies
sudo dnf group install development-tools
echo "Installing homebrew"
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
# NOTE: Do not brew install anything with a dependency on node.
# Instead, install with npm -g.
brew install \
atuin \
bat \
eza \
fd \
fish \
fzf \
gcc \
git \
git-delta \
jq \
lazygit \
neovim \
restic \
ripgrep \
stow \
tmux
#crane \
#deno \
#dive \
#go \
#gron \
#hadolint \
#pnpm
#sqlite \
#stripe-cli \
#visidata \
brew services start atuin
# Previously these were installed with npm because I didn't want to use brew to
# install packages with a node dependency. I'm not sure if that is still required.
#npm install -g @devcontainers/cli
#npm install -g mjml
#npm install -g jsonlint
# Install ble.sh
# https://github.com/akinomyoga/ble.sh
# Install system packages
sudo dnf install \
alacritty \
distrobox \
fuse-libs \ # For running appimages
gstreamer1-plugin-openh264 mozilla-openh264 \ # For twitch videos
podman
# Install tailscale
# https://tailscale.com/kb/1511/install-fedora-2
# Install flatpaks
flatpak install io.dbeaver.DBeaverCommunity
flatpak install flathub org.gimp.GIMP
flatpak install flathub org.gnucash.GnuCash
flatpak install flathub org.kde.digikam
# Install devbox
# https://www.jetify.com/docs/devbox/installing-devbox
curl -fsSL https://get.jetify.com/devbox | bash
# Installing tmux plugins
git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm

View File

@@ -1,164 +0,0 @@
#!/bin/bash
################################################################################
#Copyright (C) 2022 Tony Grosinger. All rights reserved.
#
#Description:
# This script can be run in two modes depending on the file structure of the
# current working directory or the arguments passed to it.
#
# Mode 1: From within a cloned repository or downloaded snapshot with all files
# already present and ready to be symlinked
#
# Mode 2: Standalone or through Curl in which case all required files will be
# downloaded automatically to `~/.dotfiles` before creating symlinks.
#
################################################################################
DOTFILES_DIR="${HOME}/.dotfiles"
GIT_REPO_BASE="https://github.com/tgrosinger/dotfiles"
GIT_REPO="${GIT_REPO_BASE}.git"
REPO_TAR="${GIT_REPO_BASE}/archive/master.tar.gz"
################################################################################
# Define functions
################################################################################
# Remove a file if it exists then create a symlink to the one contained in ${DOTFILES_DIR}
function linkFile() {
ln -fns ${DOTFILES_DIR}/$1 $1;
}
# Create a directory named by first parameter. Delete directory first if it already exists.
function createDirectory() {
if [ -d $1 ]; then rm -rf $1; fi
mkdir $1
}
# Perform the actual work of copying files and creating symlinks.
# Requires a home directory argument.
function performSetup() {
if [ ${#} != 1 ]; then
echo "Must pass home directory to ${FUNCNAME}"
exit 1
fi
home=${1}
echo "Moving to Home directory..."
pushd ${home} > /dev/null
echo "Linking shell configs..."
linkFile ".bashrc"
echo "Linking vim..."
linkFile ".vim"
linkFile ".vimrc"
echo "Linking Git..."
linkFile ".gitconfig"
linkFile ".gitattributes"
echo "Linking LazyGit..."
mkdir -p ~/.config/lazygit
ln -fns ${DOTFILES_DIR}/.lazygit ~/.config/lazygit/config.yml
echo "Linking Atuin..."
mkdir -p ~/.config/atuin
ln -fns ${DOTFILES_DIR}/atuin.toml ~/.config/atuin/config.toml
echo "Linking Ble.sh..."
linkFile ".blerc"
echo "Linking tmux..."
linkFile ".tmux.conf"
echo "Linking inputrc..."
linkFile ".inputrc"
echo "Installing tmux plugins"
git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
echo "Linking gitmux..."
linkFile ".gitmux.conf"
echo "Linking neovim config"
ln -fns ${DOTFILES_DIR}/nvim ~/.config/nvim
echo "Installing homebrew"
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
# NOTE: Do not brew install anything with a dependency on node.
# Instead, install with npm -g.
brew install \
gcc \
fish \
atuin \
tmux neovim \
eza bat fzf ripgrep fd jq \
git lazygit git-delta \
restic
#gron visidata \
#hadolint \
#crane dive \
#go sqlite \
#stripe-cli \
#deno pnpm
brew services start atuin
#npm install -g @devcontainers/cli
#npm install -g mjml
#npm install -g jsonlint
popd > /dev/null
}
################################################################################
# Initialize (Determine mode)
################################################################################
# Determine which mode we are running in. (Does the install script exist in the dotfiles directory?)
if [ -f ${DOTFILES_DIR}/install.sh ]; then
echo "Running in Mode 1: Already cloned repository"
performSetup ${HOME}
echo "Done! Restart your shell to see changes"
else
echo "Running in Mode 2: Direct from Curl"
# Make sure git is installed. Exit if it isn't.
if which git; then
# Git is installed, clone the repository using read-only url
if [ -d ${DOTFILES_DIR} ]; then
if [ -d ${DOTFILES_DIR}/.git ]; then
echo "Updating dotfiles repository in ${DOTFILES_DIR}"
pushd ${DOTFILES_DIR} > /dev/null
git pull > /dev/null
popd > /dev/null
else
echo "Cloning dotfiles repository to ${DOTFILES_DIR}"
rm -rf ${DOTFILES_DIR}
git clone ${GIT_REPO} ${DOTFILES_DIR}
fi
else
echo "Cloning dotfiles repository to ${DOTFILES_DIR}"
git clone ${GIT_REPO} ${DOTFILES_DIR}
fi
else
# Git is not installed, download the zip and extract
if ! which wget; then
echo "You must have either git or wget installed. Please install one before continuing."
exit 1
fi
if [ -d ${DOTFILES_DIR} ]; then
rm -rf ${DOTFILES_DIR}
fi
mkdir ${DOTFILES_DIR}
curl -L ${REPO_TAR} | tar zx --strip 1 --directory ${DOTFILES_DIR}
fi
performSetup ${HOME}
echo "Done! Restart your shell to see changes"
fi

10
run-stow.sh Executable file
View File

@@ -0,0 +1,10 @@
#!/bin/bash
if [ ! -d "${HOME}/.dotfiles" ]; then
echo "Cannot find dotfiles directory in user home."
exit 1
fi
pushd ${HOME}/.dotfiles >/dev/null
stow -v .
popd >/dev/null