Add dconf configuration and small fixes

Signed-off-by: Severin Kaderli <severin.kaderli@gmail.com>
This commit is contained in:
Severin Kaderli 2018-12-13 21:27:38 +01:00
parent 006fddf028
commit 615d4fac8d
11 changed files with 97 additions and 29 deletions

10
.gitlab-ci.yml Normal file
View file

@ -0,0 +1,10 @@
image: ubuntu:latest
before_script:
- apt-get update && apt-get install -y --no-install-recommends shellcheck
Lint:
script:
- shellcheck -x ./system/bin/*
- shellcheck -x ./install.sh
- shellcheck -x ./post-install.sh

View file

@ -40,12 +40,15 @@ LINKED_FILES_HOME=(
".xprofile"
".Xresources"
"bin"
"dconf"
)
# Array of systemd services which should be enabled
SYSTEMD_SERVICES=(
"cronie"
"bumblebeed"
"cronie"
"lightdm"
"wicd"
)
#######################################
@ -55,8 +58,7 @@ SYSTEMD_SERVICES=(
print_header "Creating directories"
for dir in "${DIRECTORIES[@]}"
do
echo "- Creating $HOME/$dir"
mkdir -p "$HOME/$dir"
create_directory "${dir}"
done
# Install base-devel for building aur packages
@ -71,16 +73,14 @@ print_header "Installing packages"
#rm -rf aurman
# Install packages
#aurman -S --noconfirm $(cat "$PACKAGES_DIR/packages.list")
#aurman -S --noconfirm $(cat "$PACKAGES_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 "${LINKED_FILES_HOME[@]}"
do
echo "- Linking $HOME/$file -> $SYSTEM_DIR/$file"
rm -rf "$HOME/$file"
ln -fs "$SYSTEM_DIR/$file" "$HOME/$file"
create_link "${file}"
done
print_header "Asking for root permissions"
@ -88,11 +88,10 @@ sudo -v
# Give scripts execute permissions
print_header "Give permissions"
set_permission severin 744 "$HOME/bin"
set_permission severin 744 "${HOME}/bin"
print_header "Enabling systemd services"
for service in "${SYSTEMD_SERVICES[@]}"
do
enable_service "$service"
enable_service "${service}"
done

View file

@ -1,7 +1,8 @@
#!/bin/bash
#
# Author: Severin Kaderli <severin.kaderli@gmail.com>
# Shortcut for clear because I often type the DOS command instead
# Shortcut for clear because I sometimes type the DOS command instead
alias cls="clear"
# Use exa as ls replacement
@ -14,4 +15,6 @@ alias grep="rg -n"
# cd shortcut to get to my Projects folder
alias pj="cd ~/Projects"
alias gw2="optirun wine64 ~/.wine/drive_c/Program\ Files/Guild\ Wars\ 2/Gw2-64.exe -dx9single -autologin -mapLoadinfo"
alias e="code"
alias gw2="primusrun wine64 ~/.wine/drive_c/Program\ Files/Guild\ Wars\ 2/Gw2-64.exe -dx9single -autologin -mapLoadinfo"

View file

@ -11,6 +11,9 @@ if [[ -f $HOME/.keyleds ]]; then
. $HOME/.keyleds
fi
# Restore custom dconf configuration
cat "${HOME}/dconf/root.conf" | dconf load /
# Activate correct crontab file
crontab $HOME/.crontab

View file

@ -5,7 +5,6 @@ shopt -s histappend
shopt -s checkwinsize
shopt -s globstar
# set a fancy prompt (non-color, unless we know we "want" color)
case "$TERM" in
xterm|xterm-color|*-256color) color_prompt=yes;;

View file

@ -3,7 +3,7 @@ background = #222D32
foreground = #A1B0B8
[bar/top]
monitor = HDMI-1
monitor = HDMI1
width = 100%
height = 35
offset-x = 0
@ -33,7 +33,7 @@ tray-position = right
[bar/top2]
inherit = bar/top
monitor = eDP-1
monitor = eDP1
[module/i3]

View file

@ -9,5 +9,10 @@ setxkbmap -model pc105 -layout ch
# Start ibus
ibus-daemon -drx
. "${HOME}/bin/resolution.sh"
xrandr --setprovideroutputsource modesetting NVIDIA -0
xrandr --auto
# Start i3
exec dbus-launch i3
i3

View file

@ -1,2 +1,4 @@
#!/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
xrandr --setprovideroutputsource modesetting NVIDIA-0
#xrandr --auto
xrandr --output HDMI3 --off --output HDMI2 --off --output HDMI1 --mode 1280x1024 --pos 80x56 --rotate normal --output eDP1 --primary --mode 1920x1080 --pos 1360x0 --rotate normal --output DP3 --off --output DP2 --off --output DP1 --off

5
system/bin/upgrade.sh Executable file
View file

@ -0,0 +1,5 @@
#!/bin/bash
#
# Author: Severin Kaderli <severin.kaderli@gmail.com>
aurman -Syuu --rebuild
npm update -g

22
system/dconf/root.conf Normal file
View file

@ -0,0 +1,22 @@
[org/nemo/preferences]
show-full-path-titles=true
show-new-folder-icon-toolbar=false
show-bookmarks-in-to-menus=true
default-sort-order='name'
default-folder-viewer='list-view'
sort-directories-first=true
show-hidden-files=false
show-image-thumbnails='never'
date-format='iso'
show-places-in-to-menus=true
[desktop/ibus/general]
engines-order=['xkb:ch::ger', 'anthy']
preload-engines=['xkb:ch::ger', 'anthy']
[desktop/ibus/general/hotkey]
triggers=['<Alt><Shift>space']
[desktop/ibus/panel/emoji]
unicode-hotkey=@as []
hotkey=@as []

View file

@ -6,8 +6,8 @@
# Directory variables
#######################################
DIR="$( cd "$(dirname "${BASH_SOURCE[0]}" )" && pwd)"
SYSTEM_DIR="$DIR/system"
PACKAGES_DIR="$DIR/packages"
SYSTEM_DIR="${DIR}/system"
PACKAGES_DIR="${DIR}/packages"
#######################################
# Bash color code variables
@ -22,22 +22,42 @@ YELLOW='\033[33m'
# Helper functions
#######################################
# Function to display fancy headers
# $1: Title
function print_header() {
echo -e "$GREEN########################################"
echo -e "# $1"
echo -e "########################################$RESET"
echo -e "\n${GREEN}########################################"
echo -e "# ${1}"
echo -e "########################################${RESET}"
}
# Creates the given directory in the home directory
# $1: Directory
function create_directory() {
echo -e "- Creating directory ${YELLOW}${HOME}/${dir}${RESET}"
mkdir -p "${HOME}/${dir}"
}
# Creates a symlink of the given file from the home directory to here.
# $1: Filename
function create_link() {
echo -e "- Linking ${YELLOW}${HOME}/${1}${RESET} -> ${YELLOW}${SYSTEM_DIR}/${1}${RESET}"
rm -rf "${HOME:?}/$1"
ln -fs "${SYSTEM_DIR}/${1}" "${HOME}/${1}"
}
# Function to set owner and permission of a file
# $1: Owner
# $2: Permissions
# $3: 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"
echo -e "- Changing permission of ${YELLOW}${3}${RESET} to ${YELLOW}${1}${RESET}"
sudo chown -R "${1}" "${3}"
echo -e "- Changing permission of ${YELLOW}${3}${RESET} to ${YELLOW}${2}${RESET}"
sudo chmod -R "${2}" "${3}"
}
# Function to enable a service
# $1: Service
function enable_service() {
echo -e "- Enabling service $1"
sudo systemctl enable "$1"
echo -e "- Enabling service ${YELLOW}${1}${RESET}"
sudo systemctl enable "${1}"
}