dotfiles

My personal shell configs and stuff
git clone git://git.alex.balgavy.eu/dotfiles.git
Log | Files | Refs | Submodules | README | LICENSE

commit df3e272a5153e1e56a5ebd4e139a5c9d6ce20b84
parent da5c7ea15ff39b34936c34f5ec59447e59f6f977
Author: Alex Balgavy <a.balgavy@gmail.com>
Date:   Sat, 19 Oct 2019 13:38:32 -0400

i3: config

Former-commit-id: 2f1071ca441790eb4ae72e7868de85a35e8b00aa
Diffstat:
Mi3/config | 376+++++++++++++++++++++++++++++++++++++++++++++++++++----------------------------
Ai3/config-old | 231+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 474 insertions(+), 133 deletions(-)

diff --git a/i3/config b/i3/config @@ -1,117 +1,99 @@ -# i3 config file (v4) +# i3 config file (v4) for Regolith Desktop Environment # -# Please see https://i3wm.org/docs/userguide.html for a complete reference! - -exec --no-startup-id compton --config ~/.config/compton/config -b -exec --no-startup-id /usr/lib/gnome-settings-daemon/gsd-xsettings -exec --no-startup-id gnome-flashback -exec --no-startup-id dropbox start -exec_always --no-startup-id ~/.scripts/feh-background -exec_always --no-startup-id ~/.config/polybar/polybar.sh & -exec_always --no-startup-id system76-power daemon -exec_always --no-startup-id xrandr --output LVDS-1-1 --off -exec_always --no-startup-id /usr/bin/setxkbmap -option 'caps:ctrl_modifier' -exec_always --no-startup-id /usr/bin/xcape -e 'Caps_Lock=Escape' +# Please see http://i3wm.org/docs/userguide.html for a complete reference! +# This defines which key super maps to on your keyboard. +# Alt key is Mod1, and Windows key is Mod4 set $mod Mod4 - -# Font for window titles. Will also be used by the bar unless a different font -# is used in the bar {} block below. -font pango:monospace 8 - -# This font is widely installed, provides lots of unicode glyphs, right-to-left -# text rendering and scalability on retina/hidpi displays (thanks to pango). -#font pango:DejaVu Sans Mono 8 - -# Before i3 v4.8, we used to recommend this one as the default: -# font -misc-fixed-medium-r-normal--13-120-75-75-C-70-iso10646-1 -# The font above is very space-efficient, that is, it looks good, sharp and -# clear in small sizes. However, its unicode glyph coverage is limited, the old -# X core fonts rendering does not support right-to-left and this being a bitmap -# font, it doesn’t scale on retina/hidpi displays. +set $alt Mod1 + +# i3xrocks config file +# set $i3xrocks_config /etc/regolith/i3xrocks/config + +# compton config file +set $compton_config /home/zeroalpha/.config/compton/config + +# path to terminal. Override this to specify a custom terminal. +set $terminal_path /usr/local/bin/xst + +# Color values are defined in ~/.Xresources-regolith +# These are the labels which define each i3 workspace. +set_from_resource $ws1 i3-wm.workspace.01.name "1" +set_from_resource $ws2 i3-wm.workspace.02.name "2" +set_from_resource $ws3 i3-wm.workspace.03.name "3" +set_from_resource $ws4 i3-wm.workspace.04.name "4" +set_from_resource $ws5 i3-wm.workspace.05.name "5" +set_from_resource $ws6 i3-wm.workspace.06.name "6" +set_from_resource $ws7 i3-wm.workspace.07.name "7" +set_from_resource $ws8 i3-wm.workspace.08.name "8" +set_from_resource $ws9 i3-wm.workspace.09.name "9" +set_from_resource $ws10 i3-wm.workspace.10.name "10" +set_from_resource $ws11 i3-wm.workspace.11.name "11" +set_from_resource $ws12 i3-wm.workspace.12.name "12" +set_from_resource $ws13 i3-wm.workspace.13.name "13" +set_from_resource $ws14 i3-wm.workspace.14.name "14" +set_from_resource $ws15 i3-wm.workspace.15.name "15" +set_from_resource $ws16 i3-wm.workspace.16.name "16" +set_from_resource $ws17 i3-wm.workspace.17.name "17" +set_from_resource $ws18 i3-wm.workspace.18.name "18" +set_from_resource $ws19 i3-wm.workspace.19.name "19" # Use Mouse+$mod to drag floating windows to their wanted position floating_modifier $mod +hide_edge_borders smart + # start a terminal -bindsym $mod+Return exec --no-startup-id i3-sensible-terminal +bindsym $mod+Return exec $terminal_path + +# start a web browser +bindsym $mod+Shift+Return exec /usr/bin/sensible-browser # kill focused window -bindsym $mod+q kill +bindsym $alt+q kill -# start dmenu (a program launcher) -bindsym $mod+r exec --no-startup-id PATH=~/.bin:~/.scripts:$PATH dmenu_run -bindsym $mod+shift+a exec --no-startup-id i3-dmenu-desktop +set_from_resource $rofiTheme rofi.theme "regolith-theme" -# There also is the (new) i3-dmenu-desktop which only displays applications -# shipping a .desktop file. It is a wrapper around dmenu, so you need that -# installed. -# bindsym $mod+d exec --no-startup-id i3-dmenu-desktop +# rofi app and window launchers +bindsym $mod+a exec rofi -show drun -theme $rofiTheme +bindsym $mod+r exec rofi -show run -theme $rofiTheme +bindsym $mod+shift+w exec rofi -show window -theme $rofiTheme # change focus -bindsym $mod+h focus left -bindsym $mod+j focus down -bindsym $mod+k focus up -bindsym $mod+l focus right - -# alternatively, you can use the cursor keys: -bindsym $mod+Left focus left -bindsym $mod+Down focus down -bindsym $mod+Up focus up -bindsym $mod+Right focus right - -# 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 - -# alternatively, you can use the cursor keys: -bindsym $mod+Shift+Left move left -bindsym $mod+Shift+Down move down -bindsym $mod+Shift+Up move up -bindsym $mod+Shift+Right move right +bindsym $alt+h focus left +bindsym $alt+j focus down +bindsym $alt+k focus up +bindsym $alt+l focus right + +bindsym $alt+Shift+h move left +bindsym $alt+Shift+j move down +bindsym $alt+Shift+k move up +bindsym $alt+Shift+l move right # split in horizontal orientation -bindsym Mod1+h split h +bindsym $mod+Shift+s split h # split in vertical orientation -bindsym Mod1+v split v +bindsym $mod+Shift+v split v # enter fullscreen mode for the focused container bindsym $mod+z fullscreen toggle -# change container layout (stacked, tabbed, toggle split) -bindsym $mod+w layout tabbed -bindsym $mod+e layout stacking -bindsym $mod+s layout default +# show/hide keybindings +bindsym $mod+Shift+question exec --no-startup-id /usr/bin/conky-toggle # toggle tiling / floating -bindsym $mod+Shift+space floating toggle +bindsym $mod+Shift+f 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 +bindsym $mod+Shift+t focus mode_toggle + +# toggle tabbed mode +bindsym $mod+w layout tabbed +bindsym $mod+e layout stacking +bindsym $mod+s layout default + +# move to workspace bindsym $mod+1 workspace $ws1 bindsym $mod+2 workspace $ws2 bindsym $mod+3 workspace $ws3 @@ -122,6 +104,19 @@ bindsym $mod+7 workspace $ws7 bindsym $mod+8 workspace $ws8 bindsym $mod+9 workspace $ws9 bindsym $mod+0 workspace $ws10 +bindsym $mod+Ctrl+1 workspace $ws11 +bindsym $mod+Ctrl+2 workspace $ws12 +bindsym $mod+Ctrl+3 workspace $ws13 +bindsym $mod+Ctrl+4 workspace $ws14 +bindsym $mod+Ctrl+5 workspace $ws15 +bindsym $mod+Ctrl+6 workspace $ws16 +bindsym $mod+Ctrl+7 workspace $ws17 +bindsym $mod+Ctrl+8 workspace $ws18 +bindsym $mod+Ctrl+9 workspace $ws19 + +# cycle across workspaces +bindsym $mod+Tab workspace next +bindsym $mod+Shift+Tab workspace prev # move focused container to workspace bindsym $mod+Shift+1 move container to workspace $ws1 @@ -134,54 +129,108 @@ bindsym $mod+Shift+7 move container to workspace $ws7 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 +bindsym $mod+Shift+Ctrl+1 move container to workspace $ws11 +bindsym $mod+Shift+Ctrl+2 move container to workspace $ws12 +bindsym $mod+Shift+Ctrl+3 move container to workspace $ws13 +bindsym $mod+Shift+Ctrl+4 move container to workspace $ws14 +bindsym $mod+Shift+Ctrl+5 move container to workspace $ws15 +bindsym $mod+Shift+Ctrl+6 move container to workspace $ws16 +bindsym $mod+Shift+Ctrl+7 move container to workspace $ws17 +bindsym $mod+Shift+Ctrl+8 move container to workspace $ws18 +bindsym $mod+Shift+Ctrl+9 move container to workspace $ws19 + +# move focused container to workspace, move to workspace +bindsym $mod+$alt+1 move container to workspace $ws1; workspace $ws1 +bindsym $mod+$alt+2 move container to workspace $ws2; workspace $ws2 +bindsym $mod+$alt+3 move container to workspace $ws3; workspace $ws3 +bindsym $mod+$alt+4 move container to workspace $ws4; workspace $ws4 +bindsym $mod+$alt+5 move container to workspace $ws5; workspace $ws5 +bindsym $mod+$alt+6 move container to workspace $ws6; workspace $ws6 +bindsym $mod+$alt+7 move container to workspace $ws7; workspace $ws7 +bindsym $mod+$alt+8 move container to workspace $ws8; workspace $ws8 +bindsym $mod+$alt+9 move container to workspace $ws9; workspace $ws9 +bindsym $mod+$alt+0 move container to workspace $ws10; workspace $ws10 +bindsym $mod+$alt+Ctrl+1 move container to workspace $ws11; workspace $ws11 +bindsym $mod+$alt+Ctrl+2 move container to workspace $ws12; workspace $ws12 +bindsym $mod+$alt+Ctrl+3 move container to workspace $ws13; workspace $ws13 +bindsym $mod+$alt+Ctrl+4 move container to workspace $ws14; workspace $ws14 +bindsym $mod+$alt+Ctrl+5 move container to workspace $ws15; workspace $ws15 +bindsym $mod+$alt+Ctrl+6 move container to workspace $ws16; workspace $ws16 +bindsym $mod+$alt+Ctrl+7 move container to workspace $ws17; workspace $ws17 +bindsym $mod+$alt+Ctrl+8 move container to workspace $ws18; workspace $ws18 +bindsym $mod+$alt+Ctrl+9 move container to workspace $ws19; workspace $ws19 # 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+q exec --no-startup-id "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'" + +# Logout of session +bindsym $alt+Shift+q exec /usr/bin/gnome-session-quit --logout + +# Reboot computer +bindsym $mod+Shift+b exec /usr/bin/gnome-session-quit --reboot + +# Power off computer +bindsym $mod+Shift+p exec /usr/bin/gnome-session-quit --power-off + +# lock the screen +bindsym $mod+Escape exec gnome-screensaver-command --lock + +# shortcuts for common system configuration tasks +bindsym $mod+c exec gnome-control-center +bindsym $mod+b exec gnome-control-center bluetooth +bindsym $mod+d exec gnome-control-center display +bindsym $mod+n exec gnome-control-center network +bindsym $mod+p exec gnome-control-center power # resize window (you can also use the mouse for that) -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 5 px or 5 ppt - bindsym j resize grow height 5 px or 5 ppt - bindsym k resize shrink height 5 px or 5 ppt - bindsym l resize grow width 5 px or 5 ppt - bindsym Shift+h resize shrink width 1 px or 1 ppt - bindsym Shift+j resize grow height 1 px or 1 ppt - bindsym Shift+k resize shrink height 1 px or 1 ppt - bindsym Shift+l resize grow width 1 px or 1 ppt - # - # back to normal: Enter or Escape or $mod+r - bindsym Return mode "default" - bindsym Escape mode "default" +mode "Resize Mode" { + # These bindings trigger as soon as you enter the resize mode + bindsym Left resize shrink width 6 px or 6 ppt + bindsym Down resize grow height 6 px or 6 ppt + bindsym Up resize shrink height 6 px or 6 ppt + bindsym Right resize grow width 6 px or 6 ppt + + bindsym Shift+Left resize shrink width 12 px or 12 ppt + bindsym Shift+Down resize grow height 12 px or 12 ppt + bindsym Shift+Up resize shrink height 12 px or 12 ppt + bindsym Shift+Right resize grow width 12 px or 12 ppt + + bindsym h resize shrink width 6 px or 6 ppt + bindsym k resize grow height 6 px or 6 ppt + bindsym j resize shrink height 6 px or 6 ppt + bindsym l resize grow width 6 px or 6 ppt + + bindsym Shift+h resize shrink width 12 px or 12 ppt + bindsym Shift+k resize grow height 12 px or 12 ppt + bindsym Shift+j resize shrink height 12 px or 12 ppt + bindsym Shift+l resize grow width 12 px or 12 ppt + + # back to normal: Enter or Escape + bindsym Return mode "default" + bindsym Escape mode "default" + bindsym $alt+r mode "default" } +bindsym $alt+r mode "Resize Mode" -bindsym Mod1+r mode "resize" - -new_window pixel 0 -for_window [class=".*"] border pixel 1 +# Disable titlebar +new_window pixel 1 +new_float pixel 1 +# Gaps (i3-gaps) gaps inner 15 gaps outer 0 -#smart_gaps on -#smart_borders on -bindsym $mod+Mod1+XF86Eject exec i3lock -i ~/Pictures/Backgrounds/dark-lock.jpg +# Only enable gaps on a workspace when there is at least one container +#smart_gaps 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 Mod1+g mode "$mode_gaps" +bindsym $mod+shift+g mode "$mode_gaps" mode "$mode_gaps" { bindsym o mode "$mode_gaps_outer" @@ -214,18 +263,79 @@ mode "$mode_gaps_outer" { bindsym Return mode "default" bindsym Escape mode "default" } -# Pulse Audio controls -bindsym XF86AudioRaiseVolume exec --no-startup-id /home/zeroalpha/.dotfiles/scripts/pactl-volume up -bindsym XF86AudioLowerVolume exec --no-startup-id /home/zeroalpha/.dotfiles/scripts/pactl-volume down -bindsym XF86AudioMute exec --no-startup-id /home/zeroalpha/.dotfiles/scripts/pactl-volume mute - -# Sreen brightness controls -bindsym XF86MonBrightnessUp exec --no-startup-id /home/zeroalpha/.dotfiles/scripts/xrandr-brightness up -bindsym XF86MonBrightnessDown exec --no-startup-id /home/zeroalpha/.dotfiles/scripts/xrandr-brightness down -bindsym Shift+XF86MonBrightnessUp exec --no-startup-id /home/zeroalpha/.dotfiles/scripts/xrandr-brightness up 0.1 -bindsym Shift+XF86MonBrightnessDown exec --no-startup-id /home/zeroalpha/.dotfiles/scripts/xrandr-brightness down 0.1 -# Media player controls -# bindsym XF86AudioPlay exec playerctl play -# bindsym XF86AudioPause exec playerctl pause -# bindsym XF86AudioNext exec playerctl next -# bindsym XF86AudioPrev exec playerctl previous +set_from_resource $focused.color.border i3-wm.client.focused.color.border "#002b36" +set_from_resource $focused.color.background i3-wm.client.focused.color.background "#586e75" +set_from_resource $focused.color.text i3-wm.client.focused.color.text "#fdf6e3" +set_from_resource $focused.color.indicator i3-wm.client.focused.color.indicator "#268bd2" +set_from_resource $focused.color.child_border i3-wm.client.focused.color.child_border + +set_from_resource $focused_inactive.color.border i3-wm.client.focused_inactive.color.border "#002b36" +set_from_resource $focused_inactive.color.background i3-wm.client.focused_inactive.color.background "#073642" +set_from_resource $focused_inactive.color.text i3-wm.client.focused_inactive.color.text "#839496" +set_from_resource $focused_inactive.color.indicator i3-wm.client.focused_inactive.color.indicator "#073642" +set_from_resource $focused_inactive.color.child_border i3-wm.client.focused_inactive.color.child_border + +set_from_resource $unfocused.color.border i3-wm.client.unfocused.color.border "#002b36" +set_from_resource $unfocused.color.background i3-wm.client.unfocused.color.background "#073642" +set_from_resource $unfocused.color.text i3-wm.client.unfocused.color.text "#839496" +set_from_resource $unfocused.color.indicator i3-wm.client.unfocused.color.indicator "#073642" +set_from_resource $unfocused.color.child_border i3-wm.client.unfocused.color.child_border + +set_from_resource $urgent.color.border i3-wm.client.urgent.color.border "#002b36" +set_from_resource $urgent.color.background i3-wm.client.urgent.color.background "#dc322f" +set_from_resource $urgent.color.text i3-wm.client.urgent.color.text "#fdf6e3" +set_from_resource $urgent.color.indicator i3-wm.client.urgent.color.indicator "#002b36" +set_from_resource $urgent.color.child_border i3-wm.client.urgent.color.child_border + + +# Window Border color +# class border background text indicator child_border +client.focused $focused.color.border $focused.color.background $focused.color.text $focused.color.indicator $focused.color.child_border +client.focused_inactive $focused_inactive.color.border $focused_inactive.color.background $focused_inactive.color.text $focused_inactive.color.indicator $focused_inactive.color.child_border +client.unfocused $unfocused.color.border $unfocused.color.background $unfocused.color.text $unfocused.color.indicator $unfocused.color.child_border +client.urgent $urgent.color.border $urgent.color.background $urgent.color.text $urgent.color.indicator $urgent.color.child_border + +# Enable popup during fullscreen +popup_during_fullscreen smart + +# window focus follows your mouse movements as the mouse crosses window borders +focus_follows_mouse no + +set_from_resource $i3-wm.bar.background.color i3-wm.bar.background.color "#002b36" +set_from_resource $i3-wm.bar.statusline.color i3-wm.bar.statusline.color "#93a1a1" +set_from_resource $i3-wm.bar.separator.color i3-wm.bar.separator.color "#268bd2" + +set_from_resource $i3-wm.bar.workspace.focused.border.color i3-wm.bar.workspace.focused.border.color "#073642" +set_from_resource $i3-wm.bar.workspace.focused.background.color i3-wm.bar.workspace.focused.background.color "#073642" +set_from_resource $i3-wm.bar.workspace.focused.text.color i3-wm.bar.workspace.focused.text.color "#eee8d5" + +set_from_resource $i3-wm.bar.workspace.active.border.color i3-wm.bar.workspace.active.border.color "#073642" +set_from_resource $i3-wm.bar.workspace.active.background.color i3-wm.bar.workspace.active.background.color "#073642" +set_from_resource $i3-wm.bar.workspace.active.text.color i3-wm.bar.workspace.active.text.color "#586e75" + +set_from_resource $i3-wm.bar.workspace.inactive.border.color i3-wm.bar.workspace.inactive.border.color "#002b36" +set_from_resource $i3-wm.bar.workspace.inactive.background.color i3-wm.bar.workspace.inactive.background.color "#002b36" +set_from_resource $i3-wm.bar.workspace.inactive.text.color i3-wm.bar.workspace.inactive.text.color "#586e75" + +set_from_resource $i3-wm.bar.workspace.urgent.border.color i3-wm.bar.workspace.urgent.border.color "#dc322f" +set_from_resource $i3-wm.bar.workspace.urgent.background.color i3-wm.bar.workspace.urgent.background.color "#dc322f" +set_from_resource $i3-wm.bar.workspace.urgent.text.color i3-wm.bar.workspace.urgent.text.color "#fdf6e3" + +set_from_resource $i3-wm.bar.font i3-wm.bar.font "pango:Source Code Pro Medium 13, FontAwesome 13" + +# Run programs when i3 starts + +# Start the composite manager +exec --no-startup-id compton -f --config $compton_config + +# Launch the shortcut Conky window on first login +exec --no-startup-id /usr/bin/regolith-ftue + +# Hide the mouse pointer if unused for a duration +exec --no-startup-id /usr/bin/unclutter -b + +# Refresh wallpaper on screen resolution change +exec --no-startup-id /usr/bin/xeventbind resolution /usr/bin/wallpaper-refresh + +# Start polybar +exec_always --no-startup-id ~/.config/polybar/polybar.sh diff --git a/i3/config-old b/i3/config-old @@ -0,0 +1,231 @@ +# i3 config file (v4) +# +# Please see https://i3wm.org/docs/userguide.html for a complete reference! + +exec --no-startup-id compton --config ~/.config/compton/config -b +exec --no-startup-id /usr/lib/gnome-settings-daemon/gsd-xsettings +exec --no-startup-id gnome-flashback +exec --no-startup-id dropbox start +exec_always --no-startup-id ~/.scripts/feh-background +exec_always --no-startup-id ~/.config/polybar/polybar.sh & +exec_always --no-startup-id system76-power daemon +exec_always --no-startup-id xrandr --output LVDS-1-1 --off +exec_always --no-startup-id /usr/bin/setxkbmap -option 'caps:ctrl_modifier' +exec_always --no-startup-id /usr/bin/xcape -e 'Caps_Lock=Escape' + +set $mod Mod4 + +# Font for window titles. Will also be used by the bar unless a different font +# is used in the bar {} block below. +font pango:monospace 8 + +# This font is widely installed, provides lots of unicode glyphs, right-to-left +# text rendering and scalability on retina/hidpi displays (thanks to pango). +#font pango:DejaVu Sans Mono 8 + +# Before i3 v4.8, we used to recommend this one as the default: +# font -misc-fixed-medium-r-normal--13-120-75-75-C-70-iso10646-1 +# The font above is very space-efficient, that is, it looks good, sharp and +# clear in small sizes. However, its unicode glyph coverage is limited, the old +# X core fonts rendering does not support right-to-left and this being a bitmap +# font, it doesn’t scale on retina/hidpi displays. + +# Use Mouse+$mod to drag floating windows to their wanted position +floating_modifier $mod + +# start a terminal +bindsym $mod+Return exec --no-startup-id i3-sensible-terminal + +# kill focused window +bindsym $mod+q kill + +# start dmenu (a program launcher) +bindsym $mod+r exec --no-startup-id PATH=~/.bin:~/.scripts:$PATH dmenu_run +bindsym $mod+shift+a exec --no-startup-id i3-dmenu-desktop + +# There also is the (new) i3-dmenu-desktop which only displays applications +# shipping a .desktop file. It is a wrapper around dmenu, so you need that +# installed. +# bindsym $mod+d exec --no-startup-id i3-dmenu-desktop + +# change focus +bindsym $mod+h focus left +bindsym $mod+j focus down +bindsym $mod+k focus up +bindsym $mod+l focus right + +# alternatively, you can use the cursor keys: +bindsym $mod+Left focus left +bindsym $mod+Down focus down +bindsym $mod+Up focus up +bindsym $mod+Right focus right + +# 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 + +# alternatively, you can use the cursor keys: +bindsym $mod+Shift+Left move left +bindsym $mod+Shift+Down move down +bindsym $mod+Shift+Up move up +bindsym $mod+Shift+Right move right + +# split in horizontal orientation +bindsym Mod1+h split h + +# split in vertical orientation +bindsym Mod1+v split v + +# enter fullscreen mode for the focused container +bindsym $mod+z fullscreen toggle + +# change container layout (stacked, tabbed, toggle split) +bindsym $mod+w layout tabbed +bindsym $mod+e layout stacking +bindsym $mod+s layout default + +# 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 +bindsym $mod+1 workspace $ws1 +bindsym $mod+2 workspace $ws2 +bindsym $mod+3 workspace $ws3 +bindsym $mod+4 workspace $ws4 +bindsym $mod+5 workspace $ws5 +bindsym $mod+6 workspace $ws6 +bindsym $mod+7 workspace $ws7 +bindsym $mod+8 workspace $ws8 +bindsym $mod+9 workspace $ws9 +bindsym $mod+0 workspace $ws10 + +# move focused container 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 +bindsym $mod+Shift+4 move container to workspace $ws4 +bindsym $mod+Shift+5 move container to workspace $ws5 +bindsym $mod+Shift+6 move container to workspace $ws6 +bindsym $mod+Shift+7 move container to workspace $ws7 +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+q exec --no-startup-id "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) +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 5 px or 5 ppt + bindsym j resize grow height 5 px or 5 ppt + bindsym k resize shrink height 5 px or 5 ppt + bindsym l resize grow width 5 px or 5 ppt + bindsym Shift+h resize shrink width 1 px or 1 ppt + bindsym Shift+j resize grow height 1 px or 1 ppt + bindsym Shift+k resize shrink height 1 px or 1 ppt + bindsym Shift+l resize grow width 1 px or 1 ppt + # + # back to normal: Enter or Escape or $mod+r + bindsym Return mode "default" + bindsym Escape mode "default" +} + +bindsym Mod1+r mode "resize" + +new_window pixel 0 +for_window [class=".*"] border pixel 1 + +gaps inner 15 +gaps outer 0 +#smart_gaps on +#smart_borders on + +bindsym $mod+Mod1+XF86Eject exec i3lock -i ~/Pictures/Backgrounds/dark-lock.jpg + +# 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 Mod1+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 + 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 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 Return mode "default" + bindsym Escape mode "default" +} +# Pulse Audio controls +#bindsym XF86AudioRaiseVolume exec --no-startup-id /home/zeroalpha/.dotfiles/scripts/pactl-volume up +# bindsym XF86AudioLowerVolume exec --no-startup-id /home/zeroalpha/.dotfiles/scripts/pactl-volume down +# bindsym XF86AudioMute exec --no-startup-id /home/zeroalpha/.dotfiles/scripts/pactl-volume mute + +# Sreen brightness controls +# bindsym XF86MonBrightnessUp exec --no-startup-id /home/zeroalpha/.dotfiles/scripts/xrandr-brightness up +# bindsym XF86MonBrightnessDown exec --no-startup-id /home/zeroalpha/.dotfiles/scripts/xrandr-brightness down +# bindsym Shift+XF86MonBrightnessUp exec --no-startup-id /home/zeroalpha/.dotfiles/scripts/xrandr-brightness up 0.1 +# bindsym Shift+XF86MonBrightnessDown exec --no-startup-id /home/zeroalpha/.dotfiles/scripts/xrandr-brightness down 0.1 +# Media player controls +# bindsym XF86AudioPlay exec playerctl play +# bindsym XF86AudioPause exec playerctl pause +# bindsym XF86AudioNext exec playerctl next +# bindsym XF86AudioPrev exec playerctl previous