Skip to content

Instantly share code, notes, and snippets.

@windelicato
windelicato / docker-mysql-import
Last active February 27, 2020 20:19
Helper for importing SQL dumps into mysql server running in Docker containers
#!/bin/bash
# NAME
#
# docker-mysql-import
#
# DESCRIPTION
#
# Helper for importing SQL dumps into mysql server running in Docker containers.
#
! █▓▒░ mikado colors
urxvt*foreground: #f3f3f3
urxvt*background: #121212
urxvt*cursorColor: #f3f3f3
urxvt*color0: #322a2c
urxvt*color8: #46423b
urxvt*color1: #a04363
urxvt*color9: #ae837a
urxvt*color2: #9b9329
urxvt*color10: #b4aa30
@windelicato
windelicato / bspwm_resize.sh
Last active July 14, 2021 18:05
Use the same keybindings to move / resize tiled + pseudotiled + floating windows in BSPWM
#!/bin/bash
# Sample sxhkd usage:
#
# alt + {a,f}
# /home/sunn/scripts/bspwm_resize {-p,-n} -x -s 20
#
# alt + {s,d}
# /home/sunn/scripts/bspwm_resize {-p,-n} -y -s 20
#!/bin/bash
POSITIVE=false
HORIZONTAL=false
SIZE='20'
err() {
echo "$1"
exit 1
}
NoGrabServer
RestartPreviousState
DecorateTransients
TitleFont "-*-drift-medium-r-normal-*-*-*-*-*-*-*-*-*"
ResizeFont "-*-drift-medium-r-normal-*-*-*-*-*-*-*-*-*"
MenuFont "-*-drift-medium-r-normal-*-*-*-*-*-*-*-*-*"
IconFont "-*-drift-medium-r-normal-*-*-*-*-*-*-*-*-*"
IconManagerFont "-*-drift-medium-r-normal-*-*-*-*-*-*-*-*-*"
#TitleFont "-*-tamsyn-medium-r-normal-*-*-87-*-*-*-*-*-*"
#ResizeFont "-*-tamsyn-medium-r-normal-*-*-87-*-*-*-*-*-*"

There are a few ways to debug this. First, a blank screen is good. That means bspwm is running.

I would confirm that you're xinitrc looks something like

sxhkd &
exec bspwm

The ampersand is important. Next, try spawning a terminal in your xinitrc to see if its getting positioned properly. It should appear somewhat "centered" on the screen. To do this, use this .xinitrc:

sxhkd &
alignment top_left
background yes
border_width 1
cpu_avg_samples 2
default_color 9a875f
default_outline_color white
default_shade_color white
draw_borders no
draw_graph_borders no
draw_outline no
@windelicato
windelicato / ~\.config\bspwm\rules
Created November 7, 2013 02:45
rulec / ruled replacement
#!/bin/bash
readarray -t PROPS < <(xwinfo -its $1)
INST=${PROPS[0]}
TYPE=${PROPS[1]}
STATE=(${PROPS[2]})
RULE=()
# Sane defaults
#
# buffers.conf -- weechat v0.4.2
#
[color]
current_bg = default
current_fg = default
default_bg = default
default_fg = black
hotlist_highlight_bg = default
URxvt.keysym.C-7: command:\033]710;-*-uushi-medium-r-normal-*-*-*-*-*-*-*-*-*\007\033]711;-*-uushi-medium-r-normal-*-*-*-*-*-*-*-*-*\007
URxvt.keysym.C-8: command:\033]710;-*-gohufontmod11-medium-r-normal-*-*-*-*-*-*-*-*-*\007\033]711;-*-gohufontmod-medium-r-normal-*-*-*-*-*-*-*-*-*\007
URxvt.keysym.C-9: command:\033]710;-*-limey-*-*-*-*-*-*-*-*-*-*-*-*\007\033]711;-*-limey-*-*-*-*-*-*-*-*-*-*-*-*\007
URxvt.keysym.C-0: command:\033]710;-*-lemon-*-*-*-*-*-*-*-*-*-*-*-*\007\033]711;-*-lemon-*-*-*-*-*-*-*-*-*-*-*-*\007
URxvt.keysym.C-minus: command:\033]710;-*-tewi-medium-r-normal-*-*-*-*-*-*-*-*-*\007\033]711;-*-tewi-medium-r-normal-*-*-*-*-*-*-*-*-*\007
URxvt.keysym.C-equal: command:\033]710;xft:inconsolata:size=8\007\033]711;xft:inconsolata:size=8\007