├── Xdefaults ├── awesome ├── mawww │ ├── init.lua │ ├── logwatcher.lua │ ├── notmuch.lua │ └── widgets.lua └── rc.lua ├── dunstrc ├── i3config ├── ide.kak ├── kakrc ├── octaverc ├── scripts ├── bandcamp-play ├── bandcamp-sort ├── bandcamp-unpack └── isolate ├── statusbar ├── tmux.conf ├── vimbconfig ├── vimrc ├── xmonad.hs └── zshrc /Xdefaults: -------------------------------------------------------------------------------- 1 | URxvt.depth: 32 2 | URxvt.background: rgba:0000/0000/0000/cccc 3 | URxvt.foreground: Grey 4 | URxvt.scrollBar: False 5 | URxvt.perl-ext-common: matcher,font-size 6 | URxvt.url-launcher: vimb 7 | !URxvt.font: xft:DejaVu Sans Mono:style=Book:pixelsize=12 8 | URxvt.font: xft:Terminus:pixelsize=12 9 | URxvt.fading: 20 10 | URxvt.fadeColor: Black 11 | URxvt.urgentOnBell: true 12 | URxvt*cutchars: `"()'*<>[]{|} 13 | 14 | URxvt.keysym.C-Up: perl:font-size:increase 15 | URxvt.keysym.C-Down: perl:font-size:decrease 16 | URxvt.keysym.C-S-Up: perl:font-size:incglobal 17 | URxvt.keysym.C-S-Down: perl:font-size:decglobal 18 | 19 | ! Le bleu par defaut est plutot dur a lire 20 | URxvt.color4: RoyalBlue 21 | URxvt.color12: RoyalBlue 22 | -------------------------------------------------------------------------------- /awesome/mawww/init.lua: -------------------------------------------------------------------------------- 1 | require("mawww.widgets") 2 | require("mawww.logwatcher") 3 | 4 | module("mawww") 5 | -------------------------------------------------------------------------------- /awesome/mawww/logwatcher.lua: -------------------------------------------------------------------------------- 1 | module("mawww.logwatcher") 2 | -------------------------------------------------------------------------------- /awesome/mawww/notmuch.lua: -------------------------------------------------------------------------------- 1 | --------------------------------------------------- 2 | -- Licensed under the GNU General Public License v2 3 | -- * (c) 2011, Maxime Coste 4 | --------------------------------------------------- 5 | 6 | local io = io 7 | local ipairs = ipairs 8 | local setmetatable = setmetatable 9 | local table = { insert = table.insert } 10 | 11 | module("mawww.notmuch") 12 | 13 | local function worker(format, tags) 14 | local unread = {} 15 | for i,tag in ipairs(tags) do 16 | local f = io.popen("notmuch count tag:unread and tag:" .. tag) 17 | table.insert(unread, f:read("*all")) 18 | f:close() 19 | end 20 | return unread 21 | end 22 | 23 | setmetatable(_M, { __call = function(_, ...) return worker(...) end }) 24 | -------------------------------------------------------------------------------- /awesome/mawww/widgets.lua: -------------------------------------------------------------------------------- 1 | require("awful") 2 | require("vicious") 3 | require("mawww.notmuch") 4 | 5 | local awful = awful 6 | local vicious = vicious 7 | local widget = widget 8 | local image = image 9 | local notmuch = mawww.notmuch 10 | 11 | module("mawww.widgets") 12 | 13 | local function icon(name) 14 | local iconwidget = widget({ type = "imagebox" }) 15 | iconwidget.image = image("/home/mawww/misc/icons/open_icon_library-standard/icons/png/32x32/" .. name) 16 | return iconwidget 17 | end 18 | 19 | -- vicious widgets 20 | local cpuicon = icon("devices/cpu.png") 21 | local cpuwidget = awful.widget.graph() 22 | cpuwidget:set_width(50) 23 | vicious.register(cpuwidget, vicious.widgets.cpu, "$1") 24 | 25 | local memicon = icon("devices/memory.png") 26 | local memwidget = awful.widget.progressbar() 27 | memwidget:set_vertical(true) 28 | memwidget:set_width(6) 29 | vicious.register(memwidget, vicious.widgets.mem, "$1", 1) 30 | 31 | local volicon = icon("devices/audio-card-2.png") 32 | local volwidget = awful.widget.progressbar() 33 | volwidget:set_vertical(true) 34 | volwidget:set_width(6) 35 | vicious.register(volwidget, vicious.widgets.volume, "$1", 1, "PCM") 36 | 37 | local baticon = icon("devices/battery.png") 38 | local batwidget = awful.widget.progressbar() 39 | batwidget:set_vertical(true) 40 | batwidget:set_width(6) 41 | vicious.register(batwidget, vicious.widgets.bat, "$2", 61, "BAT0") 42 | 43 | local mailicon = icon("emblems/emblem-mail.png") 44 | local mailwidget = widget({ type = "textbox" }) 45 | mailwidget.text="inbox: ??" 46 | vicious.register(mailwidget, notmuch, "inbox: $1", 11, { "inbox" }) 47 | 48 | systraywidget = widget({ type = "systray" }) 49 | 50 | clockwidget = awful.widget.textclock({ align = "right" }) 51 | 52 | local wibox = awful.wibox({ position = "bottom" }) 53 | wibox.widgets = { 54 | cpuicon, 55 | cpuwidget, 56 | memicon, 57 | memwidget, 58 | volicon, 59 | volwidget, 60 | baticon, 61 | batwidget, 62 | mailicon, 63 | mailwidget, 64 | layout = awful.widget.layout.horizontal.leftright, 65 | { 66 | clockwidget, 67 | systraywidget, 68 | layout = awful.widget.layout.horizontal.rightleft, 69 | }, 70 | } 71 | 72 | -------------------------------------------------------------------------------- /awesome/rc.lua: -------------------------------------------------------------------------------- 1 | -- Standard awesome library 2 | require("awful") 3 | require("awful.autofocus") 4 | require("awful.rules") 5 | -- Theme handling library 6 | require("beautiful") 7 | -- Notification library 8 | require("naughty") 9 | 10 | -- {{{ Variable definitions 11 | -- Themes define colours, icons, and wallpapers 12 | beautiful.init(awful.util.getdir("config") .. "/theme.lua") 13 | 14 | -- Personal stuffs 15 | require("mawww") 16 | 17 | -- This is used later as the default terminal and editor to run. 18 | terminal = "urxvt" 19 | editor = os.getenv("EDITOR") or "nano" 20 | editor_cmd = terminal .. " -e " .. editor 21 | 22 | -- Default modkey. 23 | -- Usually, Mod4 is the key with a logo between Control and Alt. 24 | -- If you do not like this or do not have such a key, 25 | -- I suggest you to remap Mod4 to another key using xmodmap or other tools. 26 | -- However, you can use another modifier like Mod1, but it may interact with others. 27 | modkey = "Mod4" 28 | 29 | -- Table of layouts to cover with awful.layout.inc, order matters. 30 | layouts = 31 | { 32 | awful.layout.suit.tile, 33 | -- awful.layout.suit.tile.left, 34 | awful.layout.suit.tile.bottom, 35 | -- awful.layout.suit.tile.top, 36 | awful.layout.suit.fair, 37 | -- awful.layout.suit.fair.horizontal, 38 | -- awful.layout.suit.spiral, 39 | -- awful.layout.suit.spiral.dwindle, 40 | awful.layout.suit.max, 41 | -- awful.layout.suit.max.fullscreen, 42 | -- awful.layout.suit.magnifier 43 | awful.layout.suit.floating, 44 | } 45 | -- }}} 46 | 47 | -- {{{ Tags 48 | -- Define a tag table which hold all screen tags. 49 | tags = {} 50 | if screen.count() == 2 then 51 | tags[1] = awful.tag({ "mail", "dev", "tmp", "win" }, 1, layouts[1]) 52 | tags[2] = awful.tag({ "www", "dbg", "ssh", "tmp", "bg" }, 2, layouts[1]) 53 | else 54 | for s = 1, screen.count() do 55 | -- Each screen has its own tag table. 56 | tags[s] = awful.tag({ "www", "dev", "tmp", "bg" }, s, layouts[1]) 57 | end 58 | end 59 | -- }}} 60 | 61 | -- {{{ Menu 62 | -- Create a laucher widget and a main menu 63 | myawesomemenu = { 64 | { "manual", terminal .. " -e man awesome" }, 65 | { "edit config", editor_cmd .. " " .. awful.util.getdir("config") .. "/rc.lua" }, 66 | { "restart", awesome.restart }, 67 | { "quit", awesome.quit } 68 | } 69 | 70 | mymainmenu = awful.menu({ items = { { "awesome", myawesomemenu, beautiful.awesome_icon }, 71 | { "open terminal", terminal } 72 | } 73 | }) 74 | 75 | mylauncher = awful.widget.launcher({ image = image(beautiful.awesome_icon), 76 | menu = mymainmenu }) 77 | -- }}} 78 | 79 | -- {{{ Wibox 80 | -- Create a wibox for each screen and add it 81 | mywibox = {} 82 | mypromptbox = {} 83 | mylayoutbox = {} 84 | mytaglist = {} 85 | mytaglist.buttons = awful.util.table.join( 86 | awful.button({ }, 1, awful.tag.viewonly), 87 | awful.button({ modkey }, 1, awful.client.movetotag), 88 | awful.button({ }, 3, awful.tag.viewtoggle), 89 | awful.button({ modkey }, 3, awful.client.toggletag), 90 | awful.button({ }, 4, awful.tag.viewnext), 91 | awful.button({ }, 5, awful.tag.viewprev) 92 | ) 93 | mytasklist = {} 94 | mytasklist.buttons = awful.util.table.join( 95 | awful.button({ }, 1, function (c) 96 | if not c:isvisible() then 97 | awful.tag.viewonly(c:tags()[1]) 98 | end 99 | client.focus = c 100 | c:raise() 101 | end), 102 | awful.button({ }, 3, function () 103 | if instance then 104 | instance:hide() 105 | instance = nil 106 | else 107 | instance = awful.menu.clients({ width=250 }) 108 | end 109 | end), 110 | awful.button({ }, 4, function () 111 | awful.client.focus.byidx(1) 112 | if client.focus then client.focus:raise() end 113 | end), 114 | awful.button({ }, 5, function () 115 | awful.client.focus.byidx(-1) 116 | if client.focus then client.focus:raise() end 117 | end)) 118 | 119 | for s = 1, screen.count() do 120 | -- Create a promptbox for each screen 121 | mypromptbox[s] = awful.widget.prompt({ layout = awful.widget.layout.horizontal.leftright, prompt = "Run: " }) 122 | -- Create an imagebox widget which will contains an icon indicating which layout we're using. 123 | -- We need one layoutbox per screen. 124 | mylayoutbox[s] = awful.widget.layoutbox(s) 125 | mylayoutbox[s]:buttons(awful.util.table.join( 126 | awful.button({ }, 1, function () awful.layout.inc(layouts, 1) end), 127 | awful.button({ }, 3, function () awful.layout.inc(layouts, -1) end), 128 | awful.button({ }, 4, function () awful.layout.inc(layouts, 1) end), 129 | awful.button({ }, 5, function () awful.layout.inc(layouts, -1) end))) 130 | -- Create a taglist widget 131 | mytaglist[s] = awful.widget.taglist(s, awful.widget.taglist.label.all, mytaglist.buttons) 132 | 133 | -- Create a tasklist widget 134 | mytasklist[s] = awful.widget.tasklist(function(c) 135 | return awful.widget.tasklist.label.currenttags(c, s) 136 | end, mytasklist.buttons) 137 | 138 | -- Create the wibox 139 | mywibox[s] = awful.wibox({ position = "top", screen = s }) 140 | -- Add widgets to the wibox - order matters 141 | mywibox[s].widgets = { 142 | { 143 | mylauncher, 144 | mytaglist[s], 145 | mypromptbox[s], 146 | layout = awful.widget.layout.horizontal.leftright 147 | }, 148 | mylayoutbox[s], 149 | mytasklist[s], 150 | layout = awful.widget.layout.horizontal.rightleft 151 | } 152 | end 153 | -- }}} 154 | 155 | -- {{{ Mouse bindings 156 | root.buttons(awful.util.table.join( 157 | awful.button({ }, 3, function () mymainmenu:toggle() end), 158 | awful.button({ }, 4, awful.tag.viewnext), 159 | awful.button({ }, 5, awful.tag.viewprev) 160 | )) 161 | -- }}} 162 | 163 | -- {{{ Key bindings 164 | globalkeys = awful.util.table.join( 165 | awful.key({ modkey, }, "Left", awful.tag.viewprev ), 166 | awful.key({ modkey, }, "Right", awful.tag.viewnext ), 167 | awful.key({ modkey, }, "Escape", awful.tag.history.restore), 168 | 169 | awful.key({ modkey, }, "j", 170 | function () 171 | awful.client.focus.byidx( 1) 172 | if client.focus then client.focus:raise() end 173 | end), 174 | awful.key({ modkey, }, "k", 175 | function () 176 | awful.client.focus.byidx(-1) 177 | if client.focus then client.focus:raise() end 178 | end), 179 | awful.key({ modkey, }, "w", function () mymainmenu:show({keygrabber=true}) end), 180 | 181 | -- Layout manipulation 182 | awful.key({ modkey, "Shift" }, "j", function () awful.client.swap.byidx( 1) end), 183 | awful.key({ modkey, "Shift" }, "k", function () awful.client.swap.byidx( -1) end), 184 | awful.key({ modkey, "Control" }, "j", function () awful.screen.focus_relative( 1) end), 185 | awful.key({ modkey, "Control" }, "k", function () awful.screen.focus_relative(-1) end), 186 | awful.key({ modkey, }, "u", awful.client.urgent.jumpto), 187 | awful.key({ modkey, }, "Tab", 188 | function () 189 | awful.client.focus.history.previous() 190 | if client.focus then 191 | client.focus:raise() 192 | end 193 | end), 194 | 195 | -- Standard program 196 | awful.key({ modkey, }, "Return", function () awful.util.spawn(terminal) end), 197 | awful.key({ modkey, "Control" }, "Return", function () awful.util.spawn(terminal .. " -fn 'xft:DejaVu Sans Mono:style=Book:pixelsize=20'") end), 198 | awful.key({ modkey, "Control" }, "r", awesome.restart), 199 | awful.key({ modkey, "Shift" }, "q", awesome.quit), 200 | 201 | awful.key({ modkey, }, "l", function () awful.tag.incmwfact( 0.05) end), 202 | awful.key({ modkey, }, "h", function () awful.tag.incmwfact(-0.05) end), 203 | awful.key({ modkey, "Shift" }, "h", function () awful.tag.incnmaster( 1) end), 204 | awful.key({ modkey, "Shift" }, "l", function () awful.tag.incnmaster(-1) end), 205 | awful.key({ modkey, "Control" }, "h", function () awful.tag.incncol( 1) end), 206 | awful.key({ modkey, "Control" }, "l", function () awful.tag.incncol(-1) end), 207 | awful.key({ modkey, }, "space", function () awful.layout.inc(layouts, 1) end), 208 | awful.key({ modkey, "Shift" }, "space", function () awful.layout.inc(layouts, -1) end), 209 | 210 | -- Prompt 211 | awful.key({ modkey }, "r", function () mypromptbox[mouse.screen]:run() end), 212 | 213 | awful.key({ modkey, "Shift" }, "r", 214 | function () 215 | awful.prompt.run({ prompt = "Run in terminal: " }, 216 | mypromptbox[mouse.screen].widget, 217 | function (cmd) awful.util.spawn(terminal .. " -e " .. cmd) end, nil, 218 | awful.util.getdir("cache") .. "/history") 219 | end), 220 | 221 | awful.key({ modkey }, "x", 222 | function () 223 | awful.prompt.run({ prompt = "Run Lua code: " }, 224 | mypromptbox[mouse.screen].widget, 225 | awful.util.eval, nil, 226 | awful.util.getdir("cache") .. "/history_eval") 227 | end), 228 | 229 | -- Volume 230 | awful.key({}, "XF86AudioRaiseVolume", function () awful.util.spawn("amixer sset PCM 2%+") end), 231 | awful.key({}, "XF86AudioLowerVolume", function () awful.util.spawn("amixer sset PCM 2%-") end) 232 | ) 233 | 234 | clientkeys = awful.util.table.join( 235 | awful.key({ modkey, }, "f", function (c) c.fullscreen = not c.fullscreen end), 236 | awful.key({ modkey, "Shift" }, "c", function (c) c:kill() end), 237 | awful.key({ modkey, "Control" }, "space", awful.client.floating.toggle ), 238 | awful.key({ modkey, "Control" }, "Return", function (c) c:swap(awful.client.getmaster()) end), 239 | awful.key({ modkey, }, "o", awful.client.movetoscreen ), 240 | -- awful.key({ modkey, "Shift" }, "r", function (c) c:redraw() end), 241 | awful.key({ modkey, }, "t", function (c) c.ontop = not c.ontop end), 242 | awful.key({ modkey, }, "n", function (c) c.minimized = not c.minimized end), 243 | awful.key({ modkey, }, "m", 244 | function (c) 245 | c.maximized_horizontal = not c.maximized_horizontal 246 | c.maximized_vertical = not c.maximized_vertical 247 | end) 248 | ) 249 | 250 | -- Compute the maximum number of digit we need, limited to 9 251 | keynumber = 0 252 | for s = 1, screen.count() do 253 | keynumber = math.min(9, math.max(#tags[s], keynumber)); 254 | end 255 | 256 | -- Bind all key numbers to tags. 257 | -- Be careful: we use keycodes to make it works on any keyboard layout. 258 | -- This should map on the top row of your keyboard, usually 1 to 9. 259 | for i = 1, keynumber do 260 | globalkeys = awful.util.table.join(globalkeys, 261 | awful.key({ modkey }, "#" .. i + 9, 262 | function () 263 | local screen = mouse.screen 264 | if tags[screen][i] then 265 | awful.tag.viewonly(tags[screen][i]) 266 | end 267 | end), 268 | awful.key({ modkey, "Control" }, "#" .. i + 9, 269 | function () 270 | local screen = mouse.screen 271 | if tags[screen][i] then 272 | awful.tag.viewtoggle(tags[screen][i]) 273 | end 274 | end), 275 | awful.key({ modkey, "Shift" }, "#" .. i + 9, 276 | function () 277 | if client.focus and tags[client.focus.screen][i] then 278 | awful.client.movetotag(tags[client.focus.screen][i]) 279 | end 280 | end), 281 | awful.key({ modkey, "Control", "Shift" }, "#" .. i + 9, 282 | function () 283 | if client.focus and tags[client.focus.screen][i] then 284 | awful.client.toggletag(tags[client.focus.screen][i]) 285 | end 286 | end)) 287 | end 288 | 289 | clientbuttons = awful.util.table.join( 290 | awful.button({ }, 1, function (c) client.focus = c; c:raise() end), 291 | awful.button({ modkey }, 1, awful.mouse.client.move), 292 | awful.button({ modkey }, 3, awful.mouse.client.resize)) 293 | 294 | -- Set keys 295 | root.keys(globalkeys) 296 | -- }}} 297 | 298 | -- {{{ Rules 299 | awful.rules.rules = { 300 | -- All clients will match this rule. 301 | { rule = { }, 302 | properties = { border_width = beautiful.border_width, 303 | border_color = beautiful.border_normal, 304 | focus = true, 305 | keys = clientkeys, 306 | buttons = clientbuttons } }, 307 | { rule = { class = "mplayer2" }, 308 | properties = { floating = true } }, 309 | { rule = { class = "pinentry" }, 310 | properties = { floating = true } }, 311 | { rule = { class = "gimp" }, 312 | properties = { floating = true } }, 313 | { rule = { class = "Exe" }, 314 | properties = { floating = true } }, 315 | } 316 | -- }}} 317 | 318 | -- {{{ Signals 319 | -- Signal function to execute when a new client appears. 320 | client.add_signal("manage", function (c, startup) 321 | -- Add a titlebar 322 | -- awful.titlebar.add(c, { modkey = modkey }) 323 | 324 | -- Enable sloppy focus 325 | c:add_signal("mouse::enter", function(c) 326 | if awful.layout.get(c.screen) ~= awful.layout.suit.magnifier 327 | and awful.client.focus.filter(c) then 328 | client.focus = c 329 | end 330 | end) 331 | 332 | if not startup then 333 | -- Set the windows at the slave, 334 | -- i.e. put it at the end of others instead of setting it master. 335 | -- awful.client.setslave(c) 336 | 337 | -- Put windows in a smart way, only if they does not set an initial position. 338 | if not c.size_hints.user_position and not c.size_hints.program_position then 339 | awful.placement.no_overlap(c) 340 | awful.placement.no_offscreen(c) 341 | end 342 | end 343 | end) 344 | 345 | client.add_signal("focus", function(c) c.border_color = beautiful.border_focus end) 346 | client.add_signal("unfocus", function(c) c.border_color = beautiful.border_normal end) 347 | -- }}} 348 | 349 | -------------------------------------------------------------------------------- /dunstrc: -------------------------------------------------------------------------------- 1 | [global] 2 | follow = keyboard 3 | transparency = 20 4 | font = Terminus 10 5 | markup = full 6 | geometry = "300x5-0-20" 7 | 8 | frame_color = "#aaaaaa" 9 | separator_color = frame 10 | 11 | [urgency_low] 12 | background = "#222222" 13 | foreground = "#888888" 14 | timeout = 10 15 | 16 | [urgency_normal] 17 | background = "#285577" 18 | foreground = "#ffffff" 19 | timeout = 10 20 | 21 | [urgency_critical] 22 | background = "#900000" 23 | foreground = "#ffffff" 24 | frame_color = "#ff0000" 25 | timeout = 0 26 | 27 | -------------------------------------------------------------------------------- /i3config: -------------------------------------------------------------------------------- 1 | # This file has been auto-generated by i3-config-wizard(1). 2 | # It will not be overwritten, so edit it as you like. 3 | # 4 | # Should you change your keyboard layout somewhen, delete 5 | # this file and re-run i3-config-wizard(1). 6 | # 7 | 8 | # i3 config file (v4) 9 | # 10 | # Please see http://i3wm.org/docs/userguide.html for a complete reference! 11 | 12 | set $mod Mod4 13 | 14 | # Font for window titles. Will also be used by the bar unless a different font 15 | # is used in the bar {} block below. ISO 10646 = Unicode 16 | font -misc-fixed-medium-r-normal--13-120-75-75-C-70-iso10646-1 17 | # The font above is very space-efficient, that is, it looks good, sharp and 18 | # clear in small sizes. However, if you need a lot of unicode glyphs or 19 | # right-to-left text rendering, you should instead use pango for rendering and 20 | # chose a FreeType font, such as: 21 | # font pango:DejaVu Sans Mono 10 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 38 | 39 | # lock screen 40 | bindsym $mod+Shift+o exec i3lock 41 | 42 | # change focus 43 | bindsym $mod+h focus left 44 | bindsym $mod+j focus down 45 | bindsym $mod+k focus up 46 | bindsym $mod+l focus right 47 | 48 | # alternatively, you can use the cursor keys: 49 | bindsym $mod+Left focus left 50 | bindsym $mod+Down focus down 51 | bindsym $mod+Up focus up 52 | bindsym $mod+Right focus right 53 | 54 | # move focused window 55 | bindsym $mod+Shift+h move left 56 | bindsym $mod+Shift+j move down 57 | bindsym $mod+Shift+k move up 58 | bindsym $mod+Shift+l move right 59 | 60 | # alternatively, you can use the cursor keys: 61 | bindsym $mod+Shift+Left move left 62 | bindsym $mod+Shift+Down move down 63 | bindsym $mod+Shift+Up move up 64 | bindsym $mod+Shift+Right move right 65 | 66 | # split in horizontal orientation 67 | bindsym $mod+Shift+v split h 68 | 69 | # split in vertical orientation 70 | bindsym $mod+v split v 71 | 72 | # enter fullscreen mode for the focused container 73 | bindsym $mod+f fullscreen 74 | 75 | # change container layout (stacked, tabbed, toggle split) 76 | bindsym $mod+s layout stacking 77 | bindsym $mod+w layout tabbed 78 | bindsym $mod+e layout toggle split 79 | 80 | # toggle tiling / floating 81 | bindsym $mod+Shift+space floating toggle 82 | 83 | # change focus between tiling / floating windows 84 | bindsym $mod+space focus mode_toggle 85 | 86 | # focus the parent container 87 | bindsym $mod+a focus parent 88 | 89 | # focus the child container 90 | bindsym $mod+c focus child 91 | 92 | # switch to workspace 93 | bindsym $mod+1 workspace 1 94 | bindsym $mod+2 workspace 2 95 | bindsym $mod+3 workspace 3 96 | bindsym $mod+4 workspace 4 97 | bindsym $mod+5 workspace 5 98 | bindsym $mod+6 workspace 6 99 | bindsym $mod+7 workspace 7 100 | bindsym $mod+8 workspace 8 101 | bindsym $mod+9 workspace 9 102 | bindsym $mod+0 workspace 10 103 | 104 | # move focused container to workspace 105 | bindsym $mod+Shift+1 move container to workspace 1 106 | bindsym $mod+Shift+2 move container to workspace 2 107 | bindsym $mod+Shift+3 move container to workspace 3 108 | bindsym $mod+Shift+4 move container to workspace 4 109 | bindsym $mod+Shift+5 move container to workspace 5 110 | bindsym $mod+Shift+6 move container to workspace 6 111 | bindsym $mod+Shift+7 move container to workspace 7 112 | bindsym $mod+Shift+8 move container to workspace 8 113 | bindsym $mod+Shift+9 move container to workspace 9 114 | bindsym $mod+Shift+0 move container to workspace 10 115 | 116 | # Change keymap 117 | bindsym $mod+i exec "setxkbmap us; notify-send 'Keyboard mapping is now us'" 118 | bindsym $mod+Shift+i exec "setxkbmap us_intl; notify-send 'Keyboard mapping is now us_intl'" 119 | 120 | # reload the configuration file 121 | bindsym $mod+Shift+c reload 122 | # restart i3 inplace (preserves your layout/session, can be used to upgrade i3) 123 | bindsym $mod+Shift+r restart 124 | # exit i3 (logs you out of your X session) 125 | 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'" 126 | 127 | # resize window (you can also use the mouse for that) 128 | mode "resize" { 129 | # These bindings trigger as soon as you enter the resize mode 130 | 131 | # Pressing left will shrink the window’s width. 132 | # Pressing right will grow the window’s width. 133 | # Pressing up will shrink the window’s height. 134 | # Pressing down will grow the window’s height. 135 | bindsym h resize shrink width 10 px or 10 ppt 136 | bindsym j resize grow height 10 px or 10 ppt 137 | bindsym k resize shrink height 10 px or 10 ppt 138 | bindsym l resize grow width 10 px or 10 ppt 139 | 140 | # same bindings, but for the arrow keys 141 | bindsym Left resize shrink width 10 px or 10 ppt 142 | bindsym Down resize grow height 10 px or 10 ppt 143 | bindsym Up resize shrink height 10 px or 10 ppt 144 | bindsym Right resize grow width 10 px or 10 ppt 145 | 146 | # back to normal: Enter or Escape 147 | bindsym Return mode "default" 148 | bindsym Escape mode "default" 149 | } 150 | 151 | bindsym $mod+r mode "resize" 152 | 153 | # Start i3bar to display a workspace bar (plus the system information i3status 154 | # finds out, if available) 155 | bar { 156 | status_command i3status 157 | } 158 | 159 | for_window [class=Key-mon] floating enable, border none 160 | 161 | bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume alsa_output.usb-Creative_Technology_SB_Live__24-bit_External-00.analog-stereo +5% 162 | bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume alsa_output.usb-Creative_Technology_SB_Live__24-bit_External-00.analog-stereo -5% 163 | bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute alsa_output.usb-Creative_Technology_SB_Live__24-bit_External-00.analog-stereo toggle 164 | -------------------------------------------------------------------------------- /ide.kak: -------------------------------------------------------------------------------- 1 | rename-client main 2 | new rename-client docs 3 | new rename-client tools 4 | set global docsclient docs 5 | set global toolsclient tools 6 | set global jumpclient main 7 | 8 | nop %sh{ 9 | if [[ -n $TMUX ]]; then 10 | tmux select-layout tiled 11 | tmux resize-pane -t 0 -y 90 12 | tmux resize-pane -t 1 -x 140 13 | tmux select-pane -t 0 14 | fi 15 | } 16 | 17 | def ide-place-tmux-shell-pane %{ %sh{ 18 | tmux move-pane -s 3 -t 1 19 | tmux resize-pane -t 2 -y 20 20 | tmux select-pane -t 0 21 | } } 22 | -------------------------------------------------------------------------------- /kakrc: -------------------------------------------------------------------------------- 1 | # User preference 2 | # ─────────────── 3 | 4 | set-option global makecmd 'make -j8' 5 | set-option global grepcmd 'ag --column' 6 | set-option global ui_options terminal_status_on_top=true 7 | hook global ModuleLoaded clang %{ set-option global clang_options -std=c++20 } 8 | hook global ModuleLoaded tmux %{ alias global terminal tmux-terminal-vertical } 9 | 10 | colorscheme gruvbox-dark 11 | 12 | add-highlighter global/ show-matching -previous 13 | 14 | set-face global CurSearch +u 15 | 16 | hook global RegisterModified '/' %{ add-highlighter -override global/search regex "%reg{/}" 0:CurSearch } 17 | 18 | hook global WinCreate ^[^*]+$ %{ add-highlighter window/ number-lines -hlcursor } 19 | 20 | # Enable editor config 21 | # ──────────────────── 22 | 23 | hook global BufOpenFile .* %{ editorconfig-load } 24 | hook global BufNewFile .* %{ editorconfig-load } 25 | 26 | # Filetype specific hooks 27 | # ─────────────────────── 28 | 29 | hook global WinSetOption filetype=(c|cpp) %{ 30 | clang-enable-autocomplete 31 | clang-enable-diagnostics 32 | alias window lint clang-parse 33 | alias window lint-next-error clang-diagnostics-next 34 | } 35 | 36 | hook global WinSetOption filetype=python %{ 37 | jedi-enable-autocomplete 38 | lint-enable 39 | set-option global lintcmd 'flake8' 40 | } 41 | 42 | map -docstring "xml tag objet" global object t %{c([\w.]+)\b[^>]*?(?!/)>,/([\w.]+)\b[^>]*?(?!/)>} 43 | 44 | # Highlight the word under the cursor 45 | # ─────────────────────────────────── 46 | 47 | set-face global CurWord +b 48 | 49 | hook global NormalIdle .* %{ 50 | eval -draft %{ try %{ 51 | exec ,w \A\w+\z 52 | add-highlighter -override global/curword regex "\b\Q%val{selection}\E\b" 0:CurWord 53 | } catch %{ 54 | add-highlighter -override global/curword group 55 | } } 56 | } 57 | 58 | # Switch cursor color in insert mode 59 | # ────────────────────────────────── 60 | 61 | set-face global InsertCursor default,green+B 62 | 63 | hook global ModeChange .*:.*:insert %{ 64 | set-face window PrimaryCursor InsertCursor 65 | set-face window PrimaryCursorEol InsertCursor 66 | } 67 | 68 | hook global ModeChange .*:insert:.* %{ try %{ 69 | unset-face window PrimaryCursor 70 | unset-face window PrimaryCursorEol 71 | } } 72 | 73 | # Custom mappings 74 | # ─────────────── 75 | 76 | map global normal = ':prompt math: %{exec "a%val{text}esc>|bcret>"}' 77 | 78 | # System clipboard handling 79 | # ───────────────────────── 80 | 81 | evaluate-commands %sh{ 82 | if [ -n "$SSH_TTY" ]; then 83 | copy='printf "\033]52;;%s\033\\" $(base64 | tr -d "\n") > $( [ -n "$kak_client_pid" ] && echo /proc/$kak_client_pid/fd/0 || echo /dev/tty )' 84 | paste='printf "paste unsupported through ssh"' 85 | backend="OSC 52" 86 | else 87 | case $(uname) in 88 | Linux) 89 | if [ -n "$WAYLAND_DISPLAY" ]; then 90 | copy="wl-copy -p"; paste="wl-paste -p"; backend=Wayland 91 | else 92 | copy="xclip -i"; paste="xclip -o"; backend=X11 93 | fi 94 | ;; 95 | Darwin) copy="pbcopy"; paste="pbpaste"; backend=OSX ;; 96 | esac 97 | fi 98 | 99 | printf "map global user -docstring 'paste (after) from clipboard' p '%s'\n" "$paste" 100 | printf "map global user -docstring 'paste (before) from clipboard' P '!%s'\n" "$paste" 101 | printf "map global user -docstring 'yank to primary' y '%s:echo -markup %%{{Information}copied selection to %s primary}'\n" "$copy" "$backend" 102 | printf "map global user -docstring 'yank to clipboard' Y '%s:echo -markup %%{{Information}copied selection to %s clipboard}'\n" "$copy -selection clipboard" "$backend" 103 | printf "map global user -docstring 'replace from clipboard' R '|%s'\n" "$paste" 104 | printf "define-command -override echo-to-clipboard -params .. %%{ echo -to-shell-script '%s' -- %%arg{@} }" "$copy" 105 | } 106 | 107 | # Various mappings 108 | # ──────────────── 109 | 110 | map global normal '#' :comment-line 111 | 112 | map global user -docstring 'next lint error' n ':lint-next-error' 113 | map global normal :lint 114 | 115 | map global user -docstring 'gdb helper mode' g ':gdb-helper' 116 | map global user -docstring 'gdb helper mode (repeat)' G ':gdb-helper-repeat' 117 | 118 | map global user -docstring 'lsp mode' l ':enter-user-mode lsp' 119 | 120 | hook global -always BufOpenFifo '\*grep\*' %{ map global normal ': grep-next-match' } 121 | hook global -always BufOpenFifo '\*make\*' %{ map global normal ': make-next-error' } 122 | 123 | # Enable / for insert completion selection 124 | # ────────────────────────────────────────────────────── 125 | 126 | hook global InsertCompletionShow .* %{ map window insert ; map window insert } 127 | hook global InsertCompletionHide .* %{ unmap window insert ; unmap window insert } 128 | 129 | # Helper commands 130 | # ─────────────── 131 | 132 | define-command find -params 1 %{ edit %arg{1} } 133 | complete-command -menu find shell-script-candidates %{ ag -g '' --ignore "$kak_opt_ignored_files" } 134 | 135 | define-command mkdir %{ nop %sh{ mkdir -p $(dirname $kak_buffile) } } 136 | 137 | define-command ide -params 0..1 %{ 138 | try %{ rename-session %arg{1} } 139 | 140 | rename-client main 141 | set-option global jumpclient main 142 | 143 | new rename-client tools 144 | set-option global toolsclient tools 145 | 146 | new rename-client docs 147 | set-option global docsclient docs 148 | } 149 | 150 | define-command delete-buffers-matching -params 1 %{ 151 | evaluate-commands -buffer * %{ 152 | evaluate-commands %sh{ case "$kak_buffile" in $1) echo "delete-buffer" ;; esac } 153 | } 154 | } 155 | 156 | declare-option -hidden str swap_buffer_target 157 | define-command swap-buffer-with -override -params 1 -client-completion %{ 158 | set-option global swap_buffer_target %val{bufname} 159 | edit -scratch # release current window for other client 160 | evaluate-commands -client %arg{1} " 161 | set-option global swap_buffer_target %%val{bufname} 162 | buffer %opt{swap_buffer_target} 163 | " 164 | delete-buffer # delete the temporary scratch buffer 165 | buffer %opt{swap_buffer_target} 166 | } 167 | 168 | declare-option int gdb_server_port 5678 169 | declare-option str gdb_server_cmd "gdbserver :%opt{gdb_server_port}" 170 | 171 | define-command gdb-server -params .. %{ 172 | fifo %opt{gdb_server_cmd} %arg{@} 173 | gdb-session-new -ex "target extended-remote :%opt{gdb_server_port}" 174 | } 175 | 176 | 177 | declare-option str to_asm_cmd 'g++ -O3 -x c++' 178 | declare-option str to_asm_prelude ' 179 | #include 180 | ' 181 | declare-option -hidden int to_asm_timestamp 0 182 | 183 | define-command to-asm -params .. -docstring %{ 184 | Compile selected text with using the to_asm_cmd option and display assembly in the *asm* buffer 185 | } %{ 186 | evaluate-commands -save-regs 'ab"|' %{ 187 | execute-keys -save-regs '' y 188 | set-register a %opt{to_asm_prelude} 189 | set-register b %opt{to_asm_cmd} 190 | evaluate-commands -try-client %opt{docsclient} %{ 191 | edit -scratch *asm* 192 | set-option buffer filetype gas 193 | execute-keys \%R"aP% "|%reg{b} %arg{@} -S - -o - 2>&1|c++filt" gg 194 | try %{ execute-keys -draft \%s^\h*\.cfi_xd } 195 | } 196 | } 197 | } 198 | 199 | define-command to-asm-enable -docstring %{ 200 | Automatically run to-asm on the whole buffer after each change 201 | } %{ 202 | remove-hooks window to-asm 203 | hook -group to-asm window NormalIdle .* %{ try %{ 204 | %sh{ [ $kak_opt_to_asm_timestamp -eq $kak_timestamp ] && echo "fail" || echo "nop" } 205 | set buffer to_asm_timestamp %val{timestamp} 206 | evaluate-commands -draft %{ 207 | execute-keys '%' 208 | to-asm 209 | } 210 | } } 211 | } 212 | 213 | define-command diff-buffers -override -params 2 %{ 214 | evaluate-commands %sh{ 215 | file1=$(mktemp) 216 | file2=$(mktemp) 217 | echo " 218 | evaluate-commands -buffer '$1' write -force $file1 219 | evaluate-commands -buffer '$2' write -force $file2 220 | edit! -scratch *diff-buffers* 221 | set buffer filetype diff 222 | set-register | 'diff -u $file1 $file2; rm $file1 $file2' 223 | execute-keys !gg 224 | " 225 | }} 226 | 227 | complete-command diff-buffers buffer 228 | 229 | define-command clang-format-cursor %{ 230 | exec -draft | "clang-format --lines=%val{cursor_line}:%val{cursor_line}" 231 | } 232 | 233 | hook global GlobalSetOption 'makecmd=ninja(-build)?\b.*' %{ complete-command make shell-script-candidates %{ $kak_opt_makecmd -t targets | cut -f 1 -d : } } 234 | hook global GlobalSetOption 'makecmd=bazel\b.*' %{ complete-command make shell-script-candidates %{ bazel query //... } } 235 | 236 | # Mail 237 | # ──── 238 | 239 | hook global BufOpenFile .*/mail/.*/(cur|new|tmp)/[^/]+ %{ set-option buffer filetype mail } 240 | 241 | # Load local Kakoune config file if it exists 242 | # ─────────────────────────────────────────── 243 | 244 | evaluate-commands %sh{ [ -f $kak_config/local.kak ] && echo "source $kak_config/local.kak" } 245 | -------------------------------------------------------------------------------- /octaverc: -------------------------------------------------------------------------------- 1 | function cdf(varargin) 2 | plotargs={}; 3 | for i = 1:length(varargin) 4 | samples=varargin{i}; 5 | name=inputname(i); 6 | if length(name) == 0 7 | name=num2str(i); 8 | endif 9 | samples=sort(samples); 10 | cdf=empirical_cdf(samples, samples); 11 | plotargs{i*3}=samples; 12 | plotargs{i*3+1}=cdf; 13 | plotargs{i*3+2}=["-;" name ";"]; 14 | endfor 15 | plot(plotargs{:}); 16 | ylim([0, 1]); 17 | endfunction 18 | 19 | function samples = read_samples() 20 | [~, values]=system("xclip -o"); 21 | eval(["samples=[", values, "];"]); 22 | endfunction 23 | -------------------------------------------------------------------------------- /scripts/bandcamp-play: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | bandcamp-sort "$1" | xargs -d '\n' mpv --vo=null 3 | -------------------------------------------------------------------------------- /scripts/bandcamp-sort: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | if [ $# -eq 1 ]; then 4 | ( cd "$1"; ls -1 | sort -n -t '-' -k 3 | while read -r line; do echo "$1/$line"; done ) 5 | else 6 | sort -n -t '-' -k 3 7 | fi 8 | -------------------------------------------------------------------------------- /scripts/bandcamp-unpack: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | if [ $# -eq 0 ]; then 4 | echo "usage $0 ..." 5 | exit 0; 6 | fi 7 | 8 | while [ $# -ne 0 ]; do 9 | name=$(basename "$1" .zip) 10 | mkdir "$name" 11 | unzip -d "$name" "$1" 12 | shift 13 | done 14 | -------------------------------------------------------------------------------- /scripts/isolate: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | sox -n -p synth brownnoise | sox -p -d vol 0.3 3 | -------------------------------------------------------------------------------- /statusbar: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | interval=1 4 | fgcol="#838383" 5 | bgcol="#222222" 6 | iconcol="#bfbfbf" 7 | icondir=${HOME}/misc/icons 8 | barheight=8 9 | 10 | icon() { 11 | echo "^fg($iconcol)^i($icondir/$1)^fg()" 12 | } 13 | 14 | update_date() { 15 | current_date="^i($icondir/wclock.xpm) $(date +'%d/%m/%Y %H:%M:%S')" 16 | } 17 | 18 | update_battery() { 19 | local color="#aaaaaa" 20 | 21 | local full=$( 0 ]]; then 66 | mails="$mails $tag($count)" 67 | fi 68 | done 69 | if [[ -z $mails ]]; then mails="none"; fi 70 | mail_state="$(icon envelope.xbm) $mails" 71 | } 72 | 73 | while true; do 74 | update_date 75 | update_battery 76 | update_net 77 | update_cpu 78 | update_mail 79 | 80 | echo $mail_state $cpu_state $net_state $battery_state $current_date 81 | sleep $interval 82 | done | dzen2 -ta r -fg $fgcol -bg $bgcol -w 680 -x 1000 -fn "Terminus:pixelsize=14" 83 | -------------------------------------------------------------------------------- /tmux.conf: -------------------------------------------------------------------------------- 1 | set -sg escape-time 50 2 | 3 | bind-key h select-pane -L 4 | bind-key j select-pane -D 5 | bind-key k select-pane -U 6 | bind-key l select-pane -R 7 | -------------------------------------------------------------------------------- /vimbconfig: -------------------------------------------------------------------------------- 1 | set download-path=~/dl/ 2 | set hint-keys=abcdefghijklmnopqrstuvwxyz 3 | set hint-keys-same-length=true 4 | set hint-timeout=0 5 | set accelerated-2d-canvas=true 6 | set hardware-acceleration-policy=always 7 | set webgl=true 8 | 9 | set editor-command=urxvt -e kak %s 10 | set x-hint-command=:sh! mpv ; 11 | 12 | autocmd LoadStarting http?://web.whatsapp.com/* set user-agent=Mozilla/5.0 (X11; Linux i686; rv:64.0) Gecko/20100101 Firefox/64.0 13 | -------------------------------------------------------------------------------- /vimrc: -------------------------------------------------------------------------------- 1 | set ruler 2 | set expandtab shiftwidth=4 tabstop=4 softtabstop=4 3 | set wildmenu wildmode=longest:full,full 4 | set incsearch nohlsearch 5 | set hidden 6 | set mouse=a 7 | set laststatus=2 8 | 9 | set showcmd 10 | let g:full_name="Maxime Coste" 11 | 12 | set title 13 | set encoding=utf-8 14 | set termencoding=utf-8 15 | 16 | filetype plugin indent on 17 | syntax on 18 | 19 | " use tagjump behaviour by default 20 | nnoremap g 21 | nnoremap g 22 | nnoremap ] g] 23 | 24 | " reload vimrc when modified 25 | autocmd! BufWritePost .vimrc source % 26 | 27 | " C/C++ Options 28 | autocmd FileType c\|cpp setlocal cindent 29 | set cinoptions=:0,g0,(0,w0,Ws 30 | 31 | let g:clang_complete_auto = 0 32 | 33 | function! InsertGuards() 34 | let define = substitute(substitute(expand('%'), "^.*/", "", ""), "[-\\/. ]", "_", "g") . "_INCLUDED" 35 | call append(0, [ "#ifndef " . define, "#define " . define, ]) 36 | call append(line("$"), "#endif // " . define) 37 | if line("$") == 3 38 | call append(2, "") 39 | call cursor(3, 0) 40 | endif 41 | endfunction 42 | 43 | augroup Cpp 44 | autocmd! 45 | autocmd FileType cpp syn keyword cppKeywords2 override sealed offsetof 46 | \ foreach foreachconst foreachitem foreachitemconst 47 | autocmd FileType cpp hi link cppKeywords2 Keyword 48 | autocmd BufNewFile *.{h,hh,hpp} call InsertGuards() 49 | augroup end 50 | 51 | " connect to cscope.out if possible 52 | if filereadable("cscope.out") 53 | cscope add cscope.out 54 | endif 55 | 56 | " Background make 57 | command! -nargs=* BgMake 58 | \ silent execute ":!(make " . "" . " > /tmp/make.output 2>&1;" 59 | \ "notify-send 'make finished' 'make finished') &" | 60 | \ redraw! | 61 | \ cfile /tmp/make.output | copen 62 | 63 | " Mr Proper stuffs 64 | augroup Whitespace 65 | autocmd! 66 | autocmd Syntax * syn match TrailingWhitespace /\s\+$/ 67 | autocmd Syntax * hi link TrailingWhitespace Error 68 | augroup end 69 | 70 | function! FixBlanks() 71 | %s/\s\+$// 72 | retab 73 | endfunction 74 | 75 | command! FixBlanks call FixBlanks() 76 | 77 | " Eugen Systems stuff 78 | augroup Eugen 79 | autocmd! 80 | autocmd VimEnter * if match(getcwd(), "slayer") != -1 | 81 | \set tags+=datatags | 82 | \endif 83 | autocmd VimEnter * if match(getcwd(), "slayer") != -1 | 84 | autocmd BufNewFile *.cpp if match(getcwd(), "slayer") != -1 | 85 | \call append(0, [ "#include \"StdAfx.h\"", "", "#include \"" . fnamemodify(expand('%'), ":t:r") . ".h\"", "", "namespace Eugen", "{", "}" ]) | 86 | \endif 87 | augroup end 88 | 89 | augroup ZippedDocs 90 | autocmd! 91 | autocmd BufReadCmd *.docx,*.xlsx,*.pptx call zip#Browse(expand("")) 92 | autocmd BufReadCmd *.odt,*.ott,*.ods,*.ots,*.odp,*.otp,*.odg,*.otg call zip#Browse(expand("")) 93 | augroup end 94 | 95 | " AutoComplPop 96 | let g:acp_enableAtStartup = 1 97 | let g:acp_ignorecaseOption=0 98 | 99 | " man support 100 | runtime ftplugin/man.vim 101 | nnoremap K :Man 102 | 103 | " alternate 104 | let g:alternateSearchPath = 'sfr:../Sources,sfr:../Headers' 105 | let g:alternateNoDefaultAlternate = 1 106 | let g:alternateRelativeFiles = 1 107 | 108 | colorscheme wombat256 109 | -------------------------------------------------------------------------------- /xmonad.hs: -------------------------------------------------------------------------------- 1 | import XMonad 2 | import XMonad.Util.Run 3 | import XMonad.Hooks.ManageDocks 4 | import XMonad.Hooks.DynamicLog 5 | import XMonad.Layout.NoBorders 6 | import XMonad.Layout.Tabbed 7 | import System.IO 8 | import qualified Data.Map as Map 9 | 10 | myFont = "Terminus:pixelsize=14" 11 | myFocusFGColor = "#ABCDEF" 12 | myFocusBGColor = "#123456" 13 | myNormalFGColor = "#5678AB" 14 | myNormalBGColor = "#222222" 15 | myIconDir = "/home/mawww/misc/icons/" 16 | 17 | dmenuCmd prompt = "dmenu -fa \"" ++ myFont ++ "\" -p \"" ++ prompt ++ 18 | "\" -nf \"" ++ myNormalFGColor ++ "\" -nb \"" ++ myNormalBGColor ++ 19 | "\" -sf \"" ++ myFocusFGColor ++ "\" -sb \"" ++ myFocusBGColor ++ "\"" 20 | 21 | 22 | main = do 23 | dzenPipe <- spawnPipe myStatusBar 24 | xmonad $ defaultConfig 25 | { borderWidth = 1 26 | , terminal = "urxvt" 27 | , normalBorderColor = myNormalBGColor 28 | , focusedBorderColor = myFocusBGColor 29 | , modMask = mod4Mask 30 | , workspaces = ["web", "dev", "tmp", "bg"] 31 | , manageHook = manageDocks <+> manageHook defaultConfig 32 | , layoutHook = smartBorders $ avoidStruts $ layoutHook defaultConfig ||| tabbed shrinkText myTabConfig 33 | , logHook = dynamicLogWithPP $ myDzenPP dzenPipe 34 | , keys = newKeys 35 | } 36 | 37 | myStatusBar = "dzen2 -x 0 -y 0 -h 16 -w 1000 -ta l -fg '" ++ myNormalFGColor ++ 38 | "' -bg '" ++ myNormalBGColor ++ "' -fn '" ++ myFont ++ "'" 39 | 40 | colors fg bg = "^fg(" ++ fg ++ ")^bg(" ++ bg ++ ")" 41 | endcolors = "^fg()^bg()^p()" 42 | icon name = "^i(" ++ myIconDir ++ "/" ++ name ++ ")" 43 | 44 | myDzenPP h = defaultPP 45 | { ppCurrent = wrap (colors myFocusFGColor myFocusBGColor ++ "^p() ") (" " ++ endcolors) . \wsId -> dropIx wsId 46 | , ppVisible = wrap (colors myFocusFGColor myFocusBGColor ++ "^p() ") (" " ++ endcolors) . \wsId -> dropIx wsId 47 | , ppHidden = wrap (colors myNormalFGColor myNormalBGColor ++ "^p() ") (" " ++ endcolors) . \wsId -> dropIx wsId 48 | , ppSep = " " 49 | , ppWsSep = " " 50 | , ppTitle = dzenColor myFocusFGColor "" 51 | , ppLayout = dzenColor myNormalFGColor "" . 52 | (\x -> case x of 53 | "Tall" -> icon "tall.xbm" 54 | "Mirror Tall" -> icon "mtall.xbm" 55 | "Full" -> icon "full.xbm" 56 | "Tabbed Simplest" -> icon "tabbed.xbm" 57 | _ -> x 58 | ) 59 | , ppOutput = hPutStrLn h 60 | } 61 | where 62 | dropIx wsId = if (':' `elem` wsId) then drop 2 wsId else wsId 63 | 64 | myTabConfig = defaultTheme 65 | { activeColor = myFocusBGColor 66 | , activeBorderColor = myFocusBGColor 67 | , activeTextColor = myFocusFGColor 68 | , inactiveColor = myNormalBGColor 69 | , inactiveBorderColor = myNormalBGColor 70 | , inactiveTextColor = myNormalFGColor 71 | , urgentColor = myNormalBGColor 72 | , urgentBorderColor = myNormalBGColor 73 | , urgentTextColor = myNormalFGColor 74 | , fontName = myFont 75 | , decoHeight = 16 76 | } 77 | 78 | newKeys x = Map.union (Map.fromList (myKeys x)) (keys defaultConfig x) 79 | 80 | myKeys conf@(XConfig {XMonad.modMask = modm }) = 81 | [ ((modm .|. shiftMask, xK_p), spawn ("exe=`dmenu_path | " ++ dmenuCmd "terminal launch:" ++ "` && urxvt -e \"$exe\"")) 82 | , ((modm , xK_p), spawn ("exe=`dmenu_path | " ++ dmenuCmd "launch:"++ "` && $exe")) ] 83 | -------------------------------------------------------------------------------- /zshrc: -------------------------------------------------------------------------------- 1 | # History 2 | HISTFILE=~/.histfile 3 | HISTSIZE=1000 4 | SAVEHIST=1000 5 | 6 | setopt hist_ignore_all_dups 7 | 8 | # Vi keybindings 9 | bindkey -v 10 | bindkey -M viins '^r' history-incremental-search-backward 11 | bindkey -M vicmd '^r' history-incremental-search-backward 12 | 13 | # Completion 14 | zstyle :compinstall filename '/home/mawww/.zshrc' 15 | 16 | autoload -Uz compinit 17 | compinit 18 | 19 | zstyle ':completion:*' menu select=2 20 | eval "$(dircolors -b)" 21 | zstyle ':completion:*' list-colors ${(s.:.)LS_COLORS} 22 | 23 | setopt extendedglob 24 | unsetopt no_match 25 | 26 | # Prompt 27 | autoload -U promptinit 28 | promptinit 29 | setopt prompt_subst 30 | 31 | export PS1="%F{green}%n@%m%F{cyan}(%l) %F{blue}%~ %F{grey} 32 | >>> " 33 | 34 | # Paths 35 | export PATH="${HOME}/local/bin:${PATH}" 36 | export MANPATH="${HOME}/local/share/man:${MANPATH}" 37 | export LD_LIBRARY_PATH="${HOME}/local/lib:${LD_LIBRARY_PATH}" 38 | export PYTHONPATH="${HOME}/local/lib/python:${PYTHONPATH}" 39 | 40 | # Kakoune! 41 | export EDITOR=kak 42 | 43 | # Aliases 44 | alias ls="ls --color=auto" 45 | 46 | alias -s -- pdf=zathura 47 | alias -s -- git='git clone' 48 | 49 | source ~/.zshrc_local 50 | 51 | # OPAM configuration 52 | . /home/mawww/.opam/opam-init/init.zsh > /dev/null 2> /dev/null || true 53 | --------------------------------------------------------------------------------