├── .config ├── abook │ └── abookrc ├── dmenu │ ├── LICENSE │ ├── Makefile │ ├── README │ ├── arg.h │ ├── config.h │ ├── config.mk │ ├── dmenu.1 │ ├── dmenu.c │ ├── dmenu_path │ ├── dmenu_run │ ├── drw.c │ ├── drw.h │ ├── patches │ │ └── xresources.diff │ ├── stest.1 │ ├── stest.c │ ├── util.c │ └── util.h ├── dunst │ └── dunstrc ├── dwm │ ├── LICENSE │ ├── Makefile │ ├── README │ ├── config.h │ ├── config.mk │ ├── drw.c │ ├── drw.h │ ├── dwm.1 │ ├── dwm.c │ ├── dwm.png │ ├── patches │ │ ├── center.diff │ │ ├── fullgaps.diff │ │ ├── noborder.diff │ │ └── xrdb.diff │ ├── transient.c │ ├── util.c │ └── util.h ├── fontconfig │ └── fonts.conf ├── gdb │ └── gdbinit ├── irssi │ └── config ├── mimeapps.list ├── mpd │ └── mpd.conf ├── mpv │ ├── input.conf │ └── mpv.conf ├── ncmpcpp │ ├── bindings │ └── config ├── newsboat │ ├── config │ └── urls ├── nvim │ ├── init.vim │ └── pack │ │ └── plugins │ │ └── start │ │ └── iceberg │ │ └── colors │ │ └── iceberg.vim ├── picom.conf ├── slock │ ├── LICENSE │ ├── Makefile │ ├── README │ ├── arg.h │ ├── config.h │ ├── config.mk │ ├── explicit_bzero.c │ ├── patches │ │ ├── terminalkeys.diff │ │ └── xresources.diff │ ├── slock.1 │ ├── slock.c │ └── util.h ├── st │ ├── FAQ │ ├── LEGACY │ ├── LICENSE │ ├── Makefile │ ├── README │ ├── TODO │ ├── arg.h │ ├── config.h │ ├── config.mk │ ├── patches │ │ ├── scrollback-mouse-altscreen.diff │ │ ├── scrollback-mouse.diff │ │ ├── scrollback.diff │ │ └── xresources.diff │ ├── st.1 │ ├── st.c │ ├── st.h │ ├── st.info │ ├── win.h │ └── x.c ├── surf │ ├── FAQ.md │ ├── LICENSE │ ├── Makefile │ ├── README │ ├── TODO.md │ ├── arg.h │ ├── config.h │ ├── config.mk │ ├── surf-open.sh │ ├── surf.1 │ ├── surf.c │ └── surf.png ├── sxiv │ └── exec │ │ ├── image-info │ │ └── key-handler ├── tabbed │ ├── LICENSE │ ├── Makefile │ ├── README │ ├── TODO │ ├── arg.h │ ├── config.h │ ├── config.mk │ ├── patches │ │ ├── autohide.diff │ │ └── xft.diff │ ├── tabbed.1 │ └── tabbed.c ├── tmux │ └── tmux.conf ├── user-dirs.dirs ├── vifm │ ├── colors │ │ └── iceberg.vifm │ └── vifmrc ├── wget │ └── wgetrc ├── xrdb │ └── Xdefaults ├── zathura │ └── zathurarc └── zsh │ ├── .zprofile │ ├── .zshenv │ ├── .zshrc │ └── sc ├── .gitconfig ├── .gitmodules ├── .local ├── bin │ ├── 0x0 │ ├── battery │ ├── blaze │ ├── cronbat │ ├── crontog │ ├── del │ ├── dots │ ├── dunst │ ├── dwmbar │ ├── fet.sh │ ├── fmenu │ ├── fzf │ ├── fzf-tmux │ ├── imgt │ ├── irc │ ├── keybacklight │ ├── killmen │ ├── launch │ ├── linkhandler │ ├── manmen │ ├── menu │ ├── menuhandler │ ├── menupass │ ├── mnt │ ├── notlight │ ├── nottop │ ├── notvol │ ├── pager │ ├── passmenu2 │ ├── powermenu │ ├── preview │ ├── prompt │ ├── remaps │ ├── rss │ ├── rssadd │ ├── rssup │ ├── samedir │ ├── screenshot │ ├── search │ ├── serv │ ├── setbg │ ├── setw │ ├── shortcuts │ ├── showclip │ ├── showcolors │ ├── status │ ├── surf-open.sh │ ├── sysinfo │ ├── theme │ ├── torradd │ ├── ttycol │ ├── umnt │ ├── unix │ ├── viless │ ├── viman │ ├── vol │ ├── wmap │ └── xgetres └── share │ ├── TelegramDesktop │ ├── Iceberg.tdesktop-theme │ └── tdata │ │ └── shortcuts-custom.json │ ├── applications │ ├── file.desktop │ ├── img.desktop │ ├── linkhandler.desktop │ ├── mail.desktop │ ├── pdf.desktop │ ├── rss.desktop │ ├── text.desktop │ └── torrent.desktop │ ├── dots │ ├── crontab │ ├── crypttab │ ├── fstab │ ├── issue │ ├── sudoers.bee │ └── sudoers.woodo │ ├── fonts │ ├── Hack │ │ ├── Hack Bold Italic Nerd Font Complete Mono.ttf │ │ ├── Hack Bold Italic Nerd Font Complete.ttf │ │ ├── Hack Bold Nerd Font Complete Mono.ttf │ │ ├── Hack Bold Nerd Font Complete.ttf │ │ ├── Hack Italic Nerd Font Complete Mono.ttf │ │ ├── Hack Italic Nerd Font Complete.ttf │ │ ├── Hack Regular Nerd Font Complete Mono.ttf │ │ └── Hack Regular Nerd Font Complete.ttf │ └── Terminus │ │ ├── fonts.dir │ │ ├── fonts.scale │ │ ├── ter-u12b.bdf │ │ ├── ter-u12n.bdf │ │ ├── ter-u14b.bdf │ │ ├── ter-u14n.bdf │ │ ├── ter-u14v.bdf │ │ ├── ter-u16b.bdf │ │ ├── ter-u16n.bdf │ │ ├── ter-u16v.bdf │ │ ├── ter-u18b.bdf │ │ ├── ter-u18n.bdf │ │ ├── ter-u20b.bdf │ │ ├── ter-u20n.bdf │ │ ├── ter-u22b.bdf │ │ ├── ter-u22n.bdf │ │ ├── ter-u24b.bdf │ │ ├── ter-u24n.bdf │ │ ├── ter-u28b.bdf │ │ ├── ter-u28n.bdf │ │ ├── ter-u32b.bdf │ │ └── ter-u32n.bdf │ ├── gnupg │ └── gpg-agent.conf │ └── startpage │ ├── index.html │ └── style.css ├── .w3m ├── cgi-bin │ ├── magnet.cgi │ ├── surfraw.cgi │ └── surfraw.sh ├── config ├── keymap └── urimethodmap ├── .xinitrc ├── .zshenv ├── INSTALL.md ├── LICENSE ├── README.md └── pix ├── prev ├── 01-dark.png ├── 01-light.png ├── 02-dark.png ├── 02-light.png ├── 03-dark.png ├── 03-light.png └── prev.png └── wall ├── dark ├── iceberg.jpg ├── keyboard.jpg └── space.jpg └── light ├── anime-outside-girl-car.png ├── keyboard.jpg └── minimalistic.png /.config/abook/abookrc: -------------------------------------------------------------------------------- 1 | # ██ ██ 2 | # ░██ ░██ 3 | # ██████ ░██ ██████ ██████ ░██ ██ 4 | # ░░░░░░██ ░██████ ██░░░░██ ██░░░░██░██ ██ 5 | # ███████ ░██░░░██░██ ░██░██ ░██░████ 6 | # ██░░░░██ ░██ ░██░██ ░██░██ ░██░██░██ 7 | # ░░████████░██████ ░░██████ ░░██████ ░██░░██ 8 | # ░░░░░░░░ ░░░░░ ░░░░░░ ░░░░░░ ░░ ░░ 9 | 10 | # Automatically save database on exit 11 | set autosave=true 12 | 13 | # Show all email addresses in list 14 | set show_all_emails=true 15 | 16 | # frequently used values: 17 | # -1 disabled 18 | # phone Home Phone 19 | # workphone Work Phone 20 | # fax Fax 21 | # mobile Mobile Phone 22 | # nick Nickname/Alias 23 | # url URL 24 | 25 | # Command used to start mutt 26 | set mutt_command=neomutt 27 | 28 | # Command used to print 29 | set print_command=lpr 30 | 31 | # Command used to start the web browser 32 | set www_command=w3m 33 | 34 | # address style [eu|us|uk] 35 | set address_style=eu 36 | 37 | # use ASCII characters only 38 | set use_ascii_only=false 39 | 40 | # Prevent double entry 41 | set add_email_prevent_duplicates=false 42 | 43 | # field to be used with "sort by field" command 44 | set sort_field=nick 45 | 46 | # show cursor in main display 47 | set show_cursor=false 48 | 49 | set index_format=" {name:30} {mobile:20} {workphone:20} {email:35}" 50 | -------------------------------------------------------------------------------- /.config/dmenu/LICENSE: -------------------------------------------------------------------------------- 1 | MIT/X Consortium License 2 | 3 | © 2006-2019 Anselm R Garbe 4 | © 2006-2008 Sander van Dijk 5 | © 2006-2007 Michał Janeczek 6 | © 2007 Kris Maglione 7 | © 2009 Gottox 8 | © 2009 Markus Schnalke 9 | © 2009 Evan Gates 10 | © 2010-2012 Connor Lane Smith 11 | © 2014-2020 Hiltjo Posthuma 12 | © 2015-2019 Quentin Rameau 13 | 14 | Permission is hereby granted, free of charge, to any person obtaining a 15 | copy of this software and associated documentation files (the "Software"), 16 | to deal in the Software without restriction, including without limitation 17 | the rights to use, copy, modify, merge, publish, distribute, sublicense, 18 | and/or sell copies of the Software, and to permit persons to whom the 19 | Software is furnished to do so, subject to the following conditions: 20 | 21 | The above copyright notice and this permission notice shall be included in 22 | all copies or substantial portions of the Software. 23 | 24 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 25 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 26 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 27 | THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 28 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 29 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 30 | DEALINGS IN THE SOFTWARE. 31 | -------------------------------------------------------------------------------- /.config/dmenu/Makefile: -------------------------------------------------------------------------------- 1 | # dmenu - dynamic menu 2 | # See LICENSE file for copyright and license details. 3 | 4 | include config.mk 5 | 6 | SRC = drw.c dmenu.c stest.c util.c 7 | OBJ = $(SRC:.c=.o) 8 | 9 | all: options dmenu stest 10 | 11 | options: 12 | @echo dmenu build options: 13 | @echo "CFLAGS = $(CFLAGS)" 14 | @echo "LDFLAGS = $(LDFLAGS)" 15 | @echo "CC = $(CC)" 16 | 17 | .c.o: 18 | $(CC) -c $(CFLAGS) $< 19 | 20 | config.h: 21 | cp config.def.h $@ 22 | 23 | $(OBJ): arg.h config.h config.mk drw.h 24 | 25 | dmenu: dmenu.o drw.o util.o 26 | $(CC) -o $@ dmenu.o drw.o util.o $(LDFLAGS) 27 | 28 | stest: stest.o 29 | $(CC) -o $@ stest.o $(LDFLAGS) 30 | 31 | clean: 32 | rm -f dmenu stest $(OBJ) dmenu-$(VERSION).tar.gz 33 | 34 | dist: clean 35 | mkdir -p dmenu-$(VERSION) 36 | cp LICENSE Makefile README arg.h config.def.h config.mk dmenu.1\ 37 | drw.h util.h dmenu_path dmenu_run stest.1 $(SRC)\ 38 | dmenu-$(VERSION) 39 | tar -cf dmenu-$(VERSION).tar dmenu-$(VERSION) 40 | gzip dmenu-$(VERSION).tar 41 | rm -rf dmenu-$(VERSION) 42 | 43 | install: all 44 | mkdir -p $(DESTDIR)$(PREFIX)/bin 45 | cp -f dmenu dmenu_path dmenu_run stest $(DESTDIR)$(PREFIX)/bin 46 | chmod 755 $(DESTDIR)$(PREFIX)/bin/dmenu 47 | chmod 755 $(DESTDIR)$(PREFIX)/bin/dmenu_path 48 | chmod 755 $(DESTDIR)$(PREFIX)/bin/dmenu_run 49 | chmod 755 $(DESTDIR)$(PREFIX)/bin/stest 50 | mkdir -p $(DESTDIR)$(MANPREFIX)/man1 51 | sed "s/VERSION/$(VERSION)/g" < dmenu.1 > $(DESTDIR)$(MANPREFIX)/man1/dmenu.1 52 | sed "s/VERSION/$(VERSION)/g" < stest.1 > $(DESTDIR)$(MANPREFIX)/man1/stest.1 53 | chmod 644 $(DESTDIR)$(MANPREFIX)/man1/dmenu.1 54 | chmod 644 $(DESTDIR)$(MANPREFIX)/man1/stest.1 55 | 56 | uninstall: 57 | rm -f $(DESTDIR)$(PREFIX)/bin/dmenu\ 58 | $(DESTDIR)$(PREFIX)/bin/dmenu_path\ 59 | $(DESTDIR)$(PREFIX)/bin/dmenu_run\ 60 | $(DESTDIR)$(PREFIX)/bin/stest\ 61 | $(DESTDIR)$(MANPREFIX)/man1/dmenu.1\ 62 | $(DESTDIR)$(MANPREFIX)/man1/stest.1 63 | 64 | .PHONY: all options clean dist install uninstall 65 | -------------------------------------------------------------------------------- /.config/dmenu/README: -------------------------------------------------------------------------------- 1 | dmenu - dynamic menu 2 | ==================== 3 | dmenu is an efficient dynamic menu for X. 4 | 5 | 6 | Requirements 7 | ------------ 8 | In order to build dmenu you need the Xlib header files. 9 | 10 | 11 | Installation 12 | ------------ 13 | Edit config.mk to match your local setup (dmenu is installed into 14 | the /usr/local namespace by default). 15 | 16 | Afterwards enter the following command to build and install dmenu 17 | (if necessary as root): 18 | 19 | make clean install 20 | 21 | 22 | Running dmenu 23 | ------------- 24 | See the man page for details. 25 | -------------------------------------------------------------------------------- /.config/dmenu/arg.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copy me if you can. 3 | * by 20h 4 | */ 5 | 6 | #ifndef ARG_H__ 7 | #define ARG_H__ 8 | 9 | extern char *argv0; 10 | 11 | /* use main(int argc, char *argv[]) */ 12 | #define ARGBEGIN for (argv0 = *argv, argv++, argc--;\ 13 | argv[0] && argv[0][0] == '-'\ 14 | && argv[0][1];\ 15 | argc--, argv++) {\ 16 | char argc_;\ 17 | char **argv_;\ 18 | int brk_;\ 19 | if (argv[0][1] == '-' && argv[0][2] == '\0') {\ 20 | argv++;\ 21 | argc--;\ 22 | break;\ 23 | }\ 24 | for (brk_ = 0, argv[0]++, argv_ = argv;\ 25 | argv[0][0] && !brk_;\ 26 | argv[0]++) {\ 27 | if (argv_ != argv)\ 28 | break;\ 29 | argc_ = argv[0][0];\ 30 | switch (argc_) 31 | 32 | #define ARGEND }\ 33 | } 34 | 35 | #define ARGC() argc_ 36 | 37 | #define EARGF(x) ((argv[0][1] == '\0' && argv[1] == NULL)?\ 38 | ((x), abort(), (char *)0) :\ 39 | (brk_ = 1, (argv[0][1] != '\0')?\ 40 | (&argv[0][1]) :\ 41 | (argc--, argv++, argv[0]))) 42 | 43 | #define ARGF() ((argv[0][1] == '\0' && argv[1] == NULL)?\ 44 | (char *)0 :\ 45 | (brk_ = 1, (argv[0][1] != '\0')?\ 46 | (&argv[0][1]) :\ 47 | (argc--, argv++, argv[0]))) 48 | 49 | #endif 50 | -------------------------------------------------------------------------------- /.config/dmenu/config.h: -------------------------------------------------------------------------------- 1 | /* See LICENSE file for copyright and license details. */ 2 | /* Default settings; can be overriden by command line. */ 3 | 4 | static int topbar = 1; /* -b option; if 0, dmenu appears at bottom */ 5 | /* -fn option overrides fonts[0]; default X11 font or font set */ 6 | static const char *fonts[] = { 7 | "monospace:size=10" 8 | }; 9 | static const char *prompt = NULL; /* -p option; prompt to the left of input field */ 10 | static const char *colors[SchemeLast][2] = { 11 | /* fg bg */ 12 | [SchemeNorm] = { "#bbbbbb", "#222222" }, 13 | [SchemeSel] = { "#eeeeee", "#005577" }, 14 | [SchemeOut] = { "#000000", "#00ffff" }, 15 | }; 16 | /* -l option; if nonzero, dmenu uses vertical list with given number of lines */ 17 | static unsigned int lines = 0; 18 | 19 | /* 20 | * Characters not considered part of a word while deleting words 21 | * for example: " /?\"&[]" 22 | */ 23 | static const char worddelimiters[] = " "; 24 | -------------------------------------------------------------------------------- /.config/dmenu/config.mk: -------------------------------------------------------------------------------- 1 | # dmenu version 2 | VERSION = 5.0 3 | 4 | # paths 5 | PREFIX = /usr/local 6 | MANPREFIX = $(PREFIX)/share/man 7 | 8 | X11INC = /usr/X11R6/include 9 | X11LIB = /usr/X11R6/lib 10 | 11 | # Xinerama, comment if you don't want it 12 | XINERAMALIBS = -lXinerama 13 | XINERAMAFLAGS = -DXINERAMA 14 | 15 | # freetype 16 | FREETYPELIBS = -lfontconfig -lXft 17 | FREETYPEINC = /usr/include/freetype2 18 | # OpenBSD (uncomment) 19 | #FREETYPEINC = $(X11INC)/freetype2 20 | 21 | # includes and libs 22 | INCS = -I$(X11INC) -I$(FREETYPEINC) 23 | LIBS = -L$(X11LIB) -lX11 $(XINERAMALIBS) $(FREETYPELIBS) 24 | 25 | # flags 26 | CPPFLAGS = -D_DEFAULT_SOURCE -D_BSD_SOURCE -D_XOPEN_SOURCE=700 -D_POSIX_C_SOURCE=200809L -DVERSION=\"$(VERSION)\" $(XINERAMAFLAGS) 27 | CFLAGS = -std=c99 -pedantic -Wall -Os $(INCS) $(CPPFLAGS) 28 | LDFLAGS = $(LIBS) 29 | 30 | # compiler and linker 31 | CC = cc 32 | -------------------------------------------------------------------------------- /.config/dmenu/dmenu.1: -------------------------------------------------------------------------------- 1 | .TH DMENU 1 dmenu\-VERSION 2 | .SH NAME 3 | dmenu \- dynamic menu 4 | .SH SYNOPSIS 5 | .B dmenu 6 | .RB [ \-bfiv ] 7 | .RB [ \-l 8 | .IR lines ] 9 | .RB [ \-m 10 | .IR monitor ] 11 | .RB [ \-p 12 | .IR prompt ] 13 | .RB [ \-fn 14 | .IR font ] 15 | .RB [ \-nb 16 | .IR color ] 17 | .RB [ \-nf 18 | .IR color ] 19 | .RB [ \-sb 20 | .IR color ] 21 | .RB [ \-sf 22 | .IR color ] 23 | .RB [ \-w 24 | .IR windowid ] 25 | .P 26 | .BR dmenu_run " ..." 27 | .SH DESCRIPTION 28 | .B dmenu 29 | is a dynamic menu for X, which reads a list of newline\-separated items from 30 | stdin. When the user selects an item and presses Return, their choice is printed 31 | to stdout and dmenu terminates. Entering text will narrow the items to those 32 | matching the tokens in the input. 33 | .P 34 | .B dmenu_run 35 | is a script used by 36 | .IR dwm (1) 37 | which lists programs in the user's $PATH and runs the result in their $SHELL. 38 | .SH OPTIONS 39 | .TP 40 | .B \-b 41 | dmenu appears at the bottom of the screen. 42 | .TP 43 | .B \-f 44 | dmenu grabs the keyboard before reading stdin if not reading from a tty. This 45 | is faster, but will lock up X until stdin reaches end\-of\-file. 46 | .TP 47 | .B \-i 48 | dmenu matches menu items case insensitively. 49 | .TP 50 | .BI \-l " lines" 51 | dmenu lists items vertically, with the given number of lines. 52 | .TP 53 | .BI \-m " monitor" 54 | dmenu is displayed on the monitor number supplied. Monitor numbers are starting 55 | from 0. 56 | .TP 57 | .BI \-p " prompt" 58 | defines the prompt to be displayed to the left of the input field. 59 | .TP 60 | .BI \-fn " font" 61 | defines the font or font set used. 62 | .TP 63 | .BI \-nb " color" 64 | defines the normal background color. 65 | .IR #RGB , 66 | .IR #RRGGBB , 67 | and X color names are supported. 68 | .TP 69 | .BI \-nf " color" 70 | defines the normal foreground color. 71 | .TP 72 | .BI \-sb " color" 73 | defines the selected background color. 74 | .TP 75 | .BI \-sf " color" 76 | defines the selected foreground color. 77 | .TP 78 | .B \-v 79 | prints version information to stdout, then exits. 80 | .TP 81 | .BI \-w " windowid" 82 | embed into windowid. 83 | .SH USAGE 84 | dmenu is completely controlled by the keyboard. Items are selected using the 85 | arrow keys, page up, page down, home, and end. 86 | .TP 87 | .B Tab 88 | Copy the selected item to the input field. 89 | .TP 90 | .B Return 91 | Confirm selection. Prints the selected item to stdout and exits, returning 92 | success. 93 | .TP 94 | .B Ctrl-Return 95 | Confirm selection. Prints the selected item to stdout and continues. 96 | .TP 97 | .B Shift\-Return 98 | Confirm input. Prints the input text to stdout and exits, returning success. 99 | .TP 100 | .B Escape 101 | Exit without selecting an item, returning failure. 102 | .TP 103 | .B Ctrl-Left 104 | Move cursor to the start of the current word 105 | .TP 106 | .B Ctrl-Right 107 | Move cursor to the end of the current word 108 | .TP 109 | .B C\-a 110 | Home 111 | .TP 112 | .B C\-b 113 | Left 114 | .TP 115 | .B C\-c 116 | Escape 117 | .TP 118 | .B C\-d 119 | Delete 120 | .TP 121 | .B C\-e 122 | End 123 | .TP 124 | .B C\-f 125 | Right 126 | .TP 127 | .B C\-g 128 | Escape 129 | .TP 130 | .B C\-h 131 | Backspace 132 | .TP 133 | .B C\-i 134 | Tab 135 | .TP 136 | .B C\-j 137 | Return 138 | .TP 139 | .B C\-J 140 | Shift-Return 141 | .TP 142 | .B C\-k 143 | Delete line right 144 | .TP 145 | .B C\-m 146 | Return 147 | .TP 148 | .B C\-M 149 | Shift-Return 150 | .TP 151 | .B C\-n 152 | Down 153 | .TP 154 | .B C\-p 155 | Up 156 | .TP 157 | .B C\-u 158 | Delete line left 159 | .TP 160 | .B C\-w 161 | Delete word left 162 | .TP 163 | .B C\-y 164 | Paste from primary X selection 165 | .TP 166 | .B C\-Y 167 | Paste from X clipboard 168 | .TP 169 | .B M\-b 170 | Move cursor to the start of the current word 171 | .TP 172 | .B M\-f 173 | Move cursor to the end of the current word 174 | .TP 175 | .B M\-g 176 | Home 177 | .TP 178 | .B M\-G 179 | End 180 | .TP 181 | .B M\-h 182 | Up 183 | .TP 184 | .B M\-j 185 | Page down 186 | .TP 187 | .B M\-k 188 | Page up 189 | .TP 190 | .B M\-l 191 | Down 192 | .SH SEE ALSO 193 | .IR dwm (1), 194 | .IR stest (1) 195 | -------------------------------------------------------------------------------- /.config/dmenu/dmenu_path: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | cachedir="${XDG_CACHE_HOME:-"$HOME/.cache"}" 4 | cache="$cachedir/dmenu_run" 5 | 6 | [ ! -e "$cachedir" ] && mkdir -p "$cachedir" 7 | 8 | IFS=: 9 | if stest -dqr -n "$cache" $PATH; then 10 | stest -flx $PATH | sort -u | tee "$cache" 11 | else 12 | cat "$cache" 13 | fi 14 | -------------------------------------------------------------------------------- /.config/dmenu/dmenu_run: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | dmenu_path | dmenu "$@" | ${SHELL:-"/bin/sh"} & 3 | -------------------------------------------------------------------------------- /.config/dmenu/drw.h: -------------------------------------------------------------------------------- 1 | /* See LICENSE file for copyright and license details. */ 2 | 3 | typedef struct { 4 | Cursor cursor; 5 | } Cur; 6 | 7 | typedef struct Fnt { 8 | Display *dpy; 9 | unsigned int h; 10 | XftFont *xfont; 11 | FcPattern *pattern; 12 | struct Fnt *next; 13 | } Fnt; 14 | 15 | enum { ColFg, ColBg }; /* Clr scheme index */ 16 | typedef XftColor Clr; 17 | 18 | typedef struct { 19 | unsigned int w, h; 20 | Display *dpy; 21 | int screen; 22 | Window root; 23 | Drawable drawable; 24 | GC gc; 25 | Clr *scheme; 26 | Fnt *fonts; 27 | } Drw; 28 | 29 | /* Drawable abstraction */ 30 | Drw *drw_create(Display *dpy, int screen, Window win, unsigned int w, unsigned int h); 31 | void drw_resize(Drw *drw, unsigned int w, unsigned int h); 32 | void drw_free(Drw *drw); 33 | 34 | /* Fnt abstraction */ 35 | Fnt *drw_fontset_create(Drw* drw, const char *fonts[], size_t fontcount); 36 | void drw_fontset_free(Fnt* set); 37 | unsigned int drw_fontset_getwidth(Drw *drw, const char *text); 38 | void drw_font_getexts(Fnt *font, const char *text, unsigned int len, unsigned int *w, unsigned int *h); 39 | 40 | /* Colorscheme abstraction */ 41 | void drw_clr_create(Drw *drw, Clr *dest, const char *clrname); 42 | Clr *drw_scm_create(Drw *drw, const char *clrnames[], size_t clrcount); 43 | 44 | /* Cursor abstraction */ 45 | Cur *drw_cur_create(Drw *drw, int shape); 46 | void drw_cur_free(Drw *drw, Cur *cursor); 47 | 48 | /* Drawing context manipulation */ 49 | void drw_setfontset(Drw *drw, Fnt *set); 50 | void drw_setscheme(Drw *drw, Clr *scm); 51 | 52 | /* Drawing functions */ 53 | void drw_rect(Drw *drw, int x, int y, unsigned int w, unsigned int h, int filled, int invert); 54 | int drw_text(Drw *drw, int x, int y, unsigned int w, unsigned int h, unsigned int lpad, const char *text, int invert); 55 | 56 | /* Map functions */ 57 | void drw_map(Drw *drw, Window win, int x, int y, unsigned int w, unsigned int h); 58 | -------------------------------------------------------------------------------- /.config/dmenu/patches/xresources.diff: -------------------------------------------------------------------------------- 1 | diff '--color=auto' -up ../dmenu-4.9/dmenu.c ./dmenu.c 2 | --- ../dmenu-4.9/dmenu.c 2019-02-02 13:55:02.000000000 +0100 3 | +++ ./dmenu.c 2020-05-24 00:27:58.038586112 +0200 4 | @@ -15,6 +15,7 @@ 5 | #include 6 | #endif 7 | #include 8 | +#include 9 | 10 | #include "drw.h" 11 | #include "util.h" 12 | @@ -53,6 +54,10 @@ static XIC xic; 13 | static Drw *drw; 14 | static Clr *scheme[SchemeLast]; 15 | 16 | +/* Temporary arrays to allow overriding xresources values */ 17 | +static char *colortemp[4]; 18 | +static char *tempfonts; 19 | + 20 | #include "config.h" 21 | 22 | static int (*fstrncmp)(const char *, const char *, size_t) = strncmp; 23 | @@ -596,8 +601,13 @@ setup(void) 24 | int a, di, n, area = 0; 25 | #endif 26 | /* init appearance */ 27 | - for (j = 0; j < SchemeLast; j++) 28 | - scheme[j] = drw_scm_create(drw, colors[j], 2); 29 | + for (j = 0; j < SchemeLast; j++) { 30 | + scheme[j] = drw_scm_create(drw, (const char**)colors[j], 2); 31 | + } 32 | + for (j = 0; j < SchemeOut; ++j) { 33 | + for (i = 0; i < 2; ++i) 34 | + free(colors[j][i]); 35 | + } 36 | 37 | clip = XInternAtom(dpy, "CLIPBOARD", False); 38 | utf8 = XInternAtom(dpy, "UTF8_STRING", False); 39 | @@ -687,6 +697,41 @@ usage(void) 40 | exit(1); 41 | } 42 | 43 | +void 44 | +readxresources(void) { 45 | + XrmInitialize(); 46 | + 47 | + char* xrm; 48 | + if ((xrm = XResourceManagerString(drw->dpy))) { 49 | + char *type; 50 | + XrmDatabase xdb = XrmGetStringDatabase(xrm); 51 | + XrmValue xval; 52 | + 53 | + if (XrmGetResource(xdb, "dmenu.font", "*", &type, &xval)) 54 | + fonts[0] = strdup(xval.addr); 55 | + else 56 | + fonts[0] = strdup(fonts[0]); 57 | + if (XrmGetResource(xdb, "dmenu.background", "*", &type, &xval)) 58 | + colors[SchemeNorm][ColBg] = strdup(xval.addr); 59 | + else 60 | + colors[SchemeNorm][ColBg] = strdup(colors[SchemeNorm][ColBg]); 61 | + if (XrmGetResource(xdb, "dmenu.foreground", "*", &type, &xval)) 62 | + colors[SchemeNorm][ColFg] = strdup(xval.addr); 63 | + else 64 | + colors[SchemeNorm][ColFg] = strdup(colors[SchemeNorm][ColFg]); 65 | + if (XrmGetResource(xdb, "dmenu.selbackground", "*", &type, &xval)) 66 | + colors[SchemeSel][ColBg] = strdup(xval.addr); 67 | + else 68 | + colors[SchemeSel][ColBg] = strdup(colors[SchemeSel][ColBg]); 69 | + if (XrmGetResource(xdb, "dmenu.selforeground", "*", &type, &xval)) 70 | + colors[SchemeSel][ColFg] = strdup(xval.addr); 71 | + else 72 | + colors[SchemeSel][ColFg] = strdup(colors[SchemeSel][ColFg]); 73 | + 74 | + XrmDestroyDatabase(xdb); 75 | + } 76 | +} 77 | + 78 | int 79 | main(int argc, char *argv[]) 80 | { 81 | @@ -715,15 +760,15 @@ main(int argc, char *argv[]) 82 | else if (!strcmp(argv[i], "-p")) /* adds prompt to left of input field */ 83 | prompt = argv[++i]; 84 | else if (!strcmp(argv[i], "-fn")) /* font or font set */ 85 | - fonts[0] = argv[++i]; 86 | + tempfonts = argv[++i]; 87 | else if (!strcmp(argv[i], "-nb")) /* normal background color */ 88 | - colors[SchemeNorm][ColBg] = argv[++i]; 89 | + colortemp[0] = argv[++i]; 90 | else if (!strcmp(argv[i], "-nf")) /* normal foreground color */ 91 | - colors[SchemeNorm][ColFg] = argv[++i]; 92 | + colortemp[1] = argv[++i]; 93 | else if (!strcmp(argv[i], "-sb")) /* selected background color */ 94 | - colors[SchemeSel][ColBg] = argv[++i]; 95 | + colortemp[2] = argv[++i]; 96 | else if (!strcmp(argv[i], "-sf")) /* selected foreground color */ 97 | - colors[SchemeSel][ColFg] = argv[++i]; 98 | + colortemp[3] = argv[++i]; 99 | else if (!strcmp(argv[i], "-w")) /* embedding window id */ 100 | embed = argv[++i]; 101 | else 102 | @@ -743,8 +788,23 @@ main(int argc, char *argv[]) 103 | die("could not get embedding window attributes: 0x%lx", 104 | parentwin); 105 | drw = drw_create(dpy, screen, root, wa.width, wa.height); 106 | - if (!drw_fontset_create(drw, fonts, LENGTH(fonts))) 107 | + readxresources(); 108 | + /* Now we check whether to override xresources with commandline parameters */ 109 | + if ( tempfonts ) 110 | + fonts[0] = strdup(tempfonts); 111 | + if ( colortemp[0]) 112 | + colors[SchemeNorm][ColBg] = strdup(colortemp[0]); 113 | + if ( colortemp[1]) 114 | + colors[SchemeNorm][ColFg] = strdup(colortemp[1]); 115 | + if ( colortemp[2]) 116 | + colors[SchemeSel][ColBg] = strdup(colortemp[2]); 117 | + if ( colortemp[3]) 118 | + colors[SchemeSel][ColFg] = strdup(colortemp[3]); 119 | + 120 | + if (!drw_fontset_create(drw, (const char**)fonts, LENGTH(fonts))) 121 | die("no fonts could be loaded."); 122 | + 123 | + free(fonts[0]); 124 | lrpad = drw->fonts->h; 125 | 126 | #ifdef __OpenBSD__ 127 | -------------------------------------------------------------------------------- /.config/dmenu/stest.1: -------------------------------------------------------------------------------- 1 | .TH STEST 1 dmenu\-VERSION 2 | .SH NAME 3 | stest \- filter a list of files by properties 4 | .SH SYNOPSIS 5 | .B stest 6 | .RB [ -abcdefghlpqrsuwx ] 7 | .RB [ -n 8 | .IR file ] 9 | .RB [ -o 10 | .IR file ] 11 | .RI [ file ...] 12 | .SH DESCRIPTION 13 | .B stest 14 | takes a list of files and filters by the files' properties, analogous to 15 | .IR test (1). 16 | Files which pass all tests are printed to stdout. If no files are given, stest 17 | reads files from stdin. 18 | .SH OPTIONS 19 | .TP 20 | .B \-a 21 | Test hidden files. 22 | .TP 23 | .B \-b 24 | Test that files are block specials. 25 | .TP 26 | .B \-c 27 | Test that files are character specials. 28 | .TP 29 | .B \-d 30 | Test that files are directories. 31 | .TP 32 | .B \-e 33 | Test that files exist. 34 | .TP 35 | .B \-f 36 | Test that files are regular files. 37 | .TP 38 | .B \-g 39 | Test that files have their set-group-ID flag set. 40 | .TP 41 | .B \-h 42 | Test that files are symbolic links. 43 | .TP 44 | .B \-l 45 | Test the contents of a directory given as an argument. 46 | .TP 47 | .BI \-n " file" 48 | Test that files are newer than 49 | .IR file . 50 | .TP 51 | .BI \-o " file" 52 | Test that files are older than 53 | .IR file . 54 | .TP 55 | .B \-p 56 | Test that files are named pipes. 57 | .TP 58 | .B \-q 59 | No files are printed, only the exit status is returned. 60 | .TP 61 | .B \-r 62 | Test that files are readable. 63 | .TP 64 | .B \-s 65 | Test that files are not empty. 66 | .TP 67 | .B \-u 68 | Test that files have their set-user-ID flag set. 69 | .TP 70 | .B \-v 71 | Invert the sense of tests, only failing files pass. 72 | .TP 73 | .B \-w 74 | Test that files are writable. 75 | .TP 76 | .B \-x 77 | Test that files are executable. 78 | .SH EXIT STATUS 79 | .TP 80 | .B 0 81 | At least one file passed all tests. 82 | .TP 83 | .B 1 84 | No files passed all tests. 85 | .TP 86 | .B 2 87 | An error occurred. 88 | .SH SEE ALSO 89 | .IR dmenu (1), 90 | .IR test (1) 91 | -------------------------------------------------------------------------------- /.config/dmenu/stest.c: -------------------------------------------------------------------------------- 1 | /* See LICENSE file for copyright and license details. */ 2 | #include 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | 11 | #include "arg.h" 12 | char *argv0; 13 | 14 | #define FLAG(x) (flag[(x)-'a']) 15 | 16 | static void test(const char *, const char *); 17 | static void usage(void); 18 | 19 | static int match = 0; 20 | static int flag[26]; 21 | static struct stat old, new; 22 | 23 | static void 24 | test(const char *path, const char *name) 25 | { 26 | struct stat st, ln; 27 | 28 | if ((!stat(path, &st) && (FLAG('a') || name[0] != '.') /* hidden files */ 29 | && (!FLAG('b') || S_ISBLK(st.st_mode)) /* block special */ 30 | && (!FLAG('c') || S_ISCHR(st.st_mode)) /* character special */ 31 | && (!FLAG('d') || S_ISDIR(st.st_mode)) /* directory */ 32 | && (!FLAG('e') || access(path, F_OK) == 0) /* exists */ 33 | && (!FLAG('f') || S_ISREG(st.st_mode)) /* regular file */ 34 | && (!FLAG('g') || st.st_mode & S_ISGID) /* set-group-id flag */ 35 | && (!FLAG('h') || (!lstat(path, &ln) && S_ISLNK(ln.st_mode))) /* symbolic link */ 36 | && (!FLAG('n') || st.st_mtime > new.st_mtime) /* newer than file */ 37 | && (!FLAG('o') || st.st_mtime < old.st_mtime) /* older than file */ 38 | && (!FLAG('p') || S_ISFIFO(st.st_mode)) /* named pipe */ 39 | && (!FLAG('r') || access(path, R_OK) == 0) /* readable */ 40 | && (!FLAG('s') || st.st_size > 0) /* not empty */ 41 | && (!FLAG('u') || st.st_mode & S_ISUID) /* set-user-id flag */ 42 | && (!FLAG('w') || access(path, W_OK) == 0) /* writable */ 43 | && (!FLAG('x') || access(path, X_OK) == 0)) != FLAG('v')) { /* executable */ 44 | if (FLAG('q')) 45 | exit(0); 46 | match = 1; 47 | puts(name); 48 | } 49 | } 50 | 51 | static void 52 | usage(void) 53 | { 54 | fprintf(stderr, "usage: %s [-abcdefghlpqrsuvwx] " 55 | "[-n file] [-o file] [file...]\n", argv0); 56 | exit(2); /* like test(1) return > 1 on error */ 57 | } 58 | 59 | int 60 | main(int argc, char *argv[]) 61 | { 62 | struct dirent *d; 63 | char path[PATH_MAX], *line = NULL, *file; 64 | size_t linesiz = 0; 65 | ssize_t n; 66 | DIR *dir; 67 | int r; 68 | 69 | ARGBEGIN { 70 | case 'n': /* newer than file */ 71 | case 'o': /* older than file */ 72 | file = EARGF(usage()); 73 | if (!(FLAG(ARGC()) = !stat(file, (ARGC() == 'n' ? &new : &old)))) 74 | perror(file); 75 | break; 76 | default: 77 | /* miscellaneous operators */ 78 | if (strchr("abcdefghlpqrsuvwx", ARGC())) 79 | FLAG(ARGC()) = 1; 80 | else 81 | usage(); /* unknown flag */ 82 | } ARGEND; 83 | 84 | if (!argc) { 85 | /* read list from stdin */ 86 | while ((n = getline(&line, &linesiz, stdin)) > 0) { 87 | if (n && line[n - 1] == '\n') 88 | line[n - 1] = '\0'; 89 | test(line, line); 90 | } 91 | free(line); 92 | } else { 93 | for (; argc; argc--, argv++) { 94 | if (FLAG('l') && (dir = opendir(*argv))) { 95 | /* test directory contents */ 96 | while ((d = readdir(dir))) { 97 | r = snprintf(path, sizeof path, "%s/%s", 98 | *argv, d->d_name); 99 | if (r >= 0 && (size_t)r < sizeof path) 100 | test(path, d->d_name); 101 | } 102 | closedir(dir); 103 | } else { 104 | test(*argv, *argv); 105 | } 106 | } 107 | } 108 | return match ? 0 : 1; 109 | } 110 | -------------------------------------------------------------------------------- /.config/dmenu/util.c: -------------------------------------------------------------------------------- 1 | /* See LICENSE file for copyright and license details. */ 2 | #include 3 | #include 4 | #include 5 | #include 6 | 7 | #include "util.h" 8 | 9 | void * 10 | ecalloc(size_t nmemb, size_t size) 11 | { 12 | void *p; 13 | 14 | if (!(p = calloc(nmemb, size))) 15 | die("calloc:"); 16 | return p; 17 | } 18 | 19 | void 20 | die(const char *fmt, ...) { 21 | va_list ap; 22 | 23 | va_start(ap, fmt); 24 | vfprintf(stderr, fmt, ap); 25 | va_end(ap); 26 | 27 | if (fmt[0] && fmt[strlen(fmt)-1] == ':') { 28 | fputc(' ', stderr); 29 | perror(NULL); 30 | } else { 31 | fputc('\n', stderr); 32 | } 33 | 34 | exit(1); 35 | } 36 | -------------------------------------------------------------------------------- /.config/dmenu/util.h: -------------------------------------------------------------------------------- 1 | /* See LICENSE file for copyright and license details. */ 2 | 3 | #define MAX(A, B) ((A) > (B) ? (A) : (B)) 4 | #define MIN(A, B) ((A) < (B) ? (A) : (B)) 5 | #define BETWEEN(X, A, B) ((A) <= (X) && (X) <= (B)) 6 | 7 | void die(const char *fmt, ...); 8 | void *ecalloc(size_t nmemb, size_t size); 9 | -------------------------------------------------------------------------------- /.config/dunst/dunstrc: -------------------------------------------------------------------------------- 1 | # ██ ██ 2 | # ░██ ░██ 3 | # ░██ ██ ██ ███████ ██████ ██████ 4 | # ██████░██ ░██░░██░░░██ ██░░░░ ░░░██░ 5 | # ██░░░██░██ ░██ ░██ ░██░░█████ ░██ 6 | # ░██ ░██░██ ░██ ░██ ░██ ░░░░░██ ░██ 7 | # ░░██████░░██████ ███ ░██ ██████ ░░██ 8 | # ░░░░░░ ░░░░░░ ░░░ ░░ ░░░░░░ ░░ 9 | 10 | [global] 11 | font = monospace 10 12 | geometry = "500-20+20" 13 | padding = 5 14 | horizontal_padding = 20 15 | shrink = true 16 | 17 | markup = full 18 | format = "%s\n%b" 19 | alignment = center 20 | word_wrap = true 21 | separator_color = auto 22 | transparency = 10 23 | 24 | dmenu = /usr/bin/dmenu -p dunst: 25 | browser = /usr/bin/qutebrowser 26 | 27 | icon_position = left 28 | max_icon_size = 32 29 | icon_path = /dev/null 30 | 31 | idle_threshold = 0 32 | show_age_threshold = 60 33 | show_indicators = false 34 | hide_duplicate_count = true 35 | 36 | [shortcuts] 37 | close = ctrl+space 38 | close_all = ctrl+shift+space 39 | history = ctrl+grave 40 | context = ctrl+shift+period 41 | 42 | [urgency_low] 43 | background = "#161821" 44 | foreground = "#d2d4de" 45 | #background = "#e8e9ec" 46 | #foreground = "#33374c" 47 | timeout = 5 48 | 49 | [urgency_normal] 50 | background = "#161821" 51 | foreground = "#d2d4de" 52 | #background = "#e8e9ec" 53 | #foreground = "#33374c" 54 | timeout = 5 55 | 56 | [urgency_critical] 57 | background = "#161821" 58 | foreground = "#e27878" 59 | #background = "#e8e9ec" 60 | #foreground = "#cc517a" 61 | timeout = 10 62 | 63 | [history-ignore-brightness] 64 | appname = dunstify 65 | summary = "brightness" 66 | history_ignore = yes 67 | 68 | [history-ignore-volume] 69 | appname = dunstify 70 | summary = "volume*" 71 | history_ignore = yes 72 | 73 | [history-ignore-switched] 74 | appname = dunstify 75 | summary = "switched to *" 76 | history_ignore = yes 77 | 78 | [history-ignore-moved] 79 | appname = dunstify 80 | summary = "moved to *" 81 | history_ignore = yes 82 | -------------------------------------------------------------------------------- /.config/dwm/LICENSE: -------------------------------------------------------------------------------- 1 | MIT/X Consortium License 2 | 3 | © 2006-2019 Anselm R Garbe 4 | © 2006-2009 Jukka Salmi 5 | © 2006-2007 Sander van Dijk 6 | © 2007-2011 Peter Hartlich 7 | © 2007-2009 Szabolcs Nagy 8 | © 2007-2009 Christof Musik 9 | © 2007-2009 Premysl Hruby 10 | © 2007-2008 Enno Gottox Boland 11 | © 2008 Martin Hurton 12 | © 2008 Neale Pickett 13 | © 2009 Mate Nagy 14 | © 2010-2016 Hiltjo Posthuma 15 | © 2010-2012 Connor Lane Smith 16 | © 2011 Christoph Lohmann <20h@r-36.net> 17 | © 2015-2016 Quentin Rameau 18 | © 2015-2016 Eric Pruitt 19 | © 2016-2017 Markus Teich 20 | 21 | Permission is hereby granted, free of charge, to any person obtaining a 22 | copy of this software and associated documentation files (the "Software"), 23 | to deal in the Software without restriction, including without limitation 24 | the rights to use, copy, modify, merge, publish, distribute, sublicense, 25 | and/or sell copies of the Software, and to permit persons to whom the 26 | Software is furnished to do so, subject to the following conditions: 27 | 28 | The above copyright notice and this permission notice shall be included in 29 | all copies or substantial portions of the Software. 30 | 31 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 32 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 33 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 34 | THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 35 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 36 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 37 | DEALINGS IN THE SOFTWARE. 38 | -------------------------------------------------------------------------------- /.config/dwm/Makefile: -------------------------------------------------------------------------------- 1 | # dwm - dynamic window manager 2 | # See LICENSE file for copyright and license details. 3 | 4 | include config.mk 5 | 6 | SRC = drw.c dwm.c util.c 7 | OBJ = ${SRC:.c=.o} 8 | 9 | all: options dwm 10 | 11 | options: 12 | @echo dwm build options: 13 | @echo "CFLAGS = ${CFLAGS}" 14 | @echo "LDFLAGS = ${LDFLAGS}" 15 | @echo "CC = ${CC}" 16 | 17 | .c.o: 18 | ${CC} -c ${CFLAGS} $< 19 | 20 | ${OBJ}: config.h config.mk 21 | 22 | config.h: 23 | cp config.def.h $@ 24 | 25 | dwm: ${OBJ} 26 | ${CC} -o $@ ${OBJ} ${LDFLAGS} 27 | 28 | clean: 29 | rm -f dwm ${OBJ} dwm-${VERSION}.tar.gz 30 | 31 | dist: clean 32 | mkdir -p dwm-${VERSION} 33 | cp -R LICENSE Makefile README config.def.h config.mk\ 34 | dwm.1 drw.h util.h ${SRC} dwm.png transient.c dwm-${VERSION} 35 | tar -cf dwm-${VERSION}.tar dwm-${VERSION} 36 | gzip dwm-${VERSION}.tar 37 | rm -rf dwm-${VERSION} 38 | 39 | install: all 40 | mkdir -p ${DESTDIR}${PREFIX}/bin 41 | cp -f dwm ${DESTDIR}${PREFIX}/bin 42 | chmod 755 ${DESTDIR}${PREFIX}/bin/dwm 43 | mkdir -p ${DESTDIR}${MANPREFIX}/man1 44 | sed "s/VERSION/${VERSION}/g" < dwm.1 > ${DESTDIR}${MANPREFIX}/man1/dwm.1 45 | chmod 644 ${DESTDIR}${MANPREFIX}/man1/dwm.1 46 | 47 | uninstall: 48 | rm -f ${DESTDIR}${PREFIX}/bin/dwm\ 49 | ${DESTDIR}${MANPREFIX}/man1/dwm.1 50 | 51 | .PHONY: all options clean dist install uninstall 52 | -------------------------------------------------------------------------------- /.config/dwm/README: -------------------------------------------------------------------------------- 1 | dwm - dynamic window manager 2 | ============================ 3 | dwm is an extremely fast, small, and dynamic window manager for X. 4 | 5 | 6 | Requirements 7 | ------------ 8 | In order to build dwm you need the Xlib header files. 9 | 10 | 11 | Installation 12 | ------------ 13 | Edit config.mk to match your local setup (dwm is installed into 14 | the /usr/local namespace by default). 15 | 16 | Afterwards enter the following command to build and install dwm (if 17 | necessary as root): 18 | 19 | make clean install 20 | 21 | 22 | Running dwm 23 | ----------- 24 | Add the following line to your .xinitrc to start dwm using startx: 25 | 26 | exec dwm 27 | 28 | In order to connect dwm to a specific display, make sure that 29 | the DISPLAY environment variable is set correctly, e.g.: 30 | 31 | DISPLAY=foo.bar:1 exec dwm 32 | 33 | (This will start dwm on display :1 of the host foo.bar.) 34 | 35 | In order to display status info in the bar, you can do something 36 | like this in your .xinitrc: 37 | 38 | while xsetroot -name "`date` `uptime | sed 's/.*,//'`" 39 | do 40 | sleep 1 41 | done & 42 | exec dwm 43 | 44 | 45 | Configuration 46 | ------------- 47 | The configuration of dwm is done by creating a custom config.h 48 | and (re)compiling the source code. 49 | -------------------------------------------------------------------------------- /.config/dwm/config.mk: -------------------------------------------------------------------------------- 1 | # dwm version 2 | VERSION = 6.2 3 | 4 | # Customize below to fit your system 5 | 6 | # paths 7 | PREFIX = /usr/local 8 | MANPREFIX = ${PREFIX}/share/man 9 | 10 | X11INC = /usr/X11R6/include 11 | X11LIB = /usr/X11R6/lib 12 | 13 | # Xinerama, comment if you don't want it 14 | #XINERAMALIBS = -lXinerama 15 | #XINERAMAFLAGS = -DXINERAMA 16 | 17 | # freetype 18 | FREETYPELIBS = -lfontconfig -lXft 19 | FREETYPEINC = /usr/include/freetype2 20 | # OpenBSD (uncomment) 21 | #FREETYPEINC = ${X11INC}/freetype2 22 | 23 | # includes and libs 24 | INCS = -I${X11INC} -I${FREETYPEINC} 25 | LIBS = -L${X11LIB} -lX11 ${XINERAMALIBS} ${FREETYPELIBS} 26 | 27 | # flags 28 | CPPFLAGS = -D_DEFAULT_SOURCE -D_BSD_SOURCE -D_POSIX_C_SOURCE=2 -DVERSION=\"${VERSION}\" ${XINERAMAFLAGS} 29 | #CFLAGS = -g -std=c99 -pedantic -Wall -O0 ${INCS} ${CPPFLAGS} 30 | CFLAGS = -std=c99 -pedantic -Wall -Wno-deprecated-declarations -Os ${INCS} ${CPPFLAGS} 31 | LDFLAGS = ${LIBS} 32 | 33 | # Solaris 34 | #CFLAGS = -fast ${INCS} -DVERSION=\"${VERSION}\" 35 | #LDFLAGS = ${LIBS} 36 | 37 | # compiler and linker 38 | CC = cc 39 | -------------------------------------------------------------------------------- /.config/dwm/drw.h: -------------------------------------------------------------------------------- 1 | /* See LICENSE file for copyright and license details. */ 2 | 3 | typedef struct { 4 | Cursor cursor; 5 | } Cur; 6 | 7 | typedef struct Fnt { 8 | Display *dpy; 9 | unsigned int h; 10 | XftFont *xfont; 11 | FcPattern *pattern; 12 | struct Fnt *next; 13 | } Fnt; 14 | 15 | enum { ColFg, ColBg, ColBorder }; /* Clr scheme index */ 16 | typedef XftColor Clr; 17 | 18 | typedef struct { 19 | unsigned int w, h; 20 | Display *dpy; 21 | int screen; 22 | Window root; 23 | Drawable drawable; 24 | GC gc; 25 | Clr *scheme; 26 | Fnt *fonts; 27 | } Drw; 28 | 29 | /* Drawable abstraction */ 30 | Drw *drw_create(Display *dpy, int screen, Window win, unsigned int w, unsigned int h); 31 | void drw_resize(Drw *drw, unsigned int w, unsigned int h); 32 | void drw_free(Drw *drw); 33 | 34 | /* Fnt abstraction */ 35 | Fnt *drw_fontset_create(Drw* drw, const char *fonts[], size_t fontcount); 36 | void drw_fontset_free(Fnt* set); 37 | unsigned int drw_fontset_getwidth(Drw *drw, const char *text); 38 | void drw_font_getexts(Fnt *font, const char *text, unsigned int len, unsigned int *w, unsigned int *h); 39 | 40 | /* Colorscheme abstraction */ 41 | void drw_clr_create(Drw *drw, Clr *dest, const char *clrname); 42 | Clr *drw_scm_create(Drw *drw, char *clrnames[], size_t clrcount); 43 | 44 | /* Cursor abstraction */ 45 | Cur *drw_cur_create(Drw *drw, int shape); 46 | void drw_cur_free(Drw *drw, Cur *cursor); 47 | 48 | /* Drawing context manipulation */ 49 | void drw_setfontset(Drw *drw, Fnt *set); 50 | void drw_setscheme(Drw *drw, Clr *scm); 51 | 52 | /* Drawing functions */ 53 | void drw_rect(Drw *drw, int x, int y, unsigned int w, unsigned int h, int filled, int invert); 54 | int drw_text(Drw *drw, int x, int y, unsigned int w, unsigned int h, unsigned int lpad, const char *text, int invert); 55 | 56 | /* Map functions */ 57 | void drw_map(Drw *drw, Window win, int x, int y, unsigned int w, unsigned int h); 58 | -------------------------------------------------------------------------------- /.config/dwm/dwm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YaN-3k/dots/e5f19eb7cc0a8fadc23aa08154be30ab0d2f3845/.config/dwm/dwm.png -------------------------------------------------------------------------------- /.config/dwm/patches/center.diff: -------------------------------------------------------------------------------- 1 | From 69f91089d9248fa9695eb925956e255a215171b8 Mon Sep 17 00:00:00 2001 2 | From: bakkeby 3 | Date: Tue, 7 Apr 2020 12:29:08 +0200 4 | Subject: [PATCH] Adding 6.2 center patch with multi-monitor fix and 5 | auto-centering of floating popup windows 6 | --- 7 | config.def.h | 6 +++--- 8 | dwm.c | 13 +++++++++++-- 9 | 2 files changed, 14 insertions(+), 5 deletions(-) 10 | 11 | diff --git a/config.def.h b/config.def.h 12 | index 1c0b587..44b46e5 100644 13 | --- a/config.def.h 14 | +++ b/config.def.h 15 | @@ -26,9 +26,9 @@ static const Rule rules[] = { 16 | * WM_CLASS(STRING) = instance, class 17 | * WM_NAME(STRING) = title 18 | */ 19 | - /* class instance title tags mask isfloating monitor */ 20 | - { "Gimp", NULL, NULL, 0, 1, -1 }, 21 | - { "Firefox", NULL, NULL, 1 << 8, 0, -1 }, 22 | + /* class instance title tags mask iscentered isfloating monitor */ 23 | + { "Gimp", NULL, NULL, 0, 0, 1, -1 }, 24 | + { "Firefox", NULL, NULL, 1 << 8, 0, 0, -1 }, 25 | }; 26 | 27 | /* layout(s) */ 28 | diff --git a/dwm.c b/dwm.c 29 | index 4465af1..ab33757 100644 30 | --- a/dwm.c 31 | +++ b/dwm.c 32 | @@ -92,7 +92,7 @@ struct Client { 33 | int basew, baseh, incw, inch, maxw, maxh, minw, minh; 34 | int bw, oldbw; 35 | unsigned int tags; 36 | - int isfixed, isfloating, isurgent, neverfocus, oldstate, isfullscreen; 37 | + int isfixed, iscentered, isfloating, isurgent, neverfocus, oldstate, isfullscreen; 38 | Client *next; 39 | Client *snext; 40 | Monitor *mon; 41 | @@ -137,6 +137,7 @@ typedef struct { 42 | const char *instance; 43 | const char *title; 44 | unsigned int tags; 45 | + int iscentered; 46 | int isfloating; 47 | int monitor; 48 | } Rule; 49 | @@ -285,6 +286,7 @@ applyrules(Client *c) 50 | XClassHint ch = { NULL, NULL }; 51 | 52 | /* rule matching */ 53 | + c->iscentered = 0; 54 | c->isfloating = 0; 55 | c->tags = 0; 56 | XGetClassHint(dpy, c->win, &ch); 57 | @@ -297,6 +299,7 @@ applyrules(Client *c) 58 | && (!r->class || strstr(class, r->class)) 59 | && (!r->instance || strstr(instance, r->instance))) 60 | { 61 | + c->iscentered = r->iscentered; 62 | c->isfloating = r->isfloating; 63 | c->tags |= r->tags; 64 | for (m = mons; m && m->num != r->monitor; m = m->next); 65 | @@ -1056,6 +1059,10 @@ manage(Window w, XWindowAttributes *wa) 66 | updatewindowtype(c); 67 | updatesizehints(c); 68 | updatewmhints(c); 69 | + if (c->iscentered) { 70 | + c->x = c->mon->mx + (c->mon->mw - WIDTH(c)) / 2; 71 | + c->y = c->mon->my + (c->mon->mh - HEIGHT(c)) / 2; 72 | + } 73 | XSelectInput(dpy, w, EnterWindowMask|FocusChangeMask|PropertyChangeMask|StructureNotifyMask); 74 | grabbuttons(c, 0); 75 | if (!c->isfloating) 76 | @@ -2009,8 +2016,10 @@ updatewindowtype(Client *c) 77 | 78 | if (state == netatom[NetWMFullscreen]) 79 | setfullscreen(c, 1); 80 | - if (wtype == netatom[NetWMWindowTypeDialog]) 81 | + if (wtype == netatom[NetWMWindowTypeDialog]) { 82 | + c->iscentered = 1; 83 | c->isfloating = 1; 84 | + } 85 | } 86 | 87 | void 88 | -- 89 | 2.17.1 90 | 91 | -------------------------------------------------------------------------------- /.config/dwm/patches/fullgaps.diff: -------------------------------------------------------------------------------- 1 | diff --git a/config.def.h b/config.def.h 2 | index 1c0b587..38d2f6c 100644 3 | --- a/config.def.h 4 | +++ b/config.def.h 5 | @@ -2,6 +2,7 @@ 6 | 7 | /* appearance */ 8 | static const unsigned int borderpx = 1; /* border pixel of windows */ 9 | +static const unsigned int gappx = 5; /* gaps between windows */ 10 | static const unsigned int snap = 32; /* snap pixel */ 11 | static const int showbar = 1; /* 0 means no bar */ 12 | static const int topbar = 1; /* 0 means bottom bar */ 13 | @@ -84,6 +85,9 @@ static Key keys[] = { 14 | { MODKEY, XK_period, focusmon, {.i = +1 } }, 15 | { MODKEY|ShiftMask, XK_comma, tagmon, {.i = -1 } }, 16 | { MODKEY|ShiftMask, XK_period, tagmon, {.i = +1 } }, 17 | + { MODKEY, XK_minus, setgaps, {.i = -1 } }, 18 | + { MODKEY, XK_equal, setgaps, {.i = +1 } }, 19 | + { MODKEY|ShiftMask, XK_equal, setgaps, {.i = 0 } }, 20 | TAGKEYS( XK_1, 0) 21 | TAGKEYS( XK_2, 1) 22 | TAGKEYS( XK_3, 2) 23 | diff --git a/dwm.c b/dwm.c 24 | index 4465af1..4363627 100644 25 | --- a/dwm.c 26 | +++ b/dwm.c 27 | @@ -119,6 +119,7 @@ struct Monitor { 28 | int by; /* bar geometry */ 29 | int mx, my, mw, mh; /* screen size */ 30 | int wx, wy, ww, wh; /* window area */ 31 | + int gappx; /* gaps between windows */ 32 | unsigned int seltags; 33 | unsigned int sellt; 34 | unsigned int tagset[2]; 35 | @@ -199,6 +200,7 @@ static void sendmon(Client *c, Monitor *m); 36 | static void setclientstate(Client *c, long state); 37 | static void setfocus(Client *c); 38 | static void setfullscreen(Client *c, int fullscreen); 39 | +static void setgaps(const Arg *arg); 40 | static void setlayout(const Arg *arg); 41 | static void setmfact(const Arg *arg); 42 | static void setup(void); 43 | @@ -638,6 +640,7 @@ createmon(void) 44 | m->nmaster = nmaster; 45 | m->showbar = showbar; 46 | m->topbar = topbar; 47 | + m->gappx = gappx; 48 | m->lt[0] = &layouts[0]; 49 | m->lt[1] = &layouts[1 % LENGTH(layouts)]; 50 | strncpy(m->ltsymbol, layouts[0].symbol, sizeof m->ltsymbol); 51 | @@ -1497,6 +1500,16 @@ setfullscreen(Client *c, int fullscreen) 52 | } 53 | } 54 | 55 | +void 56 | +setgaps(const Arg *arg) 57 | +{ 58 | + if ((arg->i == 0) || (selmon->gappx + arg->i < 0)) 59 | + selmon->gappx = 0; 60 | + else 61 | + selmon->gappx += arg->i; 62 | + arrange(selmon); 63 | +} 64 | + 65 | void 66 | setlayout(const Arg *arg) 67 | { 68 | @@ -1683,16 +1696,16 @@ tile(Monitor *m) 69 | if (n > m->nmaster) 70 | mw = m->nmaster ? m->ww * m->mfact : 0; 71 | else 72 | - mw = m->ww; 73 | - for (i = my = ty = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), i++) 74 | + mw = m->ww - m->gappx; 75 | + for (i = 0, my = ty = m->gappx, c = nexttiled(m->clients); c; c = nexttiled(c->next), i++) 76 | if (i < m->nmaster) { 77 | - h = (m->wh - my) / (MIN(n, m->nmaster) - i); 78 | - resize(c, m->wx, m->wy + my, mw - (2*c->bw), h - (2*c->bw), 0); 79 | - my += HEIGHT(c); 80 | + h = (m->wh - my) / (MIN(n, m->nmaster) - i) - m->gappx; 81 | + resize(c, m->wx + m->gappx, m->wy + my, mw - (2*c->bw) - m->gappx, h - (2*c->bw), 0); 82 | + my += HEIGHT(c) + m->gappx; 83 | } else { 84 | - h = (m->wh - ty) / (n - i); 85 | - resize(c, m->wx + mw, m->wy + ty, m->ww - mw - (2*c->bw), h - (2*c->bw), 0); 86 | - ty += HEIGHT(c); 87 | + h = (m->wh - ty) / (n - i) - m->gappx; 88 | + resize(c, m->wx + mw + m->gappx, m->wy + ty, m->ww - mw - (2*c->bw) - 2*m->gappx, h - (2*c->bw), 0); 89 | + ty += HEIGHT(c) + m->gappx; 90 | } 91 | } 92 | 93 | -- 94 | 2.20.1 95 | 96 | -------------------------------------------------------------------------------- /.config/dwm/patches/noborder.diff: -------------------------------------------------------------------------------- 1 | From 700b0bdea872f4c00182b2bd925b41fe03f8d222 Mon Sep 17 00:00:00 2001 2 | From: Aidan Hall 3 | Date: Tue, 2 Jun 2020 14:41:53 +0000 4 | Subject: [PATCH] Prevents hiding the border if layout is floating. 5 | 6 | --- 7 | dwm.c | 8 ++++++++ 8 | 1 file changed, 8 insertions(+) 9 | 10 | diff --git a/dwm.c b/dwm.c 11 | index 4465af1..2dd959d 100644 12 | --- a/dwm.c 13 | +++ b/dwm.c 14 | @@ -1282,6 +1282,14 @@ resizeclient(Client *c, int x, int y, int w, int h) 15 | c->oldw = c->w; c->w = wc.width = w; 16 | c->oldh = c->h; c->h = wc.height = h; 17 | wc.border_width = c->bw; 18 | + if (((nexttiled(c->mon->clients) == c && !nexttiled(c->next)) 19 | + || &monocle == c->mon->lt[c->mon->sellt]->arrange) 20 | + && !c->isfullscreen && !c->isfloating 21 | + && NULL != c->mon->lt[c->mon->sellt]->arrange) { 22 | + c->w = wc.width += c->bw * 2; 23 | + c->h = wc.height += c->bw * 2; 24 | + wc.border_width = 0; 25 | + } 26 | XConfigureWindow(dpy, c->win, CWX|CWY|CWWidth|CWHeight|CWBorderWidth, &wc); 27 | configure(c); 28 | XSync(dpy, False); 29 | -- 30 | 2.26.2 31 | 32 | -------------------------------------------------------------------------------- /.config/dwm/transient.c: -------------------------------------------------------------------------------- 1 | /* cc transient.c -o transient -lX11 */ 2 | 3 | #include 4 | #include 5 | #include 6 | #include 7 | 8 | int main(void) { 9 | Display *d; 10 | Window r, f, t = None; 11 | XSizeHints h; 12 | XEvent e; 13 | 14 | d = XOpenDisplay(NULL); 15 | if (!d) 16 | exit(1); 17 | r = DefaultRootWindow(d); 18 | 19 | f = XCreateSimpleWindow(d, r, 100, 100, 400, 400, 0, 0, 0); 20 | h.min_width = h.max_width = h.min_height = h.max_height = 400; 21 | h.flags = PMinSize | PMaxSize; 22 | XSetWMNormalHints(d, f, &h); 23 | XStoreName(d, f, "floating"); 24 | XMapWindow(d, f); 25 | 26 | XSelectInput(d, f, ExposureMask); 27 | while (1) { 28 | XNextEvent(d, &e); 29 | 30 | if (t == None) { 31 | sleep(5); 32 | t = XCreateSimpleWindow(d, r, 50, 50, 100, 100, 0, 0, 0); 33 | XSetTransientForHint(d, t, f); 34 | XStoreName(d, t, "transient"); 35 | XMapWindow(d, t); 36 | XSelectInput(d, t, ExposureMask); 37 | } 38 | } 39 | 40 | XCloseDisplay(d); 41 | exit(0); 42 | } 43 | -------------------------------------------------------------------------------- /.config/dwm/util.c: -------------------------------------------------------------------------------- 1 | /* See LICENSE file for copyright and license details. */ 2 | #include 3 | #include 4 | #include 5 | #include 6 | 7 | #include "util.h" 8 | 9 | void * 10 | ecalloc(size_t nmemb, size_t size) 11 | { 12 | void *p; 13 | 14 | if (!(p = calloc(nmemb, size))) 15 | die("calloc:"); 16 | return p; 17 | } 18 | 19 | void 20 | die(const char *fmt, ...) { 21 | va_list ap; 22 | 23 | va_start(ap, fmt); 24 | vfprintf(stderr, fmt, ap); 25 | va_end(ap); 26 | 27 | if (fmt[0] && fmt[strlen(fmt)-1] == ':') { 28 | fputc(' ', stderr); 29 | perror(NULL); 30 | } else { 31 | fputc('\n', stderr); 32 | } 33 | 34 | exit(1); 35 | } 36 | -------------------------------------------------------------------------------- /.config/dwm/util.h: -------------------------------------------------------------------------------- 1 | /* See LICENSE file for copyright and license details. */ 2 | 3 | #define MAX(A, B) ((A) > (B) ? (A) : (B)) 4 | #define MIN(A, B) ((A) < (B) ? (A) : (B)) 5 | #define BETWEEN(X, A, B) ((A) <= (X) && (X) <= (B)) 6 | 7 | void die(const char *fmt, ...); 8 | void *ecalloc(size_t nmemb, size_t size); 9 | -------------------------------------------------------------------------------- /.config/fontconfig/fonts.conf: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | serif 6 | Terminus 7 | 8 | 9 | sans-serif 10 | Terminus 11 | 12 | 13 | sans 14 | Terminus 15 | 16 | 17 | monospace 18 | Terminus 19 | 20 | 21 | -------------------------------------------------------------------------------- /.config/gdb/gdbinit: -------------------------------------------------------------------------------- 1 | set history save on 2 | set history filename ~/.config/gdb/gdb_history 3 | set history remove-duplicates 1 4 | set print pretty on 5 | set pagination off 6 | set confirm off 7 | set verbose off 8 | set style enabled off 9 | -------------------------------------------------------------------------------- /.config/irssi/config: -------------------------------------------------------------------------------- 1 | # --- 2 | # irssi 3 | # --- 4 | servers = ( 5 | { address = "irc.dal.net"; chatnet = "DALnet"; port = "6667"; }, 6 | { 7 | address = "ssl.efnet.org"; 8 | chatnet = "EFNet"; 9 | port = "9999"; 10 | use_tls = "yes"; 11 | }, 12 | { 13 | address = "irc.esper.net"; 14 | chatnet = "EsperNet"; 15 | port = "6697"; 16 | use_tls = "yes"; 17 | tls_verify = "yes"; 18 | }, 19 | { 20 | address = "chat.freenode.net"; 21 | chatnet = "Freenode"; 22 | port = "6697"; 23 | use_tls = "yes"; 24 | tls_verify = "yes"; 25 | }, 26 | { 27 | address = "irc.gamesurge.net"; 28 | chatnet = "GameSurge"; 29 | port = "6667"; 30 | }, 31 | { 32 | address = "eu.irc6.net"; 33 | chatnet = "IRCnet"; 34 | port = "6667"; 35 | use_tls = "yes"; 36 | }, 37 | { address = "open.ircnet.net"; chatnet = "IRCnet"; port = "6667"; }, 38 | { 39 | address = "irc.ircsource.net"; 40 | chatnet = "IRCSource"; 41 | port = "6667"; 42 | }, 43 | { address = "irc.netfuze.net"; chatnet = "NetFuze"; port = "6667"; }, 44 | { 45 | address = "irc.oftc.net"; 46 | chatnet = "OFTC"; 47 | port = "6697"; 48 | use_tls = "yes"; 49 | tls_verify = "yes"; 50 | }, 51 | { 52 | address = "irc.quakenet.org"; 53 | chatnet = "QuakeNet"; 54 | port = "6667"; 55 | }, 56 | { 57 | address = "irc.rizon.net"; 58 | chatnet = "Rizon"; 59 | port = "6697"; 60 | use_tls = "yes"; 61 | tls_verify = "yes"; 62 | }, 63 | { address = "silc.silcnet.org"; chatnet = "SILC"; port = "706"; }, 64 | { 65 | address = "irc.undernet.org"; 66 | chatnet = "Undernet"; 67 | port = "6667"; 68 | }, 69 | { address = "localhost"; chatnet = "BitlBee"; port = "6667"; }, 70 | { address = "irc.pirc.pl"; chatnet = "PIRC"; port = "6667"; } 71 | ); 72 | 73 | channels = ( 74 | #{ name = "#linux"; chatnet = "Freenode"; autojoin = "Yes"; }, 75 | #{ name = "#gentoo"; chatnet = "Freenode"; autojoin = "Yes"; } 76 | ); 77 | 78 | chatnets = { 79 | DALnet = { 80 | type = "IRC"; 81 | max_kicks = "4"; 82 | max_msgs = "20"; 83 | max_whois = "30"; 84 | }; 85 | EFNet = { 86 | type = "IRC"; 87 | max_kicks = "1"; 88 | max_msgs = "4"; 89 | max_whois = "1"; 90 | }; 91 | EsperNet = { 92 | type = "IRC"; 93 | max_kicks = "1"; 94 | max_msgs = "4"; 95 | max_whois = "1"; 96 | }; 97 | Freenode = { 98 | type = "IRC"; 99 | max_kicks = "1"; 100 | max_msgs = "4"; 101 | max_whois = "1"; 102 | }; 103 | GameSurge = { 104 | type = "IRC"; 105 | max_kicks = "1"; 106 | max_msgs = "1"; 107 | max_whois = "1"; 108 | }; 109 | IRCnet = { 110 | type = "IRC"; 111 | max_kicks = "1"; 112 | max_msgs = "1"; 113 | max_whois = "1"; 114 | }; 115 | IRCSource = { 116 | type = "IRC"; 117 | max_kicks = "1"; 118 | max_msgs = "4"; 119 | max_whois = "1"; 120 | }; 121 | NetFuze = { 122 | type = "IRC"; 123 | max_kicks = "1"; 124 | max_msgs = "1"; 125 | max_whois = "1"; 126 | }; 127 | OFTC = { type = "IRC"; max_kicks = "1"; max_msgs = "1"; max_whois = "1"; }; 128 | QuakeNet = { 129 | type = "IRC"; 130 | max_kicks = "1"; 131 | max_msgs = "1"; 132 | max_whois = "1"; 133 | }; 134 | Rizon = { 135 | type = "IRC"; 136 | max_kicks = "1"; 137 | max_msgs = "1"; 138 | max_whois = "1"; 139 | }; 140 | SILC = { type = "SILC"; }; 141 | Undernet = { 142 | type = "IRC"; 143 | max_kicks = "1"; 144 | max_msgs = "1"; 145 | max_whois = "1"; 146 | }; 147 | PIRC = { type = "IRC"; max_kicks = "1"; max_msgs = "1"; max_whois = "1"; }; 148 | BitlBee = { type = "IRC"; }; 149 | }; 150 | 151 | aliases = { 152 | ns = "msg nickserv"; 153 | wc = "window close"; 154 | sb = "scrollback"; 155 | p = "part"; 156 | j = "join"; 157 | m = "msg"; 158 | }; 159 | 160 | keyboard = ( 161 | { key = "^K"; id = "command"; data = "scrollback goto -1"; }, 162 | { key = "^J"; id = "command"; data = "scrollback goto +1"; } 163 | ); 164 | 165 | settings = { 166 | core = { 167 | real_name = "cherrry9"; 168 | user_name = "cherrry9"; 169 | nick = "cherrry9"; 170 | }; 171 | autolog = "yes"; 172 | autolog_path = "~/.cache/irc/$tag/$0.log"; 173 | "fe-text" = { actlist_sort = "refnum"; }; 174 | "fe-common/core" = { theme = "default"; }; 175 | }; 176 | 177 | ignores = ( { level = "JOINS PARTS QUITS"; } ); 178 | 179 | statusbar = { 180 | default = { 181 | window = { 182 | items = { 183 | barstart = { priority = "100"; }; 184 | user = { }; 185 | window = { }; 186 | window_empty = { }; 187 | lag = { priority = "-1"; }; 188 | act = { priority = "10"; }; 189 | more = { priority = "-1"; alignment = "right"; }; 190 | barend = { priority = "100"; alignment = "right"; }; 191 | }; 192 | }; 193 | }; 194 | }; 195 | -------------------------------------------------------------------------------- /.config/mimeapps.list: -------------------------------------------------------------------------------- 1 | [Default Applications] 2 | 3 | # xdg-open will use these settings to determine how to open filetypes. 4 | # These .desktop entries can also be seen and changed in ~/.local/share/applications/ 5 | 6 | text/x-shellscript=text.desktop; 7 | x-scheme-handler/magnet=torrent.desktop; 8 | application/x-bittorrent=torrent.desktop; 9 | x-scheme-handler/mailto=mail.desktop; 10 | text/plain=text.desktop; 11 | application/postscript=pdf.desktop; 12 | application/pdf=pdf.desktop; 13 | image/png=img.desktop; 14 | image/jpeg=img.desktop; 15 | image/gif=img.desktop; 16 | application/rss+xml=rss.desktop 17 | video/x-matroska=video.desktop 18 | x-scheme-handler/lbry=lbry.desktop 19 | inode/directory=file.desktop 20 | x-scheme-handler/http=linkhandler.desktop 21 | x-scheme-handler/https=linkhandler.desktop 22 | -------------------------------------------------------------------------------- /.config/mpd/mpd.conf: -------------------------------------------------------------------------------- 1 | # ~~ 2 | # change `user` and `password` option 3 | # link this file to /etc/mpd.conf 4 | # and run mpd as service 5 | # 6 | # ~~ 7 | 8 | user "user" 9 | password "password@read,add,control,admin" 10 | music_directory "~/music/" 11 | playlist_directory "~/.config/mpd/playlists" 12 | db_file "~/.config/mpd/database" 13 | log_file "~/.config/mpd/log" 14 | pid_file "~/.config/mpd/pid" 15 | state_file "~/.config/mpd/state" 16 | sticker_file "~/.config/mpd/sticker.sql" 17 | bind_to_address "~/.config/mpd/socket" 18 | bind_to_address "0.0.0.0" 19 | port "6600" 20 | auto_update "yes" 21 | restore_paused "yes" 22 | 23 | audio_output { 24 | type "pulse" 25 | name "pulse" 26 | } 27 | 28 | audio_output { 29 | type "fifo" 30 | name "fifo" 31 | path "/tmp/mpd.fifo" 32 | format "44100:16:2" 33 | } 34 | 35 | audio_output { 36 | type "httpd" 37 | name "httpd" 38 | port "8000" 39 | encoder "flac" 40 | mixer_type "software" 41 | always_on "yes" 42 | tags "yes" 43 | } 44 | -------------------------------------------------------------------------------- /.config/mpv/input.conf: -------------------------------------------------------------------------------- 1 | l seek 5 2 | h seek -5 3 | Shift+l seek 60 4 | Shift+h seek -60 5 | k cycle sub 6 | j cycle sub down 7 | ctrl+l add chapter 1 8 | ctrl+h add chapter -1 9 | Shift+k add video-zoom 0.1 10 | Shift+j add video-zoom -0.1 11 | = add volume +5 12 | - add volume -5 13 | -------------------------------------------------------------------------------- /.config/mpv/mpv.conf: -------------------------------------------------------------------------------- 1 | ytdl-format="bestvideo[height<=?1080]+bestaudio/best" 2 | save-position-on-quit 3 | slang=en # display english subtitles if available 4 | -------------------------------------------------------------------------------- /.config/ncmpcpp/bindings: -------------------------------------------------------------------------------- 1 | def_key "j" 2 | scroll_down 3 | 4 | def_key "k" 5 | scroll_up 6 | 7 | def_key "h" 8 | previous_column 9 | 10 | def_key "l" 11 | next_column 12 | 13 | def_key "l" 14 | enter_directory 15 | 16 | def_key "l" 17 | run_action 18 | 19 | def_key "l" 20 | play_item 21 | 22 | def_key "h" 23 | jump_to_parent_directory 24 | 25 | def_key "ctrl-u" 26 | page_up 27 | 28 | def_key "ctrl-d" 29 | page_down 30 | 31 | def_key "G" 32 | move_end 33 | 34 | def_key "g" 35 | move_home 36 | 37 | def_key "K" 38 | select_item 39 | scroll_up 40 | 41 | def_key "J" 42 | select_item 43 | scroll_down 44 | 45 | def_key "d" 46 | delete_playlist_items 47 | 48 | def_key "d" 49 | delete_stored_playlist 50 | 51 | def_key "d" 52 | delete_browser_items 53 | -------------------------------------------------------------------------------- /.config/ncmpcpp/config: -------------------------------------------------------------------------------- 1 | # ██████ ██████ ██████ 2 | # ███████ █████ ██████████ ░██░░░██ █████ ░██░░░██░██░░░██ 3 | # ░░██░░░██ ██░░░██░░██░░██░░██░██ ░██ ██░░░██░██ ░██░██ ░██ 4 | # ░██ ░██░██ ░░ ░██ ░██ ░██░██████ ░██ ░░ ░██████ ░██████ 5 | # ░██ ░██░██ ██ ░██ ░██ ░██░██░░░ ░██ ██░██░░░ ░██░░░ 6 | # ███ ░██░░█████ ███ ░██ ░██░██ ░░█████ ░██ ░██ 7 | # ░░░ ░░ ░░░░░ ░░░ ░░ ░░ ░░ ░░░░░ ░░ ░░ 8 | 9 | mpd_music_dir = "~/music" 10 | lyrics_directory = "~/.local/share/lyrics" 11 | ncmpcpp_directory = "~/.config/ncmpcpp" 12 | current_item_prefix = "$(8_black)" 13 | current_item_suffix = "$/r$(end)" 14 | current_item_inactive_column_prefix = "$(5_black)" 15 | current_item_inactive_column_suffix = "$/r$(end)" 16 | browser_playlist_prefix = "$b$5playlist$9$/b " 17 | empty_tag_marker = "" 18 | statusbar_visibility = no 19 | titles_visibility = no 20 | header_visibility = no 21 | message_delay_time = 1 22 | progressbar_look = "▂▂▂" # ━━─ 23 | main_window_color = 8 24 | progressbar_color = 1 25 | progressbar_elapsed_color = 5 26 | seek_time = 5 27 | volume_change_step = 5 28 | now_playing_prefix = "$5" 29 | now_playing_suffix = "$9" 30 | song_status_format = "$/b{%t}|{%f}" 31 | song_list_format = "{%a - }{%t}|{%f}$R$(end) " 32 | song_library_format = "$/b{{%a - %t} (%b)}|{%f}" 33 | #song_columns_list_format = "(50)[08]{ar} (50)[16]{t}" 34 | song_columns_list_format = "(4f)[]{} (90)[]{t|f}" 35 | -------------------------------------------------------------------------------- /.config/newsboat/config: -------------------------------------------------------------------------------- 1 | show-read-feeds yes 2 | auto-reload yes 3 | 4 | bind-key j down 5 | bind-key k up 6 | bind-key j next articlelist 7 | bind-key k prev articlelist 8 | bind-key J next-feed articlelist 9 | bind-key K prev-feed articlelist 10 | bind-key G end 11 | bind-key g home 12 | bind-key d pagedown 13 | bind-key u pageup 14 | bind-key l open 15 | bind-key h quit 16 | bind-key a toggle-article-read 17 | bind-key n next-unread 18 | bind-key N prev-unread 19 | bind-key D pb-download 20 | bind-key U show-urls 21 | bind-key x pb-delete 22 | 23 | color background default default 24 | color listnormal color8 default 25 | color listnormal_unread default default 26 | color listfocus_unread default black 27 | color listfocus color4 black 28 | color info color8 default 29 | color article white default 30 | search-highlight-colors default default reverse 31 | 32 | browser linkhandler 33 | macro d set browser "setsid -f menuhandler"; open-in-browser; set browser linkhandler 34 | macro c set browser "xclip -sel clip <<<" ; open-in-browser; set browser linkhandler 35 | macro w set browser "w3m"; open-in-browser; set browser linkhandler 36 | 37 | highlight all "---.*---" yellow 38 | highlight feedlist ".*(0/0))" black 39 | highlight article "^Feed:.*" white default bold 40 | highlight article "^Title:.*" blue default bold 41 | highlight article "^Author:.*" white default 42 | highlight article "^Date:.*" white default 43 | highlight article "^Link:.*" blue default bold 44 | highlight article "\\[[0-9][0-9]*\\]" magenta default 45 | highlight article "\\[image\\ [0-9]+\\]" yellow default bold 46 | highlight article "\\[embedded flash: [0-9][0-9]*\\]" yellow default bold 47 | highlight article ":.*\\(link\\)$" blue default underline 48 | highlight article ":.*\\(image\\)$" blue default 49 | highlight article ":.*\\(embedded flash\\)$" magenta default 50 | highlight article "https?://[^ ]+" blue default underline 51 | -------------------------------------------------------------------------------- /.config/newsboat/urls: -------------------------------------------------------------------------------- 1 | http://lukesmith.xyz/rss.xml "luke smith" 2 | https://notrelated.libsyn.com/rss "luke smith" 3 | https://www.youtube.com/feeds/videos.xml?channel_id=UC2eYFnH61tmytImy1mTYvhA "luke smith" "~Luke Smith (YouTube)" 4 | https://suckless.org/atom.xml "linux" 5 | https://www.archlinux.org/feeds/news/ "linux" 6 | https://gynvael.coldwind.pl/rss_pl.php "tech" "~Gynvael Coldwind" 7 | -------------------------------------------------------------------------------- /.config/nvim/init.vim: -------------------------------------------------------------------------------- 1 | " ___ ______ 2 | " __ | / /__(_)______ ___ 3 | " __ | / /__ /__ __ `__ \ 4 | " __ |/ / _ / _ / / / / / 5 | " _____/ /_/ /_/ /_/ /_/ 6 | 7 | " general 8 | let mapleader = ' ' 9 | set nocompatible 10 | set autoread 11 | set belloff=all 12 | set clipboard=unnamedplus 13 | set completeopt+=longest 14 | set exrc 15 | set secure 16 | set hidden 17 | set lazyredraw 18 | set listchars=tab:>\ ,trail:-,nbsp:+,eol:$ 19 | set mouse=a 20 | set scrolloff=5 21 | set ttimeout 22 | set ttimeoutlen=50 23 | set undofile 24 | set undodir=~/.vim/undo 25 | set wildmenu 26 | set wildmode=longest:full,full 27 | set updatetime=100 28 | 29 | " searching 30 | set path+=** 31 | set hlsearch 32 | set ignorecase 33 | set smartcase 34 | set incsearch 35 | if has('nvim') | set inccommand=nosplit | endif 36 | 37 | " formating 38 | filetype plugin indent on 39 | set autoindent 40 | set smartindent 41 | set backspace=indent,eol,start 42 | set formatoptions+=jl 43 | set noexpandtab 44 | set shiftround 45 | set shiftwidth=8 46 | set smarttab 47 | set softtabstop=8 48 | set tabstop=8 49 | set textwidth=79 50 | au! Filetype gitcommit,markdown setl spell! 51 | 52 | " theme 53 | syntax on 54 | set background=dark 55 | colors iceberg 56 | set number 57 | set relativenumber 58 | set ruler 59 | set showcmd 60 | set noshowmode 61 | set cursorline 62 | set shortmess+=cs 63 | 64 | " gui 65 | set guioptions-=m 66 | set guioptions-=T 67 | set guioptions-=r 68 | set guioptions-=L 69 | set guicursor+=a:blinkon0 70 | 71 | " cursor 72 | let &t_EI = "\e[2 q" 73 | let &t_SI = "\e[6 q" 74 | let &t_SR = "\e[4 q" 75 | au! VimEnter * silent exec '!printf "' &t_EI '"' 76 | 77 | " statusline 78 | set laststatus=2 79 | let StatusModes = { 80 | \ 'n': 'nor', 81 | \ 'i': 'ins', 82 | \ 'R': 'rep', 83 | \ 'c': 'cmd', 84 | \ 't': 'trm', 85 | \ 'v': 'vis', 86 | \ 'V': 'vis', 87 | \ '': 'vis', 88 | \ 'S': 'sel' 89 | \ } 90 | set stl=%#Dark#\ %{get(StatusModes,mode(),'-')}\ \| 91 | set stl+=%#Normal#\ %t\ 92 | set stl+=%#Dark#%{&paste?'[PASTE]':''}%r%m 93 | set stl+=%= 94 | set stl+=\%#Accent#\ %l.%v\ %#Dark#\|\ 95 | set stl+=%{empty(&filetype)?'txt':&filetype}\ 96 | 97 | " plugins 98 | ru! ftplugin/man.vim 99 | pa! matchit 100 | pa! justify 101 | pa! cfilter 102 | 103 | function! LessInitFunc() 104 | set nonu nornu nocul ls=0 105 | endfunction 106 | 107 | let g:netrw_list_hide = '^\.\.\=/\=$' 108 | let g:netrw_winsize = 25 109 | let g:netrw_banner = 0 110 | let g:netrw_browse_split = 4 111 | let g:netrw_preview = 1 112 | 113 | set rtp+=~/.config/fzf 114 | let $FZF_DEFAULT_OPTS .= '--layout=default' 115 | let g:fzf_history_dir = '~/.local/share/fzf-history' 116 | let g:fzf_layout = {'down': '50%'} 117 | au! FileType fzf set ls=0 nonu nornu 118 | 119 | set omnifunc=ale#completion#OmniFunc 120 | 121 | " mappings 122 | set pastetoggle= 123 | nno c :cd %:p:h \| pwd 124 | nno :noh 125 | nno q :cw 126 | nno i :set list! cuc! \| let &cc = &cc ? 0 : &tw 127 | nno e :Lex 128 | nno w :%s/\s\+$//e 129 | nno s :setl spell! 130 | nno n :let [&nu, &rnu] = [!&rnu, &nu + &rnu == 1] 131 | 132 | nno ]e :cn 133 | nno [e :cp 134 | 135 | nno f :Files 136 | nno b :Buffers 137 | nno l :BLines 138 | nno L :Lines 139 | nno t :Tags 140 | nno m :Marks 141 | nno h :History 142 | nno H :Helptags 143 | -------------------------------------------------------------------------------- /.config/picom.conf: -------------------------------------------------------------------------------- 1 | backend = "glx"; 2 | glx-no-stencil = true; 3 | glx-copy-from-front = false; 4 | glx-use-copysubbuffermesa = true; 5 | glx-no-rebind-pixmap = true; 6 | vsync = false; 7 | 8 | # shadow 9 | shadow = true; 10 | shadow-radius = 0; 11 | shadow-opacity = 0.7; 12 | shadow-offset-x = 10; 13 | shadow-offset-y = 10; 14 | shadow-exclude = [ 15 | "class_g = 'slop'", 16 | "class_g = 'dwm'", 17 | "class_g = 'dmenu'", 18 | ] 19 | 20 | # fade 21 | fading = true; 22 | fade-delta = 5; 23 | fade-in-step = 0.03; 24 | fade-out-step = 0.03; 25 | fade-exclude = [ 26 | "class_g = 'dmenu'", 27 | ] 28 | 29 | # blur && opacity 30 | blur-background = true; 31 | blur-kern = "7x7box" 32 | opacity-rule = [ 33 | "90:class_i = 'st'", 34 | "90:class_g = 'st'", 35 | "90:class_g = 'newsboat'", 36 | ]; 37 | 38 | 39 | # misc 40 | inactive-dim = 0.1; 41 | focus-exclude = [ 42 | "class_g = 'dwm'", 43 | "class_g = 'dmenu'", 44 | "class_g = 'Dunst'", 45 | ]; 46 | -------------------------------------------------------------------------------- /.config/slock/LICENSE: -------------------------------------------------------------------------------- 1 | MIT/X Consortium License 2 | 3 | © 2015-2016 Markus Teich 4 | © 2014 Dimitris Papastamos 5 | © 2006-2014 Anselm R Garbe 6 | © 2014-2016 Laslo Hunhold 7 | 8 | Permission is hereby granted, free of charge, to any person obtaining a 9 | copy of this software and associated documentation files (the "Software"), 10 | to deal in the Software without restriction, including without limitation 11 | the rights to use, copy, modify, merge, publish, distribute, sublicense, 12 | and/or sell copies of the Software, and to permit persons to whom the 13 | Software is furnished to do so, subject to the following conditions: 14 | 15 | The above copyright notice and this permission notice shall be included in 16 | all copies or substantial portions of the Software. 17 | 18 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 21 | THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 23 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 24 | DEALINGS IN THE SOFTWARE. 25 | -------------------------------------------------------------------------------- /.config/slock/Makefile: -------------------------------------------------------------------------------- 1 | # slock - simple screen locker 2 | # See LICENSE file for copyright and license details. 3 | 4 | include config.mk 5 | 6 | SRC = slock.c ${COMPATSRC} 7 | OBJ = ${SRC:.c=.o} 8 | 9 | all: options slock 10 | 11 | options: 12 | @echo slock build options: 13 | @echo "CFLAGS = ${CFLAGS}" 14 | @echo "LDFLAGS = ${LDFLAGS}" 15 | @echo "CC = ${CC}" 16 | 17 | .c.o: 18 | @echo CC $< 19 | @${CC} -c ${CFLAGS} $< 20 | 21 | ${OBJ}: config.h config.mk arg.h util.h 22 | 23 | config.h: 24 | @echo creating $@ from config.def.h 25 | @cp config.def.h $@ 26 | 27 | slock: ${OBJ} 28 | @echo CC -o $@ 29 | @${CC} -o $@ ${OBJ} ${LDFLAGS} 30 | 31 | clean: 32 | @echo cleaning 33 | @rm -f slock ${OBJ} slock-${VERSION}.tar.gz 34 | 35 | dist: clean 36 | @echo creating dist tarball 37 | @mkdir -p slock-${VERSION} 38 | @cp -R LICENSE Makefile README slock.1 config.mk \ 39 | ${SRC} explicit_bzero.c config.def.h arg.h util.h slock-${VERSION} 40 | @tar -cf slock-${VERSION}.tar slock-${VERSION} 41 | @gzip slock-${VERSION}.tar 42 | @rm -rf slock-${VERSION} 43 | 44 | install: all 45 | @echo installing executable file to ${DESTDIR}${PREFIX}/bin 46 | @mkdir -p ${DESTDIR}${PREFIX}/bin 47 | @cp -f slock ${DESTDIR}${PREFIX}/bin 48 | @chmod 755 ${DESTDIR}${PREFIX}/bin/slock 49 | @chmod u+s ${DESTDIR}${PREFIX}/bin/slock 50 | @echo installing manual page to ${DESTDIR}${MANPREFIX}/man1 51 | @mkdir -p ${DESTDIR}${MANPREFIX}/man1 52 | @sed "s/VERSION/${VERSION}/g" ${DESTDIR}${MANPREFIX}/man1/slock.1 53 | @chmod 644 ${DESTDIR}${MANPREFIX}/man1/slock.1 54 | 55 | uninstall: 56 | @echo removing executable file from ${DESTDIR}${PREFIX}/bin 57 | @rm -f ${DESTDIR}${PREFIX}/bin/slock 58 | @echo removing manual page from ${DESTDIR}${MANPREFIX}/man1 59 | @rm -f ${DESTDIR}${MANPREFIX}/man1/slock.1 60 | 61 | .PHONY: all options clean dist install uninstall 62 | -------------------------------------------------------------------------------- /.config/slock/README: -------------------------------------------------------------------------------- 1 | slock - simple screen locker 2 | ============================ 3 | simple screen locker utility for X. 4 | 5 | 6 | Requirements 7 | ------------ 8 | In order to build slock you need the Xlib header files. 9 | 10 | 11 | Installation 12 | ------------ 13 | Edit config.mk to match your local setup (slock is installed into 14 | the /usr/local namespace by default). 15 | 16 | Afterwards enter the following command to build and install slock 17 | (if necessary as root): 18 | 19 | make clean install 20 | 21 | 22 | Running slock 23 | ------------- 24 | Simply invoke the 'slock' command. To get out of it, enter your password. 25 | -------------------------------------------------------------------------------- /.config/slock/arg.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copy me if you can. 3 | * by 20h 4 | */ 5 | 6 | #ifndef ARG_H__ 7 | #define ARG_H__ 8 | 9 | extern char *argv0; 10 | 11 | /* use main(int argc, char *argv[]) */ 12 | #define ARGBEGIN for (argv0 = *argv, argv++, argc--;\ 13 | argv[0] && argv[0][0] == '-'\ 14 | && argv[0][1];\ 15 | argc--, argv++) {\ 16 | char argc_;\ 17 | char **argv_;\ 18 | int brk_;\ 19 | if (argv[0][1] == '-' && argv[0][2] == '\0') {\ 20 | argv++;\ 21 | argc--;\ 22 | break;\ 23 | }\ 24 | for (brk_ = 0, argv[0]++, argv_ = argv;\ 25 | argv[0][0] && !brk_;\ 26 | argv[0]++) {\ 27 | if (argv_ != argv)\ 28 | break;\ 29 | argc_ = argv[0][0];\ 30 | switch (argc_) 31 | 32 | /* Handles obsolete -NUM syntax */ 33 | #define ARGNUM case '0':\ 34 | case '1':\ 35 | case '2':\ 36 | case '3':\ 37 | case '4':\ 38 | case '5':\ 39 | case '6':\ 40 | case '7':\ 41 | case '8':\ 42 | case '9' 43 | 44 | #define ARGEND }\ 45 | } 46 | 47 | #define ARGC() argc_ 48 | 49 | #define ARGNUMF() (brk_ = 1, estrtonum(argv[0], 0, INT_MAX)) 50 | 51 | #define EARGF(x) ((argv[0][1] == '\0' && argv[1] == NULL)?\ 52 | ((x), abort(), (char *)0) :\ 53 | (brk_ = 1, (argv[0][1] != '\0')?\ 54 | (&argv[0][1]) :\ 55 | (argc--, argv++, argv[0]))) 56 | 57 | #define ARGF() ((argv[0][1] == '\0' && argv[1] == NULL)?\ 58 | (char *)0 :\ 59 | (brk_ = 1, (argv[0][1] != '\0')?\ 60 | (&argv[0][1]) :\ 61 | (argc--, argv++, argv[0]))) 62 | 63 | #define LNGARG() &argv[0][0] 64 | 65 | #endif 66 | -------------------------------------------------------------------------------- /.config/slock/config.h: -------------------------------------------------------------------------------- 1 | /* user and group to drop privileges to */ 2 | static const char *user = "jan"; 3 | static const char *group = "jan"; 4 | 5 | static const char *colorname[NUMCOLS] = { 6 | [INIT] = "black", /* after initialization */ 7 | [INPUT] = "#005577", /* during input */ 8 | [FAILED] = "#CC3333", /* wrong password */ 9 | }; 10 | 11 | /* 12 | * Xresources preferences to load at startup 13 | */ 14 | ResourcePref resources[] = { 15 | { "init", STRING, &colorname[INIT] }, 16 | { "input", STRING, &colorname[INPUT] }, 17 | { "failed", STRING, &colorname[FAILED] }, 18 | }; 19 | 20 | /* treat a cleared input like a wrong password (color) */ 21 | static const int failonclear = 1; 22 | -------------------------------------------------------------------------------- /.config/slock/config.mk: -------------------------------------------------------------------------------- 1 | # slock version 2 | VERSION = 1.4 3 | 4 | # Customize below to fit your system 5 | 6 | # paths 7 | PREFIX = /usr/local 8 | MANPREFIX = ${PREFIX}/share/man 9 | 10 | X11INC = /usr/X11R6/include 11 | X11LIB = /usr/X11R6/lib 12 | 13 | # includes and libs 14 | INCS = -I. -I/usr/include -I${X11INC} 15 | LIBS = -L/usr/lib -lc -lcrypt -L${X11LIB} -lX11 -lXext -lXrandr 16 | 17 | # flags 18 | CPPFLAGS = -DVERSION=\"${VERSION}\" -D_DEFAULT_SOURCE -DHAVE_SHADOW_H 19 | CFLAGS = -std=c99 -pedantic -Wall -Os ${INCS} ${CPPFLAGS} 20 | LDFLAGS = -s ${LIBS} 21 | COMPATSRC = explicit_bzero.c 22 | 23 | # On OpenBSD and Darwin remove -lcrypt from LIBS 24 | #LIBS = -L/usr/lib -lc -L${X11LIB} -lX11 -lXext -lXrandr 25 | # On *BSD remove -DHAVE_SHADOW_H from CPPFLAGS 26 | # On NetBSD add -D_NETBSD_SOURCE to CPPFLAGS 27 | #CPPFLAGS = -DVERSION=\"${VERSION}\" -D_BSD_SOURCE -D_NETBSD_SOURCE 28 | # On OpenBSD set COMPATSRC to empty 29 | #COMPATSRC = 30 | 31 | # compiler and linker 32 | CC = cc 33 | -------------------------------------------------------------------------------- /.config/slock/explicit_bzero.c: -------------------------------------------------------------------------------- 1 | /* $OpenBSD: explicit_bzero.c,v 1.3 2014/06/21 02:34:26 matthew Exp $ */ 2 | /* 3 | * Public domain. 4 | * Written by Matthew Dempsky. 5 | */ 6 | 7 | #include 8 | 9 | __attribute__((weak)) void 10 | __explicit_bzero_hook(void *buf, size_t len) 11 | { 12 | } 13 | 14 | void 15 | explicit_bzero(void *buf, size_t len) 16 | { 17 | memset(buf, 0, len); 18 | __explicit_bzero_hook(buf, len); 19 | } 20 | -------------------------------------------------------------------------------- /.config/slock/patches/terminalkeys.diff: -------------------------------------------------------------------------------- 1 | diff --git a/slock.c b/slock.c 2 | index c9cdee2..03e191d 100644 3 | --- a/slock.c 4 | +++ b/slock.c 5 | @@ -149,6 +149,22 @@ readpw(Display *dpy, const char *pws) 6 | IsPFKey(ksym) || 7 | IsPrivateKeypadKey(ksym)) 8 | continue; 9 | + if (ev.xkey.state & ControlMask) { 10 | + switch (ksym) { 11 | + case XK_u: 12 | + ksym = XK_Escape; 13 | + break; 14 | + case XK_m: 15 | + ksym = XK_Return; 16 | + break; 17 | + case XK_j: 18 | + ksym = XK_Return; 19 | + break; 20 | + case XK_h: 21 | + ksym = XK_BackSpace; 22 | + break; 23 | + } 24 | + } 25 | switch (ksym) { 26 | case XK_Return: 27 | passwd[len] = 0; 28 | -------------------------------------------------------------------------------- /.config/slock/patches/xresources.diff: -------------------------------------------------------------------------------- 1 | From 53e56c751b3f2be4154760788850c51dbffc0add Mon Sep 17 00:00:00 2001 2 | From: Arnas Udovicius 3 | Date: Tue, 26 Nov 2019 16:16:15 +0200 4 | Subject: [PATCH] Read colors from Xresources 5 | 6 | --- 7 | config.def.h | 14 +++++++++-- 8 | slock.c | 68 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 9 | util.h | 3 +++ 10 | 3 files changed, 83 insertions(+), 2 deletions(-) 11 | 12 | diff --git a/config.def.h b/config.def.h 13 | index 6288856..bfc1ba0 100644 14 | --- a/config.def.h 15 | +++ b/config.def.h 16 | @@ -3,11 +3,21 @@ static const char *user = "nobody"; 17 | static const char *group = "nogroup"; 18 | 19 | static const char *colorname[NUMCOLS] = { 20 | - [INIT] = "black", /* after initialization */ 21 | - [INPUT] = "#005577", /* during input */ 22 | + [INIT] = "black", /* after initialization */ 23 | + [INPUT] = "#005577", /* during input */ 24 | [FAILED] = "#CC3333", /* wrong password */ 25 | [CAPS] = "red", /* CapsLock on */ 26 | }; 27 | 28 | +/* 29 | + * Xresources preferences to load at startup 30 | + */ 31 | +ResourcePref resources[] = { 32 | + { "color0", STRING, &colorname[INIT] }, 33 | + { "color4", STRING, &colorname[INPUT] }, 34 | + { "color1", STRING, &colorname[FAILED] }, 35 | + { "color3", STRING, &colorname[CAPS] }, 36 | +}; 37 | + 38 | /* treat a cleared input like a wrong password (color) */ 39 | static const int failonclear = 1; 40 | diff --git a/slock.c b/slock.c 41 | index 5f4fb7a..2395547 100644 42 | --- a/slock.c 43 | +++ b/slock.c 44 | @@ -6,6 +6,7 @@ 45 | 46 | #include 47 | #include 48 | +#include 49 | #include 50 | #include 51 | #include 52 | @@ -19,6 +20,7 @@ 53 | #include 54 | #include 55 | #include 56 | +#include 57 | 58 | #include "arg.h" 59 | #include "util.h" 60 | @@ -46,6 +48,19 @@ struct xrandr { 61 | int errbase; 62 | }; 63 | 64 | +/* Xresources preferences */ 65 | +enum resource_type { 66 | + STRING = 0, 67 | + INTEGER = 1, 68 | + FLOAT = 2 69 | +}; 70 | + 71 | +typedef struct { 72 | + char *name; 73 | + enum resource_type type; 74 | + void *dst; 75 | +} ResourcePref; 76 | + 77 | #include "config.h" 78 | 79 | static void 80 | @@ -306,6 +321,57 @@ lockscreen(Display *dpy, struct xrandr *rr, int screen) 81 | return NULL; 82 | } 83 | 84 | +int 85 | +resource_load(XrmDatabase db, char *name, enum resource_type rtype, void *dst) 86 | +{ 87 | + char **sdst = dst; 88 | + int *idst = dst; 89 | + float *fdst = dst; 90 | + 91 | + char fullname[256]; 92 | + char fullclass[256]; 93 | + char *type; 94 | + XrmValue ret; 95 | + 96 | + snprintf(fullname, sizeof(fullname), "%s.%s", "slock", name); 97 | + snprintf(fullclass, sizeof(fullclass), "%s.%s", "Slock", name); 98 | + fullname[sizeof(fullname) - 1] = fullclass[sizeof(fullclass) - 1] = '\0'; 99 | + 100 | + XrmGetResource(db, fullname, fullclass, &type, &ret); 101 | + if (ret.addr == NULL || strncmp("String", type, 64)) 102 | + return 1; 103 | + 104 | + switch (rtype) { 105 | + case STRING: 106 | + *sdst = ret.addr; 107 | + break; 108 | + case INTEGER: 109 | + *idst = strtoul(ret.addr, NULL, 10); 110 | + break; 111 | + case FLOAT: 112 | + *fdst = strtof(ret.addr, NULL); 113 | + break; 114 | + } 115 | + return 0; 116 | +} 117 | + 118 | +void 119 | +config_init(Display *dpy) 120 | +{ 121 | + char *resm; 122 | + XrmDatabase db; 123 | + ResourcePref *p; 124 | + 125 | + XrmInitialize(); 126 | + resm = XResourceManagerString(dpy); 127 | + if (!resm) 128 | + return; 129 | + 130 | + db = XrmGetStringDatabase(resm); 131 | + for (p = resources; p < resources + LEN(resources); p++) 132 | + resource_load(db, p->name, p->type, p->dst); 133 | +} 134 | + 135 | static void 136 | usage(void) 137 | { 138 | @@ -364,6 +430,8 @@ main(int argc, char **argv) { 139 | if (setuid(duid) < 0) 140 | die("slock: setuid: %s\n", strerror(errno)); 141 | 142 | + config_init(dpy); 143 | + 144 | /* check for Xrandr support */ 145 | rr.active = XRRQueryExtension(dpy, &rr.evbase, &rr.errbase); 146 | 147 | diff --git a/util.h b/util.h 148 | index 6f748b8..148dbc1 100644 149 | --- a/util.h 150 | +++ b/util.h 151 | @@ -1,2 +1,5 @@ 152 | +/* macros */ 153 | +#define LEN(a) (sizeof(a) / sizeof(a)[0]) 154 | + 155 | #undef explicit_bzero 156 | void explicit_bzero(void *, size_t); 157 | -- 158 | 2.24.0 159 | 160 | -------------------------------------------------------------------------------- /.config/slock/slock.1: -------------------------------------------------------------------------------- 1 | .Dd 2016-08-23 2 | .Dt SLOCK 1 3 | .Sh NAME 4 | .Nm slock 5 | .Nd simple X screen locker 6 | .Sh SYNOPSIS 7 | .Nm 8 | .Op Fl v 9 | .Op Ar cmd Op Ar arg ... 10 | .Sh DESCRIPTION 11 | .Nm 12 | is a simple X screen locker. If provided, 13 | .Ar cmd Op Ar arg ... 14 | is executed after the screen has been locked. 15 | .Sh OPTIONS 16 | .Bl -tag -width Ds 17 | .It Fl v 18 | Print version information to stdout and exit. 19 | .El 20 | .Sh SECURITY CONSIDERATIONS 21 | To make sure a locked screen can not be bypassed by switching VTs 22 | or killing the X server with Ctrl+Alt+Backspace, it is recommended 23 | to disable both in 24 | .Xr xorg.conf 5 25 | for maximum security: 26 | .Bd -literal -offset left 27 | Section "ServerFlags" 28 | Option "DontVTSwitch" "True" 29 | Option "DontZap" "True" 30 | EndSection 31 | .Ed 32 | .Sh EXAMPLES 33 | $ 34 | .Nm 35 | /usr/sbin/s2ram 36 | .Sh CUSTOMIZATION 37 | .Nm 38 | can be customized by creating a custom config.h from config.def.h and 39 | (re)compiling the source code. This keeps it fast, secure and simple. 40 | -------------------------------------------------------------------------------- /.config/slock/util.h: -------------------------------------------------------------------------------- 1 | /* macros */ 2 | #define LEN(a) (sizeof(a) / sizeof(a)[0]) 3 | 4 | #undef explicit_bzero 5 | void explicit_bzero(void *, size_t); 6 | -------------------------------------------------------------------------------- /.config/st/LEGACY: -------------------------------------------------------------------------------- 1 | A STATEMENT ON LEGACY SUPPORT 2 | 3 | In the terminal world there is much cruft that comes from old and unsup‐ 4 | ported terminals that inherit incompatible modes and escape sequences 5 | which noone is able to know, except when he/she comes from that time and 6 | developed a graphical vt100 emulator at that time. 7 | 8 | One goal of st is to only support what is really needed. When you en‐ 9 | counter a sequence which you really need, implement it. But while you 10 | are at it, do not add the other cruft you might encounter while sneek‐ 11 | ing at other terminal emulators. History has bloated them and there is 12 | no real evidence that most of the sequences are used today. 13 | 14 | 15 | Christoph Lohmann <20h@r-36.net> 16 | 2012-09-13T07:00:36.081271045+02:00 17 | 18 | -------------------------------------------------------------------------------- /.config/st/LICENSE: -------------------------------------------------------------------------------- 1 | MIT/X Consortium License 2 | 3 | © 2014-2020 Hiltjo Posthuma 4 | © 2018 Devin J. Pohly 5 | © 2014-2017 Quentin Rameau 6 | © 2009-2012 Aurélien APTEL 7 | © 2008-2017 Anselm R Garbe 8 | © 2012-2017 Roberto E. Vargas Caballero 9 | © 2012-2016 Christoph Lohmann <20h at r-36 dot net> 10 | © 2013 Eon S. Jeon 11 | © 2013 Alexander Sedov 12 | © 2013 Mark Edgar 13 | © 2013-2014 Eric Pruitt 14 | © 2013 Michael Forney 15 | © 2013-2014 Markus Teich 16 | © 2014-2015 Laslo Hunhold 17 | 18 | Permission is hereby granted, free of charge, to any person obtaining a 19 | copy of this software and associated documentation files (the "Software"), 20 | to deal in the Software without restriction, including without limitation 21 | the rights to use, copy, modify, merge, publish, distribute, sublicense, 22 | and/or sell copies of the Software, and to permit persons to whom the 23 | Software is furnished to do so, subject to the following conditions: 24 | 25 | The above copyright notice and this permission notice shall be included in 26 | all copies or substantial portions of the Software. 27 | 28 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 29 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 30 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 31 | THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 32 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 33 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 34 | DEALINGS IN THE SOFTWARE. 35 | -------------------------------------------------------------------------------- /.config/st/Makefile: -------------------------------------------------------------------------------- 1 | # st - simple terminal 2 | # See LICENSE file for copyright and license details. 3 | .POSIX: 4 | 5 | include config.mk 6 | 7 | SRC = st.c x.c 8 | OBJ = $(SRC:.c=.o) 9 | 10 | all: options st 11 | 12 | options: 13 | @echo st build options: 14 | @echo "CFLAGS = $(STCFLAGS)" 15 | @echo "LDFLAGS = $(STLDFLAGS)" 16 | @echo "CC = $(CC)" 17 | 18 | config.h: 19 | cp config.def.h $@ 20 | 21 | .c.o: 22 | $(CC) $(STCFLAGS) -c $< 23 | 24 | st.o: config.h st.h win.h 25 | x.o: arg.h config.h st.h win.h 26 | 27 | $(OBJ): config.h config.mk 28 | 29 | st: $(OBJ) 30 | $(CC) -o $@ $(OBJ) $(STLDFLAGS) 31 | 32 | clean: 33 | rm -f st $(OBJ) st-$(VERSION).tar.gz 34 | 35 | dist: clean 36 | mkdir -p st-$(VERSION) 37 | cp -R FAQ LEGACY TODO LICENSE Makefile README config.mk\ 38 | config.def.h st.info st.1 arg.h st.h win.h $(SRC)\ 39 | st-$(VERSION) 40 | tar -cf - st-$(VERSION) | gzip > st-$(VERSION).tar.gz 41 | rm -rf st-$(VERSION) 42 | 43 | install: st 44 | mkdir -p $(DESTDIR)$(PREFIX)/bin 45 | cp -f st $(DESTDIR)$(PREFIX)/bin 46 | chmod 755 $(DESTDIR)$(PREFIX)/bin/st 47 | mkdir -p $(DESTDIR)$(MANPREFIX)/man1 48 | sed "s/VERSION/$(VERSION)/g" < st.1 > $(DESTDIR)$(MANPREFIX)/man1/st.1 49 | chmod 644 $(DESTDIR)$(MANPREFIX)/man1/st.1 50 | tic -sx st.info 51 | @echo Please see the README file regarding the terminfo entry of st. 52 | 53 | uninstall: 54 | rm -f $(DESTDIR)$(PREFIX)/bin/st 55 | rm -f $(DESTDIR)$(MANPREFIX)/man1/st.1 56 | 57 | .PHONY: all options clean dist install uninstall 58 | -------------------------------------------------------------------------------- /.config/st/README: -------------------------------------------------------------------------------- 1 | st - simple terminal 2 | -------------------- 3 | st is a simple terminal emulator for X which sucks less. 4 | 5 | 6 | Requirements 7 | ------------ 8 | In order to build st you need the Xlib header files. 9 | 10 | 11 | Installation 12 | ------------ 13 | Edit config.mk to match your local setup (st is installed into 14 | the /usr/local namespace by default). 15 | 16 | Afterwards enter the following command to build and install st (if 17 | necessary as root): 18 | 19 | make clean install 20 | 21 | 22 | Running st 23 | ---------- 24 | If you did not install st with make clean install, you must compile 25 | the st terminfo entry with the following command: 26 | 27 | tic -sx st.info 28 | 29 | See the man page for additional details. 30 | 31 | Credits 32 | ------- 33 | Based on Aurélien APTEL bt source code. 34 | 35 | -------------------------------------------------------------------------------- /.config/st/TODO: -------------------------------------------------------------------------------- 1 | vt emulation 2 | ------------ 3 | 4 | * double-height support 5 | 6 | code & interface 7 | ---------------- 8 | 9 | * add a simple way to do multiplexing 10 | 11 | drawing 12 | ------- 13 | * add diacritics support to xdraws() 14 | * switch to a suckless font drawing library 15 | * make the font cache simpler 16 | * add better support for brightening of the upper colors 17 | 18 | bugs 19 | ---- 20 | 21 | * fix shift up/down (shift selection in emacs) 22 | * remove DEC test sequence when appropriate 23 | 24 | misc 25 | ---- 26 | 27 | $ grep -nE 'XXX|TODO' st.c 28 | 29 | -------------------------------------------------------------------------------- /.config/st/arg.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copy me if you can. 3 | * by 20h 4 | */ 5 | 6 | #ifndef ARG_H__ 7 | #define ARG_H__ 8 | 9 | extern char *argv0; 10 | 11 | /* use main(int argc, char *argv[]) */ 12 | #define ARGBEGIN for (argv0 = *argv, argv++, argc--;\ 13 | argv[0] && argv[0][0] == '-'\ 14 | && argv[0][1];\ 15 | argc--, argv++) {\ 16 | char argc_;\ 17 | char **argv_;\ 18 | int brk_;\ 19 | if (argv[0][1] == '-' && argv[0][2] == '\0') {\ 20 | argv++;\ 21 | argc--;\ 22 | break;\ 23 | }\ 24 | int i_;\ 25 | for (i_ = 1, brk_ = 0, argv_ = argv;\ 26 | argv[0][i_] && !brk_;\ 27 | i_++) {\ 28 | if (argv_ != argv)\ 29 | break;\ 30 | argc_ = argv[0][i_];\ 31 | switch (argc_) 32 | 33 | #define ARGEND }\ 34 | } 35 | 36 | #define ARGC() argc_ 37 | 38 | #define EARGF(x) ((argv[0][i_+1] == '\0' && argv[1] == NULL)?\ 39 | ((x), abort(), (char *)0) :\ 40 | (brk_ = 1, (argv[0][i_+1] != '\0')?\ 41 | (&argv[0][i_+1]) :\ 42 | (argc--, argv++, argv[0]))) 43 | 44 | #define ARGF() ((argv[0][i_+1] == '\0' && argv[1] == NULL)?\ 45 | (char *)0 :\ 46 | (brk_ = 1, (argv[0][i_+1] != '\0')?\ 47 | (&argv[0][i_+1]) :\ 48 | (argc--, argv++, argv[0]))) 49 | 50 | #endif 51 | -------------------------------------------------------------------------------- /.config/st/config.mk: -------------------------------------------------------------------------------- 1 | # st version 2 | VERSION = 0.8.4 3 | 4 | # Customize below to fit your system 5 | 6 | # paths 7 | PREFIX = /usr/local 8 | MANPREFIX = $(PREFIX)/share/man 9 | 10 | X11INC = /usr/X11R6/include 11 | X11LIB = /usr/X11R6/lib 12 | 13 | PKG_CONFIG = pkg-config 14 | 15 | # includes and libs 16 | INCS = -I$(X11INC) \ 17 | `$(PKG_CONFIG) --cflags fontconfig` \ 18 | `$(PKG_CONFIG) --cflags freetype2` 19 | LIBS = -L$(X11LIB) -lm -lrt -lX11 -lutil -lXft \ 20 | `$(PKG_CONFIG) --libs fontconfig` \ 21 | `$(PKG_CONFIG) --libs freetype2` 22 | 23 | # flags 24 | STCPPFLAGS = -DVERSION=\"$(VERSION)\" -D_XOPEN_SOURCE=600 25 | STCFLAGS = $(INCS) $(STCPPFLAGS) $(CPPFLAGS) $(CFLAGS) 26 | STLDFLAGS = $(LIBS) $(LDFLAGS) 27 | 28 | # OpenBSD: 29 | #CPPFLAGS = -DVERSION=\"$(VERSION)\" -D_XOPEN_SOURCE=600 -D_BSD_SOURCE 30 | #LIBS = -L$(X11LIB) -lm -lX11 -lutil -lXft \ 31 | # `$(PKG_CONFIG) --libs fontconfig` \ 32 | # `$(PKG_CONFIG) --libs freetype2` 33 | 34 | # compiler and linker 35 | # CC = c99 36 | -------------------------------------------------------------------------------- /.config/st/patches/scrollback-mouse-altscreen.diff: -------------------------------------------------------------------------------- 1 | diff --git a/config.def.h b/config.def.h 2 | index 4b3bf15..1986316 100644 3 | --- a/config.def.h 4 | +++ b/config.def.h 5 | @@ -163,8 +163,8 @@ static uint forcemousemod = ShiftMask; 6 | */ 7 | static MouseShortcut mshortcuts[] = { 8 | /* mask button function argument release */ 9 | - { ShiftMask, Button4, kscrollup, {.i = 1} }, 10 | - { ShiftMask, Button5, kscrolldown, {.i = 1} }, 11 | + { XK_ANY_MOD, Button4, kscrollup, {.i = 1}, 0, /* !alt */ -1 }, 12 | + { XK_ANY_MOD, Button5, kscrolldown, {.i = 1}, 0, /* !alt */ -1 }, 13 | { XK_ANY_MOD, Button2, selpaste, {.i = 0}, 1 }, 14 | { XK_ANY_MOD, Button4, ttysend, {.s = "\031"} }, 15 | { XK_ANY_MOD, Button5, ttysend, {.s = "\005"} }, 16 | diff --git a/st.c b/st.c 17 | index f8b6f67..dd4cb31 100644 18 | --- st.c 19 | +++ st.c 20 | @@ -1045,6 +1045,11 @@ tnew(int col, int row) 21 | treset(); 22 | } 23 | 24 | +int tisaltscr(void) 25 | +{ 26 | + return IS_SET(MODE_ALTSCREEN); 27 | +} 28 | + 29 | void 30 | tswapscreen(void) 31 | { 32 | diff --git a/st.h b/st.h 33 | index 1332cf1..f9ad815 100644 34 | --- st.h 35 | +++ st.h 36 | @@ -89,6 +89,7 @@ void sendbreak(const Arg *); 37 | void toggleprinter(const Arg *); 38 | 39 | int tattrset(int); 40 | +int tisaltscr(void); 41 | void tnew(int, int); 42 | void tresize(int, int); 43 | void tsetdirtattr(int); 44 | diff --git a/x.c b/x.c 45 | index e5f1737..b8fbd7b 100644 46 | --- x.c 47 | +++ x.c 48 | @@ -34,6 +34,7 @@ typedef struct { 49 | void (*func)(const Arg *); 50 | const Arg arg; 51 | uint release; 52 | + int altscrn; /* 0: don't care, -1: not alt screen, 1: alt screen */ 53 | } MouseShortcut; 54 | 55 | typedef struct { 56 | @@ -446,6 +447,7 @@ mouseaction(XEvent *e, uint release) 57 | for (ms = mshortcuts; ms < mshortcuts + LEN(mshortcuts); ms++) { 58 | if (ms->release == release && 59 | ms->button == e->xbutton.button && 60 | + (!ms->altscrn || (ms->altscrn == (tisaltscr() ? 1 : -1))) && 61 | (match(ms->mod, state) || /* exact or forced */ 62 | match(ms->mod, state & ~forcemousemod))) { 63 | ms->func(&(ms->arg)); 64 | -------------------------------------------------------------------------------- /.config/st/patches/scrollback-mouse.diff: -------------------------------------------------------------------------------- 1 | diff --git a/config.def.h b/config.def.h 2 | index ec1b576..4b3bf15 100644 3 | --- a/config.def.h 4 | +++ b/config.def.h 5 | @@ -163,6 +163,8 @@ static uint forcemousemod = ShiftMask; 6 | */ 7 | static MouseShortcut mshortcuts[] = { 8 | /* mask button function argument release */ 9 | + { ShiftMask, Button4, kscrollup, {.i = 1} }, 10 | + { ShiftMask, Button5, kscrolldown, {.i = 1} }, 11 | { XK_ANY_MOD, Button2, selpaste, {.i = 0}, 1 }, 12 | { XK_ANY_MOD, Button4, ttysend, {.s = "\031"} }, 13 | { XK_ANY_MOD, Button5, ttysend, {.s = "\005"} }, 14 | -------------------------------------------------------------------------------- /.config/st/patches/xresources.diff: -------------------------------------------------------------------------------- 1 | From 2752a599ee01305a435729bfacf43b1dde7cf0ef Mon Sep 17 00:00:00 2001 2 | From: Benji Encalada Mora 3 | Date: Thu, 4 Jun 2020 00:41:10 -0500 4 | Subject: [PATCH] fix: replace xfps and actionfps variables 5 | 6 | --- 7 | config.def.h | 36 ++++++++++++++++++++++++ 8 | x.c | 78 +++++++++++++++++++++++++++++++++++++++++++++++++--- 9 | 2 files changed, 110 insertions(+), 4 deletions(-) 10 | 11 | diff --git a/config.def.h b/config.def.h 12 | index 6f05dce..9b99782 100644 13 | --- a/config.def.h 14 | +++ b/config.def.h 15 | @@ -168,6 +168,42 @@ static unsigned int defaultattr = 11; 16 | */ 17 | static uint forcemousemod = ShiftMask; 18 | 19 | +/* 20 | + * Xresources preferences to load at startup 21 | + */ 22 | +ResourcePref resources[] = { 23 | + { "font", STRING, &font }, 24 | + { "color0", STRING, &colorname[0] }, 25 | + { "color1", STRING, &colorname[1] }, 26 | + { "color2", STRING, &colorname[2] }, 27 | + { "color3", STRING, &colorname[3] }, 28 | + { "color4", STRING, &colorname[4] }, 29 | + { "color5", STRING, &colorname[5] }, 30 | + { "color6", STRING, &colorname[6] }, 31 | + { "color7", STRING, &colorname[7] }, 32 | + { "color8", STRING, &colorname[8] }, 33 | + { "color9", STRING, &colorname[9] }, 34 | + { "color10", STRING, &colorname[10] }, 35 | + { "color11", STRING, &colorname[11] }, 36 | + { "color12", STRING, &colorname[12] }, 37 | + { "color13", STRING, &colorname[13] }, 38 | + { "color14", STRING, &colorname[14] }, 39 | + { "color15", STRING, &colorname[15] }, 40 | + { "background", STRING, &colorname[256] }, 41 | + { "foreground", STRING, &colorname[257] }, 42 | + { "cursorColor", STRING, &colorname[258] }, 43 | + { "termname", STRING, &termname }, 44 | + { "shell", STRING, &shell }, 45 | + { "minlatency", INTEGER, &minlatency }, 46 | + { "maxlatency", INTEGER, &maxlatency }, 47 | + { "blinktimeout", INTEGER, &blinktimeout }, 48 | + { "bellvolume", INTEGER, &bellvolume }, 49 | + { "tabspaces", INTEGER, &tabspaces }, 50 | + { "borderpx", INTEGER, &borderpx }, 51 | + { "cwscale", FLOAT, &cwscale }, 52 | + { "chscale", FLOAT, &chscale }, 53 | +}; 54 | + 55 | /* 56 | * Internal mouse shortcuts. 57 | * Beware that overloading Button1 will disable the selection. 58 | diff --git a/x.c b/x.c 59 | index 210f184..76f167f 100644 60 | --- a/x.c 61 | +++ b/x.c 62 | @@ -14,6 +14,7 @@ 63 | #include 64 | #include 65 | #include 66 | +#include 67 | 68 | char *argv0; 69 | #include "arg.h" 70 | @@ -45,6 +46,19 @@ typedef struct { 71 | signed char appcursor; /* application cursor */ 72 | } Key; 73 | 74 | +/* Xresources preferences */ 75 | +enum resource_type { 76 | + STRING = 0, 77 | + INTEGER = 1, 78 | + FLOAT = 2 79 | +}; 80 | + 81 | +typedef struct { 82 | + char *name; 83 | + enum resource_type type; 84 | + void *dst; 85 | +} ResourcePref; 86 | + 87 | /* X modifiers */ 88 | #define XK_ANY_MOD UINT_MAX 89 | #define XK_NO_MOD 0 90 | @@ -828,8 +842,8 @@ xclear(int x1, int y1, int x2, int y2) 91 | void 92 | xhints(void) 93 | { 94 | - XClassHint class = {opt_name ? opt_name : termname, 95 | - opt_class ? opt_class : termname}; 96 | + XClassHint class = {opt_name ? opt_name : "st", 97 | + opt_class ? opt_class : "st"}; 98 | XWMHints wm = {.flags = InputHint, .input = 1}; 99 | XSizeHints *sizeh; 100 | 101 | @@ -1104,8 +1118,6 @@ xinit(int cols, int rows) 102 | pid_t thispid = getpid(); 103 | XColor xmousefg, xmousebg; 104 | 105 | - if (!(xw.dpy = XOpenDisplay(NULL))) 106 | - die("can't open display\n"); 107 | xw.scr = XDefaultScreen(xw.dpy); 108 | xw.vis = XDefaultVisual(xw.dpy, xw.scr); 109 | 110 | @@ -1964,6 +1976,59 @@ run(void) 111 | } 112 | } 113 | 114 | +int 115 | +resource_load(XrmDatabase db, char *name, enum resource_type rtype, void *dst) 116 | +{ 117 | + char **sdst = dst; 118 | + int *idst = dst; 119 | + float *fdst = dst; 120 | + 121 | + char fullname[256]; 122 | + char fullclass[256]; 123 | + char *type; 124 | + XrmValue ret; 125 | + 126 | + snprintf(fullname, sizeof(fullname), "%s.%s", 127 | + opt_name ? opt_name : "st", name); 128 | + snprintf(fullclass, sizeof(fullclass), "%s.%s", 129 | + opt_class ? opt_class : "St", name); 130 | + fullname[sizeof(fullname) - 1] = fullclass[sizeof(fullclass) - 1] = '\0'; 131 | + 132 | + XrmGetResource(db, fullname, fullclass, &type, &ret); 133 | + if (ret.addr == NULL || strncmp("String", type, 64)) 134 | + return 1; 135 | + 136 | + switch (rtype) { 137 | + case STRING: 138 | + *sdst = ret.addr; 139 | + break; 140 | + case INTEGER: 141 | + *idst = strtoul(ret.addr, NULL, 10); 142 | + break; 143 | + case FLOAT: 144 | + *fdst = strtof(ret.addr, NULL); 145 | + break; 146 | + } 147 | + return 0; 148 | +} 149 | + 150 | +void 151 | +config_init(void) 152 | +{ 153 | + char *resm; 154 | + XrmDatabase db; 155 | + ResourcePref *p; 156 | + 157 | + XrmInitialize(); 158 | + resm = XResourceManagerString(xw.dpy); 159 | + if (!resm) 160 | + return; 161 | + 162 | + db = XrmGetStringDatabase(resm); 163 | + for (p = resources; p < resources + LEN(resources); p++) 164 | + resource_load(db, p->name, p->type, p->dst); 165 | +} 166 | + 167 | void 168 | usage(void) 169 | { 170 | @@ -2037,6 +2102,11 @@ run: 171 | 172 | setlocale(LC_CTYPE, ""); 173 | XSetLocaleModifiers(""); 174 | + 175 | + if(!(xw.dpy = XOpenDisplay(NULL))) 176 | + die("Can't open display\n"); 177 | + 178 | + config_init(); 179 | cols = MAX(cols, 1); 180 | rows = MAX(rows, 1); 181 | tnew(cols, rows); 182 | -- 183 | 2.26.2 184 | 185 | -------------------------------------------------------------------------------- /.config/st/st.1: -------------------------------------------------------------------------------- 1 | .TH ST 1 st\-VERSION 2 | .SH NAME 3 | st \- simple terminal 4 | .SH SYNOPSIS 5 | .B st 6 | .RB [ \-aiv ] 7 | .RB [ \-c 8 | .IR class ] 9 | .RB [ \-f 10 | .IR font ] 11 | .RB [ \-g 12 | .IR geometry ] 13 | .RB [ \-n 14 | .IR name ] 15 | .RB [ \-o 16 | .IR iofile ] 17 | .RB [ \-T 18 | .IR title ] 19 | .RB [ \-t 20 | .IR title ] 21 | .RB [ \-l 22 | .IR line ] 23 | .RB [ \-w 24 | .IR windowid ] 25 | .RB [[ \-e ] 26 | .IR command 27 | .RI [ arguments ...]] 28 | .PP 29 | .B st 30 | .RB [ \-aiv ] 31 | .RB [ \-c 32 | .IR class ] 33 | .RB [ \-f 34 | .IR font ] 35 | .RB [ \-g 36 | .IR geometry ] 37 | .RB [ \-n 38 | .IR name ] 39 | .RB [ \-o 40 | .IR iofile ] 41 | .RB [ \-T 42 | .IR title ] 43 | .RB [ \-t 44 | .IR title ] 45 | .RB [ \-w 46 | .IR windowid ] 47 | .RB \-l 48 | .IR line 49 | .RI [ stty_args ...] 50 | .SH DESCRIPTION 51 | .B st 52 | is a simple terminal emulator. 53 | .SH OPTIONS 54 | .TP 55 | .B \-a 56 | disable alternate screens in terminal 57 | .TP 58 | .BI \-c " class" 59 | defines the window class (default $TERM). 60 | .TP 61 | .BI \-f " font" 62 | defines the 63 | .I font 64 | to use when st is run. 65 | .TP 66 | .BI \-g " geometry" 67 | defines the X11 geometry string. 68 | The form is [=][{xX}][{+-}{+-}]. See 69 | .BR XParseGeometry (3) 70 | for further details. 71 | .TP 72 | .B \-i 73 | will fixate the position given with the -g option. 74 | .TP 75 | .BI \-n " name" 76 | defines the window instance name (default $TERM). 77 | .TP 78 | .BI \-o " iofile" 79 | writes all the I/O to 80 | .I iofile. 81 | This feature is useful when recording st sessions. A value of "-" means 82 | standard output. 83 | .TP 84 | .BI \-T " title" 85 | defines the window title (default 'st'). 86 | .TP 87 | .BI \-t " title" 88 | defines the window title (default 'st'). 89 | .TP 90 | .BI \-w " windowid" 91 | embeds st within the window identified by 92 | .I windowid 93 | .TP 94 | .BI \-l " line" 95 | use a tty 96 | .I line 97 | instead of a pseudo terminal. 98 | .I line 99 | should be a (pseudo-)serial device (e.g. /dev/ttyS0 on Linux for serial port 100 | 0). 101 | When this flag is given 102 | remaining arguments are used as flags for 103 | .BR stty(1). 104 | By default st initializes the serial line to 8 bits, no parity, 1 stop bit 105 | and a 38400 baud rate. The speed is set by appending it as last argument 106 | (e.g. 'st -l /dev/ttyS0 115200'). Arguments before the last one are 107 | .BR stty(1) 108 | flags. If you want to set odd parity on 115200 baud use for example 'st -l 109 | /dev/ttyS0 parenb parodd 115200'. Set the number of bits by using for 110 | example 'st -l /dev/ttyS0 cs7 115200'. See 111 | .BR stty(1) 112 | for more arguments and cases. 113 | .TP 114 | .B \-v 115 | prints version information to stderr, then exits. 116 | .TP 117 | .BI \-e " command " [ " arguments " "... ]" 118 | st executes 119 | .I command 120 | instead of the shell. If this is used it 121 | .B must be the last option 122 | on the command line, as in xterm / rxvt. 123 | This option is only intended for compatibility, 124 | and all the remaining arguments are used as a command 125 | even without it. 126 | .SH SHORTCUTS 127 | .TP 128 | .B Break 129 | Send a break in the serial line. 130 | Break key is obtained in PC keyboards 131 | pressing at the same time control and pause. 132 | .TP 133 | .B Ctrl-Print Screen 134 | Toggle if st should print to the 135 | .I iofile. 136 | .TP 137 | .B Shift-Print Screen 138 | Print the full screen to the 139 | .I iofile. 140 | .TP 141 | .B Print Screen 142 | Print the selection to the 143 | .I iofile. 144 | .TP 145 | .B Ctrl-Shift-Page Up 146 | Increase font size. 147 | .TP 148 | .B Ctrl-Shift-Page Down 149 | Decrease font size. 150 | .TP 151 | .B Ctrl-Shift-Home 152 | Reset to default font size. 153 | .TP 154 | .B Ctrl-Shift-y 155 | Paste from primary selection (middle mouse button). 156 | .TP 157 | .B Ctrl-Shift-c 158 | Copy the selected text to the clipboard selection. 159 | .TP 160 | .B Ctrl-Shift-v 161 | Paste from the clipboard selection. 162 | .SH CUSTOMIZATION 163 | .B st 164 | can be customized by creating a custom config.h and (re)compiling the source 165 | code. This keeps it fast, secure and simple. 166 | .SH AUTHORS 167 | See the LICENSE file for the authors. 168 | .SH LICENSE 169 | See the LICENSE file for the terms of redistribution. 170 | .SH SEE ALSO 171 | .BR tabbed (1), 172 | .BR utmp (1), 173 | .BR stty (1), 174 | .BR scroll (1) 175 | .SH BUGS 176 | See the TODO file in the distribution. 177 | 178 | -------------------------------------------------------------------------------- /.config/st/st.h: -------------------------------------------------------------------------------- 1 | /* See LICENSE for license details. */ 2 | 3 | #include 4 | #include 5 | 6 | /* macros */ 7 | #define MIN(a, b) ((a) < (b) ? (a) : (b)) 8 | #define MAX(a, b) ((a) < (b) ? (b) : (a)) 9 | #define LEN(a) (sizeof(a) / sizeof(a)[0]) 10 | #define BETWEEN(x, a, b) ((a) <= (x) && (x) <= (b)) 11 | #define DIVCEIL(n, d) (((n) + ((d) - 1)) / (d)) 12 | #define DEFAULT(a, b) (a) = (a) ? (a) : (b) 13 | #define LIMIT(x, a, b) (x) = (x) < (a) ? (a) : (x) > (b) ? (b) : (x) 14 | #define ATTRCMP(a, b) ((a).mode != (b).mode || (a).fg != (b).fg || \ 15 | (a).bg != (b).bg) 16 | #define TIMEDIFF(t1, t2) ((t1.tv_sec-t2.tv_sec)*1000 + \ 17 | (t1.tv_nsec-t2.tv_nsec)/1E6) 18 | #define MODBIT(x, set, bit) ((set) ? ((x) |= (bit)) : ((x) &= ~(bit))) 19 | 20 | #define TRUECOLOR(r,g,b) (1 << 24 | (r) << 16 | (g) << 8 | (b)) 21 | #define IS_TRUECOL(x) (1 << 24 & (x)) 22 | 23 | enum glyph_attribute { 24 | ATTR_NULL = 0, 25 | ATTR_BOLD = 1 << 0, 26 | ATTR_FAINT = 1 << 1, 27 | ATTR_ITALIC = 1 << 2, 28 | ATTR_UNDERLINE = 1 << 3, 29 | ATTR_BLINK = 1 << 4, 30 | ATTR_REVERSE = 1 << 5, 31 | ATTR_INVISIBLE = 1 << 6, 32 | ATTR_STRUCK = 1 << 7, 33 | ATTR_WRAP = 1 << 8, 34 | ATTR_WIDE = 1 << 9, 35 | ATTR_WDUMMY = 1 << 10, 36 | ATTR_BOLD_FAINT = ATTR_BOLD | ATTR_FAINT, 37 | }; 38 | 39 | enum selection_mode { 40 | SEL_IDLE = 0, 41 | SEL_EMPTY = 1, 42 | SEL_READY = 2 43 | }; 44 | 45 | enum selection_type { 46 | SEL_REGULAR = 1, 47 | SEL_RECTANGULAR = 2 48 | }; 49 | 50 | enum selection_snap { 51 | SNAP_WORD = 1, 52 | SNAP_LINE = 2 53 | }; 54 | 55 | typedef unsigned char uchar; 56 | typedef unsigned int uint; 57 | typedef unsigned long ulong; 58 | typedef unsigned short ushort; 59 | 60 | typedef uint_least32_t Rune; 61 | 62 | #define Glyph Glyph_ 63 | typedef struct { 64 | Rune u; /* character code */ 65 | ushort mode; /* attribute flags */ 66 | uint32_t fg; /* foreground */ 67 | uint32_t bg; /* background */ 68 | } Glyph; 69 | 70 | typedef Glyph *Line; 71 | 72 | typedef union { 73 | int i; 74 | uint ui; 75 | float f; 76 | const void *v; 77 | const char *s; 78 | } Arg; 79 | 80 | void die(const char *, ...); 81 | void redraw(void); 82 | void draw(void); 83 | 84 | void kscrolldown(const Arg *); 85 | void kscrollup(const Arg *); 86 | void printscreen(const Arg *); 87 | void printsel(const Arg *); 88 | void sendbreak(const Arg *); 89 | void toggleprinter(const Arg *); 90 | 91 | int tattrset(int); 92 | int tisaltscr(void); 93 | void tnew(int, int); 94 | void tresize(int, int); 95 | void tsetdirtattr(int); 96 | void ttyhangup(void); 97 | int ttynew(char *, char *, char *, char **); 98 | size_t ttyread(void); 99 | void ttyresize(int, int); 100 | void ttywrite(const char *, size_t, int); 101 | 102 | void resettitle(void); 103 | 104 | void selclear(void); 105 | void selinit(void); 106 | void selstart(int, int, int); 107 | void selextend(int, int, int, int); 108 | int selected(int, int); 109 | char *getsel(void); 110 | 111 | size_t utf8encode(Rune, char *); 112 | 113 | void *xmalloc(size_t); 114 | void *xrealloc(void *, size_t); 115 | char *xstrdup(char *); 116 | 117 | /* config.h globals */ 118 | extern char *utmp; 119 | extern char *scroll; 120 | extern char *stty_args; 121 | extern char *vtiden; 122 | extern wchar_t *worddelimiters; 123 | extern int allowaltscreen; 124 | extern int allowwindowops; 125 | extern char *termname; 126 | extern unsigned int tabspaces; 127 | extern unsigned int defaultfg; 128 | extern unsigned int defaultbg; 129 | -------------------------------------------------------------------------------- /.config/st/st.info: -------------------------------------------------------------------------------- 1 | st-mono| simpleterm monocolor, 2 | acsc=+C\,D-A.B0E``aaffgghFiGjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~, 3 | am, 4 | bce, 5 | bel=^G, 6 | blink=\E[5m, 7 | bold=\E[1m, 8 | cbt=\E[Z, 9 | cvvis=\E[?25h, 10 | civis=\E[?25l, 11 | clear=\E[H\E[2J, 12 | cnorm=\E[?12l\E[?25h, 13 | colors#2, 14 | cols#80, 15 | cr=^M, 16 | csr=\E[%i%p1%d;%p2%dr, 17 | cub=\E[%p1%dD, 18 | cub1=^H, 19 | cud1=^J, 20 | cud=\E[%p1%dB, 21 | cuf1=\E[C, 22 | cuf=\E[%p1%dC, 23 | cup=\E[%i%p1%d;%p2%dH, 24 | cuu1=\E[A, 25 | cuu=\E[%p1%dA, 26 | dch=\E[%p1%dP, 27 | dch1=\E[P, 28 | dim=\E[2m, 29 | dl=\E[%p1%dM, 30 | dl1=\E[M, 31 | ech=\E[%p1%dX, 32 | ed=\E[J, 33 | el=\E[K, 34 | el1=\E[1K, 35 | enacs=\E)0, 36 | flash=\E[?5h$<80/>\E[?5l, 37 | fsl=^G, 38 | home=\E[H, 39 | hpa=\E[%i%p1%dG, 40 | hs, 41 | ht=^I, 42 | hts=\EH, 43 | ich=\E[%p1%d@, 44 | il1=\E[L, 45 | il=\E[%p1%dL, 46 | ind=^J, 47 | indn=\E[%p1%dS, 48 | invis=\E[8m, 49 | is2=\E[4l\E>\E[?1034l, 50 | it#8, 51 | kel=\E[1;2F, 52 | ked=\E[1;5F, 53 | ka1=\E[1~, 54 | ka3=\E[5~, 55 | kc1=\E[4~, 56 | kc3=\E[6~, 57 | kbs=\177, 58 | kcbt=\E[Z, 59 | kb2=\EOu, 60 | kcub1=\EOD, 61 | kcud1=\EOB, 62 | kcuf1=\EOC, 63 | kcuu1=\EOA, 64 | kDC=\E[3;2~, 65 | kent=\EOM, 66 | kEND=\E[1;2F, 67 | kIC=\E[2;2~, 68 | kNXT=\E[6;2~, 69 | kPRV=\E[5;2~, 70 | kHOM=\E[1;2H, 71 | kLFT=\E[1;2D, 72 | kRIT=\E[1;2C, 73 | kind=\E[1;2B, 74 | kri=\E[1;2A, 75 | kclr=\E[3;5~, 76 | kdl1=\E[3;2~, 77 | kdch1=\E[3~, 78 | kich1=\E[2~, 79 | kend=\E[4~, 80 | kf1=\EOP, 81 | kf2=\EOQ, 82 | kf3=\EOR, 83 | kf4=\EOS, 84 | kf5=\E[15~, 85 | kf6=\E[17~, 86 | kf7=\E[18~, 87 | kf8=\E[19~, 88 | kf9=\E[20~, 89 | kf10=\E[21~, 90 | kf11=\E[23~, 91 | kf12=\E[24~, 92 | kf13=\E[1;2P, 93 | kf14=\E[1;2Q, 94 | kf15=\E[1;2R, 95 | kf16=\E[1;2S, 96 | kf17=\E[15;2~, 97 | kf18=\E[17;2~, 98 | kf19=\E[18;2~, 99 | kf20=\E[19;2~, 100 | kf21=\E[20;2~, 101 | kf22=\E[21;2~, 102 | kf23=\E[23;2~, 103 | kf24=\E[24;2~, 104 | kf25=\E[1;5P, 105 | kf26=\E[1;5Q, 106 | kf27=\E[1;5R, 107 | kf28=\E[1;5S, 108 | kf29=\E[15;5~, 109 | kf30=\E[17;5~, 110 | kf31=\E[18;5~, 111 | kf32=\E[19;5~, 112 | kf33=\E[20;5~, 113 | kf34=\E[21;5~, 114 | kf35=\E[23;5~, 115 | kf36=\E[24;5~, 116 | kf37=\E[1;6P, 117 | kf38=\E[1;6Q, 118 | kf39=\E[1;6R, 119 | kf40=\E[1;6S, 120 | kf41=\E[15;6~, 121 | kf42=\E[17;6~, 122 | kf43=\E[18;6~, 123 | kf44=\E[19;6~, 124 | kf45=\E[20;6~, 125 | kf46=\E[21;6~, 126 | kf47=\E[23;6~, 127 | kf48=\E[24;6~, 128 | kf49=\E[1;3P, 129 | kf50=\E[1;3Q, 130 | kf51=\E[1;3R, 131 | kf52=\E[1;3S, 132 | kf53=\E[15;3~, 133 | kf54=\E[17;3~, 134 | kf55=\E[18;3~, 135 | kf56=\E[19;3~, 136 | kf57=\E[20;3~, 137 | kf58=\E[21;3~, 138 | kf59=\E[23;3~, 139 | kf60=\E[24;3~, 140 | kf61=\E[1;4P, 141 | kf62=\E[1;4Q, 142 | kf63=\E[1;4R, 143 | khome=\E[1~, 144 | kil1=\E[2;5~, 145 | krmir=\E[2;2~, 146 | knp=\E[6~, 147 | kmous=\E[M, 148 | kpp=\E[5~, 149 | lines#24, 150 | mir, 151 | msgr, 152 | npc, 153 | op=\E[39;49m, 154 | pairs#64, 155 | mc0=\E[i, 156 | mc4=\E[4i, 157 | mc5=\E[5i, 158 | rc=\E8, 159 | rev=\E[7m, 160 | ri=\EM, 161 | rin=\E[%p1%dT, 162 | ritm=\E[23m, 163 | rmacs=\E(B, 164 | rmcup=\E[?1049l, 165 | rmir=\E[4l, 166 | rmkx=\E[?1l\E>, 167 | rmso=\E[27m, 168 | rmul=\E[24m, 169 | rs1=\Ec, 170 | rs2=\E[4l\E>\E[?1034l, 171 | sc=\E7, 172 | sitm=\E[3m, 173 | sgr0=\E[0m, 174 | smacs=\E(0, 175 | smcup=\E[?1049h, 176 | smir=\E[4h, 177 | smkx=\E[?1h\E=, 178 | smso=\E[7m, 179 | smul=\E[4m, 180 | tbc=\E[3g, 181 | tsl=\E]0;, 182 | xenl, 183 | vpa=\E[%i%p1%dd, 184 | # XTerm extensions 185 | rmxx=\E[29m, 186 | smxx=\E[9m, 187 | # disabled rep for now: causes some issues with older ncurses versions. 188 | # rep=%p1%c\E[%p2%{1}%-%db, 189 | # tmux extensions, see TERMINFO EXTENSIONS in tmux(1) 190 | Tc, 191 | Ms=\E]52;%p1%s;%p2%s\007, 192 | Se=\E[2 q, 193 | Ss=\E[%p1%d q, 194 | 195 | st| simpleterm, 196 | use=st-mono, 197 | colors#8, 198 | setab=\E[4%p1%dm, 199 | setaf=\E[3%p1%dm, 200 | setb=\E[4%?%p1%{1}%=%t4%e%p1%{3}%=%t6%e%p1%{4}%=%t1%e%p1%{6}%=%t3%e%p1%d%;m, 201 | setf=\E[3%?%p1%{1}%=%t4%e%p1%{3}%=%t6%e%p1%{4}%=%t1%e%p1%{6}%=%t3%e%p1%d%;m, 202 | sgr=%?%p9%t\E(0%e\E(B%;\E[0%?%p6%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;%?%p7%t;8%;m, 203 | 204 | st-256color| simpleterm with 256 colors, 205 | use=st, 206 | ccc, 207 | colors#256, 208 | oc=\E]104\007, 209 | pairs#32767, 210 | # Nicked from xterm-256color 211 | initc=\E]4;%p1%d;rgb\:%p2%{255}%*%{1000}%/%2.2X/%p3%{255}%*%{1000}%/%2.2X/%p4%{255}%*%{1000}%/%2.2X\E\\, 212 | setab=\E[%?%p1%{8}%<%t4%p1%d%e%p1%{16}%<%t10%p1%{8}%-%d%e48;5;%p1%d%;m, 213 | setaf=\E[%?%p1%{8}%<%t3%p1%d%e%p1%{16}%<%t9%p1%{8}%-%d%e38;5;%p1%d%;m, 214 | 215 | st-meta| simpleterm with meta key, 216 | use=st, 217 | km, 218 | rmm=\E[?1034l, 219 | smm=\E[?1034h, 220 | rs2=\E[4l\E>\E[?1034h, 221 | is2=\E[4l\E>\E[?1034h, 222 | 223 | st-meta-256color| simpleterm with meta key and 256 colors, 224 | use=st-256color, 225 | km, 226 | rmm=\E[?1034l, 227 | smm=\E[?1034h, 228 | rs2=\E[4l\E>\E[?1034h, 229 | is2=\E[4l\E>\E[?1034h, 230 | 231 | st-bs| simpleterm with backspace as backspace, 232 | use=st, 233 | kbs=\010, 234 | kdch1=\177, 235 | 236 | st-bs-256color| simpleterm with backspace as backspace and 256colors, 237 | use=st-256color, 238 | kbs=\010, 239 | kdch1=\177, 240 | -------------------------------------------------------------------------------- /.config/st/win.h: -------------------------------------------------------------------------------- 1 | /* See LICENSE for license details. */ 2 | 3 | enum win_mode { 4 | MODE_VISIBLE = 1 << 0, 5 | MODE_FOCUSED = 1 << 1, 6 | MODE_APPKEYPAD = 1 << 2, 7 | MODE_MOUSEBTN = 1 << 3, 8 | MODE_MOUSEMOTION = 1 << 4, 9 | MODE_REVERSE = 1 << 5, 10 | MODE_KBDLOCK = 1 << 6, 11 | MODE_HIDE = 1 << 7, 12 | MODE_APPCURSOR = 1 << 8, 13 | MODE_MOUSESGR = 1 << 9, 14 | MODE_8BIT = 1 << 10, 15 | MODE_BLINK = 1 << 11, 16 | MODE_FBLINK = 1 << 12, 17 | MODE_FOCUS = 1 << 13, 18 | MODE_MOUSEX10 = 1 << 14, 19 | MODE_MOUSEMANY = 1 << 15, 20 | MODE_BRCKTPASTE = 1 << 16, 21 | MODE_NUMLOCK = 1 << 17, 22 | MODE_MOUSE = MODE_MOUSEBTN|MODE_MOUSEMOTION|MODE_MOUSEX10\ 23 | |MODE_MOUSEMANY, 24 | }; 25 | 26 | void xbell(void); 27 | void xclipcopy(void); 28 | void xdrawcursor(int, int, Glyph, int, int, Glyph); 29 | void xdrawline(Line, int, int, int); 30 | void xfinishdraw(void); 31 | void xloadcols(void); 32 | int xsetcolorname(int, const char *); 33 | void xsettitle(char *); 34 | int xsetcursor(int); 35 | void xsetmode(int, unsigned int); 36 | void xsetpointermotion(int); 37 | void xsetsel(char *); 38 | int xstartdraw(void); 39 | void xximspot(int, int); 40 | -------------------------------------------------------------------------------- /.config/surf/FAQ.md: -------------------------------------------------------------------------------- 1 | # Frequently Asked Questions 2 | 3 | ## Surf is starting up slowly. What might happen? 4 | 5 | The first suspect for such a behaviour is the plugin handling. Run surf 6 | on the commandline and see if there are errors because of »nspluginwrap‐ 7 | per« or failed RPCs to them. If that is true, go to ~/.mozilla/plugins 8 | and try removing stale links to plugins not on your system anymore. This 9 | will stop surf from trying to load them. 10 | 11 | -------------------------------------------------------------------------------- /.config/surf/LICENSE: -------------------------------------------------------------------------------- 1 | MIT/X Consortium License 2 | 3 | © 2009-2010 Enno Boland 4 | © 2009 Thomas Menari 5 | © 2009 Simon Rozet 6 | © 2009 Andrew Antle 7 | © 2010-2011 pancake 8 | © 2011-2013 Anselm R Garbe 9 | © 2011-2012 Troels Henriksen 10 | © 2011 Connor Lane Smith 11 | © 2012-2017 Christoph Lohmann <20h@r-36.net> 12 | © 2013 Shayan Pooya 13 | © 2013 Jens Nyberg 14 | © 2013 Carlos J. Torres 15 | © 2013 Alexander Sedov 16 | © 2013 Nick White 17 | © 2013 David Dufberg 18 | © 2014-2017 Quentin Rameau 19 | © 2014-2016 Markus Teich 20 | © 2015 Jakukyo Friel 21 | © 2015 Ben Woolley 22 | © 2015 Greg Reagle 23 | © 2015 GhostAV 24 | © 2015 Ivan Tham 25 | © 2015 Alexander Huemer 26 | © 2015 Michael Stevens 27 | © 2015 Felix Janda 28 | © 2016 Charles Lehner 29 | © 2016 Dmitry Bogatov 30 | 31 | Permission is hereby granted, free of charge, to any person obtaining a 32 | copy of this software and associated documentation files (the "Software"), 33 | to deal in the Software without restriction, including without limitation 34 | the rights to use, copy, modify, merge, publish, distribute, sublicense, 35 | and/or sell copies of the Software, and to permit persons to whom the 36 | Software is furnished to do so, subject to the following conditions: 37 | 38 | The above copyright notice and this permission notice shall be included in 39 | all copies or substantial portions of the Software. 40 | 41 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 42 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 43 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 44 | THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 45 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 46 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 47 | DEALINGS IN THE SOFTWARE. 48 | 49 | -------------------------------------------------------------------------------- /.config/surf/Makefile: -------------------------------------------------------------------------------- 1 | # surf - simple browser 2 | # See LICENSE file for copyright and license details. 3 | 4 | include config.mk 5 | 6 | SRC = surf.c 7 | OBJ = ${SRC:.c=.o} 8 | 9 | all: options surf 10 | 11 | options: 12 | @echo surf build options: 13 | @echo "CFLAGS = ${CFLAGS}" 14 | @echo "LDFLAGS = ${LDFLAGS}" 15 | @echo "CC = ${CC}" 16 | 17 | .c.o: 18 | @echo CC $< 19 | @${CC} -c ${CFLAGS} $< 20 | 21 | ${OBJ}: config.h config.mk 22 | 23 | config.h: 24 | @echo creating $@ from config.def.h 25 | @cp config.def.h $@ 26 | 27 | surf: ${OBJ} 28 | @echo CC -o $@ 29 | @${CC} -o $@ surf.o ${LDFLAGS} 30 | 31 | clean: 32 | @echo cleaning 33 | @rm -f surf ${OBJ} surf-${VERSION}.tar.gz 34 | 35 | dist: clean 36 | @echo creating dist tarball 37 | @mkdir -p surf-${VERSION} 38 | @cp -R LICENSE Makefile config.mk config.def.h README \ 39 | surf-open.sh arg.h TODO.md surf.png \ 40 | surf.1 ${SRC} surf-${VERSION} 41 | @tar -cf surf-${VERSION}.tar surf-${VERSION} 42 | @gzip surf-${VERSION}.tar 43 | @rm -rf surf-${VERSION} 44 | 45 | install: all 46 | @echo installing executable file to ${DESTDIR}${PREFIX}/bin 47 | @mkdir -p ${DESTDIR}${PREFIX}/bin 48 | @cp -f surf ${DESTDIR}${PREFIX}/bin 49 | @chmod 755 ${DESTDIR}${PREFIX}/bin/surf 50 | @echo installing manual page to ${DESTDIR}${MANPREFIX}/man1 51 | @mkdir -p ${DESTDIR}${MANPREFIX}/man1 52 | @sed "s/VERSION/${VERSION}/g" < surf.1 > ${DESTDIR}${MANPREFIX}/man1/surf.1 53 | @chmod 644 ${DESTDIR}${MANPREFIX}/man1/surf.1 54 | 55 | uninstall: 56 | @echo removing executable file from ${DESTDIR}${PREFIX}/bin 57 | @rm -f ${DESTDIR}${PREFIX}/bin/surf 58 | @echo removing manual page from ${DESTDIR}${MANPREFIX}/man1 59 | @rm -f ${DESTDIR}${MANPREFIX}/man1/surf.1 60 | 61 | .PHONY: all options clean dist install uninstall 62 | -------------------------------------------------------------------------------- /.config/surf/README: -------------------------------------------------------------------------------- 1 | surf - simple webkit-based browser 2 | ================================== 3 | surf is a simple Web browser based on WebKit/GTK+. 4 | 5 | Requirements 6 | ------------ 7 | In order to build surf you need GTK+ and Webkit/GTK+ header files. 8 | 9 | In order to use the functionality of the url-bar, also install dmenu[0]. 10 | 11 | Installation 12 | ------------ 13 | Edit config.mk to match your local setup (surf is installed into 14 | the /usr/local namespace by default). 15 | 16 | Afterwards enter the following command to build and install surf (if 17 | necessary as root): 18 | 19 | make clean install 20 | 21 | Running surf 22 | ------------ 23 | run 24 | surf [URI] 25 | 26 | See the manpage for further options. 27 | 28 | Running surf in tabbed 29 | ---------------------- 30 | For running surf in tabbed[1] there is a script included in the distribution, 31 | which is run like this: 32 | 33 | surf-open.sh [URI] 34 | 35 | Further invocations of the script will run surf with the specified URI in this 36 | instance of tabbed. 37 | 38 | [0] http://tools.suckless.org/dmenu 39 | [1] http://tools.suckless.org/tabbed 40 | 41 | -------------------------------------------------------------------------------- /.config/surf/TODO.md: -------------------------------------------------------------------------------- 1 | # TODO 2 | 3 | * suckless adblocking 4 | * replace twitch() with proper gtk calls to make scrollbars reappear 5 | * replace webkit with something sane 6 | * add video player options 7 | * play in plugin 8 | * play in video player 9 | * call command with URI (quvi + cclive) 10 | 11 | -------------------------------------------------------------------------------- /.config/surf/arg.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copy me if you can. 3 | * by 20h 4 | */ 5 | 6 | #ifndef ARG_H__ 7 | #define ARG_H__ 8 | 9 | extern char *argv0; 10 | 11 | /* use main(int argc, char *argv[]) */ 12 | #define ARGBEGIN for (argv0 = *argv, argv++, argc--;\ 13 | argv[0] && argv[0][0] == '-'\ 14 | && argv[0][1];\ 15 | argc--, argv++) {\ 16 | char argc_;\ 17 | char **argv_;\ 18 | int brk_;\ 19 | if (argv[0][1] == '-' && argv[0][2] == '\0') {\ 20 | argv++;\ 21 | argc--;\ 22 | break;\ 23 | }\ 24 | for (brk_ = 0, argv[0]++, argv_ = argv;\ 25 | argv[0][0] && !brk_;\ 26 | argv[0]++) {\ 27 | if (argv_ != argv)\ 28 | break;\ 29 | argc_ = argv[0][0];\ 30 | switch (argc_) 31 | #define ARGEND }\ 32 | } 33 | 34 | #define ARGC() argc_ 35 | 36 | #define EARGF(x) ((argv[0][1] == '\0' && argv[1] == NULL)?\ 37 | ((x), abort(), (char *)0) :\ 38 | (brk_ = 1, (argv[0][1] != '\0')?\ 39 | (&argv[0][1]) :\ 40 | (argc--, argv++, argv[0]))) 41 | 42 | #define ARGF() ((argv[0][1] == '\0' && argv[1] == NULL)?\ 43 | (char *)0 :\ 44 | (brk_ = 1, (argv[0][1] != '\0')?\ 45 | (&argv[0][1]) :\ 46 | (argc--, argv++, argv[0]))) 47 | 48 | #endif 49 | -------------------------------------------------------------------------------- /.config/surf/config.mk: -------------------------------------------------------------------------------- 1 | # surf version 2 | VERSION = 2.0 3 | 4 | # Customize below to fit your system 5 | 6 | # paths 7 | PREFIX = /usr/local 8 | MANPREFIX = ${PREFIX}/share/man 9 | LIBPREFIX = ${PREFIX}/lib/surf 10 | 11 | X11INC = /usr/X11R6/include 12 | X11LIB = /usr/X11R6/lib 13 | 14 | GTKINC = `pkg-config --cflags gtk+-3.0 webkit2gtk-4.0` 15 | GTKLIB = `pkg-config --libs gtk+-3.0 webkit2gtk-4.0` 16 | 17 | # includes and libs 18 | INCS = -I. -I/usr/include -I${X11INC} ${GTKINC} 19 | LIBS = -L/usr/lib -lc -L${X11LIB} -lX11 ${GTKLIB} -lgthread-2.0 20 | 21 | # flags 22 | CPPFLAGS = -DVERSION=\"${VERSION}\" -DWEBEXTDIR=\"${LIBPREFIX}\" -D_DEFAULT_SOURCE 23 | CFLAGS = -std=c99 -pedantic -Wall -Os ${INCS} ${CPPFLAGS} 24 | LDFLAGS = -s ${LIBS} 25 | 26 | # Solaris 27 | #CFLAGS = -fast ${INCS} -DVERSION=\"${VERSION}\" 28 | #LDFLAGS = ${LIBS} 29 | 30 | # compiler and linker 31 | CC = cc 32 | -------------------------------------------------------------------------------- /.config/surf/surf-open.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # See the LICENSE file for copyright and license details. 4 | # 5 | 6 | xidfile="$HOME/.cache/tabbed-surf.xid" 7 | 8 | runtabbed() { 9 | tabbed -cdn surf -r 2 surf -e '' "$@" >"$xidfile" \ 10 | 2>/dev/null & 11 | } 12 | 13 | if [ ! -r "$xidfile" ]; 14 | then 15 | runtabbed 16 | else 17 | xid=$(cat "$xidfile") 18 | if xprop -id "$xid" >/dev/null 2>&1; then 19 | surf -e "$xid" "$@" >/dev/null 2>&1 & 20 | else 21 | runtabbed "$@" 22 | fi 23 | fi 24 | 25 | -------------------------------------------------------------------------------- /.config/surf/surf.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YaN-3k/dots/e5f19eb7cc0a8fadc23aa08154be30ab0d2f3845/.config/surf/surf.png -------------------------------------------------------------------------------- /.config/sxiv/exec/image-info: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # sxiv statusbar 3 | filename=$(basename "$1") 4 | filesize=$(du -Hh "$1" | cut -f 1) 5 | # the '[0]' stands for the first frame of a multi-frame file, e.g. gif 6 | geometry=$(identify -format '%wx%h' "$1[0]") 7 | echo "${filesize} | ${geometry} | ${filename}" 8 | -------------------------------------------------------------------------------- /.config/sxiv/exec/key-handler: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | while read -r file; do 3 | case "$1" in 4 | 'w') setbg "$file" &;; 5 | 'g') gimp "$file" &;; 6 | 'c') 7 | destdir="$(menu -p "Copy $file to" <&- | sed "s|~|$HOME|")" 8 | [ "$destdir" ] || exit 9 | cp "$file" "$destdir" && notify-send "image copied to $destdir" &;; 10 | 'm') 11 | destdir="$(menu -p "Move $file to" <&- | sed "s|~|$HOME|g")" 12 | [ "$destdir" ] || exit 13 | mv "$file" "$destdir" && notify-send "image moved to $destdir" &;; 14 | 'd') 15 | prompt "Delete $file" && rm "$file" && notify-send "$file deleted" &;; 16 | 'y') 17 | printf %s "$file" | xclip -selection clipboard && 18 | notify-send "patch to image copied to clipboard" &;; 19 | 'Y') 20 | xclip -selection clipboard -t image/png -i "$file" && 21 | notify-send -i "$file" "image copied to clipboard" &;; 22 | esac 23 | done 24 | -------------------------------------------------------------------------------- /.config/tabbed/LICENSE: -------------------------------------------------------------------------------- 1 | MIT/X Consortium License 2 | 3 | © 2009-2011 Enno Boland 4 | © 2011 Connor Lane Smith 5 | © 2012 Christoph Lohmann <20h@r-36.net> 6 | 7 | Permission is hereby granted, free of charge, to any person obtaining a 8 | copy of this software and associated documentation files (the "Software"), 9 | to deal in the Software without restriction, including without limitation 10 | the rights to use, copy, modify, merge, publish, distribute, sublicense, 11 | and/or sell copies of the Software, and to permit persons to whom the 12 | Software is furnished to do so, subject to the following conditions: 13 | 14 | The above copyright notice and this permission notice shall be included in 15 | all copies or substantial portions of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 20 | THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 22 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 23 | DEALINGS IN THE SOFTWARE. 24 | -------------------------------------------------------------------------------- /.config/tabbed/Makefile: -------------------------------------------------------------------------------- 1 | # tabbed - tabbing interface 2 | # See LICENSE file for copyright and license details. 3 | 4 | include config.mk 5 | 6 | SRC = tabbed.c 7 | OBJ = ${SRC:.c=.o} 8 | 9 | all: options tabbed 10 | 11 | options: 12 | @echo tabbed build options: 13 | @echo "CFLAGS = ${CFLAGS}" 14 | @echo "LDFLAGS = ${LDFLAGS}" 15 | @echo "CC = ${CC}" 16 | 17 | .c.o: 18 | @echo CC $< 19 | @${CC} -c ${CFLAGS} $< 20 | 21 | ${OBJ}: config.h config.mk 22 | 23 | config.h: 24 | @echo creating $@ from config.def.h 25 | @cp config.def.h $@ 26 | 27 | tabbed: tabbed.o 28 | @echo CC -o $@ 29 | @${CC} -o $@ tabbed.o ${LDFLAGS} 30 | 31 | clean: 32 | @echo cleaning 33 | @rm -f tabbed ${OBJ} tabbed-${VERSION}.tar.gz 34 | 35 | dist: clean 36 | @echo creating dist tarball 37 | @mkdir -p tabbed-${VERSION} 38 | @cp -R LICENSE Makefile README config.def.h config.mk \ 39 | tabbed.1 arg.h ${SRC} tabbed-${VERSION} 40 | @tar -cf tabbed-${VERSION}.tar tabbed-${VERSION} 41 | @gzip tabbed-${VERSION}.tar 42 | @rm -rf tabbed-${VERSION} 43 | 44 | install: all 45 | @echo installing executable file to ${DESTDIR}${PREFIX}/bin 46 | @mkdir -p ${DESTDIR}${PREFIX}/bin 47 | @cp -f tabbed ${DESTDIR}${PREFIX}/bin 48 | @chmod 755 ${DESTDIR}${PREFIX}/bin/tabbed 49 | @echo installing manual page to ${DESTDIR}${MANPREFIX}/man1 50 | @mkdir -p ${DESTDIR}${MANPREFIX}/man1 51 | @sed "s/VERSION/${VERSION}/g" < tabbed.1 > ${DESTDIR}${MANPREFIX}/man1/tabbed.1 52 | @chmod 644 ${DESTDIR}${MANPREFIX}/man1/tabbed.1 53 | 54 | uninstall: 55 | @echo removing executable file from ${DESTDIR}${PREFIX}/bin 56 | @rm -f ${DESTDIR}${PREFIX}/bin/tabbed 57 | @echo removing manual page from ${DESTDIR}${MANPREFIX}/man1 58 | @rm -f ${DESTDIR}${MANPREFIX}/man1/tabbed.1 59 | 60 | .PHONY: all options clean dist install uninstall 61 | -------------------------------------------------------------------------------- /.config/tabbed/README: -------------------------------------------------------------------------------- 1 | tabbed - generic tabbed interface 2 | ================================= 3 | tabbed is a simple tabbed X window container. 4 | 5 | Requirements 6 | ------------ 7 | In order to build tabbed you need the Xlib header files. 8 | 9 | Installation 10 | ------------ 11 | Edit config.mk to match your local setup (tabbed is installed into 12 | the /usr/local namespace by default). 13 | 14 | Afterwards enter the following command to build and install tabbed 15 | (if necessary as root): 16 | 17 | make clean install 18 | 19 | Running tabbed 20 | -------------- 21 | See the man page for details. 22 | 23 | -------------------------------------------------------------------------------- /.config/tabbed/TODO: -------------------------------------------------------------------------------- 1 | # TODO 2 | * add some way to detach windows 3 | * add some way to attach windows 4 | 5 | -------------------------------------------------------------------------------- /.config/tabbed/arg.h: -------------------------------------------------------------------------------- 1 | /* See the LICENSE file for copyright and license details. */ 2 | 3 | #ifndef __ARG_H__ 4 | #define __ARG_H__ 5 | 6 | extern char *argv0; 7 | 8 | #define USED(x) ((void)(x)) 9 | 10 | /* use main(int argc, char *argv[]) */ 11 | #define ARGBEGIN for (argv0 = *argv, argv++, argc--;\ 12 | argv[0] && argv[0][1]\ 13 | && argv[0][0] == '-';\ 14 | argc--, argv++) {\ 15 | char _argc;\ 16 | char **_argv;\ 17 | int brk;\ 18 | if (argv[0][1] == '-' && argv[0][2] == '\0') {\ 19 | argv++;\ 20 | argc--;\ 21 | break;\ 22 | }\ 23 | for (brk = 0, argv[0]++, _argv = argv;\ 24 | argv[0][0] && !brk;\ 25 | argv[0]++) {\ 26 | if (_argv != argv)\ 27 | break;\ 28 | _argc = argv[0][0];\ 29 | switch (_argc) 30 | 31 | #define ARGEND }\ 32 | USED(_argc);\ 33 | }\ 34 | USED(argv);\ 35 | USED(argc); 36 | 37 | #define ARGC() _argc 38 | 39 | #define EARGF(x) ((argv[0][1] == '\0' && argv[1] == NULL)?\ 40 | ((x), abort(), (char *)0) :\ 41 | (brk = 1, (argv[0][1] != '\0')?\ 42 | (&argv[0][1]) :\ 43 | (argc--, argv++, argv[0]))) 44 | 45 | #define ARGF() ((argv[0][1] == '\0' && argv[1] == NULL)?\ 46 | (char *)0 :\ 47 | (brk = 1, (argv[0][1] != '\0')?\ 48 | (&argv[0][1]) :\ 49 | (argc--, argv++, argv[0]))) 50 | 51 | #endif 52 | 53 | -------------------------------------------------------------------------------- /.config/tabbed/config.h: -------------------------------------------------------------------------------- 1 | /* See LICENSE file for copyright and license details. */ 2 | 3 | /* appearance */ 4 | static const char font[] = "monospace-10"; 5 | static const char* normbgcolor = "#222222"; 6 | static const char* normfgcolor = "#cccccc"; 7 | static const char* selbgcolor = "#555555"; 8 | static const char* selfgcolor = "#ffffff"; 9 | static const char before[] = "<"; 10 | static const char after[] = ">"; 11 | static const int tabwidth = 200; 12 | static const Bool foreground = True; 13 | 14 | /* 15 | * Where to place a new tab when it is opened. When npisrelative is True, 16 | * then the current position is changed + newposition. If npisrelative 17 | * is False, then newposition is an absolute position. 18 | */ 19 | static int newposition = 0; 20 | static Bool npisrelative = False; 21 | 22 | #define SETPROP(p) { \ 23 | .v = (char *[]){ "/bin/sh", "-c", \ 24 | "prop=\"`xwininfo -children -id $1 | grep '^ 0x' | sed -e's@^ *\\(0x[0-9a-f]*\\) \"\\([^\"]*\\)\".*@\\1 \\2@' | xargs -0 printf %b | dmenu -l 10 -w $1 `\" &&" \ 25 | "xprop -id $1 -f $0 8s -set $0 \"$prop\"", \ 26 | p, winid, NULL \ 27 | } \ 28 | } 29 | 30 | #define MODKEY ControlMask 31 | static Key keys[] = { \ 32 | /* modifier key function argument */ 33 | { MODKEY|ShiftMask, XK_Return, focusonce, { 0 } }, 34 | { MODKEY|ShiftMask, XK_Return, spawn, { 0 } }, 35 | { MODKEY, XK_t, spawn, SETPROP("_TABBED_SELECT_TAB") }, 36 | 37 | { MODKEY|ShiftMask, XK_l, rotate, { .i = +1 } }, 38 | { MODKEY|ShiftMask, XK_h, rotate, { .i = -1 } }, 39 | { MODKEY|ShiftMask, XK_j, movetab, { .i = -1 } }, 40 | { MODKEY|ShiftMask, XK_k, movetab, { .i = +1 } }, 41 | { MODKEY, XK_Tab, rotate, { .i = 0 } }, 42 | 43 | { MODKEY, XK_1, move, { .i = 0 } }, 44 | { MODKEY, XK_2, move, { .i = 1 } }, 45 | { MODKEY, XK_3, move, { .i = 2 } }, 46 | { MODKEY, XK_4, move, { .i = 3 } }, 47 | { MODKEY, XK_5, move, { .i = 4 } }, 48 | { MODKEY, XK_6, move, { .i = 5 } }, 49 | { MODKEY, XK_7, move, { .i = 6 } }, 50 | { MODKEY, XK_8, move, { .i = 7 } }, 51 | { MODKEY, XK_9, move, { .i = 8 } }, 52 | { MODKEY, XK_0, move, { .i = 9 } }, 53 | 54 | { MODKEY, XK_q, killclient, { 0 } }, 55 | 56 | { 0, XK_F11, fullscreen, { 0 } }, 57 | }; 58 | 59 | -------------------------------------------------------------------------------- /.config/tabbed/config.mk: -------------------------------------------------------------------------------- 1 | # tabbed version 2 | VERSION = 0.6 3 | 4 | # Customize below to fit your system 5 | 6 | # paths 7 | PREFIX = /usr/local 8 | MANPREFIX = ${PREFIX}/share/man 9 | 10 | # includes and libs 11 | INCS = -I. -I/usr/include -I/usr/include/freetype2 12 | LIBS = -L/usr/lib -lc -lX11 -lfontconfig -lXft 13 | 14 | # flags 15 | CPPFLAGS = -DVERSION=\"${VERSION}\" -D_BSD_SOURCE 16 | CFLAGS = -std=c99 -pedantic -Wall -O0 ${INCS} ${CPPFLAGS} 17 | LDFLAGS = -s ${LIBS} 18 | 19 | # Solaris 20 | #CFLAGS = -fast ${INCS} -DVERSION=\"${VERSION}\" 21 | #LDFLAGS = ${LIBS} 22 | 23 | # compiler and linker 24 | CC = cc 25 | 26 | -------------------------------------------------------------------------------- /.config/tabbed/patches/autohide.diff: -------------------------------------------------------------------------------- 1 | diff --git a/tabbed.c b/tabbed.c 2 | index ff3ada0..c41db0c 100644 3 | --- a/tabbed.c 4 | +++ b/tabbed.c 5 | @@ -152,7 +152,7 @@ static void (*handler[LASTEvent]) (const XEvent *) = { 6 | [MapRequest] = maprequest, 7 | [PropertyNotify] = propertynotify, 8 | }; 9 | -static int bh, wx, wy, ww, wh; 10 | +static int bh, wx, wy, ww, wh, vbh; 11 | static unsigned int numlockmask = 0; 12 | static Bool running = True, nextfocus, doinitspawn = True, 13 | fillagain = False, closelastclient = False; 14 | @@ -307,6 +307,6 @@ void 15 | drawbar(void) { 16 | unsigned long *col; 17 | - int c, fc, width, n = 0; 18 | + int c, fc, width, n = 0, nbh, i; 19 | char *name = NULL; 20 | 21 | if (nclients == 0) { 22 | @@ -314,10 +314,19 @@ drawbar(void) 23 | dc.w = ww; 24 | XFetchName(dpy, win, &name); 25 | drawtext(name ? name : "", dc.norm); 26 | - XCopyArea(dpy, dc.drawable, win, dc.gc, 0, 0, ww, bh, 0, 0); 27 | + XCopyArea(dpy, dc.drawable, win, dc.gc, 0, 0, ww, vbh, 0, 0); 28 | XSync(dpy, False); 29 | 30 | return; 31 | } 32 | 33 | + nbh = nclients > 1 ? vbh : 0; 34 | + if (bh != nbh) { 35 | + bh = nbh; 36 | + for (i = 0; i < nclients; i++) 37 | + XMoveResizeWindow(dpy, clients[i]->win, 0, bh, ww, wh - bh); 38 | + } 39 | + if (bh == 0) 40 | + return; 41 | + 42 | width = ww; 43 | @@ -920,6 +929,6 @@ setup(void) 44 | screen = DefaultScreen(dpy); 45 | root = RootWindow(dpy, screen); 46 | initfont(font); 47 | - bh = dc.h = dc.font.height + 2; 48 | + vbh = dc.h = dc.font.height + 2; 49 | 50 | /* init atoms */ 51 | -------------------------------------------------------------------------------- /.config/tabbed/tabbed.1: -------------------------------------------------------------------------------- 1 | .TH TABBED 1 tabbed\-VERSION 2 | .SH NAME 3 | tabbed \- generic tabbed interface 4 | .SH SYNOPSIS 5 | .B tabbed 6 | .RB [ \-c ] 7 | .RB [ \-d ] 8 | .RB [ \-h ] 9 | .RB [ \-s ] 10 | .RB [ \-v ] 11 | .RB [ \-g 12 | .IR geometry ] 13 | .RB [ \-n 14 | .IR name ] 15 | .RB [ \-p 16 | .IR [ s +/- ] pos ] 17 | .RB [ \-r 18 | .IR narg ] 19 | .IR [ command ... ] 20 | .SH DESCRIPTION 21 | .B tabbed 22 | is a simple tabbed container for applications which support XEmbed. Tabbed 23 | will then run the provided command with the xid of tabbed as appended 24 | argument. (See EXAMPLES.) The automatic spawning of the command can be 25 | disabled by providing the -s parameter. If no command is provided 26 | tabbed will just print its xid and run no command. 27 | .SH OPTIONS 28 | .TP 29 | .B \-c 30 | close tabbed when the last tab is closed. Mutually exclusive with -f. 31 | .TP 32 | .B \-d 33 | detaches tabbed from the terminal and prints its XID to stdout. 34 | .TP 35 | .B \-f 36 | fill up tabbed again by spawning the provided command, when the last tab is 37 | closed. Mutually exclusive with -c. 38 | .TP 39 | .B \-h 40 | will print the usage of tabbed. 41 | .TP 42 | .BI \-g " geometry" 43 | defines the X11 geometry string, which will fixate the height and width of 44 | tabbed. 45 | Them form is [=][{xX}][{+-}{+-}]. See 46 | .BR XParseGeometry (3) 47 | for further details. 48 | .TP 49 | .BI \-n " name" 50 | will set the WM_CLASS attribute to 51 | .I name. 52 | .TP 53 | .BI \-p " [ s +/-] pos" 54 | will set the absolute or relative position of where to start a new tab. When 55 | .I pos 56 | is is given without 's' in front it is an absolute position. Then negative 57 | numbers will be the position from the last tab, where -1 is the last tab. 58 | If 's' is given, then 59 | .I pos 60 | is a relative position to the current selected tab. If this reaches the limits 61 | of the tabs; those limits then apply. 62 | .TP 63 | .BI \-r " narg" 64 | will replace the 65 | .I narg 66 | th argument in 67 | .I command 68 | with the window id, rather than appending it to the end. 69 | .TP 70 | .B \-s 71 | will disable automatic spawning of the command. 72 | .TP 73 | .BI \-t " color" 74 | defines the selected background color. 75 | .IR #RGB , 76 | .IR #RRGGBB , 77 | and X color names are supported. 78 | .TP 79 | .BI \-T " color" 80 | defines the selected foreground color. 81 | .TP 82 | .BI \-u " color" 83 | defines the normal background color. 84 | .TP 85 | .BI \-U " color" 86 | defines the normal foreground color. 87 | .TP 88 | .B \-v 89 | prints version information to stderr, then exits. 90 | .SH USAGE 91 | .TP 92 | .B Ctrl\-Shift\-Return 93 | open new tab 94 | .TP 95 | .B Ctrl\-Shift\-h 96 | previous tab 97 | .TP 98 | .B Ctrl\-Shift\-l 99 | next tab 100 | .TP 101 | .B Ctrl\-Shift\-j 102 | move selected tab one to the left 103 | .TP 104 | .B Ctrl\-Shift\-k 105 | move selected tab one to the right 106 | .TP 107 | .B Ctrl\-Tab 108 | toggle between the selected and last selected tab 109 | .TP 110 | .B Ctrl\-t 111 | open dmenu to either create a new tab appending the entered string or select 112 | an already existing tab. 113 | .TP 114 | .B Ctrl\-q 115 | close tab 116 | .TP 117 | .B Ctrl\-[0..9] 118 | jumps to nth tab 119 | .TP 120 | .B F11 121 | Toggle fullscreen mode. 122 | .SH EXAMPLES 123 | $ tabbed surf -e 124 | .TP 125 | $ tabbed urxvt -embed 126 | .TP 127 | $ tabbed xterm -into 128 | .TP 129 | $ $(tabbed -d >/tmp/tabbed.xid); urxvt -embed $(/dev/null & 26 | filetype *.html,*.htm w3m %f 27 | filextype *.odt,*.doc,*.docx,*.xls,*.xlsx,*.odp,*.pptx libreoffice %f & 28 | filetype *.wav,*.mp3,*.flac,*.m4a,*.wma,*.ape,*.ac3,*.og[agx],*.spx,*.opus mpv --no-audio-display %c 29 | filextype *.pdf zathura %c %i & 30 | filextype *.avi,*.mp4,*.wmv,*.dat,*.3gp,*.ogv,*.mkv,*.mpg,*.mpeg,*.vob, 31 | \*.fl[icv],*.m2v,*.mov,*.webm,*.ts,*.mts,*.m4v,*.r[am],*.qt,*.divx, 32 | \*.as[fx] mpv %f, 33 | filetype *.[1-8] man ./%c 34 | fileviewer *.bmp,*.jpg,*.jpeg,*.png,*.ico,*.gif,*.xpm imgt %c -m scale -x %px -y %py -w %pw -h %ph 35 | filextype *.bmp,*.jpg,*.jpeg,*.png,*.ico,*.gif,*.xpm sxiv -iab & 36 | filextype *.svg inkscape & 37 | filextype *.xcf gimp & 38 | fileview *,.* preview 39 | 40 | nno tj 41 | nno q :q 42 | nno I cw 43 | nno cc cw 44 | nno A cw 45 | nno s :shell 46 | nno S :sort 47 | nno w :view 48 | nno yd :!printf %s %d | xclip -sel clip 49 | nno yf :!printf %s %c:p | xclip -sel clip 50 | com FzfFind :set noquickview | :exec 'goto "'.system('find . -mindepth 1 2>/dev/null | fzf --height 100 2>/dev/tty').'"%IU' | redraw 51 | nno :FzfFind 52 | -------------------------------------------------------------------------------- /.config/wget/wgetrc: -------------------------------------------------------------------------------- 1 | hsts-file=~/.cache/wget-hsts 2 | -------------------------------------------------------------------------------- /.config/xrdb/Xdefaults: -------------------------------------------------------------------------------- 1 | ! ██ ██ ██ ████ ██ ██ 2 | ! ░░██ ██ ░██ ░██░ ░██ ░██ 3 | ! ░░██ ██ ░██ █████ ██████ ██████ ██ ██ ░██ ██████ ██████ 4 | ! ░░███ ██████ ██░░░██░░░██░ ░░░░░░██ ░██ ░██ ░██░░░██░ ██░░░░ 5 | ! ██░██ ██░░░██░███████ ░██ ███████ ░██ ░██ ░██ ░██ ░░█████ 6 | ! ██ ░░██ ░██ ░██░██░░░░ ░██ ██░░░░██ ░██ ░██ ░██ ░██ ░░░░░██ 7 | ! ██ ░░██░░██████░░██████ ░██ ░░████████░░██████ ███ ░░██ ██████ 8 | ! ░░ ░░ ░░░░░░ ░░░░░░ ░░ ░░░░░░░░ ░░░░░░ ░░░ ░░ ░░░░░░ 9 | 10 | *.font: xft:Terminus:pixelsize=14 11 | 12 | #ifdef LIGHT_THEME 13 | #define bg #e8e9ec 14 | #define fg #33374c 15 | 16 | ! black 17 | #define ice00 #dcdfe7 18 | #define ice08 #8389a3 19 | 20 | ! red 21 | #define ice01 #cc517a 22 | #define ice09 #cc3768 23 | 24 | ! green 25 | #define ice02 #668e3d 26 | #define ice0A #598030 27 | 28 | ! yellow 29 | #define ice03 #c57339 30 | #define ice0B #b6662d 31 | 32 | ! blue 33 | #define ice04 #2d539e 34 | #define ice0C #22478e 35 | 36 | ! magenta 37 | #define ice05 #7759b4 38 | #define ice0D #6845ad 39 | 40 | ! cyan 41 | #define ice06 #3f83a6 42 | #define ice0E #327698 43 | 44 | ! white 45 | #define ice07 #33374c 46 | #define ice0F #262a3f 47 | 48 | ! special 49 | #define accent ice07 50 | #else 51 | #define bg #161821 52 | #define fg #c6c8d1 53 | 54 | ! black 55 | #define ice00 #22262e 56 | #define ice08 #6b7089 57 | 58 | ! red 59 | #define ice01 #e27878 60 | #define ice09 #e98989 61 | 62 | ! yellow 63 | #define ice02 #b4be82 64 | #define ice0A #c0ca8e 65 | 66 | ! green 67 | #define ice03 #e2a478 68 | #define ice0B #e9b189 69 | 70 | ! blue 71 | #define ice04 #84a0c6 72 | #define ice0C #91acd1 73 | 74 | ! cyan 75 | #define ice05 #a093c7 76 | #define ice0D #ada0d3 77 | 78 | ! magenta 79 | #define ice06 #89b8c2 80 | #define ice0E #95c4ce 81 | 82 | ! white 83 | #define ice07 #c6c8d1 84 | #define ice0F #d2d4de 85 | 86 | ! special 87 | #define accent ice04 88 | #endif 89 | 90 | *background: bg 91 | *foreground: fg 92 | *cursorColor: fg 93 | 94 | *color0: ice00 95 | *color1: ice01 96 | *color2: ice02 97 | *color3: ice03 98 | *color4: ice04 99 | *color5: ice05 100 | *color6: ice06 101 | *color7: ice07 102 | *color8: ice08 103 | *color9: ice09 104 | *color10: ice0A 105 | *color11: ice0B 106 | *color12: ice0C 107 | *color13: ice0D 108 | *color14: ice0E 109 | *color15: ice0F 110 | 111 | dmenu.foreground: fg 112 | dmenu.background: bg 113 | dmenu.selforeground: bg 114 | dmenu.selbackground: accent 115 | 116 | dwm.normfgcolor: fg 117 | dwm.normbgcolor: bg 118 | dwm.normbordercolor: bg 119 | dwm.selfgcolor: bg 120 | dwm.selbgcolor: accent 121 | dwm.selbordercolor: accent 122 | 123 | tabbed.normfgcolor: fg 124 | tabbed.normbgcolor: bg 125 | tabbed.selfgcolor: bg 126 | tabbed.selbgcolor: accent 127 | 128 | slock.init: bg 129 | slock.input: accent 130 | slock.failed: ice01 131 | 132 | ! vim: ft=xdefaults 133 | -------------------------------------------------------------------------------- /.config/zathura/zathurarc: -------------------------------------------------------------------------------- 1 | # ██ ██ 2 | # ░██ ░██ 3 | # ██████ ██████ ██████░██ ██ ██ ██████ ██████ 4 | # ░░░░██ ░░░░░░██ ░░░██░ ░██████ ░██ ░██░░██░░█ ░░░░░░██ 5 | # ██ ███████ ░██ ░██░░░██░██ ░██ ░██ ░ ███████ 6 | # ██ ██░░░░██ ░██ ░██ ░██░██ ░██ ░██ ██░░░░██ 7 | # ██████░░████████ ░░██ ░██ ░██░░██████░███ ░░████████ 8 | # ░░░░░░ ░░░░░░░░ ░░ ░░ ░░ ░░░░░░ ░░░ ░░░░░░░░ 9 | 10 | set selection-clipboard clipboard 11 | 12 | set default-bg "#161821" 13 | set recolor-darkcolor "#c6c8d1" 14 | set recolor-lightcolor "#161821" 15 | set inputbar-bg "#161821" 16 | set inputbar-fg "#c6c8d1" 17 | set notification-bg "#161821" 18 | set notification-fg "#c6c8d1" 19 | set notification-error-bg "#cc517a" 20 | set notification-error-fg "#161821" 21 | set notification-warning-bg "#161821" 22 | set notification-warning-fg "#e27878" 23 | set statusbar-bg "#161821" 24 | set statusbar-fg "#c6c8d1" 25 | set index-bg "#161821" 26 | set index-fg "#c6c8d1" 27 | set index-active-bg "#c6c8d1" 28 | set index-active-fg "#161821" 29 | set render-loading-bg "#161821" 30 | set render-loading-fg "#c6c8d1" 31 | set completion-fg "#cccccc" 32 | set completion-bg "#161821" 33 | set completion-highlight-bg "#84a0c6" 34 | set highlight-color "#2d539e" 35 | set highlight-active-color "#2d539e" 36 | -------------------------------------------------------------------------------- /.config/zsh/.zprofile: -------------------------------------------------------------------------------- 1 | tmux has -t irc || irc 2 | [ $(tty) = "/dev/tty1" ] && ! pgrep -x X >/dev/null && exec startx 3 | -------------------------------------------------------------------------------- /.config/zsh/.zshenv: -------------------------------------------------------------------------------- 1 | # --- 2 | # environment 3 | # variables 4 | # ----- 5 | 6 | export PATH="$HOME/.local/bin:$PATH" 7 | 8 | export HISTSIZE=1000 9 | export SAVEHIST=1000 10 | export HISTFILE=~/.config/zsh/.zsh_history 11 | 12 | export EDITOR="nvim" 13 | export TERMINAL='st' 14 | export BROWSER="surf-open.sh" 15 | 16 | export XDG_DATA_HOME="$HOME/.local/share" 17 | export XDG_CONFIG_HOME="$HOME/.config" 18 | export INPUTRC="$ZDOTDIR/inputrc" 19 | export XAUTHORITY="$XDG_RUNTIME_DIR/Xauthority" 20 | export GTK2_RC_FILES="$XDG_CONFIG_HOME/gtk-2.0/gtkrc-2.0" 21 | export WGETRC="$XDG_CONFIG_HOME/wget/wgetrc" 22 | export GNUPGHOME="$XDG_DATA_HOME/gnupg" 23 | export PASSWORD_STORE_DIR="$XDG_DATA_HOME/password-store" 24 | export LESSHISTFILE="-" 25 | 26 | export SUDO_ASKPASS="$HOME/.local/bin/menupass" 27 | export VIRTUAL_ENV_DISABLE_PROMPT=1 28 | export SUDO_PROMPT=$'\e[34m'[$'\e[0m'sudo$'\e[34m']$'\e[0m'' password for '$'\e[1;34m''%p'$'\e[0m'': ' 29 | export SPROMPT="%F{blue}[%fzsh%F{blue}]%f correct %F{red}%R%f to %F{blue}%r%f [nyae]: " 30 | 31 | export PAGER='less' 32 | export LESS='-R' 33 | export LESS_TERMCAP_mb=$'\e[1;34m' 34 | export LESS_TERMCAP_md=$'\e[1;34m' 35 | export LESS_TERMCAP_me=$'\e[0m' 36 | export LESS_TERMCAP_se=$'\e[0m' 37 | export LESS_TERMCAP_so=$'\e[0;44;30m' 38 | export LESS_TERMCAP_ue=$'\e[0m' 39 | export LESS_TERMCAP_us=$'\e[0;32m' 40 | 41 | export MPD_HOST="password@$HOME/.config/mpd/socket" 42 | export WWW_HOME="ddg.gg" 43 | export LS_COLORS="di=34:ln=36:pi=42:ex=33:tw=0:ow=0:st=0:*.tar=31:*.gz=31:"\ 44 | "*.xz=31:*.zip=31:*.mp3=35:*.flac=35:*.png=35:*.jpg=35:*.mkv=35:*.mp4=35" 45 | 46 | export FZF_DEFAULT_OPTS=' 47 | --color fg:7,hl:4,fg+:15,bg+:0,hl+:3 48 | --color pointer:1,info:8,spinner:3,header:8,prompt:4,marker:8 49 | --info=inline 50 | --height 60% 51 | --cycle 52 | --reverse 53 | --pointer=" " 54 | ' 55 | export FZF_DEFAULT_COMMAND="find . -mindepth 1 2>/dev/null" 56 | export FZF_ALT_C_COMMAND="find . -mindepth 1 -type d 2>/dev/null" 57 | export FZF_ALT_C_OPTS="$FZF_DEFAULT_OPTS --preview 'preview {}'" 58 | export FZF_CTRL_T_COMMAND="$FZF_DEFAULT_COMMAND" 59 | export FZF_CTRL_T_OPTS="$FZF_DEFAULT_OPTS --preview 'preview {}'" 60 | -------------------------------------------------------------------------------- /.config/zsh/sc: -------------------------------------------------------------------------------- 1 | bin ~/.local/bin 2 | dl ~/.local/dl 3 | share ~/.local/share 4 | bw ~/.local/share/bookmarks 5 | -------------------------------------------------------------------------------- /.gitconfig: -------------------------------------------------------------------------------- 1 | [user] 2 | name = cherrry9 3 | email = cherrry9@disroot.org 4 | signingkey = FF469BD6 5 | 6 | [commit] 7 | gpgsign = true 8 | 9 | [tag] 10 | gpgsign = true 11 | 12 | [push] 13 | default = current 14 | 15 | [color "status"] 16 | added = bold blue 17 | changed = bold white 18 | untracked = bold red 19 | 20 | [color "branch"] 21 | current = bold reverse blue 22 | local = blue 23 | remote = yellow 24 | 25 | [format] 26 | pretty = %C(yellow)%h%Creset -%C(bold blue)%d%Creset %s %Cgreen(%cr) %C(bold black)<%an>%Creset 27 | 28 | [credential] 29 | helper = cache --timeout 28800 30 | 31 | [rerere] 32 | enabled = 1 33 | autoupdate = 1 34 | 35 | [merge] 36 | style = diff3 37 | tool = nvim 38 | 39 | [mergetool] 40 | prompt = false 41 | 42 | [mergetool "nvim"] 43 | cmd = nvim -f -c \"Gvdiffsplit!\" \"$MERGED\" 44 | 45 | [diff] 46 | tool = nvim 47 | 48 | [difftool] 49 | prompt = false 50 | 51 | [difftool "nvim"] 52 | cmd = nvim -d \"$BASE\" \"$LOCAL\" \"$REMOTE\" \"$MERGED\" -c \"$wincmd w\" -c \"wincmd J\" 53 | 54 | [alias] 55 | a = add -v 56 | ap = add -p 57 | 58 | c = commit 59 | ca = commit -a 60 | cae = commit -a --no-edit 61 | 62 | s = status 63 | ss = status -s 64 | 65 | l = log 66 | ls = log --show-signature 67 | lp = log -p 68 | 69 | mt = mergetool 70 | df = difftool 71 | d = diff 72 | ds = diff --staged 73 | 74 | co = checkout 75 | com = checkout master 76 | cob = checkout -b 77 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule ".config/nvim/pack/plugins/start/fzf.vim"] 2 | path = .config/nvim/pack/plugins/start/fzf.vim 3 | url = https://github.com/junegunn/fzf.vim 4 | [submodule ".config/nvim/pack/plugins/start/targets.vim"] 5 | path = .config/nvim/pack/plugins/start/targets.vim 6 | url = https://github.com/wellle/targets.vim 7 | [submodule ".config/nvim/pack/plugins/start/vim-surround"] 8 | path = .config/nvim/pack/plugins/start/vim-surround 9 | url = https://github.com/tpope/vim-surround 10 | [submodule ".config/nvim/pack/plugins/start/vim-repeat"] 11 | path = .config/nvim/pack/plugins/start/vim-repeat 12 | url = https://github.com/tpope/vim-repeat 13 | [submodule ".config/nvim/pack/plugins/start/auto-pairs"] 14 | path = .config/nvim/pack/plugins/start/auto-pairs 15 | url = https://github.com/jiangmiao/auto-pairs 16 | -------------------------------------------------------------------------------- /.local/bin/0x0: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # upload file to 0x0.st 3 | [ -f "$1" ] && op="cat" 4 | ${op:-echo} "${@:-$(cat -)}" \ 5 | | curl -sF file='@-' 'http://0x0.st' \ 6 | | tee /dev/stderr \ 7 | | tr -d '\n' \ 8 | | xclip -sel clip 9 | -------------------------------------------------------------------------------- /.local/bin/battery: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | bat='/sys/class/power_supply/BAT?' 3 | case $(cat $bat/status) in 4 | Full) sign='=';; 5 | Discharging) sign='-';; 6 | Charging) sign='+';; 7 | esac 8 | echo "$sign$(cat $bat/capacity)" 9 | -------------------------------------------------------------------------------- /.local/bin/cronbat: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # Notify me if my battery is low. 3 | if [ "$(cat /sys/class/power_supply/BAT0/status)" = "Charging" ]; then 4 | [ -f /tmp/cronbat.lock ] && rm /tmp/cronbat.lock 5 | elif [ "$(cat /sys/class/power_supply/BAT0/capacity)" -lt 25 ] && [ ! -f /tmp/cronbat.lock ]; then 6 | touch /tmp/cronbat.lock; notify-send -u critical "battery critically low." 7 | fi 8 | -------------------------------------------------------------------------------- /.local/bin/crontog: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # Toggles all cronjobs off/on. 3 | if [ -f ~/.config/cronsaved ]; then 4 | crontab ~/.config/cronsaved 5 | rm ~/.config/cronsaved 6 | notify-send "cronjobs re-enabled." 7 | else 8 | crontab -l >~/.config/cronsaved 9 | crontab -d 10 | notify-send "cronjobs saved and disabled." 11 | fi 12 | -------------------------------------------------------------------------------- /.local/bin/del: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # move a file to trash (needs GNU mvA) 3 | td=~/.local/share/trash 4 | for o; do 5 | case "$o" in 6 | --) break;; 7 | -*) rm "$@"; exit;; 8 | esac 9 | done 10 | mv --backup=t -v "$@" "$td" 11 | -------------------------------------------------------------------------------- /.local/bin/dots: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # wraper for dotfiles 3 | dotfiles() { git --git-dir ~/.config/dots-git/ --work-tree ~ "$@"; } 4 | if [ $1 = 'up' ]; then 5 | dotfiles pull && 6 | dotfiles update-index --assume-unchanged ~/LICENSE ~/README.md ~/INSTALL.md && 7 | rm -rf ~/LICENSE ~/README.md ~/INSTALL.md 8 | else 9 | dotfiles $* 10 | fi 11 | -------------------------------------------------------------------------------- /.local/bin/dunst: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | red=$(xgetres color1) 3 | fg=$(xgetres foreground) 4 | bg=$(xgetres background) 5 | /usr/bin/dunst -lf $fg -lb $bg -nf $fg -nb $bg -cf $red -cb $bg "$@" 6 | -------------------------------------------------------------------------------- /.local/bin/dwmbar: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | bat() { 4 | echo "BAT: $(battery)%" 5 | } 6 | 7 | date() { 8 | echo "$(command date '+%I:%M %p') | $(command date '+%D')" 9 | } 10 | 11 | light() { 12 | printf "LIGHT: %0.f%%" "$(xbacklight -get)" 13 | } 14 | 15 | vol() { 16 | echo "VOL: $(command vol get)" 17 | } 18 | 19 | while :; do 20 | xsetroot -name " $(vol) | $(light) | $(bat) | $(date) " 21 | sleep 1 22 | done 23 | -------------------------------------------------------------------------------- /.local/bin/fmenu: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # fzf dmenu alternative 3 | 4 | # save input, output 5 | in=/tmp/fmenuin out=/tmp/fmenuout 6 | cat >"$in" 2>/dev/null 7 | 8 | # parse opt 9 | while [ "$1" ]; do 10 | if [ "$1" = '-p' ]; then 11 | prompt=" $2" 12 | shift 13 | else 14 | args="$args $1" 15 | fi 16 | shift 17 | done 18 | args="$args --expect alt-enter --print-query --no-info --height 100% --prompt='$prompt > '" 19 | 20 | # automatically adjust height 21 | height=$(($(wc -l "$in" | cut -d' ' -f1) + 1)) 22 | [ $height -gt 15 ] && height=15 23 | 24 | # open floating terminal and run fzf 25 | $TERMINAL -g ${geometry:-48x$height} -n ${class:-center} -t fmenu -e sh -c "fzf $args <$in >$out" 2>/dev/null 26 | exit_code=$? 27 | 28 | # line: 29 | # 1 -- query string 30 | # 2 -- empty string or "alt-enter" 31 | # 3.. -- selected item(s) 32 | if [ -n "$(sed -n '2p' "$out")" ] || [ -z "$(sed -n '3p' "$out")" ]; then 33 | head -n1 "$out" 34 | else 35 | sed -n '3,$p' "$out" 36 | fi 37 | 38 | exit $exit_code 39 | -------------------------------------------------------------------------------- /.local/bin/fzf: -------------------------------------------------------------------------------- 1 | ../../.config/fzf/bin/fzf -------------------------------------------------------------------------------- /.local/bin/fzf-tmux: -------------------------------------------------------------------------------- 1 | ../../.config/fzf/bin/fzf-tmux -------------------------------------------------------------------------------- /.local/bin/imgt: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # Draw an image using w3mimagedisplay 3 | # 4 | # Dependencies: 5 | # w3mimgdisplay 6 | # imlib2 7 | # libx11 8 | # bc 9 | # 10 | # w3mimgdispolay read arguments from stdin, each argument is separeted by ';' 11 | # 12 | # 0; params -- draw image 13 | # 1; params -- redraw image 14 | # 2; -none- -- terminate drawing 15 | # 3; -none- -- sync drawing 16 | # 4; -none- -- nop, sync communication response '\n' 17 | # 5; path -- get size of image, response " \n" 18 | # 6; params(6) -- clear image 19 | # 20 | # params: 21 | # ;;;;;;;;; 22 | # params(6): 23 | # ;;; 24 | # 25 | # n - this is used when displaying multiple images 26 | # x - x coordinate to draw the image at (top left corner) 27 | # y - y coordinate to draw the image at (top left corner) 28 | # w - width to draw the image 29 | # h - height to draw the image 30 | # sx - x offset to draw the image 31 | # xy - y offset to draw the image 32 | # sw - width of the original (source) image 33 | # sh - height of the original (source) image 34 | # 35 | # usage: 36 | # imgt FILENAME -m MODE -x X_OFFSET -y Y_OFFSET -w WIDTH -h HEIGHT 37 | # 38 | # modes: 39 | # auto -- automatically adjusts dimensions (default) 40 | # scale -- scale an image keeping its aspect ratio (useful for previews scripts) 41 | # clear -- clear image 42 | # 43 | # examples: 44 | # automatically adjusts the width to the height, using the aspect ratio of the original image: 45 | # imgt image.png -m auto -h 30 46 | # 47 | # keep aspect ratio with width <= 30 and height <= 50: 48 | # imgt image.png -m scale -w 30 -h 50 49 | 50 | 51 | w3mimg="/usr/libexec/w3m/w3mimgdisplay" 52 | fonth=16 # size of one terminal row 53 | fontw=8 # size of one terminal column 54 | 55 | [ -f "$1" ] && filename=$1 && shift 56 | x=0 57 | y=0 58 | width=0 59 | height=0 60 | mode='auto' 61 | 62 | while getopts ':m:x:y:w:h:' opt; do 63 | case "$opt" in 64 | m) mode=$OPTARG;; 65 | x) x=$((OPTARG * fontw));; 66 | y) y=$((OPTARG * fonth));; 67 | w) width=$((OPTARG * fontw));; 68 | h) height=$((OPTARG * fonth));; 69 | \?) echo "invalid option: -$OPTARG" 1>&2; exit 1;; 70 | esac 71 | done 72 | shift $((OPTIND - 1)) 73 | 74 | if [ "$mode" = clear ]; then 75 | cmd="6;$x;$y;$width;$height\n3" 76 | printf "%b" "$cmd" | $w3mimg 77 | exit 78 | fi 79 | 80 | read -r source_width source_height </dev/null 2>&1 5 | case "$1" in 6 | *mkv|*webm|*mp4|*youtube.com/watch*|*youtube.com/playlist*|*youtu.be*) 7 | setsid mpv -quiet "$1" & ;; 8 | *png|*jpg|*jpe|*jpeg|*gif) 9 | file=$(echo "$1" | sed "s/.*\///") 10 | curl -sL "$1" > "/tmp/$file" && sxiv -ab "/tmp/$file" &;; 11 | *mp3|*flac|*opus|*mp3?source*) cd ~/.local/dl && setsid curl -LO "$1" &;; 12 | *) [ -f "$1" ] && $TERMINAL -e $EDITOR "$1" || setsid $BROWSER "$1";; 13 | esac 14 | -------------------------------------------------------------------------------- /.local/bin/manmen: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | manpage=$(man -k . | menu | cut -d' ' -f1) 3 | [ "$manpage" ] && st -e man "$manpage" # man -Tpdf "$manpage" | zathura - 4 | -------------------------------------------------------------------------------- /.local/bin/menu: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # specify which menu to use in scripts 3 | #dmenu "$@" 4 | fmenu "$@" 5 | -------------------------------------------------------------------------------- /.local/bin/menuhandler: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # feed this script a link and it will give menu some choice programs to use to open it 3 | exec 2>/dev/null 4 | url="$1" 5 | set -- copy browser mpv download youtube-dl sxiv w3m 6 | program=$(printf "%s\n" "$@" | menu -p 'Open with') 7 | exec >/dev/null 8 | case $program in 9 | copy) printf %s "$url" | xclip -sel clip;; 10 | browser) setsid -f $BROWSER "$url";; 11 | mpv) setsid -f mpv -quiet "$url";; 12 | download) (cd ~/.local/dl && curl -sLO "$url") &;; 13 | youtube-dl) (cd ~/.local/dl && setsid youtube-dl --add-metadata -ic "$url") &;; 14 | sxiv) file=$(echo "$url" | sed "s/.*\///"); curl -sL "$url" >"/tmp/$file" && sxiv -ab "/tmp/$file" &;; 15 | w3m) setsid -f $TERMINAL -e w3m "$url";; 16 | esac 17 | -------------------------------------------------------------------------------- /.local/bin/menupass: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # this script is the SUDO_ASKPASS variable, meaning that it will be used as a 3 | # password prompt if needed 4 | fmenu -p "Password" <&- 5 | -------------------------------------------------------------------------------- /.local/bin/mnt: -------------------------------------------------------------------------------- 1 | #!/bin/sh -e 2 | # mount disk 3 | set -- $(lsblk -rno name,mountpoint,fstype | grep -i ' [a-rt-z]' | menu -p 'Mount') 4 | [ "$1" ] 5 | mkdir -p "$HOME/mnt/$1" 6 | sudo mount "/dev/$1" "$HOME/mnt/$1" 7 | notify-send "Mounted $1" 8 | -------------------------------------------------------------------------------- /.local/bin/notlight: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | bar() { 3 | vol=$(xbacklight -get) 4 | vol=${vol%%.*} 5 | vol=$((vol / 5)) 6 | i=1 7 | printf "" 8 | [ 0 -eq "$vol" ] && printf '' 9 | while [ "$i" -le 20 ]; do 10 | [ "$i" -le "$vol" ] && printf '━' || printf '┄' 11 | [ "$i" -eq "$vol" ] && printf '' 12 | i=$((i+1)) 13 | done 14 | } 15 | dunstify -t 1000 -r 9955 "brightness" "$(bar)" & 16 | -------------------------------------------------------------------------------- /.local/bin/nottop: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | [ "$1" = m ] && m="window moved to" || m="switched to" 3 | dunstify -u low -t 700 -r 9966 "$m $(($2 + 1))" 4 | -------------------------------------------------------------------------------- /.local/bin/notvol: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | bar() { 3 | case "$1" in 4 | mpd) 5 | vol=$(mpc vol) 6 | vol=${vol#*:} 7 | case $(mpc 2>/dev/null | sed -n '2p') in 8 | '[paused]'*) color='#e27878' 9 | esac 10 | vol=${vol%\%};; 11 | *) 12 | vol=$(vol get) 13 | case "$vol" in 14 | *'[mutted]') color='#e27878' 15 | esac 16 | vol=${vol%\%*} 17 | esac 18 | vol=$((vol / 5)) 19 | i=1 20 | printf "" 21 | [ 0 -eq "$vol" ] && printf '' 22 | while [ "$i" -le 20 ]; do 23 | [ "$i" -le "$vol" ] && printf '━' || printf '┄' 24 | [ "$i" -eq "$vol" ] && printf '' 25 | i=$((i+1)) 26 | done 27 | } 28 | dunstify -t 700 -r 9955 "volume" "$(bar $1)" & 29 | -------------------------------------------------------------------------------- /.local/bin/pager: -------------------------------------------------------------------------------- 1 | col -b | /usr/share/vim/vim82/macros/less.sh -c ":set filetype=man" 2 | -------------------------------------------------------------------------------- /.local/bin/passmenu2: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # Decrypt and print password from pass database. 3 | 4 | [ "$1" = "--type" ] && typeit=0 || typeit=1 5 | 6 | prefix=${PASSWORD_STORE_DIR-~/.password-store} 7 | 8 | while read -r file; do 9 | file="${file%.gpg}" 10 | [ "$password_files" ] && 11 | password_files="$password_files\n${file##$prefix/}" || 12 | password_files="${file##$prefix/}" 13 | done </dev/null 26 | fi 27 | -------------------------------------------------------------------------------- /.local/bin/powermenu: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -- lock exit suspend hibernate shutdown reboot 3 | op="$(printf "%s\n" "$@" | menu -p 'System')" 4 | case "$op" in 5 | lock) slock & mpc pause;; 6 | exit) killall X;; 7 | shutdown) shutdown now;; 8 | suspend) loginctl suspend-then-hibernate;; 9 | hibernate) loginctl hibernate;; 10 | reboot) reboot;; 11 | esac 12 | -------------------------------------------------------------------------------- /.local/bin/preview: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # preview script for shell utilities 3 | case "$1" in 4 | *.png|*.jpg |*.jpeg |*.mkv |*.mp4 |*.mp3) mediainfo "$1";; 5 | *.pdf) pdftotext "$1" -;; 6 | *.zip) zipinfo "$1";; 7 | *.tar.gz) tar -ztvf "$1";; 8 | *.tar.bz2) tar -jtvf "$1";; 9 | *.tar) tar -tvf "$1";; 10 | *.rar) unrar l "$1";; 11 | *.7z) 7z l "$1";; 12 | *.html | *.xml) w3m -dump "$1" ;; 13 | *) 14 | if [ -d "$1" ]; then 15 | tree "$1" -L 1 --dirsfirst 16 | elif [ -f "$1" ] && file "$1" | grep -Eq 'text|data'; then 17 | cat "$1" 18 | else 19 | file "$1" 20 | fi 21 | esac 2>/dev/null || file "$1" 22 | -------------------------------------------------------------------------------- /.local/bin/prompt: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # gives a menu prompt labeled with $1 to perform command $2 3 | [ "$(printf "no\nyes" | menu -p "$1" )" = "yes" ] && eval "$2" 4 | -------------------------------------------------------------------------------- /.local/bin/remaps: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | xset r rate 300 50 # increase key speed via a rate change 3 | setxkbmap -option caps:escape # map the caps lock key to escape 4 | -------------------------------------------------------------------------------- /.local/bin/rss: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # Run RSS Feeder. 3 | newsboat -q && newsboat -x print-unread | cut -d ' ' -f 1 >~/.cache/news_unread 4 | -------------------------------------------------------------------------------- /.local/bin/rssadd: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # Add RSS feed. 3 | if ! echo "$1" | grep -q "https*://\S\+\.[A-Za-z]\+\S*"; then 4 | notify-send "That doesn't look like a full URL." 5 | exit 6 | fi 7 | 8 | rssfile=~/.config/newsboat/urls 9 | if cut -d' ' -f1 "$rssfile" | grep -q "^$1$"; then 10 | notify-send "You already have this RSS feed." 11 | else 12 | echo "$@" >> "$rssfile" 13 | notify-send "RSS feed added." 14 | fi 15 | -------------------------------------------------------------------------------- /.local/bin/rssup: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # Set as a cron job to check for new RSS entries for newsboat. 3 | # If newsboat is open, sends it an "R" key to refresh. 4 | ping -q -c 1 1.1.1.1 >/dev/null 2>&1 || exit 5 | 6 | notify-send "updating RSS feeds..." 7 | 8 | if pgrep newsboat$ >/dev/null 2>&1; then 9 | xdotool key --window "$(xdotool search --class newsboat)" R 10 | exit 11 | fi 12 | 13 | newsboat -x reload 14 | newsboat -x print-unread | cut -d' ' -f1 >~/.cache/news_unread 15 | 16 | notify-send "RSS feed update complete" "$(cat ~/.cache/news_unread) news unreded" 17 | -------------------------------------------------------------------------------- /.local/bin/samedir: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # Open a terminal in the same directory as current 3 | wpid=$(xdotool getactivewindow getwindowpid) 4 | if [ -n "$wpid" ]; then 5 | pid=$(pgrep -P $wpid | tail -n 1) 6 | [ -e "/proc/$pid/cwd" ] && cd "$(readlink "/proc/$pid/cwd")" && $TERMINAL 7 | fi 8 | -------------------------------------------------------------------------------- /.local/bin/screenshot: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # Take screenshot 3 | type="$(printf "Screen\nWindow/Area\n" | menu -p 'Type')" 4 | [ "$type" ] || exit 5 | time="$(printf "0.5\n5\n10\n" | menu -p 'Seconds to wait')" 6 | [ "$time" ] || exit 7 | [ "$type" = 'Window/Area' ] && type='-s -u' || type='-u' 8 | dir="$(xdg-user-dir PICTURES)/ss" 9 | mkdir -p "$dir" 10 | sleep "$time" 11 | maim $type | tee "$dir/$(date +%G-%m-%d_%s.png)" | xclip -sel clip -t image/png 12 | notify-send "Screenshot taken." 13 | -------------------------------------------------------------------------------- /.local/bin/search: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # search in browser or use bookmarks from file 3 | bmfile="$HOME/.local/share/bookmarks" 4 | chosen=$(sed 's/http.*\/\///g' "$bmfile" | menu -p 'search') 5 | [ "$chosen" ] || exit 6 | url=$(grep -m1 "$chosen" "$bmfile" | cut -d' ' -f1) 7 | if [ -z "$url" ]; then 8 | echo "$chosen" | grep -q "[a-z|0-9]\.[a-z|0-9]" && 9 | url="$chosen" || 10 | url="https://duckduckgo.com/?q=$chosen" 11 | fi 12 | $BROWSER "$url" 13 | -------------------------------------------------------------------------------- /.local/bin/serv: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # simple http python3 server for files or pages 3 | 4 | port='8080' 5 | ip=$(ip addr show wlp2s0 | grep -oP '\d*\.\d*\.\d*\.\d*' | head -1) 6 | pidfile='/tmp/serv.pid' 7 | logfile='/tmp/serv.log' 8 | 9 | while getopts ':p:sblh' opt; do 10 | case "$opt" in 11 | p) port="$OPTARG";; 12 | s) 13 | if [ ! -e "$pidfile" ]; then 14 | echo 'server not started' 15 | exit 16 | fi 17 | kill -9 "$(cat "$pidfile")" >/dev/null 2>&1 18 | rm "$pidfile" 19 | echo 'server terminated' 20 | exit;; 21 | b) run_browser=1;; 22 | l) less "$logfile"; exit;; 23 | h) cat <<-EOF 24 | usage: serv [-option] [directory] 25 | 26 | options: 27 | -p port port on which run server 28 | -b open in browser 29 | -l show log 30 | -h help 31 | EOF 32 | exit;; 33 | \?) echo "invalid option: -$OPTARG" 1>&2; exit 1;; 34 | :) echo "invalid option: -$OPTARG requires an argument" 1>&2; exit 1;; 35 | esac 36 | done 37 | shift $((OPTIND - 1)) 38 | 39 | if [ ! -e $pidfile ]; then 40 | nohup python3 -u -m http.server --bind "$ip" --directory "${1:-$PWD}" "$port" >"$logfile" 2>&1 & 41 | echo $! >"$pidfile" 42 | if [ -n "$run_browser" ] && [ -n "$BROWSER" ]; then 43 | $BROWSER "http://${ip}:${port}" 44 | fi 45 | else 46 | echo "serv already running" 47 | fi 48 | -------------------------------------------------------------------------------- /.local/bin/setbg: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # sets the background. If given an argument, will set file as background 3 | if [ -f "$1" ]; then 4 | cp "$1" "$(xdg-user-dir PICTURES)/wallpaper" 5 | notify-send -i ~/pix/wallpaper "Wallpaper changed." 6 | fi 7 | xwallpaper --daemon --zoom "$(xdg-user-dir PICTURES)/wallpaper" 8 | -------------------------------------------------------------------------------- /.local/bin/setw: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # set wallpaper 3 | find ~/pix/wall/ -type f,l | shuf | sxiv - -tb 4 | -------------------------------------------------------------------------------- /.local/bin/shortcuts: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | shell=~/.config/zsh/sc 3 | vifm=~/.config/vifm/sc 4 | rm "$vifm" 5 | while read -r line; do 6 | line=$(echo $line | sed "s@~@$HOME@") 7 | set -- $line 8 | case $line in 9 | \#*|"") continue 10 | esac 11 | if [ -d "$2" ]; then 12 | echo "alias $1='cd \"$2\"'" 13 | echo "hash -d $1=\"$2\"" 14 | echo "nnoremap g$1 :cd \"$2\"" >>"$vifm" 15 | else 16 | echo "alias $1='$EDITOR \"$2\"'" 17 | fi 18 | echo "export $1=\"$2\"" 19 | done <"$shell" >"$shell.sh" 20 | -------------------------------------------------------------------------------- /.local/bin/showclip: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # Display contents of clipboard 3 | clip=$(xclip -o -selection clipboard) 4 | prim=$(xclip -o -selection primary) 5 | [ -n "$clip" ] && notify-send "Clipboard" "$clip" 6 | [ -n "$prim" ] && notify-send "Primary" "$prim" 7 | -------------------------------------------------------------------------------- /.local/bin/showcolors: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # Show colors from X server resource database. 3 | colors=$(xrdb -query | sed -n 's/\*.color//p' | sort -n | cut -d'#' -f2) 4 | for color in $colors; do 5 | printf "\033[$hue;$((30 + offset))m██ $color \033[0m" 6 | offset=$((offset + 1)) 7 | [ $offset -ge 8 ] && { hue=1; offset=0; echo; } 8 | done 9 | -------------------------------------------------------------------------------- /.local/bin/status: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | notify-send "$(date '+%I:%M %p') $(date '+%D')" "bat: $(battery)%\nvol: $(vol get)\nlight: $(printf '%0.f%%' `xbacklight -get`)" 3 | -------------------------------------------------------------------------------- /.local/bin/surf-open.sh: -------------------------------------------------------------------------------- 1 | ../../.config/surf/surf-open.sh -------------------------------------------------------------------------------- /.local/bin/sysinfo: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # ██ ████ 3 | # ░░ ░██░ 4 | # ██████ ██ ██ ██████ ██ ███████ ██████ ██████ 5 | # ██░░░░ ░░██ ██ ██░░░░ ░██░░██░░░██░░░██░ ██░░░░██ 6 | # ░░█████ ░░███ ░░█████ ░██ ░██ ░██ ░██ ░██ ░██ 7 | # ░░░░░██ ░██ ░░░░░██░██ ░██ ░██ ░██ ░██ ░██ 8 | # ██████ ██ ██████ ░██ ███ ░██ ░██ ░░██████ 9 | # ░░░░░░ ██ ░░░░░░ ░░ ░░░ ░░ ░░ ░░░░░░ 10 | # ░░ 11 | # 12 | #█▓▒░ vars 13 | #full=▓ 14 | #empty=░ 15 | full=━ 16 | #empty=━ 17 | #empty=─ 18 | #full=┅ 19 | empty=┄ 20 | 21 | for os in /etc/os-release /usr/lib/os-release; do . $os 2>/dev/null; done 22 | distro=$NAME 23 | kernel=$(uname -r) 24 | kernel=${kernel%%-*} 25 | pkgs=$(pacman -Qqs | wc -l) 26 | wm=$(awk '/^exec/ {print $2; exit}' ~/.xinitrc) 27 | font='Hack Nerd Font' 28 | colors='iceberg' 29 | 30 | #█▓▒░ progress bar 31 | drawbar() { 32 | perc=$1 33 | size=$2 34 | length=$((perc * size / 100)) 35 | color=${3-34} 36 | i=0 37 | while [ $i -lt 10 ]; do 38 | if [ $i -lt $length ]; then 39 | printf "\033[1;${color}m${full}" 40 | else 41 | printf "\033[0;${color}m${empty}" 42 | fi 43 | i=$((i + 1)) 44 | done 45 | } 46 | 47 | #█▓▒░ colors 48 | echo 49 | i=0 50 | while [ $i -le 6 ]; do 51 | printf "\033[$((i + 41));$((i + 30))m█▓▒░" 52 | i=$((i + 1)) 53 | done 54 | printf "\033[37m█\033[0m▒░\n\n" 55 | 56 | #█▓▒░ greets 57 | printf " \033[0m hello \033[34m$USER\033[0m, i'm \033[34m$(hostname)\033[0m\n" 58 | 59 | #█▓▒░ environment 60 | printf " \033[1;33m distro \033[0m$distro\n" 61 | printf " \033[1;33m kernel \033[0m$kernel\n" 62 | printf " \033[1;33m packages \033[0m$pkgs\n" 63 | printf " \033[1;33m wm \033[0m$wm\n" 64 | printf " \033[1;33m font \033[0m$font\n" 65 | printf " \033[1;33m colors \033[0m$colors\n\n" 66 | 67 | #█▓▒░ cpu 68 | cpu=$(awk '/cpu/ {usage=($2+$4)*100/($2+$4+$5); exit} END {printf int(usage)}' /proc/stat) 69 | printf " \033[0;34m cpu \033[1;34m%-5s %s\n" $cpu% $(drawbar $cpu 10) 70 | 71 | #█▓▒░ ram 72 | while read -r mem total used _; do 73 | if [ $mem = 'Mem:' ]; then 74 | ram=$((100 * used / total)) 75 | break 76 | fi 77 | done</dev/null; then 5 | transmission-daemon 6 | notify-send "Starting transmission daemon..." 7 | sleep 1 8 | fi 9 | 10 | transmission-remote -a "$@" && notify-send "Torrent added." 11 | -------------------------------------------------------------------------------- /.local/bin/ttycol: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # generate colors for tty from X server resource databas 3 | file='/usr/local/bin/ttycol.sh' 4 | serv='/usr/lib/systemd/system/ttycol.service' 5 | colors=$(xrdb -query | sed -rn 's/\*.?color//gp' | sort -n | cut -d'#' -f2) 6 | { 7 | echo '#!/bin/sh' 8 | echo 'for tty in /dev/tty[0-9]; do' 9 | echo '\t[ -w $tty ] || continue' 10 | i=0 11 | for color in $colors; do 12 | printf '\tprintf "\\033]P%X%s\\n" > $tty\n' "$i" "$color" 13 | [ $i -ge 15 ] && break 14 | i=$((i + 1)) 15 | done 16 | echo 'done' 17 | } | sudo tee >"$file"; chmod +x "$file" 18 | [ -e $serv ] || cat << EOF | sudo tee "$serv" >/dev/null 19 | [Unit] 20 | Description=Change tty colours 21 | After=multi-user.target 22 | [Service] 23 | Type=oneshot 24 | ExecStart=$file 25 | [Install] 26 | WantedBy=multi-user.target 27 | EOF 28 | -------------------------------------------------------------------------------- /.local/bin/umnt: -------------------------------------------------------------------------------- 1 | #!/bin/sh -e 2 | # unmount disk 3 | fe() { 4 | while read -r l; do 5 | set -- $l 6 | grep -iq "$2" /etc/fstab || echo "$1 $2" 7 | done 8 | } 9 | set -- $(lsblk -rno 'name,mountpoint' | grep ' /' | fe | menu -0 -p 'Umount') 10 | [ "$1" ] 11 | sudo umount "$2" 12 | [ -d "$HOME/mnt/$1" ] && rmdir "$HOME/mnt/$1" 13 | notify-send "Unmounted $1" "$2" 14 | -------------------------------------------------------------------------------- /.local/bin/unix: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # original artwork by http://www.sanderfocus.nl/#/portfolio/tech-heroes 3 | # converted to shell by #nixers @ irc.unix.chat 4 | 5 | cat << 'eof' 6 | ,_ ,_==▄▂ 7 | , ▂▃▄▄▅▅▅▂▅¾. / / 8 | ▄▆<´ "»▓▓▓%\ / / / / 9 | ,▅7" ´>▓▓▓% / / > / >/% 10 | ▐¶▓ ,»▓▓¾´ /> %/%// / / 11 | ▓▃▅▅▅▃,,▄▅▅▅Æ\// ///>// />/ / 12 | V║«¼.;→ ║<«.,`=// />//%/% / / 13 | //╠<´ -²,)(▓~"-╝/¾/ %/>/ /> 14 | / / / ▐% -./▄▃▄▅▐, /7//;//% / / 15 | / ////`▌▐ %zWv xX▓▇▌//&;% / / 16 | / / / %//%/¾½´▌▃▄▄▄▄▃▃▐¶\/& / 17 | </ /)VY>7; \_ UNIX IS VERY SIMPLE IT JUST NEEDS A 19 | / /</ //<///<_/%\▓ V%W%£)XY _/%‾\_, GENIUS TO UNDERSTAND ITS SIMPLICITY 20 | / / //%/_,=--^/%/%%\¾%¶%%} /%%%%%%;\, 21 | %/< /_/ %%%%%;X%%\%%;, _/%%%;, \ 22 | / / %%%%%%;, \%%l%%;// _/%;, dmr 23 | / %%%;, <;\-=-/ / 24 | ;, l 25 | eof 26 | -------------------------------------------------------------------------------- /.local/bin/viless: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # start Vim with less.vim 3 | # read stdin if no arguments were given and stdin was redirected 4 | 5 | if [ -t 0 ] && [ $# = 0 ]; then 6 | echo "Missing filename" >&2 7 | exit 8 | fi 9 | 10 | if [ -t 1 ]; then 11 | op="vim -R -c 'ru! macros/less.vim'" 12 | else 13 | op='cat' 14 | fi 15 | 16 | if [ $# = 0 ]; then 17 | eval "$op -" 18 | else 19 | eval "$op \"$@\"" 20 | fi 21 | -------------------------------------------------------------------------------- /.local/bin/viman: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # start Vim with less.vim and man filetype 3 | col -b | vim -R -c 'ru! macros/less.vim | set ft=man' - 4 | -------------------------------------------------------------------------------- /.local/bin/vol: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # amixer wrapper script for volume 3 | 4 | mute() { 5 | # if a command isn't specified toggle mute 6 | if [ -z "$1" ]; then 7 | amixer -D pulse get Master | grep -qio "off" && 8 | action="unmute" || action="mute" 9 | else 10 | action="$1" 11 | fi 12 | 13 | amixer -D pulse set Master "$action" >/dev/null 14 | echo "volume ${action}d" 15 | } 16 | 17 | volume() { 18 | # get the current volume 19 | amixer=$(amixer -D pulse get Master) 20 | current=${amixer##*[0-9] \[} 21 | current=${current%%%*} 22 | mute=${amixer##*\[} 23 | [ "$1" = get ] && [ "$mute" != 'on]' ] && printf '%s\n' "$current% [mutted]" && exit 24 | [ "$1" = get ] && printf '%s\n' "$current%" && exit 25 | 26 | # default modifier (5%) 27 | [ "$2" ] && number="$2" || number='5' 28 | 29 | # calculate the new volume 30 | [ "$1" = up ] && number="$((current + number))" 31 | [ "$1" = down ] && number="$((current - number))" 32 | 33 | # handling of invalid numbers 34 | [ "$number" -lt '0' ] && number='0' 35 | [ "$number" -gt '100' ] && number='100' 36 | 37 | amixer -D pulse set Master "$number%" >/dev/null 38 | echo "volume set to $number" 39 | } 40 | 41 | case $1 in 42 | toggle) mute;; 43 | mute|unmute) mute "$1";; 44 | get) volume get;; 45 | set) 46 | [ "$2" ] || { echo "option set requires a number"; exit 1; } 47 | volume set "$2";; 48 | up|down) volume "$1" "$2";; 49 | *) 50 | cat <<-EOF 51 | muting: 52 | toggle 53 | mute 54 | unmute 55 | volume: 56 | get get current volume 57 | set set volume to 58 | up increase volume by number (default: 5) 59 | down decrease volume by number (default: 5) 60 | EOF 61 | exit 1;; 62 | esac 63 | -------------------------------------------------------------------------------- /.local/bin/wmap: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | list='/tmp/window_list' 3 | case $1 in 4 | umap) 5 | id=$(xdotool getactivewindow) 6 | name=$(xdotool getactivewindow getwindowname) 7 | xdotool windowunmap "$id" 8 | echo "$name $id" >>"$list" 9 | ;; 10 | map) 11 | [ -s "$list" ] || exit 1 12 | case $2 in 13 | last) 14 | id=$(tail -n 1 "$list") 15 | size=$(wc -c "$list" | cut -d' ' -f1) 16 | item=${#id} 17 | truncate -s $((size - item - 1)) $list 18 | id=${id##* } 19 | ;; 20 | *) 21 | id=$(menu <"$list") 22 | id=${id##* } 23 | sed -i "/$id/d" "$list" 24 | ;; 25 | esac 26 | [ "$id" ] || exit 1 27 | xdotool windowmap "$id" 28 | ;; 29 | esac 30 | -------------------------------------------------------------------------------- /.local/bin/xgetres: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | if [ $1 = '-colors' ]; then 3 | xrdb -query | sed -En 's/.*color([0-9][0-9]?)/\1/p' | sort -n | cut -f2 4 | else 5 | xrdb -query | awk "/$@/ {print \$2; exit}" 6 | fi 7 | -------------------------------------------------------------------------------- /.local/share/TelegramDesktop/Iceberg.tdesktop-theme: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YaN-3k/dots/e5f19eb7cc0a8fadc23aa08154be30ab0d2f3845/.local/share/TelegramDesktop/Iceberg.tdesktop-theme -------------------------------------------------------------------------------- /.local/share/TelegramDesktop/tdata/shortcuts-custom.json: -------------------------------------------------------------------------------- 1 | // This is a list of your own shortcuts for Telegram Desktop 2 | // You can see full list of commands in the 'shortcuts-default.json' file 3 | // Place a null value instead of a command string to switch the shortcut off 4 | 5 | [ 6 | // { 7 | // "command": "close_telegram", 8 | // "keys": "ctrl+f4" 9 | // }, 10 | // { 11 | // "command": "quit_telegram", 12 | // "keys": "ctrl+q" 13 | // } 14 | 15 | { 16 | "version": "1004003" 17 | }, 18 | { 19 | "command": "media_play", 20 | "keys": "media play" 21 | }, 22 | { 23 | "command": "media_stop", 24 | "keys": "media stop" 25 | }, 26 | { 27 | "command": "media_previous", 28 | "keys": "media previous" 29 | }, 30 | { 31 | "command": "media_next", 32 | "keys": "media next" 33 | }, 34 | { 35 | "command": "media_pause", 36 | "keys": "media pause" 37 | }, 38 | { 39 | "command": "media_playpause", 40 | "keys": "toggle media play/pause" 41 | }, 42 | { 43 | "command": "search", 44 | "keys": "ctrl+/" 45 | }, 46 | { 47 | "command": "search", 48 | "keys": "find" 49 | }, 50 | { 51 | "command": "search", 52 | "keys": "ctrl+f" 53 | }, 54 | { 55 | "command": "lock_telegram", 56 | "keys": "ctrl+l" 57 | }, 58 | { 59 | "command": "minimize_telegram", 60 | "keys": "ctrl+m" 61 | }, 62 | { 63 | "command": "quit_telegram", 64 | "keys": "ctrl+q" 65 | }, 66 | { 67 | "command": "close_telegram", 68 | "keys": "ctrl+w" 69 | }, 70 | { 71 | "command": "next_chat", 72 | "keys": "ctrl+tab" 73 | }, 74 | { 75 | "command": "previous_chat", 76 | "keys": "ctrl+backtab" 77 | }, 78 | { 79 | "command": "previous_chat", 80 | "keys": "ctrl+pgup" 81 | }, 82 | { 83 | "command": "next_chat", 84 | "keys": "ctrl+pgdown" 85 | }, 86 | { 87 | "command": "close_telegram", 88 | "keys": "ctrl+f4" 89 | }, 90 | { 91 | "command": "previous_chat", 92 | "keys": "ctrl+shift+tab" 93 | }, 94 | { 95 | "command": "previous_chat", 96 | "keys": "ctrl+shift+k" 97 | }, 98 | { 99 | "command": "next_chat", 100 | "keys": "ctrl+shift+j" 101 | } 102 | ] 103 | -------------------------------------------------------------------------------- /.local/share/applications/file.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Type=Application 3 | Name=File Manager 4 | Exec=/usr/local/bin/st -e vifm %u 5 | -------------------------------------------------------------------------------- /.local/share/applications/img.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Type=Application 3 | Name=Image Viewer 4 | Exec=/usr/bin/sxiv -ab %u 5 | -------------------------------------------------------------------------------- /.local/share/applications/linkhandler.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Type=Application 3 | Name=Link handler 4 | Exec=/usr/bin/env linkhandler %u 5 | -------------------------------------------------------------------------------- /.local/share/applications/mail.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Type=Application 3 | Name=Mail 4 | Exec=/usr/bin/urxvt -e neomutt %u 5 | -------------------------------------------------------------------------------- /.local/share/applications/pdf.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Type=Application 3 | Name=PDF reader 4 | Exec=/usr/bin/zathura %u 5 | -------------------------------------------------------------------------------- /.local/share/applications/rss.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Type=Application 3 | Name=RSS feed addition 4 | Exec=/usr/bin/env rssadd %u 5 | -------------------------------------------------------------------------------- /.local/share/applications/text.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Type=Application 3 | Name=Text editor 4 | Exec=/usr/local/bin/st -e nvim %u 5 | -------------------------------------------------------------------------------- /.local/share/applications/torrent.desktop: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Type=Application 3 | Name=Torrent 4 | Exec=/usr/bin/env torradd %u 5 | -------------------------------------------------------------------------------- /.local/share/dots/crontab: -------------------------------------------------------------------------------- 1 | # 2 | # ██████ ██████  ██████  ███  ██  3 | # ██      ██   ██ ██    ██ ████  ██  4 | # ██  ██████  ██  ██ ██ ██  ██  5 | # ██  ██   ██ ██  ██ ██  ██ ██  6 | #  ██████ ██  ██  ██████  ██   ████  7 | # 8 | # -+(crontab)-+- 9 | # If you want to interact with 10 | # X-session you need to export: 11 | # XAUTHORITY= DISPLAY=:0 12 | # 13 | # ~~ 14 | -------------------------------------------------------------------------------- /.local/share/dots/crypttab: -------------------------------------------------------------------------------- 1 | # 2 | # ____ ______ ______ _____ _____ _ ____ 3 | # / ___| _ \ \ / / _ \_ _|_ _|/ \ | __ ) 4 | # | | | |_) \ V /| |_) || | | | / _ \ | _ \ 5 | # | |___| _ < | | | __/ | | | |/ ___ \| |_) | 6 | # \____|_| \_\|_| |_| |_| |_/_/ \_\____/ 7 | # 8 | # -+-(/etc/crypttab)-+- 9 | # 10 | # encrypted block devices configuration 11 | # 12 | # ~~~ 13 | # Do not list your root (/) partition here, it must be set up 14 | # beforehand by the initramfs (/etc/mkinitcpio.conf). 15 | # 16 | # ~~~ 17 | # man crypttab(5) for details 18 | # -+-+-+-+-+-+-+-+-+-+-+-+-+-+-+- 19 | # 20 | # ---------------------------------------- 21 | # | | | 22 | # ---------------------------------------- 23 | 24 | -------------------------------------------------------------------------------- /.local/share/dots/fstab: -------------------------------------------------------------------------------- 1 | # 2 | # _____ ____ _____ _ ____ 3 | # | ___/ ___|_ _|/ \ | __ ) 4 | # | |_ \___ \ | | / _ \ | _ \ 5 | # | _| ___) || |/ ___ \| |_) | 6 | # |_| |____/ |_/_/ \_\____/ 7 | # 8 | # -+-(/etc/fstab)-+- 9 | # 10 | # static filesystem information 11 | # 12 | # ~~ 13 | # man fstab(5) for details 14 | # -+-+-+-+-+-+-+-+-+-+-+-+-+-+- 15 | # 16 | # ------------------------------------------------------- 17 | # | | | | | 18 | # ------------------------------------------------------- 19 | 20 | -------------------------------------------------------------------------------- /.local/share/dots/issue: -------------------------------------------------------------------------------- 1 | █████ ██████ ██████ ██ ██ ██ ██ ███ ██ ██ ██ ██ ██ TTY: \l 2 | ██ ██ ██ ██ ██ ██ ██ ██ ██ ████ ██ ██ ██ ██ ██ Host: \n 3 | ███████ ██████ ██ ███████ ██ ██ ██ ██ ██ ██ ██ ███ Arch: \m 4 | ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ Kernel: \r 5 | ██ ██ ██ ██ ██████ ██ ██ ███████ ██ ██ ████ ██████ ██ ██ Build: \v 6 | 7 | \d \t 8 | 9 | 10 | ██████ ███████ ███ ██ ████████ ██████ ██████ ██ ██ ███ ██ ██ ██ ██ ██ TTY: \l 11 | ██ ██ ████ ██ ██ ██ ██ ██ ██ ██ ██ ████ ██ ██ ██ ██ ██ Host: \n 12 | ██ ███ █████ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ███ Arch: \m 13 | ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ Kernel: \r 14 | ██████ ███████ ██ ████ ██ ██████ ██████ ███████ ██ ██ ████ ██████ ██ ██ Build: \v 15 | 16 | \d \t 17 | 18 | 19 | -------------------------------------------------------------------------------- /.local/share/dots/sudoers.bee: -------------------------------------------------------------------------------- 1 | 2 |  "Bee" careful __ 3 | with sudo! // \ 4 | \\_/ // 5 | ''-.._.-''-.._.. -(||)(') 6 | ,,,  7 | 8 | -------------------------------------------------------------------------------- /.local/share/dots/sudoers.woodo: -------------------------------------------------------------------------------- 1 | 2 | ` `o+ 3 | -++///. 4 | `-` :-. 5 | oso``` `ossss` ` :so- 6 | `:///ss: `sosos: sso./:` 7 | /so:/--` +ssss/ .-//so: 8 | `` -:-..+ssss+--:--.`:/. 9 | .:oosss/-` 10 | /sooso 11 | -soooo` 12 | `oosos: here's sudowoodo reminding you to 13 | `/+++++/ be careful when using sudo! 14 | .+/+++++o. 15 | `+:``.-.`://- 16 | /+/- `++` 17 | 18 | -------------------------------------------------------------------------------- /.local/share/fonts/Hack/Hack Bold Italic Nerd Font Complete Mono.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YaN-3k/dots/e5f19eb7cc0a8fadc23aa08154be30ab0d2f3845/.local/share/fonts/Hack/Hack Bold Italic Nerd Font Complete Mono.ttf -------------------------------------------------------------------------------- /.local/share/fonts/Hack/Hack Bold Italic Nerd Font Complete.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YaN-3k/dots/e5f19eb7cc0a8fadc23aa08154be30ab0d2f3845/.local/share/fonts/Hack/Hack Bold Italic Nerd Font Complete.ttf -------------------------------------------------------------------------------- /.local/share/fonts/Hack/Hack Bold Nerd Font Complete Mono.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YaN-3k/dots/e5f19eb7cc0a8fadc23aa08154be30ab0d2f3845/.local/share/fonts/Hack/Hack Bold Nerd Font Complete Mono.ttf -------------------------------------------------------------------------------- /.local/share/fonts/Hack/Hack Bold Nerd Font Complete.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YaN-3k/dots/e5f19eb7cc0a8fadc23aa08154be30ab0d2f3845/.local/share/fonts/Hack/Hack Bold Nerd Font Complete.ttf -------------------------------------------------------------------------------- /.local/share/fonts/Hack/Hack Italic Nerd Font Complete Mono.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YaN-3k/dots/e5f19eb7cc0a8fadc23aa08154be30ab0d2f3845/.local/share/fonts/Hack/Hack Italic Nerd Font Complete Mono.ttf -------------------------------------------------------------------------------- /.local/share/fonts/Hack/Hack Italic Nerd Font Complete.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YaN-3k/dots/e5f19eb7cc0a8fadc23aa08154be30ab0d2f3845/.local/share/fonts/Hack/Hack Italic Nerd Font Complete.ttf -------------------------------------------------------------------------------- /.local/share/fonts/Hack/Hack Regular Nerd Font Complete Mono.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YaN-3k/dots/e5f19eb7cc0a8fadc23aa08154be30ab0d2f3845/.local/share/fonts/Hack/Hack Regular Nerd Font Complete Mono.ttf -------------------------------------------------------------------------------- /.local/share/fonts/Hack/Hack Regular Nerd Font Complete.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YaN-3k/dots/e5f19eb7cc0a8fadc23aa08154be30ab0d2f3845/.local/share/fonts/Hack/Hack Regular Nerd Font Complete.ttf -------------------------------------------------------------------------------- /.local/share/fonts/Terminus/fonts.dir: -------------------------------------------------------------------------------- 1 | 18 2 | ter-u12b.bdf -xos4-terminus-bold-r-normal--12-120-72-72-c-60-iso10646-1 3 | ter-u12n.bdf -xos4-terminus-medium-r-normal--12-120-72-72-c-60-iso10646-1 4 | ter-u14b.bdf -xos4-terminus-bold-r-normal--14-140-72-72-c-80-iso10646-1 5 | ter-u14n.bdf -xos4-terminus-medium-r-normal--14-140-72-72-c-80-iso10646-1 6 | ter-u16n.bdf -xos4-terminus-medium-r-normal--16-160-72-72-c-80-iso10646-1 7 | ter-u16v.bdf -xos4-terminus-bold-r-normal--16-160-72-72-c-80-iso10646-1 8 | ter-u18b.bdf -xos4-terminus-bold-r-normal--18-180-72-72-c-100-iso10646-1 9 | ter-u18n.bdf -xos4-terminus-medium-r-normal--18-180-72-72-c-100-iso10646-1 10 | ter-u20b.bdf -xos4-terminus-bold-r-normal--20-200-72-72-c-100-iso10646-1 11 | ter-u20n.bdf -xos4-terminus-medium-r-normal--20-200-72-72-c-100-iso10646-1 12 | ter-u22b.bdf -xos4-terminus-bold-r-normal--22-220-72-72-c-110-iso10646-1 13 | ter-u22n.bdf -xos4-terminus-medium-r-normal--22-220-72-72-c-110-iso10646-1 14 | ter-u24b.bdf -xos4-terminus-bold-r-normal--24-240-72-72-c-120-iso10646-1 15 | ter-u24n.bdf -xos4-terminus-medium-r-normal--24-240-72-72-c-120-iso10646-1 16 | ter-u28b.bdf -xos4-terminus-bold-r-normal--28-280-72-72-c-140-iso10646-1 17 | ter-u28n.bdf -xos4-terminus-medium-r-normal--28-280-72-72-c-140-iso10646-1 18 | ter-u32b.bdf -xos4-terminus-bold-r-normal--32-320-72-72-c-160-iso10646-1 19 | ter-u32n.bdf -xos4-terminus-medium-r-normal--32-320-72-72-c-160-iso10646-1 20 | -------------------------------------------------------------------------------- /.local/share/fonts/Terminus/fonts.scale: -------------------------------------------------------------------------------- 1 | 0 2 | -------------------------------------------------------------------------------- /.local/share/gnupg/gpg-agent.conf: -------------------------------------------------------------------------------- 1 | pinentry-program /usr/bin/pinentry-gtk-2 2 | max-cache-ttl 31536000 3 | default-cache-ttl 31536000 4 | -------------------------------------------------------------------------------- /.local/share/startpage/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | ~ 4 | 5 | 11 |
12 | social 13 | discord 14 | reddit 15 | github 16 |
17 | 18 | -------------------------------------------------------------------------------- /.local/share/startpage/style.css: -------------------------------------------------------------------------------- 1 | html { 2 | font: 11pt Hack Nerd Font; 3 | background: #161821; //#e8e9ec; 4 | /* align to center */ 5 | height: 100%; 6 | display: flex; 7 | align-items: center; 8 | justify-content: center; 9 | } 10 | 11 | body { 12 | margin-bottom: -10px; 13 | /* flow horizontally */ 14 | display: flex; 15 | } 16 | 17 | div > * { 18 | display: block; 19 | text-decoration: none; 20 | padding: 10px 40px; 21 | text-align: center; 22 | } 23 | 24 | a { color: #d2d4de; } 25 | span { color: #84a0c6; } 26 | a:hover { color: #91acd1; } 27 | 28 | /* 29 | a { color: #262a3f; } 30 | span { color: #2d539e; } 31 | a:hover { color: #22478e; } 32 | */ 33 | -------------------------------------------------------------------------------- /.w3m/cgi-bin/magnet.cgi: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | if [ -z "$QUERY_STRING" ]; then 4 | echo "Error: No URI" 5 | exit 1 6 | fi 7 | 8 | torradd "$QUERY_STRING" 9 | 10 | if [ -n "$HTTP_REFERER" ]; then 11 | echo "HTTP/1.1 See Other" 12 | echo "Location: $HTTP_REFERER" 13 | else 14 | echo "w3m-control: BACK" 15 | fi 16 | -------------------------------------------------------------------------------- /.w3m/cgi-bin/surfraw.cgi: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | if [ -f /tmp/search ]; then 4 | echo "w3m-control: GOTO $(cat /tmp/search)" 5 | rm /tmp/search 6 | else 7 | echo "w3m-control: BACK" 8 | fi 9 | -------------------------------------------------------------------------------- /.w3m/cgi-bin/surfraw.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | prefix=$(sr -elvi | tail -n +2 | fzf | cut -f1) 3 | [ "$prefix" ] || exit 4 | printf "Search using %s: " "$prefix" 5 | read -r input 6 | printf "%s" "$(sr -p "${prefix}" $input)" >/tmp/search 7 | -------------------------------------------------------------------------------- /.w3m/config: -------------------------------------------------------------------------------- 1 | tabstop 8 2 | indent_incr 4 3 | pixel_per_char 9 4 | pixel_per_line 16 5 | frame 0 6 | target_self 0 7 | open_tab_blank 0 8 | open_tab_dl_list 0 9 | display_link 0 10 | display_link_number 0 11 | decode_url 0 12 | display_lineinfo 0 13 | ext_dirlist 1 14 | dirlist_cmd file:///$LIB/dirlist.cgi 15 | use_dictcommand 1 16 | dictcommand file:///$LIB/w3mdict.cgi 17 | multicol 0 18 | alt_entity 0 19 | graphic_char 0 20 | display_borders 0 21 | fold_textarea 0 22 | display_ins_del 1 23 | ignore_null_img_alt 1 24 | view_unseenobject 0 25 | display_image 1 26 | pseudo_inlines 1 27 | auto_image 1 28 | max_load_image 4 29 | ext_image_viewer 0 30 | image_scale 100 31 | imgdisplay w3mimgdisplay 32 | image_map_list 1 33 | fold_line 0 34 | show_lnum 0 35 | show_srch_str 1 36 | label_topline 0 37 | nextpage_topline 0 38 | color 1 39 | basic_color terminal 40 | anchor_color blue 41 | image_color green 42 | form_color red 43 | mark_color cyan 44 | bg_color terminal 45 | active_style 0 46 | active_color cyan 47 | visited_anchor 0 48 | visited_color magenta 49 | pagerline 10000 50 | use_history 1 51 | history 100 52 | save_hist 1 53 | confirm_qq 1 54 | close_tab_back 0 55 | mark 0 56 | emacs_like_lineedit 0 57 | vi_prec_num 0 58 | mark_all_pages 0 59 | wrap_search 0 60 | ignorecase_search 1 61 | use_mouse 1 62 | reverse_mouse 0 63 | relative_wheel_scroll 0 64 | relative_wheel_scroll_ratio 30 65 | fixed_wheel_scroll_count 5 66 | clear_buffer 1 67 | decode_cte 0 68 | auto_uncompress 0 69 | preserve_timestamp 1 70 | keymap_file keymap 71 | document_root 72 | personal_document_root 73 | cgi_bin ~/.w3m/cgi-bin/ 74 | index_file 75 | mime_types ~/.mime.types, /usr/etc/mime.types 76 | mailcap ~/.w3m/mailcap, /usr/etc/w3m/mailcap 77 | urimethodmap ~/.w3m/urimethodmap, /usr/etc/w3m/urimethodmap 78 | editor /usr/bin/vi 79 | mailto_options 1 80 | mailer /usr/bin/mail 81 | extbrowser /usr/bin/firefox 82 | extbrowser2 83 | extbrowser3 84 | extbrowser4 85 | extbrowser5 86 | extbrowser6 87 | extbrowser7 88 | extbrowser8 89 | extbrowser9 90 | bgextviewer 1 91 | use_lessopen 0 92 | passwd_file ~/.w3m/passwd 93 | disable_secret_security_check 0 94 | ftppasswd 95 | ftppass_hostnamegen 1 96 | pre_form_file ~/.w3m/pre_form 97 | siteconf_file ~/.w3m/siteconf 98 | user_agent 99 | no_referer 0 100 | accept_language en;q=1.0 101 | accept_encoding gzip, compress, bzip, bzip2, deflate 102 | accept_media text/html, text/*;q=0.5, image/* 103 | argv_is_url 1 104 | retry_http 1 105 | default_url 1 106 | follow_redirection 10 107 | meta_refresh 0 108 | dns_order 0 109 | nntpserver 110 | nntpmode 111 | max_news 50 112 | use_proxy 1 113 | http_proxy 114 | https_proxy 115 | ftp_proxy 116 | no_proxy 117 | noproxy_netaddr 1 118 | no_cache 0 119 | ssl_forbid_method 2, 3 120 | ssl_verify_server 1 121 | ssl_cert_file 122 | ssl_key_file 123 | ssl_ca_path 124 | ssl_ca_file 125 | use_cookie 1 126 | show_cookie 0 127 | accept_cookie 1 128 | accept_bad_cookie 0 129 | cookie_reject_domains 130 | cookie_accept_domains 131 | cookie_avoid_wrong_number_of_dots 132 | display_charset UTF-8 133 | document_charset UTF-8 134 | auto_detect 2 135 | system_charset UTF-8 136 | follow_locale 1 137 | ext_halfdump 0 138 | use_wide 1 139 | use_combining 1 140 | east_asian_width 0 141 | use_language_tag 1 142 | ucs_conv 1 143 | pre_conv 0 144 | search_conv 1 145 | fix_width_conv 1 146 | use_gb12345_map 0 147 | use_jisx0201 0 148 | use_jisc6226 0 149 | use_jisx0201k 0 150 | use_jisx0212 0 151 | use_jisx0213 0 152 | strict_iso2022 1 153 | gb18030_as_ucs 0 154 | simple_preserve_space 0 155 | -------------------------------------------------------------------------------- /.w3m/keymap: -------------------------------------------------------------------------------- 1 | keymap S COMMAND "EXTERN ~/.w3m/cgi-bin/surfraw.sh; GOTO file:/cgi-bin/surfraw.cgi" 2 | keymap \\\i COMMAND "SET_OPTION display_image=toggle; RESHAPE" 3 | keymap yy EXTERN 'printf %s "$1" | xclip -i -selection clipboard' 4 | keymap yf EXTERN_LINK 'printf %s "$0" | xsel -b' 5 | keymap M-u TAB_GOTO 6 | -------------------------------------------------------------------------------- /.w3m/urimethodmap: -------------------------------------------------------------------------------- 1 | magnet: file:/cgi-bin/magnet.cgi?%s 2 | -------------------------------------------------------------------------------- /.xinitrc: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | setxkbmap pl & 3 | unclutter & 4 | picom & 5 | remaps & 6 | dwmbar & 7 | theme dark 8 | exec dwm 9 | -------------------------------------------------------------------------------- /.zshenv: -------------------------------------------------------------------------------- 1 | export ZDOTDIR=~/.config/zsh 2 | source $ZDOTDIR/.zshenv 3 | -------------------------------------------------------------------------------- /INSTALL.md: -------------------------------------------------------------------------------- 1 | # Installation guide 2 | ## Install dependencies 3 | * tmux 4 | * sxiv 5 | * irssi 6 | * vifm 7 | * neovim 8 | * dunst 9 | * mpd / mpc / ncmpcpp 10 | * xdg-user-dirs 11 | ## Setup dotfiles 12 | Download dotfiles 13 | ``` 14 | $ git clone --recurse-submodules --bare https://github.com/cherrry9/dots.git ~/.config/dots-git 15 | $ alias dots='git --git-dir ~/.config/dots-git/ --work-tree ~' 16 | $ dots checkout 17 | ``` 18 | If it will fail and show message like this: 19 | ``` 20 | error: The following untracked working tree files would be overwritten by checkout: 21 | .bashrc 22 | .gitignore 23 | Please move or remove them before you can switch branches. 24 | Aborting 25 | ``` 26 | Move these files to another directories or force checkout (delete all these files) 27 | ``` 28 | $ dots checkout -f 29 | ``` 30 | Set the flag `showUntrackedFiles` to `no` for dots git repository 31 | ``` 32 | $ dots config --local status.showUntrackedFiles no 33 | ``` 34 | Install fonts 35 | ``` 36 | $ fc-cache -fv 37 | ``` 38 | Create user directories: 39 | ``` 40 | $ mkdir ~/.local/dl ~/dox ~/music ~/pix ~/vid 41 | $ xdg-user-dirs-update 42 | ``` 43 | Set `zsh` as default shell 44 | ``` 45 | $ chsh -s /usr/bin/zsh 46 | ``` 47 | Remove `LICENSE`, `README.md` and `INSTALL.md` from your `~` 48 | ``` 49 | $ dots update-index --assume-unchanged LICENSE README.md INSTALL.md 50 | $ rm -rf LICENSE README.md INSTALL.md 51 | ``` 52 | You can revert this later with `--no-assume-unchanged` flag. 53 | ## Build and install suckless programs 54 | Example to install foo program: 55 | ``` 56 | $ cd ~/.config/foo 57 | $ sudo make install 58 | ``` 59 | ## Finished 60 | That's it, dotfiles are ready! It is recommended to restart your computer. Now you can type `dots up` to update dotfiles or use regular git commands: 61 | ``` 62 | $ dots status 63 | $ dots pull 64 | $ dots add 65 | $ dots commit 66 | $ dots push 67 | ``` 68 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ![preview](pix/prev/prev.png) 2 | -------------------------------------------------------------------------------- /pix/prev/01-dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YaN-3k/dots/e5f19eb7cc0a8fadc23aa08154be30ab0d2f3845/pix/prev/01-dark.png -------------------------------------------------------------------------------- /pix/prev/01-light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YaN-3k/dots/e5f19eb7cc0a8fadc23aa08154be30ab0d2f3845/pix/prev/01-light.png -------------------------------------------------------------------------------- /pix/prev/02-dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YaN-3k/dots/e5f19eb7cc0a8fadc23aa08154be30ab0d2f3845/pix/prev/02-dark.png -------------------------------------------------------------------------------- /pix/prev/02-light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YaN-3k/dots/e5f19eb7cc0a8fadc23aa08154be30ab0d2f3845/pix/prev/02-light.png -------------------------------------------------------------------------------- /pix/prev/03-dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YaN-3k/dots/e5f19eb7cc0a8fadc23aa08154be30ab0d2f3845/pix/prev/03-dark.png -------------------------------------------------------------------------------- /pix/prev/03-light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YaN-3k/dots/e5f19eb7cc0a8fadc23aa08154be30ab0d2f3845/pix/prev/03-light.png -------------------------------------------------------------------------------- /pix/prev/prev.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YaN-3k/dots/e5f19eb7cc0a8fadc23aa08154be30ab0d2f3845/pix/prev/prev.png -------------------------------------------------------------------------------- /pix/wall/dark/iceberg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YaN-3k/dots/e5f19eb7cc0a8fadc23aa08154be30ab0d2f3845/pix/wall/dark/iceberg.jpg -------------------------------------------------------------------------------- /pix/wall/dark/keyboard.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YaN-3k/dots/e5f19eb7cc0a8fadc23aa08154be30ab0d2f3845/pix/wall/dark/keyboard.jpg -------------------------------------------------------------------------------- /pix/wall/dark/space.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YaN-3k/dots/e5f19eb7cc0a8fadc23aa08154be30ab0d2f3845/pix/wall/dark/space.jpg -------------------------------------------------------------------------------- /pix/wall/light/anime-outside-girl-car.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YaN-3k/dots/e5f19eb7cc0a8fadc23aa08154be30ab0d2f3845/pix/wall/light/anime-outside-girl-car.png -------------------------------------------------------------------------------- /pix/wall/light/keyboard.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YaN-3k/dots/e5f19eb7cc0a8fadc23aa08154be30ab0d2f3845/pix/wall/light/keyboard.jpg -------------------------------------------------------------------------------- /pix/wall/light/minimalistic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YaN-3k/dots/e5f19eb7cc0a8fadc23aa08154be30ab0d2f3845/pix/wall/light/minimalistic.png --------------------------------------------------------------------------------