]> git.donarmstrong.com Git - x_base.git/blob - .config/i3/config_base
use rofi to lanch windows
[x_base.git] / .config / i3 / config_base
1 # -*- mode: conf -*-
2 # i3 config file (v4)
3 #
4 # Please see http://i3wm.org/docs/userguide.html for a complete reference!
5
6 set $mod Mod4
7
8 # Font for window titles. Will also be used by the bar unless a different font
9 # is used in the bar {} block below.
10 #font pango:monospace 8
11
12 # This font is widely installed, provides lots of unicode glyphs, right-to-left
13 # text rendering and scalability on retina/hidpi displays (thanks to pango).
14 font pango:DejaVu Sans Mono 8
15
16 # Before i3 v4.8, we used to recommend this one as the default:
17 # font -misc-fixed-medium-r-normal--13-120-75-75-C-70-iso10646-1
18 # The font above is very space-efficient, that is, it looks good, sharp and
19 # clear in small sizes. However, its unicode glyph coverage is limited, the old
20 # X core fonts rendering does not support right-to-left and this being a bitmap
21 # font, it doesn’t scale on retina/hidpi displays.
22
23 # Use Mouse+$mod to drag floating windows to their wanted position
24 floating_modifier $mod
25
26 # start a terminal
27 bindsym $mod+Return exec i3-sensible-terminal
28
29 # kill focused window
30 bindsym $mod+Shift+q kill
31
32 # start dmenu (a program launcher)
33 # bindsym $mod+d exec dmenu_run
34 # There also is the (new) i3-dmenu-desktop which only displays applications
35 # shipping a .desktop file. It is a wrapper around dmenu, so you need that
36 # installed.
37 bindsym $mod+d exec --no-startup-id i3-dmenu-desktop --dmenu='rofi -dmenu'
38 bindsym $mod+q exec --no-startup-id rofi -show window
39
40 # change focus
41 bindsym $mod+j focus left
42 bindsym $mod+k focus down
43 bindsym $mod+l focus up
44 bindsym $mod+semicolon focus right
45
46 # alternatively, you can use the cursor keys:
47 bindsym $mod+Left focus left
48 bindsym $mod+Down focus down
49 bindsym $mod+Up focus up
50 bindsym $mod+Right focus right
51
52 # move focused window
53 bindsym $mod+Shift+j move left
54 bindsym $mod+Shift+k move down
55 bindsym $mod+Shift+l move up
56 bindsym $mod+Shift+semicolon move right
57
58 # alternatively, you can use the cursor keys:
59 bindsym $mod+Shift+Left move left
60 bindsym $mod+Shift+Down move down
61 bindsym $mod+Shift+Up move up
62 bindsym $mod+Shift+Right move right
63
64 # move focused window
65 bindsym $mod+Control+Shift+j move container to output left
66 bindsym $mod+Control+Shift+k move container to output down
67 bindsym $mod+Control+Shift+l move container to output up
68 bindsym $mod+Control+Shift+semicolon move container to output right
69
70 bindsym $mod+Control+Shift+Left move container to output left
71 bindsym $mod+Control+Shift+Down move container to output down
72 bindsym $mod+Control+Shift+Up move container to output up
73 bindsym $mod+Control+Shift+Right move container to output right
74
75 # alternatively, you can use the cursor keys:
76 bindsym $mod+Control+j move workspace to output left
77 bindsym $mod+Control+k move workspace to output down
78 bindsym $mod+Control+l move workspace to output up
79 bindsym $mod+Control+semicolon move workspace to output right
80
81 bindsym $mod+Control+Left move workspace to output left
82 bindsym $mod+Control+Down move workspace to output down
83 bindsym $mod+Control+Up move workspace to output up
84 bindsym $mod+Control+Right move workspace to output right
85
86 # split in horizontal orientation
87 bindsym $mod+h split h
88
89 # split in vertical orientation
90 bindsym $mod+v split v
91
92 # enter fullscreen mode for the focused container
93 bindsym $mod+f fullscreen toggle
94
95 # change container layout (stacked, tabbed, toggle split)
96 bindsym $mod+s layout stacking
97 bindsym $mod+w layout tabbed
98 bindsym $mod+e layout toggle split
99
100 # toggle tiling / floating
101 bindsym $mod+Shift+space floating toggle
102
103 # change focus between tiling / floating windows
104 bindsym $mod+space focus mode_toggle
105
106 # focus the parent container
107 bindsym $mod+a focus parent
108
109 # focus the child container
110 #bindsym $mod+d focus child
111
112 # switch to workspace
113 bindsym $mod+1 workspace "1: emacs"
114 bindsym $mod+2 workspace "2: mutt"
115 bindsym $mod+3 workspace "3: browser"
116 bindsym $mod+4 workspace 4
117 bindsym $mod+5 workspace 5
118 bindsym $mod+6 workspace 6
119 bindsym $mod+7 workspace 7
120 bindsym $mod+8 workspace 8
121 bindsym $mod+9 workspace 9
122 bindsym $mod+0 workspace 10
123
124 # move focused container to workspace
125 bindsym $mod+Shift+1 move container to workspace "1: emacs"
126 bindsym $mod+Shift+2 move container to workspace "2: mutt"
127 bindsym $mod+Shift+3 move container to workspace "3: browser"
128 bindsym $mod+Shift+4 move container to workspace 4
129 bindsym $mod+Shift+5 move container to workspace 5
130 bindsym $mod+Shift+6 move container to workspace 6
131 bindsym $mod+Shift+7 move container to workspace 7
132 bindsym $mod+Shift+8 move container to workspace 8
133 bindsym $mod+Shift+9 move container to workspace 9
134 bindsym $mod+Shift+0 move container to workspace 10
135
136 # reload the configuration file
137 bindsym $mod+Shift+c exec "sh -c '[ -x ~/.config/i3/build_config.sh ] && ~/.config/i3/build_config.sh; i3-msg reload'"
138 # restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
139 bindsym $mod+Shift+r restart
140 # exit i3 (logs you out of your X session)
141 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'"
142
143 # resize window (you can also use the mouse for that)
144 mode "resize" {
145         # These bindings trigger as soon as you enter the resize mode
146
147         # Pressing left will shrink the window’s width.
148         # Pressing right will grow the window’s width.
149         # Pressing up will shrink the window’s height.
150         # Pressing down will grow the window’s height.
151         bindsym j resize shrink width 10 px or 10 ppt
152         bindsym k resize grow height 10 px or 10 ppt
153         bindsym l resize shrink height 10 px or 10 ppt
154         bindsym semicolon resize grow width 10 px or 10 ppt
155
156         # same bindings, but for the arrow keys
157         bindsym Left resize shrink width 10 px or 10 ppt
158         bindsym Down resize grow height 10 px or 10 ppt
159         bindsym Up resize shrink height 10 px or 10 ppt
160         bindsym Right resize grow width 10 px or 10 ppt
161
162         # back to normal: Enter or Escape
163         bindsym Return mode "default"
164         bindsym Escape mode "default"
165 }
166
167 bindsym $mod+r mode "resize"
168
169 # media keys
170 bindsym XF86AudioRaiseVolume exec --no-startup-id sh -c "pactl set-sink-volume `pacmd list-sinks | awk -F': ' '/* index/{print $2}'` +5%" #increase sound volume
171 bindsym XF86AudioLowerVolume exec --no-startup-id sh -c "pactl set-sink-volume `pacmd list-sinks | awk -F': ' '/* index/{print $2}'` -5%" #decrease sound volume
172 bindsym XF86AudioMute exec --no-startup-id sh -c "pactl set-sink-mute `pacmd list-sinks | awk -F': ' '/* index/{print $2}'` toggle" # mute sound
173 bindsym XF86AudioMicMute exec --no-startup-id sh -c "pactl set-source-mute `pacmd list-sinks | awk -F': ' '/* index/{print $2}'` toggle" # mute mic
174
175 # brightness
176 bindsym XF86MonBrightnessUp exec xbacklight -inc 5 # increase screen brightness
177 bindsym XF86MonBrightnessDown exec xbacklight -dec 5 # decrease screen brightness
178
179 # seach/tools/wlan/display
180 bindsym XF86WLAN exec sh -c 'if /usr/sbin/rfkill list|grep -q "blocked: yes"; then /usr/sbin/rfkill unblock all; else /usr/sbin/rfkill block all; fi;' 
181 #bindsym XF86Display exec presentation_mode
182
183 # Start i3bar to display a workspace bar (plus the system information i3status
184 # finds out, if available)
185 bar {
186         status_command i3status
187         tray_output primary
188 }