From 9f29f25756b8f3f75dfb71228fd252da187ae3f0 Mon Sep 17 00:00:00 2001 From: Severin Kaderli Date: Tue, 14 May 2019 11:57:10 +0200 Subject: [PATCH] Separate work and private configuration Signed-off-by: Severin Kaderli --- install | 2 +- system/.config/X11/xinitrc | 15 +++++++--- system/.config/compton/compton.conf | 3 +- system/.config/custom/env | 2 +- system/.config/i3/config | 25 +++------------- system/.config/i3/config.base | 46 ++--------------------------- system/.config/i3/config.private | 46 +++++++++++++++++++++++++++++ system/.config/i3/config.work | 37 +++++++++++++++++++++++ 8 files changed, 104 insertions(+), 72 deletions(-) create mode 100644 system/.config/i3/config.private create mode 100644 system/.config/i3/config.work diff --git a/install b/install index 2b47801..90452b8 100755 --- a/install +++ b/install @@ -258,6 +258,6 @@ print_section "Creating issue file" < "/etc/hostname" tr '[:lower:]' '[:upper:]' | figlet -f big | sed "s/\\\\/\\\\\\\/g"; echo -e "\\\r (\\\l)"; echo '\e{reset}'; -} >> "/tmp/issue" +} > "/tmp/issue" sudo install "/tmp/issue" "/etc/issue" print_log "Issue file created" \ No newline at end of file diff --git a/system/.config/X11/xinitrc b/system/.config/X11/xinitrc index 8747a9b..e1b8b2c 100644 --- a/system/.config/X11/xinitrc +++ b/system/.config/X11/xinitrc @@ -17,11 +17,18 @@ # the monitor names are different. NVIDIA_CHECK="$(xrandr | grep "eDP-1-1 connected")" if [ -z "${NVIDIA_CHECK}" ]; then - LOCAL_I3_CONFIG="${XDG_CONFIG_HOME}/i3/config.intel" + I3_SCREEN_CONFIG="${XDG_CONFIG_HOME}/i3/config.intel" else - LOCAL_I3_CONFIG="${XDG_CONFIG_HOME}/i3/config.nvidia" + I3_SCREEN_CONFIG="${XDG_CONFIG_HOME}/i3/config.nvidia" fi -cat "${LOCAL_I3_CONFIG}" "${XDG_CONFIG_HOME}/i3/config.base" > "${XDG_CONFIG_HOME}/i3/config" +# Load different i3 configuration depending on if it's a work computer. +if [ "${IS_WORK}" = "1" ]; then + LOCAL_I3_CONFIG="${XDG_CONFIG_HOME}/i3/config.work" +else + LOCAL_I3_CONFIG="${XDG_CONFIG_HOME}/i3/config.private" +fi -i3 +cat "${I3_SCREEN_CONFIG}" "${XDG_CONFIG_HOME}/i3/config.base" "${LOCAL_I3_CONFIG}" > "${XDG_CONFIG_HOME}/i3/config" + +i3 \ No newline at end of file diff --git a/system/.config/compton/compton.conf b/system/.config/compton/compton.conf index d237dcd..3b2f552 100644 --- a/system/.config/compton/compton.conf +++ b/system/.config/compton/compton.conf @@ -12,7 +12,8 @@ # Settings opacity rules opacity-rule = [ - "85:class_g = 'Nemo'" + "85:class_g = 'Nemo'", + "85:class_g = 'Thunar'" ]; #inactive-dim = 0.25; diff --git a/system/.config/custom/env b/system/.config/custom/env index 3c2d6f5..027d10f 100644 --- a/system/.config/custom/env +++ b/system/.config/custom/env @@ -23,7 +23,7 @@ export XDG_BIN_HOME="${HOME}/.local/bin" export XDG_LOG_HOME="${HOME}/.local/log" export DOTFILES="${HOME}/dotfiles" -if [ "$(hostname)" = "odin" ]; then +if [ "$(hostname)" = "loki" ]; then export IS_WORK="1" else export IS_WORK="0" diff --git a/system/.config/i3/config b/system/.config/i3/config index e2a47a8..b94848d 100644 --- a/system/.config/i3/config +++ b/system/.config/i3/config @@ -71,7 +71,9 @@ assign [class="Google-chrome-beta"] $workspace1 assign [instance="cmus"] $workspace10 assign [class="code-oss"] $workspace3 assign [class="Nemo"] $workspace4 +assign [class="Thunar"] $workspace4 assign [class="discord"] $workspace5 +assign [class="Riot"] $workspace5 assign [class="Steam"] $workspace6 assign [class="keepassxc"] $workspace8 assign [class="vlc"] $workspace9 @@ -222,23 +224,6 @@ bindsym $mod+Control+Right exec --no-startup-id cmus-remote -n bindsym XF86AudioPrev exec --no-startup-id cmus-remote -r bindsym $mod+Control+Left exec --no-startup-id cmus-remote -r - -exec --no-startup-id "i3-msg 'workspace 10: ; \ -append_layout /home/severin/.config/i3/workspace-10.json; \ -exec termite -e cmus --name cmus; \ -exec termite -e cava --name cava; \ -exec sxiv -b -s f $HOME/.local/share/cmus/.cover'" - - -exec --no-startup-id "i3-msg 'workspace 2: ; \ -append_layout /home/severin/.config/i3/workspace-2.json; \ -exec termite; \ -exec termite; \ -exec termite; \ -exec termite'" - -exec --no-startup-id "i3-msg 'workspace 1: '" - ############################################################################### # Startup applications # ############################################################################### @@ -261,8 +246,6 @@ exec_always --no-startup-id wallpaper exec autokey-gtk exec google-chrome-beta -exec discord -exec nemo -exec nemo +exec Thunar +exec Thunar exec keepassxc -exec notable diff --git a/system/.config/i3/config.base b/system/.config/i3/config.base index b2cf94c..fe2e0cd 100644 --- a/system/.config/i3/config.base +++ b/system/.config/i3/config.base @@ -66,7 +66,9 @@ assign [class="Google-chrome-beta"] $workspace1 assign [instance="cmus"] $workspace10 assign [class="code-oss"] $workspace3 assign [class="Nemo"] $workspace4 +assign [class="Thunar"] $workspace4 assign [class="discord"] $workspace5 +assign [class="Riot"] $workspace5 assign [class="Steam"] $workspace6 assign [class="keepassxc"] $workspace8 assign [class="vlc"] $workspace9 @@ -217,47 +219,3 @@ bindsym $mod+Control+Right exec --no-startup-id cmus-remote -n bindsym XF86AudioPrev exec --no-startup-id cmus-remote -r bindsym $mod+Control+Left exec --no-startup-id cmus-remote -r - -exec --no-startup-id "i3-msg 'workspace 10: ; \ -append_layout /home/severin/.config/i3/workspace-10.json; \ -exec termite -e cmus --name cmus; \ -exec termite -e cava --name cava; \ -exec sxiv -b -s f $HOME/.local/share/cmus/.cover'" - - -exec --no-startup-id "i3-msg 'workspace 2: ; \ -append_layout /home/severin/.config/i3/workspace-2.json; \ -exec termite; \ -exec termite; \ -exec termite; \ -exec termite'" - -exec --no-startup-id "i3-msg 'workspace 1: '" - -############################################################################### -# Startup applications # -############################################################################### -# Start compton -exec --no-startup-id compton -b - -# Start polybar -exec_always --no-startup-id $XDG_CONFIG_HOME/polybar/launch - -# Start dunst -exec --no-startup-id dunst - -# Set resolution -exec_always --no-startup-id resolution - -# Set wallpaper -exec_always --no-startup-id wallpaper - -# Other applications -exec autokey-gtk -exec google-chrome-beta - -exec discord -exec nemo -exec nemo -exec keepassxc -exec notable diff --git a/system/.config/i3/config.private b/system/.config/i3/config.private new file mode 100644 index 0000000..fd54f90 --- /dev/null +++ b/system/.config/i3/config.private @@ -0,0 +1,46 @@ +############################################################################### +# Layouts # +############################################################################### +exec --no-startup-id "i3-msg 'workspace 10: ; \ +append_layout /home/severin/.config/i3/workspace-10.json; \ +exec termite -e cmus --name cmus; \ +exec termite -e cava --name cava; \ +exec sxiv -b -s f $HOME/.local/share/cmus/.cover'" + +exec --no-startup-id "i3-msg 'workspace 2: ; \ +append_layout /home/severin/.config/i3/workspace-2.json; \ +exec termite; \ +exec termite; \ +exec termite; \ +exec termite'" + +exec --no-startup-id "i3-msg 'workspace 1: '" + +############################################################################### +# Startup applications # +############################################################################### +# Start compton +exec --no-startup-id compton -b + +# Start polybar +exec_always --no-startup-id $XDG_CONFIG_HOME/polybar/launch + +# Start dunst +exec --no-startup-id dunst + +# Set resolution +exec_always --no-startup-id resolution + +# Set wallpaper +exec_always --no-startup-id wallpaper + +# Other applications +exec autokey-gtk +exec google-chrome-beta + +exec riot-desktop +exec discord +exec Thunar +exec Thunar +exec keepassxc +exec notable diff --git a/system/.config/i3/config.work b/system/.config/i3/config.work new file mode 100644 index 0000000..14205bf --- /dev/null +++ b/system/.config/i3/config.work @@ -0,0 +1,37 @@ +############################################################################### +# Layouts # +############################################################################### +exec --no-startup-id "i3-msg 'workspace 2: ; \ +append_layout /home/severin/.config/i3/workspace-2.json; \ +exec termite; \ +exec termite; \ +exec termite; \ +exec termite'" + +exec --no-startup-id "i3-msg 'workspace 1: '" + +############################################################################### +# Startup applications # +############################################################################### +# Start compton +exec --no-startup-id compton -b + +# Start polybar +exec_always --no-startup-id $XDG_CONFIG_HOME/polybar/launch + +# Start dunst +exec --no-startup-id dunst + +# Set resolution +exec_always --no-startup-id resolution + +# Set wallpaper +exec_always --no-startup-id wallpaper + +# Other applications +exec autokey-gtk +exec google-chrome-beta + +exec Thunar +exec Thunar +exec keepassxc