Various changes.
This commit is contained in:
24
i3/i3/config
24
i3/i3/config
@@ -174,17 +174,19 @@
|
||||
|
||||
# regenerate and reload the configuration file
|
||||
# if genconfig gets any paramters, it will invoke i3-msg reload
|
||||
bindsym $mod+$reload exec --no-startup-id bash ~/.i3/scripts/genconfig.bash 1
|
||||
bindsym $mod+$reload exec --no-startup-id ~/.i3/scripts/genconfig.bash 1
|
||||
|
||||
bindsym $mod+$restart restart
|
||||
bindsym $mod+$exit exit
|
||||
|
||||
### START APPLICATIONS #####################################################
|
||||
|
||||
bindsym $mod+d exec j4-dmenu-desktop --dmenu="dmenu -b -i -l 10 -p '>' -nb '#222222' -nf '#ffffff' -sb '#e16b40' -sf '#000000'"
|
||||
bindsym $mod+d exec j4-dmenu-desktop --dmenu="dmenu -fn 'DejaVu Sans Mono:size=11' -b -i -l 10 -p '>' -nb '#222222' -nf '#ffffff' -sb '#e16b40' -sf '#000000'"
|
||||
bindsym $mod+Return exec $terminal
|
||||
bindsym $mod+F1 exec firefox
|
||||
|
||||
bindsym Pause exec --no-startup-id ~/.i3/scripts/shutdown-menu.bash
|
||||
|
||||
################################################################################
|
||||
### MODES ######################################################################
|
||||
################################################################################
|
||||
@@ -214,23 +216,6 @@
|
||||
}
|
||||
bindsym $mod+r mode "resize"
|
||||
|
||||
# Enabling a mode to shutdown, reboot, lock screen and so on
|
||||
set $mode_system System (l) lock, (e) logout, (s) suspend, (h) hibernate, (r) reboot, (Shift+s) shutdown
|
||||
mode "$mode_system" {
|
||||
bindsym $key_lock exec --no-startup-id $path_i3exit $signal_lock, mode "default"
|
||||
bindsym $key_logout exec --no-startup-id $path_i3exit $signal_logout, mode "default"
|
||||
bindsym $key_suspend exec --no-startup-id $path_i3exit $signal_suspend, mode "default"
|
||||
bindsym $key_hibernate exec --no-startup-id $path_i3exit $signal_hibernate, mode "default"
|
||||
bindsym $key_reboot exec --no-startup-id $path_i3exit $signal_reboot, mode "default"
|
||||
bindsym $key_shutdown exec --no-startup-id $path_i3exit $signal_shutdown, mode "default"
|
||||
|
||||
# back to normal: Enter or Escape
|
||||
bindsym Return mode "default"
|
||||
bindsym Escape mode "default"
|
||||
}
|
||||
bindsym $mod+Pause mode "$mode_system"
|
||||
bindsym Pause exec --no-startup-id $path_i3exit lock
|
||||
|
||||
################################################################################
|
||||
### GENERAL SETUP ##############################################################
|
||||
################################################################################
|
||||
@@ -321,6 +306,7 @@ client.urgent #2f343a #900000 #ffffff #900000
|
||||
for_window [class="^main\.py$" ] floating enable
|
||||
for_window [class="^Xfce4-panel$"] floating enable
|
||||
for_window [class="^Thunderbird"] border none
|
||||
for_window [instance="^shutdown-menu$"] border normal
|
||||
|
||||
assign [class="^Thunderbird"] $workspace9
|
||||
assign [class="^Skype$"] $workspace10
|
||||
|
||||
|
Before Width: | Height: | Size: 327 KiB After Width: | Height: | Size: 327 KiB |
|
Before Width: | Height: | Size: 1.2 MiB After Width: | Height: | Size: 1.2 MiB |
@@ -12,6 +12,7 @@ touch "$LOGFILE"
|
||||
|
||||
log()
|
||||
{
|
||||
echo "$1"
|
||||
echo "[$(date +%FT%T)] $1" >> "$LOGFILE"
|
||||
}
|
||||
|
||||
@@ -19,7 +20,7 @@ lock()
|
||||
{
|
||||
resolution=$(xrandr | grep '*' | awk '{ print $1 }' | head -n1)
|
||||
log "[I] Resolution found: \"$resolution\""
|
||||
lockscreen="$HOME/.i3/data/lockscreen_$resolution.png"
|
||||
lockscreen="$HOME/.i3/data/lockscreen/$resolution.png"
|
||||
log "[I] Looking for lockscreen at \"$lockscreen\""
|
||||
if [[ -f "$lockscreen" ]] ; then
|
||||
log "[I] Lockscreen found, will be used as background image."
|
||||
@@ -30,13 +31,19 @@ lock()
|
||||
fi
|
||||
i3lock $background_options #-p win --image "$HOME/pictures/windows-lockscreen.jpg"
|
||||
retval=$?
|
||||
[[ -z "$1" ]] && sleep 1 && xset dpms force off
|
||||
[[ -z "$1" ]] && sleep 3 && xset dpms force off
|
||||
return $retval
|
||||
}
|
||||
|
||||
log "[I] Received signal \"$1\"."
|
||||
if [[ "$1" == '-' ]]; then
|
||||
read signal
|
||||
else
|
||||
signal="$1"
|
||||
fi
|
||||
|
||||
case "$1" in
|
||||
log "[I] Received signal \"$signal\"."
|
||||
|
||||
case "$signal" in
|
||||
lock)
|
||||
log "[I] Locking session."
|
||||
lock
|
||||
@@ -64,7 +71,7 @@ case "$1" in
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $0 {lock|logout|suspend|hibernate|reboot|shutdown}"
|
||||
log "[E] Signal \"$1\" unknown. Aborting."
|
||||
log "[E] Signal \"$signal\" unknown. Aborting."
|
||||
exit 2
|
||||
esac
|
||||
|
||||
|
||||
18
i3/i3/scripts/shutdown-menu.bash
Executable file
18
i3/i3/scripts/shutdown-menu.bash
Executable file
@@ -0,0 +1,18 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
options=(
|
||||
"lock"
|
||||
"logout"
|
||||
"suspend"
|
||||
"hibernate"
|
||||
"reboot"
|
||||
"shutdown")
|
||||
|
||||
i=1
|
||||
output=$(
|
||||
for option in "${options[@]}"; do
|
||||
echo "($i) $option"
|
||||
(( i++ ))
|
||||
done | dmenu -fn 'DejaVu Sans Mono:size=11' -b -i -l 10 -p '>' -nb '#222222' -nf '#ffffff' -sb '#e16b40' -sf '#000000' -w 200 -name 'shutdown-menu')
|
||||
|
||||
[[ "$output" ]] && "$(dirname "$0")"/i3exit.bash "${output#(*) }"
|
||||
@@ -24,7 +24,7 @@ URxvt.termName: urxvt
|
||||
URxvt.cursorBlink: true
|
||||
|
||||
URxvt.transparent: true
|
||||
URxvt.shading: 10
|
||||
URxvt.shading: 15
|
||||
|
||||
! Solarized color scheme for the X Window System
|
||||
!
|
||||
|
||||
@@ -59,7 +59,7 @@ wallpaper_interval="900"
|
||||
|
||||
# redshift settings
|
||||
redshift_lat_long="49.5:11"
|
||||
redshift_colortemp="5500:4000"
|
||||
redshift_colortemp="5500:3700"
|
||||
|
||||
# start mpd
|
||||
if ! pgrep --euid hannes --exact '^mpd$' ; then
|
||||
|
||||
58
zsh/zshrc
58
zsh/zshrc
@@ -12,9 +12,11 @@ SAVEHIST=10000
|
||||
HISTFILE="$HOME/.zsh_history"
|
||||
|
||||
PROMPT="%{$fg[white]%}╭─%{$fg[green]%}%M %{$fg[red]%}▶ %{$fg[yellow]%}%~
|
||||
%{$fg[white]%}╰─%B$%b "
|
||||
%{$fg[white]%}╰─%B%#%b "
|
||||
RPROMPT="%{$fg[red]%}%? %{$fg[white]%}%*%{$reset_color%}"
|
||||
|
||||
PATH="$PATH:$HOME/bin"
|
||||
|
||||
man() {
|
||||
env LESS_TERMCAP_mb=$'\E[01;31m' \
|
||||
LESS_TERMCAP_md=$'\E[01;38;5;74m' \
|
||||
@@ -110,7 +112,7 @@ alias much="git"
|
||||
alias wow="git status"
|
||||
|
||||
alias v="vim"
|
||||
alias g="grep"
|
||||
alias g="git"
|
||||
|
||||
|
||||
# rebase the current branch onto WTF ARE YOU DOING YOU ARE DRUNNK TO GO BED
|
||||
@@ -134,11 +136,11 @@ slideshow() {
|
||||
"$@"
|
||||
}
|
||||
|
||||
function cd() {
|
||||
cd() {
|
||||
builtin cd $* && ls
|
||||
}
|
||||
|
||||
function mount() {
|
||||
mount() {
|
||||
if [[ $# == 0 ]] ; then
|
||||
/usr/bin/env mount | column -t
|
||||
else
|
||||
@@ -154,22 +156,25 @@ ffcs() {
|
||||
find . -type f -name "*"$*"*" ;
|
||||
}
|
||||
|
||||
extract() # Handy Extract Program.
|
||||
extr()
|
||||
{
|
||||
if [ -f $1 ] ; then
|
||||
case $1 in
|
||||
*.tar.bz2 ) tar xvjf $1 ;;
|
||||
*.tar.gz ) tar xvzf $1 ;;
|
||||
*.bz2 ) bunzip2 $1 ;;
|
||||
*.rar ) unrar x $1 ;;
|
||||
*.gz ) gunzip $1 ;;
|
||||
*.tar ) tar xvf $1 ;;
|
||||
*.tbz2 ) tar xvjf $1 ;;
|
||||
*.tgz ) tar xvzf $1 ;;
|
||||
*.zip ) unzip $1 ;;
|
||||
*.Z ) uncompress $1 ;;
|
||||
*.7z ) 7z x $1 ;;
|
||||
*) echo "$1 cannot be extracted via extract()" ;;
|
||||
if [[ -f "$1" ]] ; then
|
||||
case "$1" in
|
||||
*.tar.bz2 ) tar xvjf "$1" ;;
|
||||
*.tar.gz ) tar xvzf "$1" ;;
|
||||
*.tar.xz ) tar xvJf "$1" ;;
|
||||
*.bz2 ) bunzip2 "$1" ;;
|
||||
*.rar ) unrar x "$1" ;;
|
||||
*.gz ) gunzip "$1" ;;
|
||||
*.tar ) tar xvf "$1" ;;
|
||||
*.tbz2 ) tar xvjf "$1" ;;
|
||||
*.tgz ) tar xvzf "$1" ;;
|
||||
*.zip ) unzip "$1" ;;
|
||||
*.Z ) uncompress "$1" ;;
|
||||
*.7z ) 7z x "$1" ;;
|
||||
*)
|
||||
echo "$1 cannot be extracted via $0"
|
||||
;;
|
||||
esac
|
||||
else
|
||||
echo "$1 is not a valid file"
|
||||
@@ -208,6 +213,19 @@ c () {
|
||||
echo "$*" | bc -l
|
||||
}
|
||||
|
||||
function http() {
|
||||
http() {
|
||||
curl http://httpcode.info/$1
|
||||
}
|
||||
|
||||
bak() {
|
||||
[[ -e "$1" ]] && cp -ai "$1" "$1.$(date +%FT%T).bak"
|
||||
}
|
||||
|
||||
fstab() {
|
||||
# yeah
|
||||
expand /etc/fstab | grep -v '^#' | grep -P '^.+$' | tr -s ' ' | tr ' ' '|' | cat <(grep -P '<.+>' /etc/fstab | cut -f 2- -d ' ' | sed 's/>[^<]*</>|</g') - | column -ts '|'
|
||||
}
|
||||
|
||||
rmext() {
|
||||
[[ -e "$1" ]] && mv -i "$1" "${1%.*}"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user