Browse Source

Add .zprofile

master
Riyyi 6 years ago
parent
commit
0c71f5a09c
  1. 16
      .config/xorg/xinitrc
  2. 55
      .config/zsh/.zprofile
  3. 34
      .config/zsh/.zshrc
  4. 11
      .scripts/alias.sh

16
.config/xorg/xinitrc

@ -7,26 +7,10 @@ xrandr --newmode "3000x2000_48.00" 405.25 3000 3232 3552 4104 2000 2003 2013 205
xrandr --addmode eDP-1 3000x2000_48.00 xrandr --addmode eDP-1 3000x2000_48.00
xrandr --output eDP-1 --mode 3000x2000_48.00 --primary xrandr --output eDP-1 --mode 3000x2000_48.00 --primary
# Export terminal colors
$(xrdb -query | awk '/^*.color/{print "export " toupper(substr($1, 3, length($1) - 3)) "=" $2}')
# Example: *.color0: #282a2e -> export COLOR0=#282a2e
# Export wm colors
$(xrdb -query | awk '/Wmcolor./{print "export " toupper(substr($1, 9, length($1) - 9)) "=" $2}')
# Example: Wmcolor.bgcolor: #404552 -> export BGCOLOR=#404552
# Program starting # Program starting
dunst & dunst &
redshift & redshift &
# Qt application scaling
export QT_AUTO_SCREEN_SCALE_FACTOR=0
export QT_SCREEN_SCALE_FACTORS=2
# GTK application scaling
export GDK_SCALE=2
export GDK_DPI_SCALE=0.5
# Screensaver # Screensaver
xset s off xset s off
xset -dpms xset -dpms

55
.config/zsh/.zprofile

@ -0,0 +1,55 @@
## Settings
# Directories
export PATH="$PATH:$HOME/.scripts"
export XDG_CACHE_HOME="$HOME/.cache"
export XDG_CONFIG_HOME="$HOME/.config"
export XDG_DATA_HOME="$HOME/.local/share"
mkdir -p "$XDG_CACHE_HOME/zsh"
# Editor
export EDITOR="vim"
# Files
export GTK2_RC_FILES="$XDG_CONFIG_HOME/gtk-2.0/gtkrc"
export PLATFORMIO_HOME_DIR="$XDG_DATA_HOME/platformio"
export R_ENVIRON_USER="$XDG_CONFIG_HOME/R/Renviron"
# GTK
export GDK_SCALE=2
export GDK_DPI_SCALE=0.5
# Less
export LESS="-R"
export LESSHISTFILE="-"
export LESS_TERMCAP_mb="$(printf '%b' '\e[01;31m')" # begin blink
export LESS_TERMCAP_md="$(printf '%b' '\e[01;34m')" # begin bold
export LESS_TERMCAP_me="$(printf '%b' '\e[0m')" # reset blink/bold
export LESS_TERMCAP_so="$(printf '%b' '\e[01;107;30m')" # begin reverse video
export LESS_TERMCAP_se="$(printf '%b' '\e[0m')" # reset reverse video
export LESS_TERMCAP_us="$(printf '%b' '\e[04;95m')" # begin underline
export LESS_TERMCAP_ue="$(printf '%b' '\e[0m')" # reset underline
# Qt5
export QT_AUTO_SCREEN_SCALE_FACTOR=0
export QT_SCREEN_SCALE_FACTORS=2
export QT_QPA_PLATFORMTHEME="qt5ct"
# Vim
export VIMINIT="source $XDG_CONFIG_HOME/vim/vimrc"
# Xorg
export XINITRC="$XDG_CONFIG_HOME/xorg/xinitrc"
export XAUTHORITY="$XDG_DATA_HOME/xorg/Xauthority"
# Colors
# Example: *.color0: #282a2e -> export COLOR0=#282a2e
$(awk '/^*.color/ {print "export " toupper(substr($1, 3, length($1) - 3)) "=" $2}' \
"$XDG_CONFIG_HOME/xorg/Xresources")
# Example: Wmcolor.bgcolor: #404552 -> export BGCOLOR=#404552
$(awk '/Wmcolor./ {print "export " toupper(substr($1, 9, length($1) - 9)) "=" $2}' \
"$XDG_CONFIG_HOME/xorg/Xresources")
## Login
[ "$USER" = "rick" ] && [ "$(tty)" = "/dev/tty1" ] && exec xinit -- vt1 > /dev/null 2>&1

34
.config/zsh/.zshrc

@ -1,30 +1,3 @@
## Settings
# Directories
export PATH="$PATH:$HOME/.scripts"
export XDG_CACHE_HOME="$HOME/.cache"
export XDG_CONFIG_HOME="$HOME/.config"
export XDG_DATA_HOME="$HOME/.local/share"
mkdir -p "$XDG_CACHE_HOME/zsh"
# Files
export GTK2_RC_FILES="$XDG_CONFIG_HOME/gtk-2.0/gtkrc"
export PLATFORMIO_HOME_DIR="$XDG_DATA_HOME/platformio"
# Qt5
export QT_QPA_PLATFORMTHEME="qt5ct"
# VIM
export EDITOR="vim"
export VIMINIT="source $XDG_CONFIG_HOME/vim/vimrc"
# X11
export XINITRC="$XDG_CONFIG_HOME/xorg/xinitrc"
export XAUTHORITY="$XDG_DATA_HOME/xorg/Xauthority"
# General
export LESSHISTFILE=-
## Terminal ## Terminal
# Disable Ctrl+S and Ctrl+Q # Disable Ctrl+S and Ctrl+Q
@ -160,13 +133,8 @@ alias offtouchpad='sudo rmmod i2c_hid'
alias ontouchpad="sudo modprobe i2c_hid && $HOME/.scripts/touchscreen.sh 0" alias ontouchpad="sudo modprobe i2c_hid && $HOME/.scripts/touchscreen.sh 0"
# Other # Other
alias man="$HOME/.scripts/alias.sh man"
alias mysql-workbench="GDK_SCALE=1 GDK_DPI_SCALE=1 mysql-workbench 1>/dev/null 2>&1 &; disown" alias mysql-workbench="GDK_SCALE=1 GDK_DPI_SCALE=1 mysql-workbench 1>/dev/null 2>&1 &; disown"
alias weather="curl -s 'http://wttr.in/dordrecht?q&n&p' | head -n -3" alias weather="curl -s 'http://wttr.in/dordrecht?q&n&p' | head -n -3"
alias mpvshuffle='mpv "$(xclip -o)" --no-video --shuffle --ytdl-format="bestaudio[ext=m4a]"' alias mpvshuffle='mpv "$(xclip -o)" --no-video --shuffle --ytdl-format="bestaudio[ext=m4a]"'
source $ZDOTDIR/.zshrc_extended [ -f "$ZDOTDIR/.zshrc_extended" ] && source "$ZDOTDIR/.zshrc_extended"
## Login
[[ $USER == "rick" ]] && [ "$(tty)" = "/dev/tty1" ] && exec xinit -- vt1 &> /dev/null

11
.scripts/alias.sh

@ -1,16 +1,5 @@
#!/bin/bash #!/bin/bash
man() {
LESS_TERMCAP_mb=$'\e[01;31m' \
LESS_TERMCAP_md=$'\e[01;34m' \
LESS_TERMCAP_me=$'\e[0m' \
LESS_TERMCAP_so=$'\e[01;107;30m' \
LESS_TERMCAP_se=$'\e[0m' \
LESS_TERMCAP_us=$'\e[04;95m' \
LESS_TERMCAP_ue=$'\e[0m' \
command man "$@"
}
depend() { depend() {
pactree -u -d 1 $1 | tail -n +2 pactree -u -d 1 $1 | tail -n +2
} }

Loading…
Cancel
Save