Stow restructuring

This commit is contained in:
Marcel Kapfer 2022-02-25 16:22:57 +01:00
parent 685e4dbe8b
commit 097cbd1c6d
Signed by: mmk2410
GPG key ID: CADE6F0C09F21B09
53 changed files with 62 additions and 205 deletions

6
.gitignore vendored
View file

@ -1,7 +1,3 @@
/fish/fishd.*
*~
dotdotfiles/
dot-private/
dot-work/
/shells/fish/functions/tide/
/shells/fish/functions/tide.fish
/shells/fish/conf.d/_tide_init.fish

View file

@ -1,6 +1,6 @@
The MIT License (MIT)
Copyright (c) 2015-2016 Marcel Kapfer
Copyright (c) 2015-2022 Marcel Kapfer
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

View file

View file

@ -1,13 +0,0 @@
.config/alacritty
.config/bspwm
.config/dunst
.config/fish
.config/kitty
.config/nvim
.config/polybar
.config/qtile
.config/qutebrowser
.config/redshift
.config/rofi
.config/sxhkd
.config/systemd/user

View file

@ -1,19 +0,0 @@
#!/usr/bin/fish
# Script for linking the dotfiles
echo "Creating necessary directories"
for dir in (cat dirs.list)
echo "Creating directory:" ~/$dir
mkdir -p ~/$dir
end
echo "Linking the dotfiles"
for link in (cat links.list)
set link (string split " " $link)
echo "creating symlink from" ~/dotfiles/$link[1] "to" ~/$link[2]
ln -s ~/dotfiles/$link[1] ~/$link[2]
end
echo "done"

View file

@ -1,31 +0,0 @@
alacritty/alacritty.yml .config/alacritty/alacritty.yml
bspwm/bspwmrc .config/bspwm/bspwmrc
bspwm/sxhkdrc .config/sxhkd/sxhkdrc
debian/dquilt .quiltrc-dpkg
debian/git-buildpackage.conf .gbp.conf
debian/pbuilder .pbuilderrc
debian/sbuild .sbuildrc
dotdotfiles/git/gitconfig .gitconfig
dotdotfiles/mbsync/mbsyncrc .mbsyncrc
dotdotfiles/msmtp/msmtprc .msmtprc
dunst/dunstrc .config/dunst/dunstrc
herbstluftwm .config/herbstluftwm
kitty/kitty.conf .config/kitty/kitty.conf
neovim/init.vim .config/nvim/init.vim
picom/picom.conf .config/picom.conf
polybar/config .config/polybar/config
qtile/config.py .config/qtile/config.py
qtile/startup.sh .config/qtile/startup.sh
qutebrowser/config.py .config/qutebrowser/config.py
redshift/redshift .config/redshift.conf
rofi/config.rasi .config/rofi/config.rasi
screen/screenrc .screenrc
shells/bashrc .bashrc
shells/fish/conf.d .config/fish/
shells/fish/functions .config/fish/
shells/zshrc .zshrc
stumpwm/stumpwmrc .stumpwmrc
systemd/* .config/systemd/user/
x/Xmodmap .Xmodmap
x/Xresources .Xresources
x/xinitrc .xinitrc

View file

@ -1,3 +0,0 @@
90-pure.fish
_pure_init.fish
pure.fish

View file

@ -1,36 +0,0 @@
__bass.py
bass.fish
fish_prompt.fish
fish_right_prompt.fish
git_ahead.fish
git_branch_name.fish
git_is_detached_head.fish
git_is_dirty.fish
git_is_empty.fish
git_is_repo.fish
git_is_staged.fish
git_is_stashed.fish
git_is_tag.fish
git_is_touched.fish
git_repository_root.fish
git_untracked_files.fish
humanize_duration.fish
segment.fish
segment_close.fish
segment_right.fish
set_color_custom.fish
vcs.name.fish
vcs.present.fish
fisher.fish
fin.fish
fish_greeting.fish
fish_mode_prompt.fish
host_info.fish
last_job_id.fish
pwd_info.fish
pwd_is_home.fish
_*
fish_prompt.fish
fish_title.fish
agnoster.fish
bobthefish_display_colors.fish

View file

@ -1,11 +0,0 @@
function gitignore_fisher_functions
set functions_path ~/.config/fish/functions/
if not test -e $functions_path
echo "Functions directory not found"
else
cd $functions_path
find * -type l > .gitignore
echo "fisher.fish" >> .gitignore
cd -
end
end

View file

@ -1,10 +0,0 @@
#
# /etc/zprofile and ~/.zprofile are run for login shells
#
# Add ~/.local/bin to path
PATH="$PATH:$HOME/.local/bin"
# Add ~/.npm-global/bin/ to path
PATH="$PATH:$HOME/.npm-global/bin"
export PATH

60
stow.sh Executable file
View file

@ -0,0 +1,60 @@
#!/bin/bash
set -euo pipefail
PRIMARY="\033[0;35m"
LOG="\033[0;36m"
SUCCESS="\033[0;32m"
NC="\033[0m"
BRAND="[stow]"
function log {
echo -e "${PRIMARY}${BRAND} ${LOG}$1${NC}"
}
function success {
echo -e "${PRIMARY}${BRAND} ${SUCCESS}$1${NC}"
}
DEFAULT_STOW_PKGS="alacritty systemd picom bash fish zsh stumpwm qutebrowser redshift neovim dunst x"
STOW_PKGS=${STOW_PKGS:=$DEFAULT_STOW_PKGS}
WORK_DOTFILES="${WORK_DOTFILES:=$HOME/.dotfiles/dot-work}"
DEFAULT_WORK_STOW_PKGS="mbsync msmtp ssh passwords"
WORK_STOW_PKGS="${WORK_STOW_PKGS:=$DEFAULT_WORK_STOW_PKGS}"
PRIVATE_DOTFILES="${PRIVATE_DOTFILES:=$HOME/.dotfiles/dot-private}"
DEFAULT_PRIVATE_STOW_PKGS="mbsync msmtp ssh git"
PRIVATE_STOW_PKGS="${PRIVATE_STOW_PKGS:=$DEFAULT_PRIVATE_STOW_PKGS}"
WORK_MACHINE="knuth"
CURRENT_MACHINE="$(hostname)"
log "Stowing general packages."
for pkg in $STOW_PKGS
do
log "Stowing $pkg package."
stow $@ "$pkg"
done
log "Finished stowing general packages."
if [[ "$WORK_MACHINE" == "$CURRENT_MACHINE" ]]
then
log "Detected work system. Stowing relevant files."
for pkg in $WORK_STOW_PKGS
do
log "Stowing $pkg package."
stow $@ -d "$WORK_DOTFILES" -t "$HOME" "$pkg"
done
log "Finished stowing work packages."
else
log "Detected personal system. Stowing relevant packages."
for pkg in $PRIVATE_STOW_PKGS
do
log "Stowing $pkg package."
stow $@ -d "$PRIVATE_DOTFILES" -t "$HOME" "$pkg"
done
log "Finished stowing private packages."
fi
success "Finished stowing files."

View file

@ -1,57 +0,0 @@
! terminal colors -------------------------------------------------------------
*background: #282828
*foreground: #ebdbb2
*color0: #282828
*color8: #928374
*color1: #cc241d
*color9: #fb4934
*color2: #98971a
*color10: #b8bb26
*color3: #d79921
*color11: #fabd2f
*color4: #458588
*color12: #83a598
*color5: #b16286
*color13: #d3869b
*color6: #689d6a
*color14: #8ec07c
*color7: #a89984
*color15: #ebdbb2
! Xcursor ---------------------------------------------------------------------
Xcursor.theme: Vanilla-DMZ-AA
Xcursor.size: 24
! Xft setttings ---------------------------------------------------------------
Xft.dpi: 192
Xft.antialias: true
Xft.rgba: rgb
Xft.hinting: true
Xft.hintstyle: hintslight
! xterm ----------------------------------------------------------------------
xterm*termName: xterm-256color
xterm*locale: true
xterm*metaSendsEscape: true
xterm*faceName: Hermit:style=Medium:size=11
xterm*dymanicColors: true
xtem*utf8: 2
xterm*eightBitInput: true
xterm*saveLines: 4096
xterm*scrollKey: true
xterm*scrollTtyOutput: false
xterm*scrollBar: true
xterm*rightScrollBar: true
xterm*jumpScroll: true
xterm*multiScroll: true
xterm*fastScroll: true
xterm*toolBar: false
xterm*VT100.translations: #override <Btn1Up>: select-end(PRIMARY, CLIPBOARD, CUT_BUFFER0)
! xpdf ------------------------------------------------------------------------
xpdf*enableFreetype: yes
xpdf*antialias: yes
xpdf*foreground: black:
xpdf*background: white
xpdf*urlCommand: /usr/bin/iceweasel %s

View file

@ -1 +0,0 @@
Xft.dpi: 192

View file

@ -1,18 +0,0 @@
#!/bin/sh
######################################
### Additional X Environment variables
######################################
export QT_QPA_PLATFORMTHEME=qt5ct
##################################
### Adjust for multi-monitor setup
##################################
extern="HDMI-1"
intern="eDP-1"
if xrandr | grep "$extern connected"; then
xrandr --output "$extern" --auto --primary --left-of "$intern"
fi