Reroganize repository
Signed-off-by: Severin Kaderli <severin.kaderli@gmail.com>
This commit is contained in:
parent
0a4424d25e
commit
cd781c174e
40 changed files with 113 additions and 22 deletions
|
@ -1,2 +0,0 @@
|
|||
#!/bin/sh
|
||||
xrandr --output eDP-1 --primary --mode 1920x1080 --pos 1280x0 --rotate normal --output HDMI-3 --off --output HDMI-2 --off --output HDMI-1 --mode 1280x1024 --pos 0x56 --rotate normal --output DP-3 --off --output DP-2 --off --output DP-1 --off
|
2
.crontab
2
.crontab
|
@ -1,2 +0,0 @@
|
|||
# Synchronize Google Drive
|
||||
*/5 * * * * grive -p $HOME/GoogleDrive/ > /dev/null 2>&1
|
|
@ -1,2 +0,0 @@
|
|||
#!/bin/bash
|
||||
i3lock-fancy -pf Roboto -- scrot -z
|
85
install.sh
85
install.sh
|
@ -2,14 +2,27 @@
|
|||
#
|
||||
# Author: Severin Kaderli <severin.kaderli@gmail.com>
|
||||
# Usage: ./install.sh
|
||||
# Array of files which should be symlinked.
|
||||
FILES=(
|
||||
|
||||
#######################################
|
||||
# Configuration variables
|
||||
#######################################
|
||||
# Array of directories which should be created
|
||||
DIRECTORIES=(
|
||||
"Build"
|
||||
"Downloads"
|
||||
"Projects"
|
||||
".logs"
|
||||
)
|
||||
|
||||
# Array of files which should be symlinked in the home folder
|
||||
LINKED_FILES_HOME=(
|
||||
".aliases"
|
||||
".bash_logout"
|
||||
".bash_profile"
|
||||
".bashrc"
|
||||
".config/compton.conf"
|
||||
".config/dunst"
|
||||
".config/gtk-3.0"
|
||||
".config/i3"
|
||||
".config/polybar"
|
||||
".config/streamlink"
|
||||
|
@ -22,20 +35,59 @@ FILES=(
|
|||
".keyleds"
|
||||
".vimrc"
|
||||
".xinitrc"
|
||||
".xprofile"
|
||||
".Xresources"
|
||||
"bin"
|
||||
)
|
||||
|
||||
# The directory of this repository
|
||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
# Array of systemd services which should be enabled
|
||||
SYSTEMD_SERVICES=(
|
||||
"cronie"
|
||||
"bumblebeed"
|
||||
)
|
||||
|
||||
#######################################
|
||||
# Directory variables
|
||||
#######################################
|
||||
DIR="$( cd "$(dirname "${BASH_SOURCE[0]}" )" && pwd)"
|
||||
SYSTEM_DIR="$DIR/system"
|
||||
PACKAGES_DIR="$DIR/packages"
|
||||
|
||||
#######################################
|
||||
# Helper functions
|
||||
#######################################
|
||||
# Function to display fancy headers
|
||||
function print_header() {
|
||||
echo -e "\e[32m########################################"
|
||||
echo -e "\n\e[32m########################################"
|
||||
echo -e "# $1"
|
||||
echo -e "########################################\e[39m"
|
||||
}
|
||||
|
||||
# Function to set owner and permission of a file
|
||||
function set_permission() {
|
||||
echo -e "- Changing permission of $3 to $1"
|
||||
sudo chown -R "$1" "$3"
|
||||
echo -e "- Changing permission of $3 to $2"
|
||||
sudo chmod -R "$2" "$3"
|
||||
}
|
||||
|
||||
# Function to enable a service
|
||||
function enable_service() {
|
||||
echo -e "- Enabling service $1"
|
||||
sudo systemctl enable "$1"
|
||||
}
|
||||
|
||||
#######################################
|
||||
# Main code
|
||||
#######################################
|
||||
# Creating needed directories
|
||||
print_header "Creating directories"
|
||||
for dir in "${DIRECTORIES[@]}"
|
||||
do
|
||||
echo "- Creating $HOME/$dir"
|
||||
mkdir -p "$HOME/$dir"
|
||||
done
|
||||
|
||||
# Install base-devel for building aur packages
|
||||
print_header "Installing packages"
|
||||
#sudo pacman -S git base-devel --noconfirm
|
||||
|
@ -48,21 +100,28 @@ print_header "Installing packages"
|
|||
#rm -rf aurman
|
||||
|
||||
# Install packages
|
||||
#aurman -S --noconfirm $(cat "$DIR/packages.list")
|
||||
#aurman -S --noconfirm $(cat "$DIR/packages2.list")
|
||||
#aurman -S --noconfirm $(cat "$PACKAGES_DIR/packages.list")
|
||||
#aurman -S --noconfirm $(cat "$PACKAGES_DIR/packages2.list")
|
||||
|
||||
# Create symlinks to dotfiles
|
||||
print_header "Creating symlinks"
|
||||
for file in "${FILES[@]}"
|
||||
for file in "${LINKED_FILES_HOME[@]}"
|
||||
do
|
||||
echo "Linking $file"
|
||||
echo "- Linking $HOME/$file -> $SYSTEM_DIR/$file"
|
||||
rm -rf "$HOME/$file"
|
||||
ln -fs "$DIR/$file" "$HOME/$file"
|
||||
ln -fs "$SYSTEM_DIR/$file" "$HOME/$file"
|
||||
done
|
||||
|
||||
print_header "Asking for root permissions"
|
||||
sudo -v
|
||||
|
||||
# Give scripts execute permissions
|
||||
print_header "Give permissions"
|
||||
chmod -R +x "$HOME/bin"
|
||||
set_permission severin 744 "$HOME/bin"
|
||||
|
||||
# TODO: Enable services
|
||||
print_header "Enabling systemd services"
|
||||
|
||||
print_header "Enabling systemd services"
|
||||
for service in "${SYSTEMD_SERVICES[@]}"
|
||||
do
|
||||
enable_service "$service"
|
||||
done
|
4
system/.config/gtk-3.0/bookmarks
Normal file
4
system/.config/gtk-3.0/bookmarks
Normal file
|
@ -0,0 +1,4 @@
|
|||
file:///home/severin/GoogleDrive GoogleDrive
|
||||
file:///home/severin/Downloads Downloads
|
||||
file:///home/severin/Projects Projects
|
||||
file:///home/severin/dotfiles dotfiles
|
14
system/.config/gtk-3.0/settings.ini
Normal file
14
system/.config/gtk-3.0/settings.ini
Normal file
|
@ -0,0 +1,14 @@
|
|||
[Settings]
|
||||
gtk-theme-name=Adapta-Nokto
|
||||
gtk-icon-theme-name=Paper-Mono-Dark
|
||||
gtk-font-name=Roboto 11
|
||||
gtk-cursor-theme-size=0
|
||||
gtk-toolbar-style=GTK_TOOLBAR_BOTH
|
||||
gtk-toolbar-icon-size=GTK_ICON_SIZE_LARGE_TOOLBAR
|
||||
gtk-button-images=1
|
||||
gtk-menu-images=1
|
||||
gtk-enable-event-sounds=1
|
||||
gtk-enable-input-feedback-sounds=1
|
||||
gtk-xft-antialias=1
|
||||
gtk-xft-hinting=1
|
||||
gtk-xft-hintstyle=hintfull
|
|
@ -64,8 +64,8 @@ bindsym $mod+a focus parent
|
|||
#bindsym $mod+d focus child
|
||||
|
||||
# Set monitor names
|
||||
set $output1 HDMI-1
|
||||
set $output2 eDP-1
|
||||
set $output1 HDMI1
|
||||
set $output2 eDP1
|
||||
|
||||
# Set workspace titles
|
||||
set $workspace1 "1: "
|
||||
|
@ -222,7 +222,7 @@ exec --no-startup-id compton
|
|||
exec_always --no-startup-id feh --bg-fill $HOME/GoogleDrive/02_Media/Images/01_Wallpaper/Desktop/Fearsome_Awakening.png
|
||||
|
||||
# Monitor settings
|
||||
exec_always --no-startup-id xrandr --output $output2 --primary --mode 1920x1080 --pos 1280x0 --rotate normal --output $output1 --mode 1280x1024 --pos 0x56 --rotate normal
|
||||
exec_always --no-startup-id $HOME/bin/resolution.sh
|
||||
|
||||
# Other applications
|
||||
exec google-chrome-beta
|
2
system/.crontab
Normal file
2
system/.crontab
Normal file
|
@ -0,0 +1,2 @@
|
|||
# Synchronize Google Drive
|
||||
*/10 * * * * grive -d -p /home/severin/GoogleDrive/ >> /home/severin/.logs/cron.log 2>&1
|
14
system/.xprofile
Normal file
14
system/.xprofile
Normal file
|
@ -0,0 +1,14 @@
|
|||
# Disable screen saver
|
||||
xset s off
|
||||
xset -dpms
|
||||
xset s noblank
|
||||
|
||||
# Set keyboard layout
|
||||
setxkbmap -model pc105 -layout ch
|
||||
|
||||
# Start ibus
|
||||
ibus-daemon -drx
|
||||
|
||||
if [[ -f $HOME/.bash_profile ]]; then
|
||||
. $HOME/.bash_profile
|
||||
fi
|
2
system/bin/resolution.sh
Executable file
2
system/bin/resolution.sh
Executable file
|
@ -0,0 +1,2 @@
|
|||
#!/bin/sh
|
||||
xrandr --output VIRTUAL1 --off --output DP3 --off --output eDP1 --mode 1920x1080 --pos 1400x472 --rotate normal --output DP1 --off --output HDMI3 --off --output HDMI2 --off --output HDMI1 --mode 1280x1024 --pos 120x528 --rotate normal --output DP2 --off
|
2
system/bin/screenlock.sh
Executable file
2
system/bin/screenlock.sh
Executable file
|
@ -0,0 +1,2 @@
|
|||
#!/bin/bash
|
||||
dm-tool lock
|
Loading…
Add table
Add a link
Reference in a new issue