Skip to the relevant sections if needed.
This file contains hidden or 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/zsh | |
ws1= # main | |
ws2= # web | |
ws3= # mail | |
ws4= # code | |
ws5= # math [infinity] (term icon) | |
ws6= # media | |
ws7= # misc (9 squares icon) | |
ws8= # notes/docs (pdf icon) |
This file contains hidden or 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
(EE) Backtrace: | |
(EE) 0: /usr/bin/X (xorg_backtrace+0x4e) [0x55ace80e168e] | |
(EE) 1: /usr/bin/X (mieqEnqueue+0x253) [0x55ace80c3373] | |
(EE) 2: /usr/bin/X (QueuePointerEvents+0x52) [0x55ace7f9d152] | |
(EE) 3: /usr/lib/xorg/modules/input/evdev_drv.so (0x7f8f1747a000+0x60a7) [0x7f8f174800a7] | |
(EE) 4: /usr/lib/xorg/modules/input/evdev_drv.so (0x7f8f1747a000+0x687d) [0x7f8f1748087d] | |
(EE) 5: /usr/bin/X (0x55ace7f2d000+0x96ac8) [0x55ace7fc3ac8] | |
(EE) 6: /usr/bin/X (0x55ace7f2d000+0xbfc92) [0x55ace7fecc92] | |
(EE) 7: /lib/x86_64-linux-gnu/libc.so.6 (0x7f8f20a53000+0x352f0) [0x7f8f20a882f0] | |
(EE) 8: /lib/x86_64-linux-gnu/libc.so.6 (ioctl+0x7) [0x7f8f20b50067] |
This file contains hidden or 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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <errno.h> | |
#include <sys/sysctl.h> | |
#include <inttypes.h> | |
bool device_enabled(char *); | |
char *find_device(void); | |
int get_brightness(char *); |
This file contains hidden or 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
shopt -s checkwinsize 2>/dev/null | |
_cmd_status() { | |
if [ $? -eq 0 ]; then | |
printf '\001[0;32m\002✔' | |
else | |
printf '\001[0;31m\002✘' | |
fi | |
} |
This file contains hidden or 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
# | |
# Tools -> Build System -> New Build System | |
# Paste the snippet below in the file that opens | |
# Save as "Maven.sublime-build" in ~/.config/sublime-text-3/Packages/User | |
# Ctrl+Shift+P will show all maven commands in snippet below if you start to type "Maven" | |
# Open a pom.xml file and execute a command | |
# | |
{ | |
"working_dir": "$file_path", | |
"shell_cmd":"mvn clean install", |
This file contains hidden or 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
#include <algorithm> | |
#include <iostream> | |
#include <vector> | |
#include <cstdio> | |
#include <cassert> | |
using namespace std; | |
typedef double ElementType; | |
typedef vector<vector<ElementType>> matrix; |
This file contains hidden or 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
# My tmux configuration, partly based on https://github.com/wbkang/wbk-stow/blob/master/tmux-config/.tmux.conf | |
# Scroll History | |
set -g history-limit 50000 | |
# show messages for 4 seconds instead | |
set -g display-time 4000 | |
# set first window to index 1 (not 0) to map more to the keyboard layout | |
set-option -g renumber-windows on |
This file contains hidden or 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
[0;37;40m | |
[1;34;40m [0;37;40m [1;34;40m [0;37;40m [1;34;40m [0;37;40m [1;37;40m###[0;37;40m [1;34;40m###[0;37;40m [1;37;40m##[0;37;40m | |
[1;34;40m [0;37;40m [1;34;40m [0;37;40m [1;37;40m##[0;37;40m [1;34;40m##[0;37;40m | |
[1;34;40m┌ #### [1;37;40m###[0;37;40m [1;37;40m###[0;37;40m [1;34;40m [0;37;40m [1;37;40m####[0;37;40m [1;34;40m [0;37;40m [1;37;40m##[0;37;40m [1;37;40m###[0;37;40m [1;34;40m##[0;37;40m [1;37;40m### ###[0;37;40m [1;37;40m###[0;37;40m [1;37;40m###[0;37;40m [1;37;40m###[0;37;40m [1;31;40m ###[0;37;40m [1;31;40m###[0;37;40m | |
[1;34;40m│ [0;37;40m [1;34;40m## [0;37;40m [1;37;40m###[0;37;40m [1;37;40m##[1;34;40m [0;37;40m [1;37;40m##[0;37;40m [1;34;40m [0;37;40m [1;37;40m###[0;37;40m [1;31;40m [1;37; |
- macOS 10.15.5
- tmux 3.1b
macOS has ncurses version 5.7 which does not ship the terminfo description for tmux. There're two ways that can help you to solve this problem.
Instead of tmux-256color
, use screen-256color
which comes with system. Place this command into ~/.tmux.conf
or ~/.config/tmux/tmux.conf
(for version 3.1 and later):