diff --git a/Xresources b/Xresources index 91664a9..ebdba57 100644 --- a/Xresources +++ b/Xresources @@ -1,3 +1,3 @@ #include ".Xresources.d/xft" -#include ".Xresources.d/solarized.dark" +#include ".Xresources.d/theme" #include ".Xresources.d/xterm" diff --git a/Xresources.d/Xresources.dark b/Xresources.d/Xresources.dark deleted file mode 100644 index 6db1ab8..0000000 --- a/Xresources.d/Xresources.dark +++ /dev/null @@ -1,56 +0,0 @@ -#define S_base03 #002b36 -#define S_base02 #073642 -#define S_base01 #586e75 -#define S_base00 #657b83 -#define S_base0 #839496 -#define S_base1 #93a1a1 -#define S_base2 #eee8d5 -#define S_base3 #fdf6e3 - -*background: S_base03 -*foreground: S_base0 -*fadeColor: S_base03 -*cursorColor: S_base1 -*pointerColorBackground:S_base01 -*pointerColorForeground:S_base1 - -#define S_yellow #b58900 -#define S_orange #cb4b16 -#define S_red #dc322f -#define S_magenta #d33682 -#define S_violet #6c71c4 -#define S_blue #268bd2 -#define S_cyan #2aa198 -#define S_green #859900 - -!! black dark/light -*color0: S_base02 -*color8: S_base03 - -!! red dark/light -*color1: S_red -*color9: S_orange - -!! green dark/light -*color2: S_green -*color10: S_base01 - -!! yellow dark/light -*color3: S_yellow -*color11: S_base00 - -!! blue dark/light -*color4: S_blue -*color12: S_base0 - -!! magenta dark/light -*color5: S_magenta -*color13: S_violet - -!! cyan dark/light -*color6: S_cyan -*color14: S_base1 - -!! white dark/light -*color7: S_base2 -*color15: S_base3 diff --git a/Xresources.d/configure b/Xresources.d/configure index b22a5f0..4c312ed 100755 --- a/Xresources.d/configure +++ b/Xresources.d/configure @@ -1,7 +1,5 @@ #!/usr/bin/env bash -wget "https://raw.githubusercontent.com/solarized/xresources/master/Xresources.light" -O solarized.light -wget "https://raw.githubusercontent.com/solarized/xresources/master/Xresources.dark" -O solarized.dark mkdir -p $HOME/.local/share/fonts echo $(for i in "" "%20Bold" "%20Oblique" "%20Bold%20Oblique"; do cd $HOME/.local/share/fonts diff --git a/Xresources.d/solarized.dark b/Xresources.d/solarized.dark deleted file mode 100644 index 6db1ab8..0000000 --- a/Xresources.d/solarized.dark +++ /dev/null @@ -1,56 +0,0 @@ -#define S_base03 #002b36 -#define S_base02 #073642 -#define S_base01 #586e75 -#define S_base00 #657b83 -#define S_base0 #839496 -#define S_base1 #93a1a1 -#define S_base2 #eee8d5 -#define S_base3 #fdf6e3 - -*background: S_base03 -*foreground: S_base0 -*fadeColor: S_base03 -*cursorColor: S_base1 -*pointerColorBackground:S_base01 -*pointerColorForeground:S_base1 - -#define S_yellow #b58900 -#define S_orange #cb4b16 -#define S_red #dc322f -#define S_magenta #d33682 -#define S_violet #6c71c4 -#define S_blue #268bd2 -#define S_cyan #2aa198 -#define S_green #859900 - -!! black dark/light -*color0: S_base02 -*color8: S_base03 - -!! red dark/light -*color1: S_red -*color9: S_orange - -!! green dark/light -*color2: S_green -*color10: S_base01 - -!! yellow dark/light -*color3: S_yellow -*color11: S_base00 - -!! blue dark/light -*color4: S_blue -*color12: S_base0 - -!! magenta dark/light -*color5: S_magenta -*color13: S_violet - -!! cyan dark/light -*color6: S_cyan -*color14: S_base1 - -!! white dark/light -*color7: S_base2 -*color15: S_base3 diff --git a/Xresources.d/solarized.light b/Xresources.d/solarized.light deleted file mode 100644 index 75f4497..0000000 --- a/Xresources.d/solarized.light +++ /dev/null @@ -1,56 +0,0 @@ -#define S_base03 #002b36 -#define S_base02 #073642 -#define S_base01 #586e75 -#define S_base00 #657b83 -#define S_base0 #839496 -#define S_base1 #93a1a1 -#define S_base2 #eee8d5 -#define S_base3 #fdf6e3 - -*background: S_base3 -*foreground: S_base00 -*fadeColor: S_base3 -*cursorColor: S_base01 -*pointerColorBackground:S_base1 -*pointerColorForeground:S_base01 - -#define S_yellow #b58900 -#define S_orange #cb4b16 -#define S_red #dc322f -#define S_magenta #d33682 -#define S_violet #6c71c4 -#define S_blue #268bd2 -#define S_cyan #2aa198 -#define S_green #859900 - -!! black dark/light -*color0: S_base02 -*color8: S_base03 - -!! red dark/light -*color1: S_red -*color9: S_orange - -!! green dark/light -*color2: S_green -*color10: S_base01 - -!! yellow dark/light -*color3: S_yellow -*color11: S_base00 - -!! blue dark/light -*color4: S_blue -*color12: S_base0 - -!! magenta dark/light -*color5: S_magenta -*color13: S_violet - -!! cyan dark/light -*color6: S_cyan -*color14: S_base1 - -!! white dark/light -*color7: S_base2 -*color15: S_base3 diff --git a/Xresources.d/theme b/Xresources.d/theme new file mode 100644 index 0000000..d60c7b3 --- /dev/null +++ b/Xresources.d/theme @@ -0,0 +1,36 @@ +! special +*.foreground: #f1ebeb +*.background: #272822 +*.cursorColor: #f1ebeb + +! black +*.color0: #48483e +*.color8: #76715e + +! red +*.color1: #dc2566 +*.color9: #fa2772 + +! green +*.color2: #8fc029 +*.color10: #a7e22e + +! yellow +*.color3: #d4c96e +*.color11: #e7db75 + +! blue +*.color4: #55bcce +*.color12: #66d9ee + +! magenta +*.color5: #9358fe +*.color13: #ae82ff + +! cyan +*.color6: #56b7a5 +*.color14: #66efd5 + +! white +*.color7: #acada1 +*.color15: #cfd0c2 diff --git a/Xresources.d/xterm b/Xresources.d/xterm index 7eedaa8..40f323f 100644 --- a/Xresources.d/xterm +++ b/Xresources.d/xterm @@ -10,3 +10,6 @@ xterm*rightScrollBar: false xterm*jumpScroll: true xterm*multiScroll: true xterm*toolBar: false +XTerm.vt100.translations: #override \n\ + Ctrl Shift C: copy-selection(CLIPBOARD) \n\ + Ctrl Shift V: insert-selection(CLIPBOARD) diff --git a/bashrc b/bashrc index 394d77b..1abcdeb 100644 --- a/bashrc +++ b/bashrc @@ -1,55 +1,79 @@ -# Custom scripts +# +# ~/.bashrc +# +# ENVIRONMENT VARIABLES +# Region preferences +export LANG=fr_FR.utf8 +export TZ=/usr/share/zoneinfo/Europe/Paris -#find ~/.scripts/ ~/.gscripts/ -type f -name "*.sh" | while read script; do - #source "$script" -#done -[ -f ~/.scripts/index.sh ] && source ~/.scripts/index.sh -[ -f ~/.gscripts/index.sh ] && source ~/.gscripts/index.sh - -# Prompt -if [[ $USER == 'root' ]]; then - col=31; -elif [[ -n $ME ]]; then # $ME is a var set by my private config that is not empty if it is my account (and not a system account e.g. `git`) - col=32; -else - col=33; -fi - -export USER=$(whoami) -PS1="\[\e]2;\u@\h \w\a\]\[\e[0;37m\][\[\e[0;${col}m\]\u\[\e[0;37m\]@\[\e[0;34m\]\h \[\e[0;36m\]\W\[\e[0;37m\]]\$\[\e[0m\] " -PS2="> " -PS3="+ " -PS4="- " - - -# Vars +# Favourite commands export PAGER=less export EDITOR=vim export VISUAL=vim -export BROWSER=/usr/bin/qutebrowser -export TZ=/usr/share/zoneinfo/Europe/Paris +export BROWSER=qutebrowser -export PATH="$PATH:$HOME/.gem/ruby/2.3.0/bin/" -export LANG=fr_FR.utf8 -export HISTSIZE=10000 -export HISTFILESIZE=${HISTSIZE} -export HISTCONTROL=ignoreboth +# Some programs need those changes +export PATH="/usr/lib/ccache/bin/:$PATH" +if [ -d $HOME/.gem/ruby/2.4.0/bin ]; then + export PATH="$HOME/.gem/ruby/2.4.0/bin/:$PATH" +fi +#export PATH="$(echo "$PATH" | sed 's|:|\n|g' | sort | uniq | tr '\n' ':' | sed 's|:$||')" export JAVA_FONTS=/usr/share/fonts/TTF export ANDROID_HOME=/opt/android-sdk export GOPATH=$HOME/.go +export PATH=$GOPATH/bin:$PATH +export XDG_CONFIG_HOME=$HOME/.config +export ARDUINO=/usr/share/arduino +export ARDUINO_DIR=$ARDUINO +export ARDMK_VENDOR=archlinux-arduino -if [ -z $XDG_CONFIG_HOME ]; then - export XDG_CONFIG_HOME=$HOME/.config +# ALIASES + +# Completion for existing commands +export LS_OPTIONS='--group-directories-first --time-style=+"%d/%m/%Y %H:%M:%S" --color=auto --file-type --human-readable' +alias ls="ls $LS_OPTIONS" +alias grep='grep --color=tty -d skip' +alias mkdir='mkdir -v' +alias cp="cp -i" +alias mv="mv -iv" +alias dd='dd status=progress' +alias rm='rm -Iv --one-file-system' +alias free='free -m' +alias df='df -h' +alias pacman='pacman --color auto' +alias dmesg='dmesg --ctime' + +# Frequent mistakes +alias systemclt=systemctl + +# Shortcuts for commonly used commands +alias ll="ls -l $LS_OPTIONS" +alias la="ls -la $LS_OPTIONS" +alias al=sl +alias x='startx; logout' +alias s='sudo -s -E' +alias po='eval $(proxy off)' +alias nw="sudo systemctl restart NetworkManager" +alias mc="machines" +alias tracefiles="strace -f -t -e trace=file" +alias vpn="sudo systemctl start openvpn-client@$HOSTNAME" +alias vpno="sudo systemctl stop openvpn-client@$HOSTNAME" +alias vpns="sudo systemctl status openvpn-client@$HOSTNAME" +alias vpnr="sudo systemctl restart openvpn-client@$HOSTNAME" +# Superseding commands with better ones if they are present +if which vim &> /dev/null; then + alias vi='vim' +fi +if which gopass &> /dev/null; then + alias pass='gopass' +fi +if which wakeonlan &> /dev/null; then + alias wol='wakeonlan' fi -# Tweaks -[[ $- != *i* ]] && return - -if [ -f /etc/bash_completion ]; then . /etc/bash_completion; fi - -xhost +local:root > /dev/null 2>&1 +# SHELL CUSTOMIZATION complete -cf sudo @@ -62,78 +86,60 @@ shopt -s extglob shopt -s histappend shopt -s hostcomplete -export LS_OPTIONS='--group-directories-first --time-style=+"%d/%m/%Y %H:%M" --color=auto --classify --human-readable' -alias ls="ls $LS_OPTIONS" -alias ll="ls -l $LS_OPTIONS" -alias la="ls -la $LS_OPTIONS" -alias al=sl -alias grep='grep --color=tty -d skip' -alias mkdir='mkdir -v' -alias cp="cp -i" -alias mv="mv -iv" -alias dd='dd status=progress' -alias rm='rm -Iv --one-file-system' -alias free='free -m' -alias df='df -h' -alias 49.3='sudo' -alias pacman='pacman --color auto' -alias x='startx; logout' -alias s='sudo -s -E' +export HISTSIZE=100000 +export HISTFILESIZE=${HISTSIZE} +export HISTCONTROL=ignoreboth -# Solarized theme for tty, the dark version. -# Based on: -# - Solarized (http://ethanschoonover.com/solarized) -# - Xresources from http://github.com/altercation/solarized -# Generated with pty2tty.awk by Joep van Delft -# http://github.com/joepvd/tty-solarized -if [ "$TERM" = "linux" ]; then - echo -en "\e]PB657b83" # S_base00 - echo -en "\e]PA586e75" # S_base01 - echo -en "\e]P0073642" # S_base02 - echo -en "\e]P62aa198" # S_cyan - echo -en "\e]P8002b36" # S_base03 - echo -en "\e]P2859900" # S_green - echo -en "\e]P5d33682" # S_magenta - echo -en "\e]P1dc322f" # S_red - echo -en "\e]PC839496" # S_base0 - echo -en "\e]PE93a1a1" # S_base1 - echo -en "\e]P9cb4b16" # S_orange - echo -en "\e]P7eee8d5" # S_base2 - echo -en "\e]P4268bd2" # S_blue - echo -en "\e]P3b58900" # S_yellow - echo -en "\e]PFfdf6e3" # S_base3 - echo -en "\e]PD6c71c4" # S_violet - clear # against bg artifacts +# PROMPT CUSTOMIZATION + +if [[ $USER == 'root' ]]; then + col=31; +elif [[ $USER == 'geoffrey' || $USER == 'gbontoux' || $USER == 'gpreud' ]]; then + col=32; +else + col=33; fi +export PS1="\[\e]2;\u@\h \w\a\]\[\e[0;37m\][\[\e[0;${col}m\]\u\[\e[0;37m\]@\[\e[0;34m\]\h \[\e[0;36m\]\W\[\e[0;37m\]]\$\[\e[0m\] " +export PS2="> " +export PS3="+ " +export PS4="- " -# Utils -alias fuck='eval $(thefuck $(fc -ln -1))' +# CUSTOM SCRIPTS + +export PATH="$HOME/.bin/:$HOME/.scripts/:$PATH" +[ -f ~/.gscripts/gprofile ] && source ~/.gscripts/gprofile + +# UTILITIES + +# Bash completion +[ -f /etc/bash_completion ] && . /etc/bash_completion + +# Bad day mood-saver +function fuck { + if which thefuck &> /dev/null + then + eval $(thefuck --alias) + fuck $@ + else + echo "thefuck is not installed on this system." + fi +} alias FUCK='fuck' -# Command not found -[ -r /usr/share/doc/pkgfile/command-not-found.bash ] && . /usr/share/doc/pkgfile/command-not-found.bash -[ -r /etc/profile.d/cnf.sh ] && . /etc/profile.d/cnf.sh - -# Functions -function clean { - find . -type d -name bower_components -or -name node_modules -print0 | while read file; do - rm -rf "$file" - done - find . -type f -name Makefile -print0 | while IFS= read -r -d '' file; do - echo "--> $file" - (cd "${file//Makefile}"; make clean) - done - find . -type d -name .git -print0 | while IFS= read -r -d '' dir; do - echo "--> $file" - (cd "$dir"; git gc) - done +# Node Version Manager +function nvm { + export NVM_DIR="$HOME/.nvm" + if [ -s "$NVM_DIR/nvm.sh" ] + then + . "$NVM_DIR/nvm.sh" + [ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" + nvm $@ + else + echo "NVM is not installed on this system." + fi } -function dafont { - wget "http://dl.dafont.com/dl/?f=$1" -O /tmp/dafont.zip - unzip /tmp/dafont.zip -d ~/.local/share/fonts -x *.txt - rm -rf /tmp/dafont.zip -} - -alias nw="sudo systemctl restart NetworkManager" +# Command not found handlers +[ -r /usr/share/doc/pkgfile/command-not-found.bash ] && . /usr/share/doc/pkgfile/command-not-found.bash # Arch +[ -r /etc/profile.d/cnf.sh ] && . /etc/profile.d/cnf.sh # Arch (alternative, for Manjaro mostly) diff --git a/bin/.gitignore b/bin/.gitignore new file mode 100644 index 0000000..d6b7ef3 --- /dev/null +++ b/bin/.gitignore @@ -0,0 +1,2 @@ +* +!.gitignore diff --git a/config/htop/htoprc b/config/htop/htoprc index 882a239..9a0a084 100644 --- a/config/htop/htoprc +++ b/config/htop/htoprc @@ -1,15 +1,15 @@ # Beware! This file is rewritten by htop when settings are changed in the interface. # The parser is also very primitive, and not human-friendly. fields=0 48 17 18 38 39 40 2 46 47 49 1 -sort_key=46 +sort_key=47 sort_direction=1 hide_threads=0 -hide_kernel_threads=0 -hide_userland_threads=0 +hide_kernel_threads=1 +hide_userland_threads=1 shadow_other_users=0 show_thread_names=0 -show_program_path=1 -highlight_base_name=0 +show_program_path=0 +highlight_base_name=1 highlight_megabytes=0 highlight_threads=1 tree_view=0 diff --git a/config/i3/autorandrdefaultmenu b/config/i3/autorandrdefaultmenu new file mode 100755 index 0000000..3f8a36e --- /dev/null +++ b/config/i3/autorandrdefaultmenu @@ -0,0 +1,10 @@ +#!/usr/bin/env bash + +shopt -s nullglob globstar + +profile=$(echo -e "$(autorandr 2>&1 | cut -d' ' -f1)" | ~/.config/i3/dmenu_cmd -p "Default profile" "$@") + +[[ -n $profile ]] || exit + +autorandr --default "$profile" + diff --git a/config/i3/autorandrloadmenu b/config/i3/autorandrloadmenu new file mode 100755 index 0000000..930b044 --- /dev/null +++ b/config/i3/autorandrloadmenu @@ -0,0 +1,10 @@ +#!/usr/bin/env bash + +shopt -s nullglob globstar + +profile=$(echo -e "common\nhorizontal\nvertical\n$(autorandr 2>&1 | cut -d' ' -f1)" | ~/.config/i3/dmenu_cmd -p "Load profile" "$@") + +[[ -n $profile ]] || exit + +autorandr --load "$profile" + diff --git a/config/i3/autorandrremovemenu b/config/i3/autorandrremovemenu new file mode 100755 index 0000000..7b12673 --- /dev/null +++ b/config/i3/autorandrremovemenu @@ -0,0 +1,10 @@ +#!/usr/bin/env bash + +shopt -s nullglob globstar + +profile=$(echo -e "$(autorandr 2>&1 | cut -d' ' -f1)" | ~/.config/i3/dmenu_cmd -p "Remove profile" "$@") + +[[ -n $profile ]] || exit + +autorandr --remove "$profile" + diff --git a/config/i3/autorandrsavemenu b/config/i3/autorandrsavemenu new file mode 100755 index 0000000..bae7989 --- /dev/null +++ b/config/i3/autorandrsavemenu @@ -0,0 +1,10 @@ +#!/usr/bin/env bash + +shopt -s nullglob globstar + +profile=$(echo -e "$(autorandr 2>&1 | cut -d' ' -f1)" | ~/.config/i3/dmenu_cmd -p "Save profile" "$@") + +[[ -n $profile ]] || exit + +autorandr --save "$profile" + diff --git a/config/i3/config b/config/i3/config index e18e78f..00565de 100644 --- a/config/i3/config +++ b/config/i3/config @@ -22,6 +22,7 @@ hide_edge_borders both # Font for window titles. Will also be used by the bar unless a different font # is used in the bar {} block below. +font pango:Source Code Pro 8 font pango:DejaVu Sans Mono 8 font pango:Sans 8 @@ -38,7 +39,7 @@ bindsym $mod+F2 exec --no-startup-id ~/.config/i3/dmenu_run bindsym Mod1+F2 exec --no-startup-id ~/.config/i3/dmenu_run bindsym $mod+c exec --no-startup-id ~/.config/i3/passmenu -bindsym $mod+x exec --no-startup-id ~/.config/i3/clipmenu +#bindsym $mod+x exec --no-startup-id ~/.config/i3/clipmenu bindsym $mod+asterisk exec --no-startup-id ~/.config/i3/sshmenu bindsym $mod+dollar exec --no-startup-id ~/.config/i3/sshmenu root @@ -51,7 +52,7 @@ set $up_bar killall -USR1 i3status # Start Applications bindsym $mod+Return exec xterm bindsym $mod+p exec thunar -bindsym $mod+m exec qutebrowser +bindsym $mod+m exec qutebrowser --override-restore --backend=webengine # Volume control #bindsym XF86AudioRaiseVolume exec amixer -q set Master 5+ unmute; exec $up_bar @@ -102,7 +103,7 @@ bindsym $mod+Shift+l move right #bindsym $mod+Shift+Right move right # workspace back and forth (with/without active container) -workspace_auto_back_and_forth yes +workspace_auto_back_and_forth no bindsym $mod+b workspace back_and_forth bindsym $mod+Shift+b move container to workspace back_and_forth; workspace back_and_forth @@ -133,27 +134,27 @@ bindsym $mod+a focus parent bindsym $mod+q focus child # Workspace names -set $WS1 1 Édition -set $WS2 2 Éxecution -set $WS3 3 Organisation -set $WS4 4 Référence -set $WS5 5 Divers 1 -set $WS6 6 Divers 2 -set $WS7 7 Contact -set $WS8 8 Social -set $WS9 9 Veille -set $WS10 10 Musique +set $WS1 1 +set $WS2 2 +set $WS3 3 +set $WS4 4 +set $WS5 5 +set $WS6 6 +set $WS7 7 +set $WS8 8 +set $WS9 9 +set $WS10 10 # Workspace output -workspace "$WS1" output LVDS1 -workspace "$WS2" output VGA1 -workspace "$WS3" output LVDS1 -workspace "$WS4" output VGA1 -workspace "$WS5" output LVDS1 -workspace "$WS6" output VGA1 -workspace "$WS7" output LVDS1 -workspace "$WS8" output VGA1 -workspace "$WS9" output LVDS1 +workspace "$WS1" output LVDS1 +workspace "$WS2" output VGA1 +workspace "$WS3" output LVDS1 +workspace "$WS4" output VGA1 +workspace "$WS5" output LVDS1 +workspace "$WS6" output VGA1 +workspace "$WS7" output LVDS1 +workspace "$WS8" output VGA1 +workspace "$WS9" output LVDS1 workspace "$WS10" output VGA1 # switch to workspace @@ -301,66 +302,55 @@ mode "Resize" { bindsym $mod+r mode "Resize" -set $background exec --no-startup-id feh --bg-fill $HOME/.config/i3/bg.jpg -bindsym $mod+Shift+a $background -set $mode_screen_select [V] VGA1 [H] HDMI1 -mode "$mode_screen_select" { - bindsym v mode "$mode_screen_VGA1" - bindsym h mode "$mode_screen_HDMI1" - - # back to normal: Enter or Escape - bindsym Return mode "default" - bindsym Escape mode "default" -} -bindsym $mod+t mode "$mode_screen_select" - -set $mode_screen_VGA1 VGA [R] Right [L] Left [U] Up [D] Down [C] Copy [O] Off -mode "$mode_screen_VGA1" { - bindsym r exec xrandr --output VGA1 --auto --right-of LVDS1; $background - bindsym l exec xrandr --output VGA1 --auto --left-of LVDS1; $background - bindsym u exec xrandr --output VGA1 --auto --above LVDS1; $background - bindsym d exec xrandr --output VGA1 --auto --below LVDS1; $background - bindsym c exec xrandr --output VGA1 --auto --same-as LVDS1; $background - bindsym o exec xrandr --output VGA1 --auto --off; $background +set $mode_screen Screen setup [A] Auto [L] Load [S] Save [R] Remove [D] Default +bindsym $mod+t mode "$mode_screen" +mode "$mode_screen" { + bindsym a exec autorandr --change --force, mode "default" + bindsym l exec ~/.config/i3/autorandrloadmenu, mode "default" + bindsym s exec ~/.config/i3/autorandrsavemenu, mode "default" + bindsym r exec ~/.config/i3/autorandrremovemenu, mode "default" + bindsym d exec ~/.config/i3/autorandrdefaultmenu, mode "default" # back to normal: Enter or Escape bindsym Return mode "default" bindsym Escape mode "default" } -set $mode_screen_HDMI1 HDMI [R] Right [L] Left [U] Up [D] Down [C] Copy [O] Off -mode "$mode_screen_HDMI1" { - bindsym r exec xrandr --output HDMI1 --auto --right-of LVDS1; $background - bindsym l exec xrandr --output HDMI1 --auto --left-of LVDS1; $background - bindsym u exec xrandr --output HDMI1 --auto --above LVDS1; $background - bindsym d exec xrandr --output HDMI1 --auto --below LVDS1; $background - bindsym c exec xrandr --output HDMI1 --auto --same-as LVDS1; $background - bindsym o exec xrandr --output HDMI1 --auto --off; $background +# Screen temperature ("redness") setting +bindsym $mod+y mode "$mode_temp" +set $mode_temp Temperature [R] Red [D] Dust storm [C] Campfire [O] Normal [A] All nighter [B] Blue +mode "$mode_temp" { + bindsym r exec sct 1000 + bindsym d exec sct 2000 + bindsym c exec sct 4500 + bindsym o exec sct + bindsym a exec sct 8000 + bindsym b exec sct 10000 # back to normal: Enter or Escape bindsym Return mode "default" bindsym Escape mode "default" } -# Start i3bar to display a workspace bar (plus the system information i3status if available) -bar { - #i3bar_command ~/.config/lemonbar/i3_lemonbar.sh - mode hide - status_command i3status -# wheel_up_cmd nop -# wheel_down_cmd nop - font pango:DejaVu Sans Mono 9 - font pango:Sans 8 - colors { - separator #4E9C00 - background #333333 - statusline #FFFFFF - focused_workspace #4E9C00 #4E9C00 #FFFFFF - active_workspace #333333 #333333 #FFFFFF - inactive_workspace #333333 #222222 #888888 - urgent_workspace #C20000 #C20000 #FFFFFF - } -} +# Colors +set $bg #272822 +set $fg #f1ebeb +set $00 #48483e +set $01 #dc2566 +set $02 #8fc029 +set $03 #d4c96e +set $04 #55bcce +set $05 #9358fe +set $06 #56b7a5 +set $07 #acada1 +set $08 #76715e +set $09 #fa2772 +set $10 #a7e22e +set $11 #e7db75 +set $12 #66d9ee +set $13 #ae82ff +set $14 #66efd5 +set $15 #cfd0c2 # Inactivity settings exec --no-startup-id xautolock -time 10 -locker 'xset dpms force standby' -killtime 1 -killer '$locker' @@ -369,26 +359,26 @@ bindsym $mod+F5 exec --no-startup-id xautolock -enable # Autostart applications -$background +exec --no-startup-id autorandr --change # Screen configuration and everything that depends on it exec --no-startup-id /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 # Password remembering exec --no-startup-id gnome-keyring-daemon # Password remembering exec --no-startup-id numlockx on # Activate Num lock #exec --no-startup-id nm-applet # Network manager tray icon #exec --no-startup-id compton -b # Compositing manager -#exec --no-startup-id conky -c $HOME/.conky/status # Desktop widget exec --no-startup-id unclutter # Hide mouse cursor after some time exec --no-startup-id dunst # Notifications -exec --no-startup-id $HOME/.config/i3/clipmenud # Clipboard manager +exec --no-startup-id keynav # Keyboard cursor controller +#exec --no-startup-id $HOME/.config/i3/clipmenud # Clipboard manager +exec --no-startup-id mpd # Music Player Daemon -# Autostart programs -#exec --no-startup-id i3-msg 'workspace $WS8; exec firefox --new-window tweetdeck.twitter.com' -#exec --no-startup-id i3-msg 'workspace $WS9; exec firefox --new-window rss.frogeye.fr' -#exec --no-startup-id clementine -#exec --no-startup-id evolution -#exec --no-startup-id pidgin +set $ignore #ff00000 # Theme colors -client.focused #4E9C00 #4E9C00 #FFFFFF #FFFFFF -client.focused_inactive #1B3600 #1B3600 #888888 #FFFFFF -client.unfocused #333333 #333333 #888888 #FFFFFF -client.urgent #C20000 #C20000 #FFFFFF #FFFFFF +# class border backgr. text indicator child_border +client.focused $02 $02 $bg $07 $10 +client.focused_inactive $03 $03 $08 $15 $14 +client.unfocused $08 $08 $fg $11 $00 +client.urgent $01 $01 $fg $05 $09 +client.placeholder $ignore $06 $fg $ignore $14 + +client.background $15 diff --git a/config/i3/dmenu_cmd b/config/i3/dmenu_cmd index e1d3599..a02a9b2 100755 --- a/config/i3/dmenu_cmd +++ b/config/i3/dmenu_cmd @@ -1,2 +1,2 @@ #!/bin/sh -dmenu -fn 'DejaVu Sans Mono-10' -nb '#222222' -nf '#888888' -sb '#4E9C00' -sf '#FFFFFF' -l 8 -f -i -h 19 "$@" +dmenu -fn 'DejaVu Sans Mono-10' -nb '#48483e' -nf '#f1ebeb' -sb '#8fc029' -sf '#272822' -l 8 -f -i -h 19 "$@" diff --git a/config/i3/lock b/config/i3/lock index 9bc0a51..e5d1829 100755 --- a/config/i3/lock +++ b/config/i3/lock @@ -7,6 +7,6 @@ if [ $? -ne 0 ]; then } trap revert SIGHUP SIGINT SIGTERM xset dpms 5 5 5 - i3lock --nofork --color 648901 --ignore-empty-password + i3lock --nofork --color 648901 --image=$HOME/.config/i3/lock.png --tiling --ignore-empty-password revert fi diff --git a/config/i3/lock.png b/config/i3/lock.png new file mode 100644 index 0000000..70cc80b Binary files /dev/null and b/config/i3/lock.png differ diff --git a/config/i3/lock.svg b/config/i3/lock.svg new file mode 100644 index 0000000..8eac69f --- /dev/null +++ b/config/i3/lock.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/config/i3/sshmenu b/config/i3/sshmenu index 00cf7fa..7b3fdc5 100755 --- a/config/i3/sshmenu +++ b/config/i3/sshmenu @@ -1,9 +1,9 @@ #!/bin/bash if [ "$1" == 'root' ]; then a=" (root)" - b="sudo -E " + b="-t 'sudo -s'" fi machine=$(cat ~/.ssh/config | grep '^Host ' | cut -d ' ' -f 2 | grep -v '*' | sort | $HOME/.config/i3/dmenu_cmd -p "SSH$a to ") if [ ! -z $machine ]; then - xterm -e "ssh $machine -t '${b}bash --login'" + xterm -e "ssh $machine $b" fi diff --git a/config/i3status/config b/config/i3status/config index 4e38eb4..5860ec6 100644 --- a/config/i3status/config +++ b/config/i3status/config @@ -36,7 +36,7 @@ ethernet eth0 { ethernet usb0 { # if you use %speed, i3status requires the cap_net_admin capability format_up = " %ip" - format_down = "" + format_down = "📱" } cpu_usage { @@ -56,11 +56,11 @@ battery 0 { path_exists VPN { # path exists when a VPN tunnel launched by nmcli/nm-applet is active path = "/proc/sys/net/ipv4/conf/tun0" - format = "" + format = "🔐" } tztime local { - format = "%d/%m/%Y %H:%M:%S" + format = "🕘 %d/%m/%Y %H:%M:%S" timezone = "Europe/Paris" } @@ -76,8 +76,8 @@ disk "/home" { format = " %avail / %total" } volume master { - format = " %volume" - format_muted = " %volume" + format = "🔈 %volume" + format_muted = "🔇 %volume" device = "default" mixer = "Master" mixer_idx = 0 diff --git a/config/linuxColors.sh b/config/linuxColors.sh new file mode 100644 index 0000000..192b39a --- /dev/null +++ b/config/linuxColors.sh @@ -0,0 +1,24 @@ +#!/bin/sh +if [ "$TERM" = "linux" ]; then + /bin/echo -e " + \e]P048483e + \e]P1dc2566 + \e]P28fc029 + \e]P3d4c96e + \e]P455bcce + \e]P59358fe + \e]P656b7a5 + \e]P7acada1 + \e]P876715e + \e]P9fa2772 + \e]PAa7e22e + \e]PBe7db75 + \e]PC66d9ee + \e]PDae82ff + \e]PE66efd5 + \e]PFcfd0c2 + " + # get rid of artifacts + clear +fi + diff --git a/scripts/svgo.yml b/config/optiSvgo.yml similarity index 100% rename from scripts/svgo.yml rename to config/optiSvgo.yml diff --git a/config/polybar/config b/config/polybar/config new file mode 100644 index 0000000..6758e66 --- /dev/null +++ b/config/polybar/config @@ -0,0 +1,342 @@ +;===================================================== +; +; To learn more about how to configure Polybar +; go to https://github.com/jaagr/polybar +; +; The README contains alot of information +; +;===================================================== + +[theme] +foreground = #f1ebeb +background = #272822 +blackB = #48483e +blackF = #76715e +redB = #dc2566 +redF = #fa2772 +greenB = #8fc029 +greenF = #a7e22e +yellowB = #d4c96e +yellowF = #e7db75 +blueB = #55bcce +blueF = #66d9ee +magentaB = #9358fe +magentaF = #ae82ff +cyanB = #56b7a5 +cyanF = #66efd5 +whiteB = #acada1 +whiteF = #cfd0c2 + +[colors] +background = ${theme.blackB} +foreground = ${theme.foreground} + +[bar/base] +monitor = ${env:display:LVDS1} +width = 100% +height = 20 +fixed-center = false + +background = ${colors.background} +foreground = ${colors.foreground} + +line-size = 0 + +border-size = 0 +border-color = ${colors.background} + +padding-left = 2 +padding-right = 2 + +module-margin-left = 1 +module-margin-right = 1 + +font-0 = "Font Awesome:size=10;0" +font-1 = "DejaVu Sans:size=10;0" +font-2 = "DejaVu Sans Mono for Powerline:pixelsize=10;0" + +modules-left = i3 + +;wm-restack = bspwm +wm-restack = i3 + +;override-redirect = true + +;scroll-up = bspwm-desknext +;scroll-down = bspwm-deskprev + +;scroll-up = i3wm-wsnext +;scroll-down = i3wm-wsprev + +bottom = true + +enable-ipc = true + +[bar/primary] +inherit = bar/base + +modules-right = cpu memory temperature eth wlan xbacklight volume battery date + +tray-position = right +tray-padding = 2 +tray-transparent = false + +[bar/secondary] +inherit = bar/base +modules-center = mpd +modules-right = ethMore wlanMore filesystem xbacklight volume date + + +[module/filesystem] +type = internal/fs +interval = 25 + +mount-0 = / +mount-1 = /home + +label-mounted-foreground = ${theme.magentaB} +label-mounted = %{F#ae81ff}%mountpoint%%{F-} %free% +label-unmounted = + +[module/i3] +type = internal/i3 +pin-workspaces = true +strip-wsnumbers = false +index-sort = true +enable-click = true +enable-scroll = true +wrapping-scroll = false +reverse-scroll = true +fuzzy-match = false + +ws-icon-0 = "1;" +ws-icon-1 = "2;" +ws-icon-2 = "3;" +ws-icon-3 = "4;" +ws-icon-4 = "5;▲" +ws-icon-5 = "6;▲" +ws-icon-6 = "7;" +ws-icon-7 = "8;" +ws-icon-8 = "9;" +ws-icon-9 = "10;" +ws-icon-default = ? + +format = + +label-mode = %mode% +label-mode-padding = 2 +label-mode-background = ${theme.redB} + +label-focused = %index% %icon% +label-focused-foreground = ${theme.background} +label-focused-background = ${theme.greenB} +label-focused-padding = 2 + +label-unfocused = ${self.label-focused} +label-unfocused-padding = ${self.label-focused-padding} + +label-visible = ${self.label-focused} +label-visible-padding = ${self.label-focused-padding} +label-visible-foreground = ${theme.greenF} + +label-urgent = ${self.label-focused} +label-urgent-padding = ${self.label-focused-padding} +label-urgent-foreground = ${theme.foreground} +label-urgent-background = ${theme.redB} + +[module/mpd] +type = internal/mpd +; format-online = +format-online = +format-playing = ${self.format-online} +format-paused = ${self.format-online} +format-stopped = + +label-song =  %title% - %artist% +label-song-maxlen = 35 +label-song-ellipsis = true + +label-time = %elapsed%/%total% + +label-offline = + +icon-play =  +icon-pause =  +icon-stop =  +icon-prev =  +icon-next =  +icon-seekb =  +icon-seekf =  +icon-random =  +icon-repeat =  +icon-repeatone = 1 + +toggle-on-foreground = ${theme.foreground} +toggle-off-foreground = #55 + + +[module/xbacklight] +type = internal/xbacklight +output = ${env:display:LVDS1} +enable-scroll = true +format = +ramp-0 = 🌕 +ramp-1 = 🌔 +ramp-2 = 🌓 +ramp-3 = 🌒 +ramp-4 = 🌑 +format-foreground = ${theme.redF} + +[module/backlight-acpi] +inherit = module/xbacklight +type = internal/backlight +card = intel_backlight + +[module/cpu] +type = internal/cpu +interval = 0.5 +format = +format-foreground = ${theme.redF} +ramp-coreload-0 = ▁ +ramp-coreload-1 = ▂ +ramp-coreload-2 = ▃ +ramp-coreload-3 = ▄ +ramp-coreload-4 = ▅ +ramp-coreload-5 = ▆ +ramp-coreload-6 = ▇ +ramp-coreload-7 = █ + +[module/memory] +type = internal/memory +interval = 2 +format-foreground = ${theme.greenF} +label =  %gb_free% + +[module/eth] +type = internal/network +interface = ${env:ethI:eth0} +interval = 1 + +format-connected =  +label-connected = %local_ip% +format-connected-foreground = ${theme.blueF} + +format-disconnected = + +[module/ethMore] +inherit = module/eth +label-connected = ↑%upspeed% ↓%downspeed% + +[module/wlan] +type = internal/network +interface = ${env:wlanI:wlan0} +interval = 1 + +format-connected =  +label-connected = %local_ip% %essid% +format-connected-foreground = ${theme.cyanF} + +format-disconnected = + +ramp-signal-0 = ▁ +ramp-signal-1 = ▂ +ramp-signal-2 = ▃ +ramp-signal-3 = ▄ +ramp-signal-4 = ▅ +ramp-signal-5 = ▆ +ramp-signal-6 = ▇ +ramp-signal-7 = █ + +animation-packetloss-0 =  +animation-packetloss-1 =  +animation-packetloss-framerate = 500 + +[module/wlanMore] +inherit = module/wlan +label-connected = ↑%upspeed% ↓%downspeed% + +[module/date] +type = internal/date +interval = 1 + +date = " %d/%m/%Y" +time =  %H:%M:%S + +format =