plugfiles

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README

config (9592B)


      1 # I3 CONFIG
      2 # Please see https://i3wm.org/docs/userguide.html for a complete reference!
      3 
      4 # WINDOWS KEY MODIFIER
      5 # "The button for i3 commands"
      6 set $mod Mod4
      7 #set $mod Mod1
      8 
      9 # Font for window titles. Will also be used by the bar unless a different font
     10 # is used in the bar {} block below.
     11 font pango:monospace 8
     12 
     13 # Monitors
     14 workspace 1 output HDMI-0
     15 workspace 2 output DVI-I-0
     16 
     17 # Fix optimus
     18 exec /usr/bin/prime-offload
     19 
     20 # Load bash_profile on startup
     21 exec --no-startup-id source $HOME/.bash_profile
     22 
     23 # Choose random background
     24 #exec --no-startup-id feh --randomize --bg-fill ~/Pictures/Wallpapers/*
     25 
     26 # Choose random background with associated color theme
     27 exec --no-startup-id wal -i ~/Pictures/Wallpapers/ -l
     28 
     29 # I3 Lock, SCRIPT FROM https://github.com/petvas/i3lock-blur
     30 bindsym $mod+F12 exec ~/.config/i3lock/lock.sh 
     31 
     32 # Force monitor positions
     33 exec --no-startup-id xrandr --output DVI-I-0 --right-of HDMI-0
     34 
     35 # Force US keyboard layout
     36 exec --no-startup-id setxkbmap -layout us
     37 
     38 # Compositor
     39 #exec_always --no-startup-id compton --backend glx --blur-method kawase --blur-strength 4 --config ~/.config/.compton.conf
     40 #exec_always --no-startup-id compton --blur-background --blur-method kawase --blur-strength 8 --opacity-rule 30:'class_g="st"' --backend glx
     41 exec_always --no-startup-id compton --backend glx
     42 
     43 # Launch redshift (like flux)
     44 exec_always --no-startup-id redshift -l -37.814:144.96332
     45 
     46 # Flameshot screenshotting tool startup
     47 exec_always --no-startup-id flameshot
     48 
     49 # I3 GAPS
     50 for_window [class=".*"] border pixel 0
     51 
     52 # Status bar
     53 #bar {
     54 #    # Height in pixels
     55 #    position top
     56 #    height 20 
     57 #    
     58 #    font pango:Terminus 12px    
     59 # 
     60 #    #status_command i3status
     61 #    # Custom i3status bar
     62 #    status_command ~/.config/i3/statusbar.sh
     63 #}
     64 
     65 
     66 exec --no-startup-id pkill polybar; polybar -r example
     67 #exec_always --no-startup-id $HOME/.config/polybar/launch.sh
     68 
     69 
     70 # Application Shortcuts
     71 bindsym $mod+F1 exec brave --disable-seccomp-filter-sandbox #google-chrome-stable 
     72 bindsym $mod+F2 exec nautilus
     73 bindsym $mod+F3 exec firefox
     74 bindsym $mod+F4 exec discord-canary
     75 bindsym $mod+F5 exec s-tui
     76 bindsym $mod+F6 exec google-chrome-stable
     77 
     78 # printscreen takes screenshot with flameshot
     79 bindsym Print exec flameshot gui
     80 #bindsym $mod2+r exec --no-startup-id ranger
     81 #bindsym $mod2+c exec --no-startup-id google-chrome
     82 
     83 # Use Mouse+$mod to drag floating windows to their wanted position
     84 floating_modifier $mod
     85 
     86 # Move workspace to other monitor
     87 bindsym $mod+p move workspace to output right
     88 
     89 # start a terminal
     90 bindsym $mod+Return exec st
     91 #bindsym $mod+Return exec i3-sensible-terminal
     92 #bindsym $mod+\ exec xterm
     93 
     94 # kill focused window
     95 bindsym $mod+Shift+q kill
     96 bindsym $mod+q kill
     97 
     98 # start dmenu (a program launcher)
     99 bindsym $mod+d exec dmenu_run
    100 # bindsym $mod+d exec --no-startup-id i3-dmenu-desktop
    101 
    102 # BORROWED FROM LUKE SMITH
    103 bindsym $mod+Shift+y exec --no-startup-id i3resize left
    104 bindsym $mod+Shift+u exec --no-startup-id i3resize down
    105 bindsym $mod+Shift+i exec --no-startup-id i3resize up
    106 bindsym $mod+Shift+o exec --no-startup-id i3resize right
    107 
    108 
    109 # Rounded Corners 
    110 border_radius 10
    111 
    112 # Control inner gap size
    113 bindsym $mod+s gaps inner current plus 5
    114 bindsym $mod+Shift+s gaps inner current minus 5
    115 
    116 # Reset gaps
    117 bindsym $mod+Shift+d gaps inner current set 10; gaps outer current set 20 
    118 
    119 # Control outer gaps
    120 bindsym $mod+z gaps outer current plus 5
    121 bindsym $mod+Shift+z gaps outer current minus 5
    122 
    123 
    124 # VIM CONTROLS
    125 # change focus
    126 bindsym $mod+h focus left
    127 bindsym $mod+j focus down
    128 bindsym $mod+k focus up
    129 bindsym $mod+l focus right
    130 
    131 # Or using arrow keys:
    132 bindsym $mod+Left focus left
    133 bindsym $mod+Down focus down
    134 bindsym $mod+Up focus up
    135 bindsym $mod+Right focus right
    136 
    137 # move focused window
    138 bindsym $mod+Shift+h move left
    139 bindsym $mod+Shift+j move down
    140 bindsym $mod+Shift+k move up
    141 bindsym $mod+Shift+l move right
    142 
    143 # or using arrow keys:
    144 bindsym $mod+Shift+Left move left
    145 bindsym $mod+Shift+Down move down
    146 bindsym $mod+Shift+Up move up
    147 bindsym $mod+Shift+Right move right
    148 
    149 # split in horizontal orientation
    150 bindsym $mod+b split h
    151 
    152 # split in vertical orientation
    153 bindsym $mod+v split v
    154 
    155 # enter fullscreen mode for the focused container
    156 bindsym $mod+f fullscreen toggle
    157 
    158 # change container layout (stacked, tabbed, toggle split)
    159 #bindsym $mod+s layout stacking
    160 bindsym $mod+w layout tabbed
    161 bindsym $mod+e layout toggle split
    162 
    163 # toggle tiling / floating
    164 bindsym $mod+Shift+space floating toggle
    165 
    166 # change focus between tiling / floating windows
    167 bindsym $mod+space focus mode_toggle
    168 
    169 # focus the parent container
    170 bindsym $mod+a focus parent
    171 
    172 # focus the child container
    173 #bindsym $mod+d focus child
    174 
    175 # Define names for default workspaces for which we configure key bindings later on.
    176 # We use variables to avoid repeating the names in multiple places.
    177 set $ws1 "1"
    178 set $ws2 "2"
    179 set $ws3 "3"
    180 set $ws4 "4"
    181 set $ws5 "5"
    182 set $ws6 "6"
    183 set $ws7 "7"
    184 set $ws8 "8"
    185 set $ws9 "9"
    186 set $ws10 "10"
    187 
    188 # switch to workspace
    189 bindsym $mod+1 workspace $ws1
    190 bindsym $mod+2 workspace $ws2
    191 bindsym $mod+3 workspace $ws3
    192 bindsym $mod+4 workspace $ws4
    193 bindsym $mod+5 workspace $ws5
    194 bindsym $mod+6 workspace $ws6
    195 bindsym $mod+7 workspace $ws7
    196 bindsym $mod+8 workspace $ws8
    197 bindsym $mod+9 workspace $ws9
    198 bindsym $mod+0 workspace $ws10
    199 
    200 # move focused container to workspace
    201 bindsym $mod+Shift+1 move container to workspace $ws1
    202 bindsym $mod+Shift+2 move container to workspace $ws2
    203 bindsym $mod+Shift+3 move container to workspace $ws3
    204 bindsym $mod+Shift+4 move container to workspace $ws4
    205 bindsym $mod+Shift+5 move container to workspace $ws5
    206 bindsym $mod+Shift+6 move container to workspace $ws6
    207 bindsym $mod+Shift+7 move container to workspace $ws7
    208 bindsym $mod+Shift+8 move container to workspace $ws8
    209 bindsym $mod+Shift+9 move container to workspace $ws9
    210 bindsym $mod+Shift+0 move container to workspace $ws10
    211 
    212 # reload the configuration file
    213 bindsym $mod+Shift+c reload
    214 # restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
    215 bindsym $mod+Shift+r exec --no-startup-id pkill compton; restart
    216 # exit i3 (logs you out of your X session)
    217 bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'Exit i3 session?' -B 'Yes, exit i3' 'i3-msg exit'"
    218 
    219 # resize window (you can also use the mouse for that)
    220 mode "resize" {
    221         # These bindings trigger as soon as you enter the resize mode
    222 
    223         # Pressing left will shrink the window’s width.
    224         # Pressing right will grow the window’s width.
    225         # Pressing up will shrink the window’s height.
    226         # Pressing down will grow the window’s height.
    227         bindsym h resize shrink width 10 px or 10 ppt
    228         bindsym j resize grow height 10 px or 10 ppt
    229         bindsym k resize shrink height 10 px or 10 ppt
    230         bindsym l resize grow width 10 px or 10 ppt
    231 
    232         # same bindings, but for the arrow keys
    233         bindsym Left resize shrink width 10 px or 10 ppt
    234         bindsym Down resize grow height 10 px or 10 ppt
    235         bindsym Up resize shrink height 10 px or 10 ppt
    236         bindsym Right resize grow width 10 px or 10 ppt
    237 
    238         # back to normal: Enter or Escape or $mod+r
    239         bindsym Return mode "default"
    240         bindsym Escape mode "default"
    241         bindsym $mod+r mode "default"
    242 }
    243 
    244 bindsym $mod+r mode "resize"
    245 
    246 
    247 
    248 set $i3_resurrect i3-resurrect
    249 
    250 # Save workspace mode.
    251 mode "save" {
    252   bindsym 1 exec "$i3_resurrect save -w 1 --swallow=class,instance,title"
    253   bindsym 2 exec "$i3_resurrect save -w 2 --swallow=class,instance,title"
    254   bindsym 3 exec "$i3_resurrect save -w 3 --swallow=class,instance,title"
    255   bindsym 4 exec "$i3_resurrect save -w 4 --swallow=class,instance,title"
    256   bindsym 5 exec "$i3_resurrect save -w 5 --swallow=class,instance,title"
    257   bindsym 6 exec "$i3_resurrect save -w 6 --swallow=class,instance,title"
    258   bindsym 7 exec "$i3_resurrect save -w 7 --swallow=class,instance,title"
    259   bindsym 8 exec "$i3_resurrect save -w 8 --swallow=class,instance,title"
    260   bindsym 9 exec "$i3_resurrect save -w 9 --swallow=class,instance,title"
    261   bindsym 0 exec "$i3_resurrect save -w 10 --swallow=class,instance,title"
    262 
    263   # Back to normal: Enter, Escape, or s
    264   bindsym Return mode "default"
    265   bindsym Escape mode "default"
    266   bindsym m mode "default"
    267   bindsym $mod+m mode "default"
    268 }
    269 
    270 bindsym $mod+m mode "save"
    271 
    272 # Restore workspace mode.
    273 mode "restore" {
    274   bindsym 1 exec "$i3_resurrect restore -w 1 --programs-only"
    275   bindsym 2 exec "$i3_resurrect restore -w 2 --programs-only"
    276   bindsym 3 exec "$i3_resurrect restore -w 3 --programs-only"
    277   bindsym 4 exec "$i3_resurrect restore -w 4 --programs-only"
    278   bindsym 5 exec "$i3_resurrect restore -w 5 --programs-only"
    279   bindsym 6 exec "$i3_resurrect restore -w 6 --programs-only"
    280   bindsym 7 exec "$i3_resurrect restore -w 7 --programs-only"
    281   bindsym 8 exec "$i3_resurrect restore -w 8 --programs-only"
    282   bindsym 9 exec "$i3_resurrect restore -w 9 --programs-only"
    283   bindsym 0 exec "$i3_resurrect restore -w 10 --programs-only"
    284 
    285   bindsym $mod+1 exec "$i3_resurrect restore -w 1"
    286   bindsym $mod+2 exec "$i3_resurrect restore -w 2"
    287   bindsym $mod+3 exec "$i3_resurrect restore -w 3"
    288   bindsym $mod+4 exec "$i3_resurrect restore -w 4"
    289   bindsym $mod+5 exec "$i3_resurrect restore -w 5"
    290   bindsym $mod+6 exec "$i3_resurrect restore -w 6"
    291   bindsym $mod+7 exec "$i3_resurrect restore -w 7"
    292   bindsym $mod+8 exec "$i3_resurrect restore -w 8"
    293   bindsym $mod+9 exec "$i3_resurrect restore -w 9"
    294   bindsym $mod+0 exec "$i3_resurrect restore -w 10"
    295 
    296   # Back to normal: Enter, Escape, or n
    297   bindsym Return mode "default"
    298   bindsym Escape mode "default"
    299   bindsym n mode "default"
    300   bindsym $mod+n mode "default"
    301 }
    302 
    303 bindsym $mod+n mode "restore"
    304