From a589a936c107c7d7e1ba8f4cb4748ea5b65748a7 Mon Sep 17 00:00:00 2001 From: David Luevano <55825613+luevano@users.noreply.github.com> Date: Tue, 11 Feb 2020 00:37:42 -0700 Subject: Clean up i3 conf, add auto read from x, fix error on sd --- .config/i3/config | 200 +++++++++++++++++++++++++++++++----------------------- 1 file changed, 114 insertions(+), 86 deletions(-) (limited to '.config/i3') diff --git a/.config/i3/config b/.config/i3/config index ee312de..acd36ec 100644 --- a/.config/i3/config +++ b/.config/i3/config @@ -11,94 +11,136 @@ gaps outer 5 set $mod Mod4 font pango:monospace 10 exec --no-startup-id nm-applet + ## i3config variables. set $term --no-startup-id $TERMINAL set $fmgr --no-startup-id $FILE set $ibwsr --no-startup-id $BROWSER set $edit --no-startup-id $EDITOR set $read --no-startup-id $READER set $rstbar pkill -RTMIN+1 $STATUSBAR + ## Workspace variables. +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" + ## Colors from ~/.Xresources. +# set_from_resource $bg background +# set_from_resource $fg foreground +set_from_resource $c0 color0 +set_from_resource $c1 color1 +set_from_resource $c2 color2 +set_from_resource $c3 color3 +set_from_resource $c4 color4 +set_from_resource $c5 color5 +set_from_resource $c6 color6 +set_from_resource $c7 color7 +set_from_resource $c8 color8 +set_from_resource $c9 color9 +set_from_resource $c10 color10 +set_from_resource $c11 color11 +set_from_resource $c12 color12 +set_from_resource $c13 color13 +set_from_resource $c14 color14 +set_from_resource $c15 color15 -##--i3bar configuration--## -# Primary monitor. +##---i3 color scheme---## +# Class bor bgt txt ind chb +client.focused $c14 $c4 $c8 $c4 $c6 +client.focused_inactive $c0 $c0 $c14 $c11 $c0 +client.unfocused $c0 $c8 $c14 $c0 $c0 +client.urgent $c1 $c1 $c8 $c1 $c1 +client.placeholder $c8 $c8 $c14 $c8 $c8 +client.background $c15 + +##---i3bar configuration---## + ## Primary monitor. bar { - output primary - tray_output primary - position top - status_command $STATUSBAR + output primary + tray_output primary + position top + status_command $STATUSBAR + colors{ + background $c8 + statusline $c12 + separator $c0 + + # Class bor bag txt + focused_workspace $c14 $c4 $c8 + active_workspace $c14 $c11 $c8 + inactive_workspace $c11 $c0 $c14 + urgent_workspace $c1 $c1 $c8 + binding_mode $c8 $c3 $c8 + } } -# Second monitor. + ## Second monitor. bar { - output DP-0 - tray_output none - position top - status_command $STATUSBAR + output DP-0 + tray_output none + position top + status_command $STATUSBAR + colors{ + background $c8 + statusline $c12 + separator $c0 + + # Class bor bag txt + focused_workspace $c14 $c4 $c8 + active_workspace $c14 $c11 $c8 + inactive_workspace $c11 $c0 $c14 + urgent_workspace $c1 $c1 $c8 + binding_mode $c8 $c3 $c8 + } } ##--Keybindings--## -# Use Mouse+$mod to drag floating windows to their wanted position -floating_modifier $mod + ## Basic bindings. +bindsym $mod+Shift+c reload +bindsym $mod+Shift+r restart +bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'Exit i3? This will end your X session.' -B 'Yes, exit i3' 'i3-msg exit'" -# start a terminal + ## Run commands bindsym $mod+Return exec $term -# kill focused window -bindsym $mod+Shift+q kill - -# start d-menu (only desktop apps) + ## Dmenu. bindsym $mod+d exec --no-startup-id i3-dmenu-desktop -# change focus + ## Navigation and window options. + # Basics. +bindsym $mod+Shift+q kill +bindsym $mod+r mode "resize" +floating_modifier $mod +# bindsym $mod+Shift+h split h +bindsym $mod+Shift+v split v +bindsym $mod+f fullscreen toggle + + # Focus. bindsym $mod+h focus left bindsym $mod+j focus down bindsym $mod+k focus up bindsym $mod+l focus right +# bindsym $mod+space focus mode_toggle +# bindsym $mod+a focus parent +# bindsym $mod+d focus child -# move focused window -bindsym $mod+Shift+j move left -bindsym $mod+Shift+k move down -bindsym $mod+Shift+l move up -bindsym $mod+Shift+ntilde move right - -# split in horizontal orientation -bindsym $mod+Shift+h split h - -# split in vertical orientation -bindsym $mod+Shift+v split v + # Move focused window. +bindsym $mod+Shift+h move left +bindsym $mod+Shift+j move down +bindsym $mod+Shift+k move up +bindsym $mod+Shift+l move right -# enter fullscreen mode for the focused container -bindsym $mod+f fullscreen toggle - -# change container layout (stacked, tabbed, toggle split) + # Container layout. bindsym $mod+s layout stacking bindsym $mod+w layout tabbed bindsym $mod+e layout toggle split -# toggle tiling / floating -bindsym $mod+Shift+space floating toggle - -# change focus between tiling / floating windows -bindsym $mod+space focus mode_toggle - -# focus the parent container -bindsym $mod+a focus parent - -# focus the child container -#bindsym $mod+d focus child - -# Define names for default workspaces for which we configure key bindings later on. -# We use variables to avoid repeating the names in multiple places. -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" - -# switch to workspace + ## Workspace bindings. + # Change workspace. bindsym $mod+1 workspace $ws1 bindsym $mod+2 workspace $ws2 bindsym $mod+3 workspace $ws3 @@ -110,7 +152,7 @@ bindsym $mod+8 workspace $ws8 bindsym $mod+9 workspace $ws9 bindsym $mod+0 workspace $ws10 -# move focused container to workspace + # Move focused window to workspace. bindsym $mod+Shift+1 move container to workspace $ws1 bindsym $mod+Shift+2 move container to workspace $ws2 bindsym $mod+Shift+3 move container to workspace $ws3 @@ -122,34 +164,20 @@ bindsym $mod+Shift+8 move container to workspace $ws8 bindsym $mod+Shift+9 move container to workspace $ws9 bindsym $mod+Shift+0 move container to workspace $ws10 -# reload the configuration file -bindsym $mod+Shift+c reload -# restart i3 inplace (preserves your layout/session, can be used to upgrade i3) -bindsym $mod+Shift+r restart -# exit i3 (logs you out of your X session) -bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -B 'Yes, exit i3' 'i3-msg exit'" - -# resize window (you can also use the mouse for that) + ## Modes. + # Resize. mode "resize" { - # These bindings trigger as soon as you enter the resize mode - - # Pressing left will shrink the window’s width. - # Pressing right will grow the window’s width. - # Pressing up will shrink the window’s height. - # Pressing down will grow the window’s height. - bindsym h resize shrink width 10 px or 10 ppt - bindsym j resize grow height 10 px or 10 ppt - bindsym k resize shrink height 10 px or 10 ppt - bindsym l resize grow width 10 px or 10 ppt - - # back to normal: Enter or Escape or $mod+r - bindsym Return mode "default" - bindsym Escape mode "default" - bindsym $mod+r mode "default" + ## Resize mode keybindings. + bindsym h resize shrink width 10 px or 10 ppt + bindsym j resize grow height 10 px or 10 ppt + bindsym k resize shrink height 10 px or 10 ppt + bindsym l resize grow width 10 px or 10 ppt + ## Return to default mode keybindings. + bindsym Return mode "default" + bindsym Escape mode "default" + bindsym $mod+r mode "default" } -bindsym $mod+r mode "resize" - ##--Extra XF86 Keys--## bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +2% && $rstbar bindsym Shift+XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +10% && $rstbar -- cgit v1.2.3-54-g00ecf