From 5889c607bda271927f94a89c62550e623676fe40 Mon Sep 17 00:00:00 2001 From: CramMK Date: Wed, 29 Jan 2020 13:37:05 +0100 Subject: [PATCH] Add templating with profiles - workstation - laptop --- config.yaml | 50 +++++++++++++++++++++++++++++++++++---- dotfiles/config/i3/config | 6 ++--- dotfiles/vimrc | 2 +- dotfiles/xinitrc | 10 ++++++++ 4 files changed, 58 insertions(+), 10 deletions(-) create mode 100755 dotfiles/xinitrc diff --git a/config.yaml b/config.yaml index e1eb475..471999a 100644 --- a/config.yaml +++ b/config.yaml @@ -14,7 +14,7 @@ dotfiles: src: vimrc dst: ~/.vimrc actions: - - vundle-refresh + - vundle-refresh f_gitconfig: src: gitconfig dst: ~/.gitconfig @@ -22,7 +22,7 @@ dotfiles: src: Xresources dst: ~/.Xresources actions: - - reload-xresources + - reload-xresources f_config: src: config/i3/config dst: ~/.config/i3/config @@ -33,18 +33,58 @@ dotfiles: src: fonts/Inconsolata-Regular/Inconsolata-Regular.ttf dst: ~/.fonts/Inconsolata-Regular/Inconsolata-Regular.ttf actions: - - cache-font + - cache-font f_gdbinit: src: gdbinit dst: ~/.gdbinit + f_xinitrc: + src: xinitrc + dst: ~/.xinitrc profiles: - marc: + laptop: + include: + - bash + - vim + - x11 + - i3 + - font + - git + - gdb + workstation: + include: + - bash + - vim + - x11 + - i3 + - font + - git + - gdb + minimal: + include: + - bash + - vim + + # Packages to be used above + bash: dotfiles: - f_bashrc + vim: + dotfiles: - f_vimrc - - f_gitconfig + x11: + dotfiles: - f_xresources + - f_xinitrc + i3: + dotfiles: - f_config - f_i3status_config + font: + dotfiles: - f_inconsolata-regular.ttf + git: + dotfiles: + - f_gitconfig + gdb: + dotfiles: - f_gdbinit diff --git a/dotfiles/config/i3/config b/dotfiles/config/i3/config index 201550a..2c1cb64 100644 --- a/dotfiles/config/i3/config +++ b/dotfiles/config/i3/config @@ -188,8 +188,7 @@ bindsym Ctrl+Shift+2 exec --no-startup-id setxkbmap de new_window 1pixel -{%@@ if exists('/home/mthomas') @@%} -# CONFIG FOR WORK +{%@@ if profile == "workstation" @@%} # Locking bindsym $mod+Shift+b exec "xlock -mode blank -startCmd /share/bin/isweg -endCmd /share/bin/isda" @@ -213,8 +212,7 @@ bindsym $mod+Ctrl+1 move workspace to output $monitor1 bindsym $mod+Ctrl+2 move workspace to output $monitor2 {%@@ endif @@%} -{%@@ if exists('/home/marc') @@%} -# CONFIG FOR HOME +{%@@ if profile == "laptop" @@%} # Locking bindsym $mod+Shift+b exec "xlock -mode matrix" diff --git a/dotfiles/vimrc b/dotfiles/vimrc index 41a9c82..3abcd0d 100644 --- a/dotfiles/vimrc +++ b/dotfiles/vimrc @@ -68,7 +68,7 @@ set colorcolumn=80 " Numbers at the left side set number -:highlight LineNr ctermfg=gray "color +:highlight LineNr ctermfg=white "color "set relativenumber " Parathesis highlighting diff --git a/dotfiles/xinitrc b/dotfiles/xinitrc new file mode 100755 index 0000000..33a58fa --- /dev/null +++ b/dotfiles/xinitrc @@ -0,0 +1,10 @@ +export TERM="xterm-256color" + +xrdb -load $HOME/.Xresources + +{%@@ if profile == "workstation" @@%} +/share/bin/isda +~/bin/.keyboard.scm & +xrandr --output DVI-I-1 --auto --right-of VGA-1 +exec i3 +{%@@ endif @@%}