From 90855d3f7e5f33f91f6097a3992c8c2bbee8048f Mon Sep 17 00:00:00 2001 From: Mastermindzh Date: Mon, 2 Jul 2018 22:16:18 +0200 Subject: [PATCH] second computer changes --- bash/.bashrc | 2 ++ bash/.custom | 4 ++++ i3/config | 17 +++++++++++------ i3/scripts/i3lock.sh | 2 +- install.sh | 8 ++++++++ 5 files changed, 26 insertions(+), 7 deletions(-) create mode 100644 bash/.custom diff --git a/bash/.bashrc b/bash/.bashrc index 0c30c19..05e25ef 100644 --- a/bash/.bashrc +++ b/bash/.bashrc @@ -14,6 +14,8 @@ source ~/.alias eval $(thefuck --alias) +source ~/.custom + #... :P fancy stuffs #screenfetch -t -A "UBUNTU" neofetch diff --git a/bash/.custom b/bash/.custom new file mode 100644 index 0000000..e779efa --- /dev/null +++ b/bash/.custom @@ -0,0 +1,4 @@ +# PC specific stuff goes here + +# example +# alias vm="export QT_AUTO_SCREEN_SCALE_FACTOR= QT_SCREEN_SCALE_FACTORS= QT_SCALE_FACTOR= QT_DEVICE_PIXEL_RATIO= && VBoxManage setextradata Windows10 GUI/HiDPI/UnscaledOutput 1 && sudo VBoxManage startvm Windows10" \ No newline at end of file diff --git a/i3/config b/i3/config index 6c06b30..69ede67 100644 --- a/i3/config +++ b/i3/config @@ -33,7 +33,8 @@ set $workspace7 "7: " set $workspace8 "8: " set $workspace9 "9: " set $workspace10 "10:  " -set $workspace11 " Enpass" +set $workspace11 " Virtualbox" +set $workspace12 " Enpass" ############################################ # i3 management keys # @@ -64,7 +65,7 @@ bindsym $mod+f fullscreen toggle # change container layout (stacked, tabbed, toggle split) bindsym $mod+shift+s layout stacking -bindsym $mod+shift+w layout tabbed +bindsym $mod+shift+t layout tabbed bindsym $mod+shift+e layout toggle split # toggle tiling / floating @@ -85,7 +86,7 @@ bindsym $mod+Shift+Delete exec "i3-nagbar -t alert -m 'Do you really want to shu bindsym $mod+Shift+BackSpace exec "i3-nagbar -t error -m 'Do you really want to reboot?' -b 'Yes, Reboot' 'reboot'" # focus on the parent window -bindsym $mod+shift+p focus parent +bindsym $mod+shift+alt+p focus parent # resize window (you can also use the mouse for that) mode "resize" { @@ -109,7 +110,6 @@ bindsym $mod+l exec /bin/bash ~/.config/i3/scripts/i3lock.sh # Application Keys # ############################################ bindsym $mod+Return exec xfce4-terminal # terminal -bindsym $mod+w exec chromium # Webbrowser bindsym $mod+e exec nautilus # File manager bindsym Print exec gnome-screenshot # Fullscreen screenshot bindsym $mod+Print exec /bin/bash ~/.config/i3/scripts/screenshot.sh # Show screenshot window @@ -151,7 +151,8 @@ bindsym $mod+7 workspace $workspace7 bindsym $mod+8 workspace $workspace8 bindsym $mod+9 workspace $workspace9 bindsym $mod+0 workspace $workspace10 -bindsym $mod+p workspace $workspace11 +bindsym $mod+w workspace $workspace11 +bindsym $mod+p workspace $workspace12 # move focused container to workspace bindsym $mod+Shift+1 move container to workspace $workspace1 @@ -164,6 +165,9 @@ bindsym $mod+Shift+7 move container to workspace $workspace7 bindsym $mod+Shift+8 move container to workspace $workspace8 bindsym $mod+Shift+9 move container to workspace $workspace9 bindsym $mod+Shift+0 move container to workspace $workspace10 +bindsym $mod+Shift+w move container to workspace $workspace11 +bindsym $mod+Shift+p move container to workspace $workspace12 + ############################################ # Appearance settings # @@ -212,7 +216,8 @@ for_window [class="Eog"] floating enable ############################################ assign [class="Google Play Music Desktop Player"] $workspace10 assign [class="Franz"] $workspace9 -assign [class="Enpass-Desktop"] $workspace11 +assign [class="Enpass-Desktop"] $workspace12 +assign [class="VirtualBox Machine"] $workspace11 # database stuff assign [class="MongoDB Compass"] $workspace8 diff --git a/i3/scripts/i3lock.sh b/i3/scripts/i3lock.sh index 9e41187..31630bc 100644 --- a/i3/scripts/i3lock.sh +++ b/i3/scripts/i3lock.sh @@ -8,4 +8,4 @@ tmpbg='/tmp/screen.png' scrot "$tmpbg" convert "$tmpbg" -scale 10% -scale 1000% "$tmpbg" convert "$tmpbg" "$icon" -gravity center -composite -matte "$tmpbg" -i3lock -u -i "$tmpbg" \ No newline at end of file +i3lock -f -i "$tmpbg" diff --git a/install.sh b/install.sh index ed78376..c2856ad 100644 --- a/install.sh +++ b/install.sh @@ -48,6 +48,12 @@ function fileToList { echo $(cat $1 | sed ':a;N;$!ba;s/\n/ /g') } +# create and copy files to directory +function copyToDir { + echo $2 | sed 's%/[^/]*$%/%' | xargs mkdir -p + cp $1 $2 +} + # ======================================= # Installation functions # ======================================= @@ -93,6 +99,8 @@ function install_config { sudo ln -sf "$PWD"/config/package-managers/makepkg.conf /etc/makepkg.conf sudo ln -sf "$PWD"/config/ntp.conf /etc/ntp.conf + # Copy pc specific config files + copyToDir "$PWD"/bash/.custom ~/.custom } function install_HiDPI {