Minor changes

This commit is contained in:
Thomas Dehaeze 2019-03-26 12:10:43 +01:00
parent ac734f41d1
commit c9b1c5aa8c
3 changed files with 172 additions and 160 deletions

View File

@ -207,24 +207,24 @@ alias meteo=meteo
*** TODO Upload using transfer.sh
#+BEGIN_SRC conf
upload() {
# write to output to tmpfile because of progress bar
tmpfile=$(mktemp -t transferXXX)
# basefile=$(basename "$1" | sed -e 's/[^a-zA-Z0-9]/-/g')
curl --progress-bar --upload-file "$1" "https://transfer.sh/" >> $tmpfile;
cat $tmpfile | xclip;
echo "Copied:" $(cat $tmpfile);
rm -f $tmpfile;
}
alias upload=upload
upload() {
# write to output to tmpfile because of progress bar
tmpfile=$(mktemp -t transferXXX)
# basefile=$(basename "$1" | sed -e 's/[^a-zA-Z0-9]/-/g')
curl --progress-bar --upload-file "$1" "https://transfer.sh/" >> $tmpfile;
cat $tmpfile | xclip -selection clipboard;
echo "Copied:" $(cat $tmpfile);
rm -f $tmpfile;
}
alias upload=upload
#+END_SRC
*** TODO Upload alternative
#+BEGIN_SRC conf
transfer() {
transfer() {
curl --progress-bar --upload-file "$1" https://transfer.sh/$(basename $1) | xclip -in -selection clipboard;
}
alias transfer=transfer
}
alias transfer=transfer
#+END_SRC
*** Extract archive
@ -306,14 +306,18 @@ fi
#+END_SRC
** Exports
#+BEGIN_SRC conf
export TERM=xterm-256color
#+END_SRC
*** Better yaourt colors
#+BEGIN_SRC conf
export YAOURT_COLORS="nb=1:pkg=1:ver=1;32:lver=1;45:installed=1;42:grp=1;34:od=1;41;5:votes=1;44:dsc=0:other=1;35"
export YAOURT_COLORS="nb=1:pkg=1:ver=1;32:lver=1;45:installed=1;42:grp=1;34:od=1;41;5:votes=1;44:dsc=0:other=1;35"
#+END_SRC
*** Use Ripgrep for FZF
#+BEGIN_SRC conf
export FZF_DEFAULT_COMMAND='rg --files --no-ignore --hidden --follow --glob "!.git/*"'
export FZF_DEFAULT_COMMAND='rg --files --no-ignore --hidden --follow --glob "!.git/*"'
#+END_SRC
*** Goland
@ -327,21 +331,21 @@ export FZF_DEFAULT_COMMAND='rg --files --no-ignore --hidden --follow --glob "!.g
Undocumented feature which sets the size to "unlimited". http://stackoverflow.com/questions/9457233/unlimited-bash-history
#+BEGIN_SRC conf
export HISTFILESIZE=
export HISTSIZE=
export HISTTIMEFORMAT="[%F %T] "
export HISTFILESIZE=
export HISTSIZE=
export HISTTIMEFORMAT="[%F %T] "
#+END_SRC
Change the file location because certain bash sessions truncate =.bash_history= file upon close. http://superuser.com/questions/575479/bash-history-truncated-to-500-lines-on-each-login
#+BEGIN_SRC conf
export HISTFILE=~/.bash_eternal_history
export HISTFILE=~/.bash_eternal_history
#+END_SRC
Force prompt to write history after every command. http://superuser.com/questions/20900/bash-history-loss
#+BEGIN_SRC conf
PROMPT_COMMAND="history -a; $PROMPT_COMMAND"
PROMPT_COMMAND="history -a; $PROMPT_COMMAND"
#+END_SRC
** Base16 Shell

View File

@ -202,12 +202,12 @@ bindsym $mod+BackSpace scratchpad show
* Custom Cratchpad for Quick Access
** Weechat
#+begin_src conf
for_window [instance="scratch-weechat"] scratchpad show;
exec termite --name="scratch-weechat" --exec="weechat"
for_window [instance="scratch-weechat"] floating enable;
for_window [instance="scratch-weechat"] move position 240 px 125 px;
for_window [instance="scratch-weechat"] resize set 1200 px 800 px;
for_window [instance="scratch-weechat"] move scratchpad;
# for_window [instance="scratch-weechat"] scratchpad show;
# exec termite --name="scratch-weechat" --exec="weechat"
# for_window [instance="scratch-weechat"] floating enable;
# for_window [instance="scratch-weechat"] move position 240 px 125 px;
# for_window [instance="scratch-weechat"] resize set 1200 px 800 px;
# for_window [instance="scratch-weechat"] move scratchpad;
#+end_src
** Music with ncmpcpp
@ -393,7 +393,7 @@ To display names or symbols instead of plain workspace numbers you can use somet
* Restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
#+begin_src conf
bindsym $mod+Shift+r restart
bindsym $mod+Shift+r restart
#+end_src
* Set shut down, restart and locking features
@ -459,183 +459,191 @@ bindsym $mod+Shift+r restart
* Autostart Background Applications
#+begin_src conf
# Authentication agent
exec --no-startup-id /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1
# Authentication agent
exec --no-startup-id /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1
# Set custom wallpaper script
exec --no-startup-id $HOME/scripts/wallpaper.sh
# Set custom wallpaper script
exec --no-startup-id $HOME/scripts/wallpaper.sh
# Run Compton
exec --no-startup-id compton -b
# Run Compton
exec --no-startup-id compton -b
# Start Network Management Framework
exec --no-startup-id nm-applet
# Start Network Management Framework
exec --no-startup-id nm-applet
# Start Power Manager
exec --no-startup-id xfce4-power-manager
# Start Power Manager
exec --no-startup-id xfce4-power-manager
# Bluetooth Manager
exec --no-startup-id blueman-applet
# Bluetooth Manager
exec --no-startup-id blueman-applet
# Autolock screen after x minutes
# exec --no-startup-id xautolock -time 30 -locker blurlock
exec --no-startup-id xautolock -detectsleep -time 30 -locker blurlock -notify 60 -notifier "notify-send -u critical -t 10000 -- 'LOCKING screen in 60 seconds'"
# Autolock screen after x minutes
# exec --no-startup-id xautolock -time 30 -locker blurlock
exec --no-startup-id xautolock -detectsleep -time 30 -locker blurlock -notify 60 -notifier "notify-send -u critical -t 10000 -- 'LOCKING screen in 60 seconds'"
# Autostart udiskie that is used to automount devices
exec --no-startup-id udiskie
# Autostart udiskie that is used to automount devices
exec --no-startup-id udiskie
# Screen options
exec --no-startup-id xrandr --output eDP1 --mode 1680x1050 --dpi 192
# Screen options
exec --no-startup-id xrandr --output eDP1 --mode 1680x1050 --dpi 192
# Redshift
exec --no-startup-id redshift
# Redshift
exec --no-startup-id redshift
# Emacs Daemon
exec --no-startup-id /usr/bin/emacs --fg-daemon
# Start mopidy
exec --no-startup-id mopidy
# Megasync
exec --no-startup-id megasync
# Emacs Daemon
exec --no-startup-id /usr/bin/emacs --fg-daemon
# TODO - Start polybar
exec_always --no-startup-id $HOME/.config/polybar/bin/launch.sh
# TODO - Start polybar
exec_always --no-startup-id $HOME/.config/polybar/bin/launch.sh
#+end_src
* Start Foreground Applications
#+begin_src conf
# Emacs
exec --no-startup-id i3-msg 'exec emacsclient -create-frame --alternate-editor=""'
# Megasync
exec --no-startup-id i3-msg 'exec megasync'
#+end_src
* Old autostart Applications
#+begin_src conf
# Used to display shortcuts in the background
# exec --no-startup-id start_conky_live_solarized
# Tray keyboard indicator
# exec_always --no-startup-id sbxkb
# Clipboard Manager
# exec --no-startup-id clipit
# Tray Icon with update notifications
# exec --no-startup-id pamac-tray
# Sound Icon
# exec --no-startup-id volumeicon
# Find what this does
# exec_always --no-startup-id fix_xcursor
# Used to display shortcuts in the background
# exec --no-startup-id start_conky_live_solarized
# Tray keyboard indicator
# exec_always --no-startup-id sbxkb
# Clipboard Manager
# exec --no-startup-id clipit
# Tray Icon with update notifications
# exec --no-startup-id pamac-tray
# Sound Icon
# exec --no-startup-id volumeicon
# Find what this does
# exec_always --no-startup-id fix_xcursor
#+end_src
* Color palette used for the terminal ( ~/.Xresources file )
Colors are gathered based on the documentation https://i3wm.org/docs/userguide.html#xresources.
#+begin_src conf
set_from_resource $darkred color1 #000000
set_from_resource $red color9 #000000
set_from_resource $darkgreen color2 #000000
set_from_resource $green color10 #000000
set_from_resource $darkyellow color3 #000000
set_from_resource $yellow color11 #000000
set_from_resource $darkblue color4 #000000
set_from_resource $blue color12 #000000
set_from_resource $darkmagenta color5 #000000
set_from_resource $magenta color13 #000000
set_from_resource $darkcyan color6 #000000
set_from_resource $cyan color14 #000000
set_from_resource $darkwhite color7 #000000
set_from_resource $white color15 #000000
set_from_resource $darkred color1 #000000
set_from_resource $red color9 #000000
set_from_resource $darkgreen color2 #000000
set_from_resource $green color10 #000000
set_from_resource $darkyellow color3 #000000
set_from_resource $yellow color11 #000000
set_from_resource $darkblue color4 #000000
set_from_resource $blue color12 #000000
set_from_resource $darkmagenta color5 #000000
set_from_resource $magenta color13 #000000
set_from_resource $darkcyan color6 #000000
set_from_resource $cyan color14 #000000
set_from_resource $darkwhite color7 #000000
set_from_resource $white color15 #000000
# Use custom colors for black
set $black #282828
set $darkblack #1d2021
set $transparent #00000000
# Use custom colors for black
set $black #282828
set $darkblack #1d2021
set $transparent #00000000
# set_from_resource $term_background background
# set_from_resource $term_foreground foreground
# set_from_resource $term_color0 color0
# set_from_resource $term_color1 color1
# set_from_resource $term_color2 color2
# set_from_resource $term_color3 color3
# set_from_resource $term_color4 color4
# set_from_resource $term_color5 color5
# set_from_resource $term_color6 color6
# set_from_resource $term_color7 color7
# set_from_resource $term_color8 color8
# set_from_resource $term_color9 color9
# set_from_resource $term_color10 color10
# set_from_resource $term_color11 color11
# set_from_resource $term_color12 color12
# set_from_resource $term_color13 color13
# set_from_resource $term_color14 color14
# set_from_resource $term_color15 color15
# set_from_resource $term_background background
# set_from_resource $term_foreground foreground
# set_from_resource $term_color0 color0
# set_from_resource $term_color1 color1
# set_from_resource $term_color2 color2
# set_from_resource $term_color3 color3
# set_from_resource $term_color4 color4
# set_from_resource $term_color5 color5
# set_from_resource $term_color6 color6
# set_from_resource $term_color7 color7
# set_from_resource $term_color8 color8
# set_from_resource $term_color9 color9
# set_from_resource $term_color10 color10
# set_from_resource $term_color11 color11
# set_from_resource $term_color12 color12
# set_from_resource $term_color13 color13
# set_from_resource $term_color14 color14
# set_from_resource $term_color15 color15
#+end_src
* TODO Theme colors
#+begin_src conf
# class border backgr. text indic. child_border
client.focused #2F3D44 #2F3D44 #1ABC9C #454948
client.focused_inactive #2F3D44 #2F3D44 #1ABC9C #454948
client.urgent #CB4B16 #FDF6E3 #1ABC9C #268BD2
client.unfocused #556064 #556064 #80FFF9 #FDF6E3
client.placeholder #000000 #0c0c0c #ffffff #000000
# class border backgr. text indic. child_border
client.focused #2F3D44 #2F3D44 #1ABC9C #454948
client.focused_inactive #2F3D44 #2F3D44 #1ABC9C #454948
client.urgent #CB4B16 #FDF6E3 #1ABC9C #268BD2
client.unfocused #556064 #556064 #80FFF9 #FDF6E3
client.placeholder #000000 #0c0c0c #ffffff #000000
client.background #2B2C2B
client.background #2B2C2B
#+end_src
* Settings for i3-gaps
#+begin_src conf
# Set inner/outer gaps
gaps inner 10
gaps outer -2
# Set inner/outer gaps
gaps inner 10
gaps outer -2
# Additionally, you can issue commands with the following syntax. This is useful to bind keys to changing the gap size.
# gaps inner|outer current|all set|plus|minus <px>
# gaps inner all set 10
# gaps outer all plus 5
# Additionally, you can issue commands with the following syntax. This is useful to bind keys to changing the gap size.
# gaps inner|outer current|all set|plus|minus <px>
# gaps inner all set 10
# gaps outer all plus 5
# Smart gaps (gaps used if only more than one container on the workspace)
# smart_gaps on
# Smart gaps (gaps used if only more than one container on the workspace)
# smart_gaps on
# Smart borders (draw borders around container only if it is not the only container on this workspace)
# on|no_gaps (on=always activate and no_gaps=only activate if the gap size to the edge of the screen is 0)
smart_borders on
# Smart borders (draw borders around container only if it is not the only container on this workspace)
# on|no_gaps (on=always activate and no_gaps=only activate if the gap size to the edge of the screen is 0)
smart_borders on
# Press $mod+Shift+g to enter the gap mode. Choose o or i for modifying outer/inner gaps. Press one of + / - (in-/decrement for current workspace) or 0 (remove gaps for current workspace). If you also press Shift with these keys, the change will be global for all workspaces.
set $mode_gaps Gaps: (o) outer, (i) inner
set $mode_gaps_outer Outer Gaps: +|-|0 (local), Shift + +|-|0 (global)
set $mode_gaps_inner Inner Gaps: +|-|0 (local), Shift + +|-|0 (global)
bindsym $mod+Shift+g mode "$mode_gaps"
# Press $mod+Shift+g to enter the gap mode. Choose o or i for modifying outer/inner gaps. Press one of + / - (in-/decrement for current workspace) or 0 (remove gaps for current workspace). If you also press Shift with these keys, the change will be global for all workspaces.
set $mode_gaps Gaps: (o) outer, (i) inner
set $mode_gaps_outer Outer Gaps: +|-|0 (local), Shift + +|-|0 (global)
set $mode_gaps_inner Inner Gaps: +|-|0 (local), Shift + +|-|0 (global)
bindsym $mod+Shift+g mode "$mode_gaps"
mode "$mode_gaps" {
bindsym o mode "$mode_gaps_outer"
bindsym i mode "$mode_gaps_inner"
bindsym Return mode "default"
bindsym Escape mode "default"
}
mode "$mode_gaps_inner" {
bindsym plus gaps inner current plus 5
bindsym minus gaps inner current minus 5
mode "$mode_gaps" {
bindsym o mode "$mode_gaps_outer"
bindsym i mode "$mode_gaps_inner"
bindsym Return mode "default"
bindsym Escape mode "default"
}
mode "$mode_gaps_inner" {
bindsym plus gaps inner current plus 5
bindsym minus gaps inner current minus 5
bindsym 0 gaps inner current set 0
bindsym 0 gaps inner current set 0
bindsym Shift+plus gaps inner all plus 5
bindsym Shift+minus gaps inner all minus 5
bindsym Shift+0 gaps inner all set 0
bindsym Shift+plus gaps inner all plus 5
bindsym Shift+minus gaps inner all minus 5
bindsym Shift+0 gaps inner all set 0
bindsym Return mode "default"
bindsym Escape mode "default"
}
mode "$mode_gaps_outer" {
bindsym plus gaps outer current plus 5
bindsym minus gaps outer current minus 5
bindsym 0 gaps outer current set 0
bindsym Return mode "default"
bindsym Escape mode "default"
}
mode "$mode_gaps_outer" {
bindsym plus gaps outer current plus 5
bindsym minus gaps outer current minus 5
bindsym 0 gaps outer current set 0
bindsym Shift+plus gaps outer all plus 5
bindsym Shift+minus gaps outer all minus 5
bindsym Shift+0 gaps outer all set 0
bindsym Shift+plus gaps outer all plus 5
bindsym Shift+minus gaps outer all minus 5
bindsym Shift+0 gaps outer all set 0
bindsym Return mode "default"
bindsym Escape mode "default"
}
bindsym Return mode "default"
bindsym Escape mode "default"
}
#+end_src
* Keyboard Configuration
#+begin_src conf
# Set repetition keyboard rate
exec --no-startup-id xset r rate 200 40
# Set International US keyboard layout
exec --no-startup-id setxkbmap -layout us -variant intl -option caps:escape
# Default numpad on
# exec --no-startup-id numlockx &
# =============================================================
# Set repetition keyboard rate
exec --no-startup-id xset r rate 200 40
# Set International US keyboard layout
exec --no-startup-id setxkbmap -layout us -variant intl -option caps:escape
# Default numpad on
# exec --no-startup-id numlockx &
#+END_SRC

View File

@ -416,7 +416,7 @@ ramp-11 = 
thermal-zone = 0
warn-temperature = 70
;; Temperature off one cpu core
hwmon-path = /sys/devices/platform/coretemp.0/hwmon/hwmon1/temp2_input
hwmon-path = /sys/devices/platform/coretemp.0/hwmon/hwmon2/temp1_input
format = %{A1:termite -e "watch sensors" &:}<ramp> <label>%{A}
format-underline = ${colors.background}