dotfiles

Obligatory dotfiles repo
git clone git://git.danielmoch.com/dotfiles.git
Log | Files | Refs

commit 5bd15fe49d43cbca86a894be9e5892fc8bb5152b
parent 4bf002444e6db7c699ffdcfe1d233ca32d3e6a5e
Author: Daniel Moch <daniel@danielmoch.com>
Date:   Fri, 26 Jan 2018 07:21:29 -0500

Add i3 config

Diffstat:
A.config/i3/config | 121+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
A.config/i3status/config | 23+++++++++++++++++++++++
M.local/bin/my | 2+-
M.xsession | 29++++++++++++++---------------
4 files changed, 159 insertions(+), 16 deletions(-)

diff --git a/.config/i3/config b/.config/i3/config @@ -0,0 +1,121 @@ +# vim: set ft=conf + +set $mod Mod4 + +floating_modifier $mod + +# {{{ Theme +font pango:sans 9 + +set_from_resource $background i3wm.background #262626 +set_from_resource $foreground i3wm.foreground #BCBCBC +set_from_resource $color0 i3wm.color0 #1C1C1C +set_from_resource $color8 i3wm.color8 #444444 +set_from_resource $color1 i3wm.color1 #AF5F5F +set_from_resource $color9 i3wm.color9 #FF8700 +set_from_resource $color2 i3wm.color2 #5F875F +set_from_resource $color10 i3wm.color10 #87AF87 +set_from_resource $color3 i3wm.color3 #87875F +set_from_resource $color11 i3wm.color11 #FFFFAF +set_from_resource $color4 i3wm.color4 #5F87AF +set_from_resource $color12 i3wm.color12 #8FAFD7 +set_from_resource $color5 i3wm.color5 #5F5F87 +set_from_resource $color13 i3wm.color13 #8787AF +set_from_resource $color6 i3wm.color6 #5F8787 +set_from_resource $color14 i3wm.color14 #5FAFAF +set_from_resource $color7 i3wm.color7 #6C6C6C +set_from_resource $color15 i3wm.color15 #FFFFFF + +# class border backgr. text indicator child_border +client.focused $foreground $color7 $foreground $color7 $foreground +client.focused_inactive $foreground $color7 $foreground $color7 $foreground +client.unfocused $foreground $background $foreground $background $foreground +client.urgent $foreground $color3 $foreground $color3 $foreground +client.placeholder $foreground $background $foreground $background $foreground + +client.background $background +# }}} + +# {{{ Key Bindings +bindsym $mod+Return exec my term +bindsym $mod+q kill +bindsym $mod+r exec dmenu_run +bindsym $mod+p exec --no-startup-id i3-dmenu-desktop + +bindsym $mod+h focus left +bindsym $mod+j focus down +bindsym $mod+k focus up +bindsym $mod+l focus right +bindsym $mod+Shift+h move left +bindsym $mod+Shift+j move down +bindsym $mod+Shift+k move up +bindsym $mod+Shift+l move right + +bindsym $mod+| split h +bindsym $mod+- split v + +bindsym $mod+f fullscreen toggle + +bindsym $mod+s layout stacking +bindsym $mod+w layout tabbed +bindsym $mod+e layout toggle split +bindsym $mod+space floating toggle +bindsym $mod+shift+space focus mode_toggle + +bindsym $mod+a focus parent + +bindsym $mod+1 workspace 1 +bindsym $mod+2 workspace 2 +bindsym $mod+3 workspace 3 +bindsym $mod+4 workspace 4 +bindsym $mod+5 workspace 5 +bindsym $mod+6 workspace 6 +bindsym $mod+7 workspace 7 +bindsym $mod+8 workspace 8 +bindsym $mod+9 workspace 9 + +bindsym $mod+Shift+1 move container to workspace 1 +bindsym $mod+Shift+2 move container to workspace 2 +bindsym $mod+Shift+3 move container to workspace 3 +bindsym $mod+Shift+4 move container to workspace 4 +bindsym $mod+Shift+5 move container to workspace 5 +bindsym $mod+Shift+6 move container to workspace 6 +bindsym $mod+Shift+7 move container to workspace 7 +bindsym $mod+Shift+8 move container to workspace 8 +bindsym $mod+Shift+9 move container to workspace 9 + +bindsym $mod+Control+r reload +# }}} + +# {{{ Resize Mode +bindsym $mod+Mod1+r mode "resize" +mode "resize" { + bindsym j resize shrink width 10 px or 10 ppt + bindsym k resize grow height 10 px or 10 ppt + bindsym l resize shrink height 10 px or 10 ppt + bindsym semicolon resize grow width 10 px or 10 ppt + + bindsym Escape mode "default" +} +#}}} + +# {{{ i3bar +bar { + position top + tray_output primary + status_command i3status + + colors { + background $background + statusline $foreground + separator $color8 + + # color border backgr. text + focused_workspace $foreground $color7 $foreground + active_workspace $color7 $background $foreground + inactive_workspace $background $background $color7 + urgent_workspace $foreground $color3 $foreground + binding_mode $foreground $color1 $foreground + } +} +# }}} diff --git a/.config/i3status/config b/.config/i3status/config @@ -0,0 +1,23 @@ +# i3status configuration file. +# see "man i3status" for documentation. + +# It is important that this file is edited as UTF-8. +# The following line should contain a sharp s: +# ß +# If the above line is not correctly displayed, fix your editor first! + +general { + colors = true + interval = 5 +} + +order += "battery all" +order += "tztime local" + +battery all { + format = "%status %percentage %remaining" +} + +tztime local { + format = "%Y-%m-%d %H:%M" +} diff --git a/.local/bin/my b/.local/bin/my @@ -154,7 +154,7 @@ case $command in if [ $numoptions -eq 1 ] then __mylog "my screen" "Executing xrandr --output $xrandr_options --auto" - xrandr --output $xrandr_options --auto + xrandr --output $xrandr_options --auto --primary else # Prefer external monitors # If more than one display is connected, then enable the diff --git a/.xsession b/.xsession @@ -8,10 +8,9 @@ __autostart() { - : ${XDG_CURRENT_DESKTOP:=${XDG_SESSION_DESKTOP:-$1}} if type dex > /dev/null 2>&1 then - AUTOSTART_CMD="dex -ae $XDG_CURRENT_DESKTOP" + AUTOSTART_CMD="dex -ae $1" elif type fbautostart > /dev/null 2>&1 then AUTOSTART_CMD="fbautostart" @@ -22,16 +21,12 @@ __autostart() sleep 1 done - case $XDG_CURRENT_DESKTOP in - awesome|twm) - if [ -n "$AUTOSTART_CMD" ] - then - $AUTOSTART_CMD - else - xbindkeys - fi - ;; - esac + if [ -n "$AUTOSTART_CMD" ] + then + $AUTOSTART_CMD + else + xbindkeys + fi } xset dpms 0 0 300 @@ -44,7 +39,7 @@ my screen if [ $# -eq 0 ] then - for wm in awesome startxfce4 cinnamon-session twm + for wm in awesome i3 startxfce4 cinnamon-session twm do >&2 echo "No params provided. Setting window manager." if type $wm > /dev/null 2>&1 @@ -56,7 +51,11 @@ then done fi -__autostart "$@" & +case $1 in + awesome|i3|twm) + __autostart "$@" & + ;; +esac unset __autostart -[ -n "$EXEC" ] && exec "$@" +exec "$@"