From a8668f540956e4911cc4b3d87254251116ce2d36 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Pankowski?= Date: Tue, 21 Jul 2020 06:50:01 +0200 Subject: [PATCH] reorganize to use stow to manage configs, remove fish and stumpwm configs --- .config/fish/config.fish | 11 --- .config/fish/functions/fish_prompt.fish | 97 ------------------- .config/fish/functions/fish_title.fish | 3 - .config/st/config.h.patch | 63 ------------ .config/stumpwm/config | 95 ------------------ .zshenv | 1 - README.md | 17 ++++ .../.config}/alacritty/alacritty.yml | 0 .../.config}/alacritty/switch_bg.py | 0 .Xresources => bspwm/.Xresources | 0 {.config => bspwm/.config}/bspwm/bspwmrc | 0 {.config => bspwm/.config}/bspwm/commands.sh | 0 {.config => bspwm/.config}/polybar/config | 0 {.config => bspwm/.config}/sxhkd/sxhkdrc | 0 .xsession => bspwm/.xsession | 0 {.config => i3/.config}/i3/config | 0 {.config => i3/.config}/i3status/config | 0 {.config => music/.config}/mpd/mpd.conf | 0 shell/.config/zsh/plugins/README.md | 6 ++ .profile => shell/.profile | 0 {.config/zsh => shell}/.zprofile | 0 {.config/zsh => shell}/.zshrc | 3 +- .tmux.conf => tmux/.tmux.conf | 0 23 files changed, 24 insertions(+), 272 deletions(-) delete mode 100644 .config/fish/config.fish delete mode 100644 .config/fish/functions/fish_prompt.fish delete mode 100644 .config/fish/functions/fish_title.fish delete mode 100644 .config/st/config.h.patch delete mode 100644 .config/stumpwm/config delete mode 100644 .zshenv create mode 100644 README.md rename {.config => alacritty/.config}/alacritty/alacritty.yml (100%) rename {.config => alacritty/.config}/alacritty/switch_bg.py (100%) rename .Xresources => bspwm/.Xresources (100%) rename {.config => bspwm/.config}/bspwm/bspwmrc (100%) rename {.config => bspwm/.config}/bspwm/commands.sh (100%) rename {.config => bspwm/.config}/polybar/config (100%) rename {.config => bspwm/.config}/sxhkd/sxhkdrc (100%) rename .xsession => bspwm/.xsession (100%) rename {.config => i3/.config}/i3/config (100%) rename {.config => i3/.config}/i3status/config (100%) rename {.config => music/.config}/mpd/mpd.conf (100%) create mode 100644 shell/.config/zsh/plugins/README.md rename .profile => shell/.profile (100%) rename {.config/zsh => shell}/.zprofile (100%) rename {.config/zsh => shell}/.zshrc (96%) rename .tmux.conf => tmux/.tmux.conf (100%) diff --git a/.config/fish/config.fish b/.config/fish/config.fish deleted file mode 100644 index bf9e006..0000000 --- a/.config/fish/config.fish +++ /dev/null @@ -1,11 +0,0 @@ -# abbr -a e emacsclient -n - -set -g fish_prompt_pwd_dir_length 0 - -bind \cg cancel - -# to synch current directory betweeen Emacs an fish shell in vterm -function fish_vterm_prompt_end; - printf '\e]51;A'(whoami)'@'(prompt_hostname)':'(pwd)'\e\\'; -end -function track_directories --on-event fish_prompt; fish_vterm_prompt_end; end diff --git a/.config/fish/functions/fish_prompt.fish b/.config/fish/functions/fish_prompt.fish deleted file mode 100644 index 4f7de1c..0000000 --- a/.config/fish/functions/fish_prompt.fish +++ /dev/null @@ -1,97 +0,0 @@ -function fish_prompt --description 'Write out the prompt' - set -l last_status $status - - if not set -q __fish_git_prompt_show_informative_status - set -g __fish_git_prompt_show_informative_status 1 - end - if not set -q __fish_git_prompt_hide_untrackedfiles - set -g __fish_git_prompt_hide_untrackedfiles 1 - end - - if not set -q __fish_git_prompt_color_branch - set -g __fish_git_prompt_color_branch magenta --bold - end - if not set -q __fish_git_prompt_showupstream - set -g __fish_git_prompt_showupstream "informative" - end - if not set -q __fish_git_prompt_char_upstream_ahead - set -g __fish_git_prompt_char_upstream_ahead "↑" - end - if not set -q __fish_git_prompt_char_upstream_behind - set -g __fish_git_prompt_char_upstream_behind "↓" - end - if not set -q __fish_git_prompt_char_upstream_prefix - set -g __fish_git_prompt_char_upstream_prefix "" - end - - if not set -q __fish_git_prompt_char_stagedstate - set -g __fish_git_prompt_char_stagedstate "●" - end - if not set -q __fish_git_prompt_char_dirtystate - set -g __fish_git_prompt_char_dirtystate "✚" - end - if not set -q __fish_git_prompt_char_untrackedfiles - set -g __fish_git_prompt_char_untrackedfiles "…" - end - if not set -q __fish_git_prompt_char_invalidstate - set -g __fish_git_prompt_char_invalidstate "✖" - end - if not set -q __fish_git_prompt_char_cleanstate - set -g __fish_git_prompt_char_cleanstate "✔" - end - - if not set -q __fish_git_prompt_color_dirtystate - set -g __fish_git_prompt_color_dirtystate blue - end - if not set -q __fish_git_prompt_color_stagedstate - set -g __fish_git_prompt_color_stagedstate yellow - end - if not set -q __fish_git_prompt_color_invalidstate - set -g __fish_git_prompt_color_invalidstate red - end - if not set -q __fish_git_prompt_color_untrackedfiles - set -g __fish_git_prompt_color_untrackedfiles $fish_color_normal - end - if not set -q __fish_git_prompt_color_cleanstate - set -g __fish_git_prompt_color_cleanstate green --bold - end - - if not set -q __fish_prompt_normal - set -g __fish_prompt_normal (set_color normal) - end - - set -l color_cwd - set -l prefix - set -l suffix - switch "$USER" - case root toor - if set -q fish_color_cwd_root - set color_cwd $fish_color_cwd_root - else - set color_cwd $fish_color_cwd - end - set suffix '#' - case '*' - set color_cwd $fish_color_cwd - set suffix '$' - end - - # USER@HOST - set_color normal - printf '%s@%s ' "$USER" (prompt_hostname) - - # PWD - set_color $color_cwd - echo -n (prompt_pwd) - set_color normal - - printf '%s ' (__fish_vcs_prompt) - - if not test $last_status -eq 0 - set_color $fish_color_error - echo -n "[$last_status] " - set_color normal - end - - echo -n "$suffix " -end diff --git a/.config/fish/functions/fish_title.fish b/.config/fish/functions/fish_title.fish deleted file mode 100644 index d90ca3e..0000000 --- a/.config/fish/functions/fish_title.fish +++ /dev/null @@ -1,3 +0,0 @@ -if test "$TERM" = "eterm-color" - function fish_title; end -end diff --git a/.config/st/config.h.patch b/.config/st/config.h.patch deleted file mode 100644 index 17ec473..0000000 --- a/.config/st/config.h.patch +++ /dev/null @@ -1,63 +0,0 @@ ---- config.def.h 2020-01-22 00:08:57.811290066 +0100 -+++ config.h 2020-01-22 00:08:50.174623312 +0100 -@@ -5,7 +5,7 @@ - * - * font: see http://freedesktop.org/software/fontconfig/fontconfig-user.html - */ --static char *font = "Liberation Mono:pixelsize=12:antialias=true:autohint=true"; -+static char *font = "FantasqueSansMono:pixelsize=30:antialias=true:autohint=true"; - static int borderpx = 2; - - /* -@@ -86,22 +86,22 @@ - static const char *colorname[] = { - /* 8 normal colors */ - "black", -- "red3", -- "green3", -- "yellow3", -- "blue2", -- "magenta3", -- "cyan3", -+ "#ef6a6c", // "red3", -+ "#59c19f", // "green3", -+ "#e9dc88", // "yellow3", -+ "#25bcf6", // "blue2", -+ "#dc88e9", // "magenta3", -+ "#62dafb", // "cyan3", - "gray90", - - /* 8 bright colors */ - "gray50", -- "red", -- "green", -- "yellow", -- "#5c5cff", -- "magenta", -- "cyan", -+ "#ef9a9a", // "red", -+ "#a5d6a7", // "green", -+ "#fff59d", // "yellow", -+ "#90caf9", // "#5c5cff", -+ "#ce93d8", // "magenta", -+ "#80deea", // "cyan", - "white", - - [255] = 0, -@@ -109,6 +109,7 @@ - /* more colors can be added after 255 to use with DefaultXX */ - "#cccccc", - "#555555", -+ "#424242", - }; - - -@@ -117,7 +118,7 @@ - * foreground, background, cursor, reverse cursor - */ - unsigned int defaultfg = 7; --unsigned int defaultbg = 0; -+unsigned int defaultbg = 258; - static unsigned int defaultcs = 256; - static unsigned int defaultrcs = 257; - diff --git a/.config/stumpwm/config b/.config/stumpwm/config deleted file mode 100644 index fb644d6..0000000 --- a/.config/stumpwm/config +++ /dev/null @@ -1,95 +0,0 @@ -;; -*- common-lisp -*- - -(in-package :stumpwm) - -(set-prefix-key (kbd "s-;")) -(or (set-font "terminus-32") - (set-font "-xos4-terminus-medium-r-normal--32-320-72-72-c-160-iso10646-1")) -(set-focus-color "gray50") -(setf *screen-mode-line-format* "[^B%n^b] %W^>%d") -(setf *mode-line-timeout* 5) -(setf *message-window-gravity* :center) -(setf *input-window-gravity* :center) -(setf *mouse-focus-policy* :click) -(setf *time-modeline-string* "%k:%M") - -(define-key *root-map* (kbd ";") "colon") -(define-key *root-map* (kbd "c") "exec st") -(define-key *root-map* (kbd "C-c") "exec st") -(define-key *root-map* (kbd "s-TAB") "gother") -(define-key *root-map* (kbd "H") "exec systemctl hibernate") -(define-key *root-map* (kbd "L") "exec systemctl suspend") -(define-key *root-map* (kbd "F") "exec firefox") - -(define-key *top-map* (kbd "s-1") "gselect 1") -(define-key *top-map* (kbd "s-2") "gselect 2") -(define-key *top-map* (kbd "s-3") "gselect 3") -(define-key *top-map* (kbd "s-4") "gselect 4") -(define-key *top-map* (kbd "s-5") "gselect 5") -(define-key *top-map* (kbd "s-6") "gselect 6") -(define-key *top-map* (kbd "s-7") "gselect 7") -(define-key *top-map* (kbd "s-8") "gselect 8") -(define-key *top-map* (kbd "s-9") "gselect 9") -(define-key *top-map* (kbd "s-0") "gselect 0") -(define-key *top-map* (kbd "s-!") "gmove 1") -(define-key *top-map* (kbd "s-@") "gmove 2") -(define-key *top-map* (kbd "s-#") "gmove 3") -(define-key *top-map* (kbd "s-$") "gmove 4") -(define-key *top-map* (kbd "s-%") "gmove 5") -(define-key *top-map* (kbd "s-^") "gmove 6") -(define-key *top-map* (kbd "s-&") "gmove 7") -(define-key *top-map* (kbd "s-*") "gmove 8") -(define-key *top-map* (kbd "s-(") "gmove 9") -(define-key *top-map* (kbd "s-)") "gmove 0") - -(define-key *top-map* (kbd "s-e") "exec emacsclient -c") -(define-key *top-map* (kbd "s-p") "run-shell-command") -(define-key *top-map* (kbd "s-S-RET") "exec emacsclient -c -e '(vterm)'") - -(define-key *top-map* (kbd "s-TAB") "gother") -(define-key *top-map* (kbd "s-h") "move-focus left") -(define-key *top-map* (kbd "s-j") "move-focus down") -(define-key *top-map* (kbd "s-k") "move-focus up") -(define-key *top-map* (kbd "s-l") "move-focus right") -(define-key *top-map* (kbd "s-H") "move-window left") -(define-key *top-map* (kbd "s-J") "move-window down") -(define-key *top-map* (kbd "s-K") "move-window up") -(define-key *top-map* (kbd "s-L") "move-window right") - -(define-key *top-map* (kbd "XF86AudioMute") "exec amixer set Master toggle") -(define-key *top-map* (kbd "XF86AudioLowerVolume") "exec amixer set Master 5-") -(define-key *top-map* (kbd "XF86AudioRaiseVolume") "exec amixer set Master 5+") -(define-key *top-map* (kbd "XF86MonBrightnessDown") "exec xbacklight -dec 3") -(define-key *top-map* (kbd "XF86MonBrightnessUp") "exec xbacklight -inc 3") - -(when (and (= 1 (group-number (current-group))) - (string= "Default" (group-name (current-group)))) - (grename "1") - (dolist (name '("2" "3" "4" "5" "6" "7" "8" "9")) - (gnewbg name)) - (let ((widths (mapcar #'head-width (screen-heads (current-screen))))) - (if (and (= (length widths) 2) (< (car widths) (cadr widths))) - (mapc #'focus-next-frame (screen-groups (current-screen))))) - (gnewbg-float "Float")) - -(setq *mode-line-background-color* "#455a64") -(setq *mode-line-foreground-color* "#b0bec5") -(set-border-color "#212121") -(set-bg-color "#455a64") -(set-fg-color "#b0bec5") -(setq *colors* '("#212121" "#e57373" "#a5d6a7" "#fff59d" "#90caf9" "#e1bee7" "#80deea" "#fafafa")) -(update-color-map (current-screen)) - -(let ((scr (current-screen))) - (dolist (head (screen-heads scr)) - (enable-mode-line scr head t))) - -(require :asdf) ; needed to find swank in ~/common-lisp if not using - ; quicklisp -(require :swank) - -(defcommand swank () () - "Start swank server" - (swank:create-server :port 4004 - :style swank:*communication-style* - :dont-close t)) diff --git a/.zshenv b/.zshenv deleted file mode 100644 index 1f6242a..0000000 --- a/.zshenv +++ /dev/null @@ -1 +0,0 @@ -ZDOTDIR="$HOME/.config/zsh" diff --git a/README.md b/README.md new file mode 100644 index 0000000..1dcb57c --- /dev/null +++ b/README.md @@ -0,0 +1,17 @@ +Lupan's config files +==================== + +To reproduce my environment clone this repo into `~/dotfiles` and run + +``` +$ stow -v alacritty bspwm music shell tmux +``` + +if you want i3 instead of bspwm (left as a fallback) *also* run + +``` +$ stow -v i3 +``` + +Watch this video for a demo of using `stow` to manage dotfiles: +https://www.youtube.com/watch?v=TG_R7lpR2zU diff --git a/.config/alacritty/alacritty.yml b/alacritty/.config/alacritty/alacritty.yml similarity index 100% rename from .config/alacritty/alacritty.yml rename to alacritty/.config/alacritty/alacritty.yml diff --git a/.config/alacritty/switch_bg.py b/alacritty/.config/alacritty/switch_bg.py similarity index 100% rename from .config/alacritty/switch_bg.py rename to alacritty/.config/alacritty/switch_bg.py diff --git a/.Xresources b/bspwm/.Xresources similarity index 100% rename from .Xresources rename to bspwm/.Xresources diff --git a/.config/bspwm/bspwmrc b/bspwm/.config/bspwm/bspwmrc similarity index 100% rename from .config/bspwm/bspwmrc rename to bspwm/.config/bspwm/bspwmrc diff --git a/.config/bspwm/commands.sh b/bspwm/.config/bspwm/commands.sh similarity index 100% rename from .config/bspwm/commands.sh rename to bspwm/.config/bspwm/commands.sh diff --git a/.config/polybar/config b/bspwm/.config/polybar/config similarity index 100% rename from .config/polybar/config rename to bspwm/.config/polybar/config diff --git a/.config/sxhkd/sxhkdrc b/bspwm/.config/sxhkd/sxhkdrc similarity index 100% rename from .config/sxhkd/sxhkdrc rename to bspwm/.config/sxhkd/sxhkdrc diff --git a/.xsession b/bspwm/.xsession similarity index 100% rename from .xsession rename to bspwm/.xsession diff --git a/.config/i3/config b/i3/.config/i3/config similarity index 100% rename from .config/i3/config rename to i3/.config/i3/config diff --git a/.config/i3status/config b/i3/.config/i3status/config similarity index 100% rename from .config/i3status/config rename to i3/.config/i3status/config diff --git a/.config/mpd/mpd.conf b/music/.config/mpd/mpd.conf similarity index 100% rename from .config/mpd/mpd.conf rename to music/.config/mpd/mpd.conf diff --git a/shell/.config/zsh/plugins/README.md b/shell/.config/zsh/plugins/README.md new file mode 100644 index 0000000..0fd2740 --- /dev/null +++ b/shell/.config/zsh/plugins/README.md @@ -0,0 +1,6 @@ +Directory for plugins. Checkout here + +1. zsh-autosuggestions (https://github.com/zsh-users/zsh-autosuggestions) +2. zsh-syntax-highlighting (https://github.com/zsh-users/zsh-syntax-highlighting) + +or install then with package manager in /usr/share/zsh/plugins/ and symlink. diff --git a/.profile b/shell/.profile similarity index 100% rename from .profile rename to shell/.profile diff --git a/.config/zsh/.zprofile b/shell/.zprofile similarity index 100% rename from .config/zsh/.zprofile rename to shell/.zprofile diff --git a/.config/zsh/.zshrc b/shell/.zshrc similarity index 96% rename from .config/zsh/.zshrc rename to shell/.zshrc index 5a2a043..3a8a199 100644 --- a/.config/zsh/.zshrc +++ b/shell/.zshrc @@ -1,7 +1,6 @@ # History. -HISTFILE="$ZDOTDIR/.zsh_history" -SCD_HISTFILE="$ZDOTDIR/.scdhistory" +HISTFILE=${ZDOTDIR:-~}/.zsh_history HISTSIZE=10000 SAVEHIST=10000 setopt append_history diff --git a/.tmux.conf b/tmux/.tmux.conf similarity index 100% rename from .tmux.conf rename to tmux/.tmux.conf