This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
echo $1 > /tmp/i3mode-$DISPLAY | |
exec i3-msg mode $1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ~/.config/i3/config | |
# startup scripts | |
exec --no-startup-id ~/.config/i3/rc | |
# use super as mod | |
set $mod Mod4 | |
# font (window titles, never seen) | |
font pango:DejaVu Sans 10 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# set i3 to default mode, creates /tmp/i3mode-$DISPLAY if neccessary | |
i3mode default | |
# enable xautolock if disabled, creates /tmp/xlmode-$DISPLAY if neccessary | |
xlmode enable -quiet | |
# do autostart (needs dex to run .desktop files) | |
if test -d /etc/xdg/autostart; then | |
shopt -s nullglob |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# calculate workspace indicators (needs jshon) | |
workspaces() { | |
wtext=('%{F#174652}' '%{F#174652}' '%{F#174652}' '%{F#174652}' '%{F#174652}' '%{F#174652}' '%{F#174652}' '%{F#174652}' '%{F#174652}' '%{F#174652}') | |
wjson=$(jshon -a -j) | |
for w in $wjson; do | |
vars=($(echo $w | jshon -e num -u -p -e urgent -u -p -e focused -u -p -e visible -u)) | |
num=$((${vars[0]} - 1)) | |
if [[ ${vars[1]} == 'true' ]]; then |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
xlenable() { | |
echo enabled > /tmp/xlmode-$DISPLAY | |
[[ "$1" != "-quiet" ]] && notify-send "xautolock" "Automatic locking enabled" | |
xautolock -enable | |
} | |
xldisable() { | |
echo disabled > /tmp/xlmode-$DISPLAY |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>Name Slider Thingy</title> | |
<style type="text/css"> | |
#name { | |
margin-left: 1em; | |
} | |
.content { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# check usage | |
if [[ $# -eq 0 ]]; then | |
echo "usage: cmacro [headers..] MACRO" >&2 | |
exit 1 | |
fi | |
# generate temporary file | |
f=$(mktemp --suffix=.c) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
CC=${CC:-gcc} | |
# check usage | |
if [[ $# -eq 0 ]]; then | |
echo "usage: cenum [headers..] ENUM" >&2 | |
exit 1 | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bits 64 | |
org 0x0 | |
ehdr: | |
db 0x7f, "ELF" ; e_ident[0:4] = ELFMAG | |
db 2 ; e_ident[4] = ELFCLASS64 | |
db 1 ; e_ident[5] = ELFDATA2LSB | |
db 1 ; e_ident[6] = EV_CURRENT | |
db 0 ; e_ident[7] = ELFOSABI_SYSV | |
db 0 ; e_ident[8] = EI_ABIVERSION |
OlderNewer