Compare commits

...

1705 Commits

Author SHA1 Message Date
stupidcomputer b73c435f5a add knowledge to misc.md 2024-11-09 21:39:27 -06:00
stupidcomputer b6b86824de change port number? 2024-11-09 21:35:11 -06:00
stupidcomputer ae22abd986 inc flake.lock 2024-11-09 20:09:03 -06:00
stupidcomputer 3d87c8bfca Merge branch 'master' of https://git.beepboop.systems/stupidcomputer/dot_testing 2024-11-09 20:08:49 -06:00
stupidcomputer 8efb0b321a add a little development testing thing 2024-11-09 20:08:44 -06:00
stupidcomputer 4ab7330eb5 update .gitignore 2024-11-08 16:36:34 -06:00
stupidcomputer a5b1bc0b80 rotate ssh keys for phone 2024-11-08 14:15:55 -06:00
stupidcomputer b084dc49e1 substitute nextcloud for photoprism 2024-11-05 16:10:37 -06:00
stupidcomputer 71659092dc add the google play app declarations to the phone init 2024-11-05 14:09:42 -06:00
stupidcomputer fd07fdbb34 add misc.md 2024-11-05 11:58:47 -06:00
stupidcomputer 66424aa9b1 whoops 2024-11-04 02:33:03 -06:00
stupidcomputer 18ccd71602 add the stupid static site generator 2024-11-04 02:31:48 -06:00
stupidcomputer 6f2c96613b some misc changes 2024-11-04 01:45:16 -06:00
stupidcomputer 7f4055435b merge the phone sxhkdrc with the regular one 2024-11-04 01:26:35 -06:00
stupidcomputer 657287d513 stop prompting for package installation 2024-11-04 01:15:54 -06:00
stupidcomputer 4640167eb0 write a script to synchronize music to phone 2024-11-04 01:14:57 -06:00
stupidcomputer 3edb488963 move rbw from hm config to .config for phone 2024-11-04 00:50:54 -06:00
stupidcomputer a03d535034 Merge pull request 'make statusbar work with phone' (#3) from statusbar-experimental into master
Reviewed-on: #3
2024-11-04 00:41:07 -06:00
stupidcomputer 005df66d02 make statusbar work with phone 2024-11-04 00:40:17 -06:00
stupidcomputer e7a6168d72 add some media packages to copernicus 2024-11-04 00:13:01 -06:00
stupidcomputer 6667309c1a declarative app installation method for phone 2024-11-04 00:06:45 -06:00
stupidcomputer 19585d432a Merge branch 'master' of https://git.beepboop.systems/stupidcomputer/dot_testing 2024-11-03 23:59:05 -06:00
stupidcomputer fe89438ad2 add a pycache file 2024-11-03 23:59:01 -06:00
stupidcomputer c736b1c6a8 codify more things in the phone configuration 2024-11-03 23:57:17 -06:00
stupidcomputer d0f532f15c make regeneration of tmenu_run cache better 2024-11-03 23:41:14 -06:00
stupidcomputer a4284d5904 some changes to the phone configuration 2024-11-02 22:11:38 -05:00
stupidcomputer 287d092972 add some characters to special_ins 2024-10-29 01:56:24 -05:00
stupidcomputer a2a94368c6 add a wrapper for nix-gc 2024-10-29 00:14:50 -05:00
stupidcomputer d0b8013497 reduce log file prevalance on netbox 2024-10-29 00:09:06 -05:00
stupidcomputer 15f2580cab add git-rebuild
when you're running on a server and pushing changes, it's nice to have
just one command that does that and nothing else. this is that command.
2024-10-28 23:53:44 -05:00
stupidcomputer b2de08b2dc make bashrc available in netbox root account, too 2024-10-28 23:44:26 -05:00
stupidcomputer 2001e824a5 make the ryan user on netbox exempt from addition to prompt 2024-10-28 23:39:35 -05:00
stupidcomputer 2b2db129b1 add a socks proxy to netbox 2024-10-28 23:16:36 -05:00
stupidcomputer 29e75e319f add aristotle to wireguard 2024-10-28 23:01:11 -05:00
stupidcomputer 2045d94da3 make netbox be able to use neovim configuration 2024-10-28 21:44:05 -05:00
stupidcomputer a7964a221f add stupid post-rebuild activationScripts 2024-10-28 21:32:00 -05:00
stupidcomputer 66a6fc1a7c make prompts better in bash 2024-10-28 21:23:40 -05:00
stupidcomputer 672f385a2a add the initial password thing 2024-10-28 20:54:17 -05:00
stupidcomputer 808ce0fefc allow promethus onto the wg0 interface 2024-10-28 19:29:20 -05:00
stupidcomputer af0395badd add grafana 2024-10-28 00:54:52 -05:00
stupidcomputer 5aceed436c finalize photoprism configuration 2024-10-28 00:10:05 -05:00
stupidcomputer 55cb186947 stupid wireguard configuration 2024-10-27 23:49:52 -05:00
stupidcomputer 8478a2f7cc boneheaded photoprism configuration 2024-10-27 22:48:02 -05:00
stupidcomputer 37743be5dd some changes to copernicus 2024-10-27 18:37:28 -05:00
stupidcomputer 625a5bcc04 inc flake.lock 2024-10-27 17:29:54 -05:00
stupidcomputer 51b091a6a3 make the makefile ignore errors 2024-10-26 12:30:37 -05:00
stupidcomputer 6a8d7e2c5c make rebuilds on termux faster 2024-10-26 12:08:22 -05:00
stupidcomputer 4169e02552 revise keyboard shortcuts 2024-10-26 12:03:57 -05:00
stupidcomputer 6de18e3c81 make the termux Makefile update to the new ssh config location 2024-10-26 11:41:19 -05:00
stupidcomputer a9a92371dd Merge branch 'master' of https://git.beepboop.systems/stupidcomputer/dot_testing 2024-10-26 10:57:53 -05:00
stupidcomputer e1b6469287 add tur-repo and chromium 2024-10-26 10:57:24 -05:00
stupidcomputer bafc27a047 add chromium to termux gitignore 2024-10-26 10:57:17 -05:00
stupidcomputer 339b39efcd move ssh configuration to the right place 2024-10-26 10:54:25 -05:00
stupidcomputer 7a488636f4 add gitea and nginx 2024-10-22 08:22:06 -05:00
stupidcomputer 93d923f109 add the laptop pubkey 2024-10-22 08:10:51 -05:00
stupidcomputer 95d727c4a5 resolve merge conflict 2024-10-21 22:32:44 -05:00
stupidcomputer d2cb348769 small changes to termux shortcuts 2024-10-21 22:32:10 -05:00
stupidcomputer e5cf3a102d small changes to termux shortcuts 2024-10-21 22:30:06 -05:00
stupidcomputer 9e8baced38 implement the "extended desktop" metaphor for copernicus 2024-10-21 22:20:46 -05:00
stupidcomputer 67881fcad5 add tigervnc to copernicus 2024-10-21 20:34:00 -05:00
stupidcomputer 58a6ddd306 Merge branch 'master' of https://git.beepboop.systems/stupidcomputer/dot_testing 2024-10-21 20:33:41 -05:00
stupidcomputer 4bc1865a2e add some crappy habbit tracking software 2024-10-21 20:33:37 -05:00
stupidcomputer 7b5954997e update the .gitignore for termux 2024-10-21 17:04:23 -05:00
stupidcomputer e604037100 make phone/out-of-tree install git-annex 2024-10-21 17:03:44 -05:00
stupidcomputer bf7565e916 move sync to synchron 2024-10-21 17:03:40 -05:00
stupidcomputer a1f763ab67 khard doesn't work as expected 2024-10-16 01:00:46 -05:00
stupidcomputer 0f3c6a3874 add some shortcuts for use with termux:widget 2024-10-16 00:59:04 -05:00
stupidcomputer 885bc145f8 Merge branch 'master' of https://git.beepboop.systems/stupidcomputer/dot_testing 2024-10-16 00:57:54 -05:00
stupidcomputer 36c2b69932 Merge branch 'master' of https://git.beepboop.systems/stupidcomputer/dot_testing 2024-10-16 00:57:40 -05:00
stupidcomputer 9ac137dcbb some changes 2024-10-16 00:56:41 -05:00
stupidcomputer b3abec4911 inc flake.lock 2024-10-15 23:28:23 -05:00
stupidcomputer 5ece5b7bc9 Merge branch 'master' of https://git.beepboop.systems/stupidcomputer/dot_testing 2024-10-15 23:27:15 -05:00
stupidcomputer 3f06705f89 move ~/doc to ~/annex 2024-10-15 23:27:09 -05:00
stupidcomputer 4c16d744a4 make the phone xorg experience better 2024-10-15 11:31:33 -05:00
stupidcomputer 542d05f0df add nix.gc to netbox configuration 2024-10-09 04:26:18 -05:00
stupidcomputer c569ba00d7 move termux stuff to out-of-tree directory 2024-10-08 22:31:19 -05:00
stupidcomputer 40731b3740 move the winget-list to the out-of-tree directory 2024-10-08 22:28:42 -05:00
stupidcomputer 928c65dfc4 add establish-annex-link 2024-10-08 18:54:14 -05:00
stupidcomputer 4064d774ad add git-annext to mlg 2024-10-08 17:17:45 -05:00
stupidcomputer b1ab4677ab enable port 8000 on mlg for testing of web services 2024-10-07 22:00:39 -05:00
stupidcomputer 22ce9198e8 inc flake.lock 2024-10-07 15:15:19 -05:00
stupidcomputer 7db704a59c add mlg to trusted on netbox 2024-10-07 14:50:10 -05:00
stupidcomputer af38624f59 add an evil hack 2024-09-19 00:04:02 -05:00
stupidcomputer 3001ba4dde inc flake.lock 2024-09-18 22:56:43 -05:00
stupidcomputer cc89c4ed0e get rid of steam and discord 2024-09-17 15:41:20 -05:00
stupidcomputer b0ad4e58f0 add new mailbox to netbox 2024-09-17 15:40:53 -05:00
stupidcomputer c824d7a6b5 add some schedule changes 2024-09-17 02:39:16 -05:00
stupidcomputer b1c87c3b86 add do_backup 2024-09-09 01:07:13 -05:00
stupidcomputer 2be886d132 add git-annex to copernicus 2024-09-09 01:07:06 -05:00
stupidcomputer 221b97c41c add mdadm to copernicus package list 2024-09-02 17:25:11 -05:00
stupidcomputer 7ef78737d5 Merge branch 'master' of https://git.beepboop.systems/stupidcomputer/dot_testing 2024-09-02 17:20:32 -05:00
stupidcomputer 7f0dde3687 add new script: mount_raid_array 2024-09-02 17:20:13 -05:00
stupidcomputer c569ae410d add some winget dependencies (because windows) 2024-09-02 16:58:24 -05:00
stupidcomputer b47225c26b inc flake.lock 2024-08-31 20:18:15 -05:00
stupidcomputer a167c6161f misc. aristotle things 2024-08-31 20:13:14 -05:00
stupidcomputer f5da4b013b add xscreensaver configuration 2024-08-31 20:02:43 -05:00
stupidcomputer 9c811c5b77 add new machine: aristotle 2024-08-31 19:10:25 -05:00
stupidcomputer fdd8c5144f add a utility for quickly creating a lot of todo list items 2024-08-27 19:17:36 -05:00
stupidcomputer ce0b116cbb some changes to the briefing system 2024-08-26 20:01:48 -05:00
stupidcomputer c015833774 add archutils and initial utility
add an archutils subdirectory and a shell script that generates a nice
pdf for everything I have to do for the day
2024-08-26 17:44:22 -05:00
stupidcomputer d16d8f2991 change schedules in khalmacs 2024-08-26 16:10:07 -05:00
stupidcomputer 403af5a796 make bspwm focus first desktop on startup 2024-08-26 12:13:08 -05:00
stupidcomputer bf93ab10c0 add two things to the phone utility 2024-08-26 00:41:29 -05:00
stupidcomputer 6946936158 enable virtualbox 2024-08-25 19:09:11 -05:00
stupidcomputer e35562e6a4 make kdeconnect autoconnect work 2024-08-25 19:07:12 -05:00
stupidcomputer e08c671a95 increase font size on dunst notifications 2024-08-15 03:11:35 -05:00
stupidcomputer 8dc19fd4ab update copernicus 2024-08-15 03:11:25 -05:00
stupidcomputer 07980aa0db fully configure dunst and kdeconnect 2024-08-11 14:23:01 -05:00
stupidcomputer 85bf27d8b3 add dunst configuration 2024-08-11 14:22:42 -05:00
stupidcomputer 9cb6b9e34d increment flake.lock 2024-08-04 19:42:46 -05:00
stupidcomputer 2653aa81dd replace pulse with pipewire on copernicus 2024-08-04 18:43:03 -05:00
stupidcomputer 5decb4c14c decouple pulseaudio from x11 module loading 2024-08-04 18:32:40 -05:00
stupidcomputer db8a710e51 add support for top two monitors 2024-08-04 17:46:40 -05:00
stupidcomputer 18e99c3b15 add computersarebad rss feed 2024-08-03 21:07:52 -05:00
stupidcomputer efd46a51ba increment flake.lock 2024-08-02 05:58:51 -05:00
stupidcomputer 0a145e9ac8 add another setting to disp 2024-08-02 05:58:31 -05:00
stupidcomputer 38bee39349 remove kdeconnect from copernicus 2024-08-02 05:54:00 -05:00
stupidcomputer 5e27475b23 make git autosetup branches 2024-07-30 20:04:04 -05:00
stupidcomputer 935964a047 remove extraneous manual/ directory 2024-07-29 20:45:36 -05:00
stupidcomputer b268a84393 add query_command to neomutt 2024-07-29 13:01:35 -05:00
stupidcomputer ca4515d440 rework the regeneration mechanism for tmenu_run 2024-07-25 01:53:02 -05:00
stupidcomputer 8ed9beffba allow capture to run in tmenu 2024-07-25 00:51:56 -05:00
stupidcomputer ecbd242551 different PS1 for different hostnames 2024-07-24 13:37:30 -05:00
stupidcomputer 43a639af99 increment flake.lock 2024-07-24 13:20:47 -05:00
stupidcomputer fc7bee4b2b add prompt_for_new_password executable 2024-07-24 13:20:24 -05:00
stupidcomputer 74a6e7658a swap some monitors around 2024-07-24 13:16:58 -05:00
stupidcomputer 2cc261dc68 add some adb, pci, and usb utils 2024-07-22 22:14:13 -05:00
stupidcomputer e58604ad2c inc flake.lock 2024-07-22 16:30:44 -05:00
stupidcomputer 6baa5c0e96 add copernicus to the allowed hosts 2024-07-22 16:30:37 -05:00
stupidcomputer 264ef86797 change password entry names 2024-07-22 16:04:40 -05:00
stupidcomputer f4d9057f44 add autocorrect to gitconfig 2024-07-22 15:46:32 -05:00
stupidcomputer f98acbb12a automagically make git passwords work 2024-07-22 15:42:44 -05:00
stupidcomputer bd1731aae8 add some programs to the default set for copernicus 2024-07-22 15:12:19 -05:00
stupidcomputer 1b300b233e add a simple rotate wrapper around imagemagick 2024-07-22 15:11:57 -05:00
stupidcomputer 90e4234f2a add custom_command support to `rebuild`
since `netbox` has some weird requirements, add a custom_command option
for `rebuild`.
2024-07-22 14:21:02 -05:00
stupidcomputer b834f6e76a add shebang and mass_delete 2024-07-22 14:03:45 -05:00
stupidcomputer 5f17ccf995 add a mass rename script 2024-07-22 13:47:58 -05:00
stupidcomputer c23635a853 some changes 2024-07-22 01:22:27 -05:00
stupidcomputer b32e3af440 update flake.lock 2024-07-01 16:33:35 -05:00
stupidcomputer fc7c140bc1 make passmenu work the first time 2024-06-29 20:10:08 -05:00
stupidcomputer 3f85eab3ba Merge branch 'master' of https://git.beepboop.systems/rndusr/dot_testing 2024-06-25 20:14:15 -05:00
stupidcomputer ec0f618a60 add powersave to x230t 2024-06-25 20:13:53 -05:00
stupidcomputer 94e1957b55 remove old man pages and clean up utils 2024-06-24 02:39:35 -05:00
stupidcomputer a514c944bd add franklincce and docker on a trial basis 2024-06-23 14:16:23 -05:00
stupidcomputer aa91852de0 make rebuild a global availability 2024-06-23 13:01:25 -05:00
stupidcomputer 26fa23ab80 modularize netbox 2024-06-23 13:01:12 -05:00
stupidcomputer 0672122eb1 remove gmail_mail_bridge 2024-06-23 13:00:52 -05:00
stupidcomputer 115deb8fc0 fix tabs in netbox/default.nix 2024-06-23 13:00:52 -05:00
stupidcomputer 413796ae2a add usr to the docker group 2024-06-23 13:00:52 -05:00
stupidcomputer 858bfb84d0 add a mailmap 2024-06-23 13:00:52 -05:00
stupidcomputer 1703177ade actually disable user registration for gitea 2024-06-20 19:02:08 -05:00
stupidcomputer fc785fa6dd make ssh pubkey auth required 2024-06-19 01:03:51 -05:00
stupidcomputer 1210e716f3 changes to netbox 2024-06-18 16:34:55 -05:00
stupidcomputer e781396a19 Merge branch 'master' of https://git.beepboop.systems/rndusr/dot_testing 2024-06-16 20:32:37 -05:00
stupidcomputer 085fadf2d0 update some attribute sets because of the 24.05 upgrade 2024-06-16 20:32:27 -05:00
stupidcomputer 6cfbe5e003 Merge branch 'master' of https://git.beepboop.systems/rndusr/dot_testing 2024-06-15 21:58:37 -05:00
stupidcomputer 0e5d3288f2 readd python3 -- it's needed 2024-06-15 21:58:09 -05:00
stupidcomputer c1ff21e877 remove the rewrite rule in nginx 2024-06-15 21:57:21 -05:00
stupidcomputer 53a9878e82 refine the licensing situation 2024-06-15 21:40:49 -05:00
stupidcomputer 237f7c2691 potpourri - add brave into home/, st has light mode, etc. 2024-06-15 21:34:04 -05:00
stupidcomputer fd3f89ce28 Merge branch 'master' of https://git.beepboop.systems/rndusr/dot_testing 2024-06-15 21:20:15 -05:00
stupidcomputer 66b98eab2e potpourri - add brave into home/, st has light mode, etc. 2024-06-15 21:19:41 -05:00
stupidcomputer e7e75d747c add a "solo" option for mlg
I'm on vacation, so it now makes sense for mlg to be solo, instead of
being forevermore plugged into a dock. Now, you can type `disp solo` and
make it configure DP-0 for working, instead of trying to configure
DP-1-1 and DP-1-2.

Additionally, this commit also introduces DISP_ACCESS_IP, to remotely
specify the access IP of `x230t`. This is because the wifi I'm using
right now:

- doesn't have the right subnet
- not the right network prefix
- no static ip assignment
- etc.
2024-06-15 20:19:11 -05:00
stupidcomputer 236529f36a Merge branch 'master' of https://git.beepboop.systems/rndusr/dot_testing 2024-06-12 12:15:24 -05:00
stupidcomputer d9f3b42108 upgrade to 24.05 2024-06-12 12:14:31 -05:00
stupidcomputer 5620e61f31 make the statusbar program actually work 2024-06-12 12:14:20 -05:00
stupidcomputer 5161262388 update statusbar setup.py to say GPLv3, not MIT 2024-06-07 17:52:49 -05:00
stupidcomputer a0866a7bfd remove comments from statusbar and change statusbar location to ~/.cache/statusbar 2024-05-28 10:14:39 -05:00
stupidcomputer 36b441f054 add a shift+ins to insert special characters 2024-05-28 10:14:25 -05:00
stupidcomputer 1be3c2feaa invert monitors 2024-05-25 21:01:11 -05:00
stupidcomputer 6e80934f75 Merge branch 'master' of https://git.beepboop.systems/rndusr/dot_testing 2024-05-25 14:06:29 -05:00
stupidcomputer cb5a278470 bump flake.lock 2024-05-25 14:06:20 -05:00
stupidcomputer db20d9e047 plus 20 focus 2024-05-25 14:06:08 -05:00
stupidcomputer edceb9cf4e add special case for htmldjango 2024-05-25 10:33:13 -05:00
stupidcomputer 8563eede63 mlg has two displays now 2024-05-25 10:32:57 -05:00
stupidcomputer f7c7671dce update khard config location 2024-05-25 10:32:43 -05:00
stupidcomputer 032df33f95 add khard config 2024-05-18 22:19:16 -05:00
stupidcomputer f28f9837f6 add the new_mail module 2024-05-17 10:33:46 -05:00
stupidcomputer 921c36dc0f add sxhkd mode support to statusbar.py 2024-05-13 18:44:23 -05:00
stupidcomputer 427885772a some changes 2024-05-12 17:30:33 -05:00
stupidcomputer b2256fdc19 enable bitlbee 2024-05-12 17:10:30 -05:00
stupidcomputer 9053b258c0 capture updates 2024-05-12 17:08:24 -05:00
stupidcomputer 1bd70f34ca misc changes 2024-05-12 13:24:03 -05:00
stupidcomputer c713065135 add new statusbar program 2024-05-12 13:24:03 -05:00
stupidcomputer 56193d308a merge remote branch 2024-05-01 07:49:39 -05:00
stupidcomputer 56e59a8331 inc flake.lock 2024-05-01 07:48:03 -05:00
stupidcomputer 43c689ff90 add light documentation to khalmacs 2024-05-01 07:46:42 -05:00
stupidcomputer 4da2c989cd add jq and termux-api to termux packages 2024-04-28 23:24:04 -05:00
stupidcomputer bd1bbdfb1f Merge branch 'master' of https://git.beepboop.systems/stupidcomputer/dot_testing 2024-04-28 23:23:50 -05:00
stupidcomputer c40fc1eebf add phone as a host on local net 2024-04-28 17:58:51 -05:00
stupidcomputer 1648db66d2 inc flake.lock 2024-04-28 17:58:28 -05:00
stupidcomputer f2ff0448aa add tig to termux distribution 2024-04-26 14:32:28 -05:00
stupidcomputer 246e43bae7 update README.md to reflect new termux 'output' 2024-04-26 14:29:19 -05:00
stupidcomputer 7ae57a2f0d Merge branch 'master' of https://git.beepboop.systems/stupidcomputer/dot_testing 2024-04-26 14:21:53 -05:00
stupidcomputer 883a0e6ee6 automatically clean up nix store on mainsail 2024-04-26 14:21:23 -05:00
stupidcomputer 8c7ba43b93 automatically clean up nix store on mainsail 2024-04-26 14:14:11 -05:00
stupidcomputer 6ede499b2f add some strategically placed .gitignore files
because of the implementation of the termux-android Makefile installer,
the .config directory contents are symlinked into ~/.config. this
results in programs being able to write into the repo. these .gitignores
combat this.
2024-04-26 14:06:01 -05:00
stupidcomputer 9a64781d08 add new packages to phone termux setup; modify start-termux-xorg 2024-04-26 12:16:23 -05:00
stupidcomputer 900e8e2445 add phone key to ssh 2024-04-25 17:10:06 -05:00
stupidcomputer 937e2c648a make some minor changes to sxhkdrc and x230t config 2024-04-25 09:51:01 -05:00
stupidcomputer 45bbbac20c Merge branch 'master' of https://git.beepboop.systems/rndusr/dot_testing 2024-04-25 09:50:06 -05:00
stupidcomputer ca80f73ef2 add termux support to the Makefile 2024-04-24 11:35:35 -05:00
stupidcomputer d106210de2 Merge branch 'statusbar-messaging' 2024-04-16 08:02:16 -05:00
stupidcomputer 011925061d make statusbar program accept notifications 2024-04-15 21:49:28 -05:00
stupidcomputer f2d4c7c364 add new sync script 2024-04-15 21:48:58 -05:00
stupidcomputer 275fa01164 add a new module to the statusbar
make it such that notifications can occur. that is, write to
~/.cache/statusbar_notification, and things appear on the bar. pretty
cool right?
2024-04-15 19:34:16 -05:00
stupidcomputer 405fed6955 add a password menu 2024-04-15 19:33:35 -05:00
stupidcomputer e196a5f96f add ssh to tty-progs 2024-04-15 01:50:46 -05:00
stupidcomputer 3deefc0bf5 rebase onto 0b317f4 2024-04-15 01:50:20 -05:00
stupidcomputer 876e535cba change IP address allocation for home network 2024-04-15 01:46:48 -05:00
stupidcomputer 0b317f491f Merge branch 'master' of https://git.beepboop.systems/rndusr/dot_testing 2024-04-13 22:45:25 -05:00
stupidcomputer 8162f56a44 add additional calendars
add a school and pco calendar to vdirsyncer and khal configurations.
2024-04-13 22:44:29 -05:00
stupidcomputer 7de996bb25 add ledger to package list to x230t and mlg 2024-04-13 13:53:11 -05:00
stupidcomputer fa92bbee83 fix window border inconsistencies
across monitors, there an active monitor for each one. now, there's only
one active monitor displayed.
2024-04-10 21:19:25 -05:00
stupidcomputer ffc00b80b8 major changes to bashrc
This patch:
  - improves the ctrl+r recollection mechanism
  - sets vi mode on shell startup
2024-04-10 19:20:09 -05:00
stupidcomputer 5d80dbb1ca modify xset rate to reduce key repeats 2024-04-10 18:59:38 -05:00
stupidcomputer b7d5dff2e4 fix issue where rbw couldn't collect password from pinentry
when executing rbw, pinentry complains about a lack of terminal size. if
you remove the terminal, it can't be too small, right?
2024-04-10 17:08:10 -05:00
stupidcomputer c7a51fb7a1 add tmuxbird, a crappy thunderbird replacement via tmux 2024-04-10 17:04:46 -05:00
stupidcomputer f261b58ce6 remove firefox and emacs from x11.nix 2024-04-08 11:50:11 -05:00
stupidcomputer b94b9e8f73 update disp to allow mlg to synchronize ~/Mail and ~/vdir
change builds/utils/sh/disp to allow mlg to mirror ~/Mail and ~/vdir
from x230t.
2024-04-08 11:43:24 -05:00
stupidcomputer 82636ae45f update python installation configuration
some changes:
- move pythonrc to be copied to ~/.config/python/pythonrc*.py*, instead
  of ~/.config/python/pythonrc.py
- remove spurious print statement from pythonrc.py
2024-04-08 11:39:48 -05:00
stupidcomputer b112ef7f87 modify khal configuration: modify spacing and change calendar color 2024-04-08 09:03:45 -05:00
stupidcomputer 5f32ddeb26 update search shell function to search current directory by default
instead of searching ~/doc, search the current directory. the old
functionality can be restored by passing -a to the function.
2024-04-08 08:42:36 -05:00
stupidcomputer ab145f8294 update khalmacs to reflect schedules 2024-04-08 08:42:03 -05:00
stupidcomputer 8875a7c219 move all the dotfiles to .config 2024-04-06 17:29:20 -05:00
stupidcomputer 4e01d44bff removed polybar; no longer needed 2024-04-06 17:12:03 -05:00
stupidcomputer 74e6a4ec2b git identity change 2024-04-06 16:56:13 -05:00
randomuser ec6a7979de update disp for three monitor setup 2024-04-06 16:49:59 -05:00
randomuser fa17d83cb2 add some library functions 2024-04-06 16:49:59 -05:00
randomuser 7759241d99 Merge branch 'master' of https://git.beepboop.systems/rndusr/dot_testing 2024-04-05 12:24:49 -05:00
randomuser 1d438e399b some changes 2024-04-04 13:16:47 -05:00
stupidcomputer 97288d1592 Merge branch 'master' of https://git.beepboop.systems/rndusr/dot_testing 2024-03-29 15:54:41 -05:00
stupidcomputer 206980aa98 remove roundcube 2024-03-29 15:54:34 -05:00
randomuser 0d6ba3e72a change README to reflect licensing change 2024-03-24 20:42:24 -05:00
randomuser bad198ee02 integrate st merge into repo 2024-03-24 20:39:08 -05:00
randomuser bc7140f9e4 Add 'builds/st/' from commit '6094c5f5dd44fb1890ad080082f54c55b0ec0b98'
git-subtree-dir: builds/st
git-subtree-mainline: b40f7c6df8
git-subtree-split: 6094c5f5dd
2024-03-24 20:36:40 -05:00
randomuser b40f7c6df8 Merge branch 'master' of https://git.beepboop.systems/rndusr/dot_testing 2024-03-18 18:38:20 -05:00
randomuser 1d7ff0dcf9 mlg no longer has its own dot_testing 2024-03-18 18:38:01 -05:00
randomuser fa7113e7af resolve merge conflict 2024-03-18 18:37:20 -05:00
randomuser d3ebc491c1 some misc stuff 2024-03-18 18:27:29 -05:00
randomuser 9dd19eb429 add options to hm/bash.nix 2024-03-16 14:12:43 -05:00
randomuser 9890f55c9d updated flake.lock 2024-03-15 18:54:42 -05:00
randomuser 2690b6296f changes 2024-03-15 18:51:36 -05:00
randomuser 6094c5f5dd split color configuration into seperate file 2024-03-14 07:45:25 -05:00
randomuser c4844575d0 some changes -- see description
migrate elinks to home-manager, add package installation directives, and
generally restructure things.
2024-03-13 07:14:47 -05:00
stupidcomputer 36486ba1a2 some server-side changes 2024-02-26 00:05:50 -06:00
randomuser 78dc445d3b some server chagnes 2024-02-25 20:29:31 -06:00
randomuser 347d57c51f add a simple latex snippet 2024-02-25 14:05:32 -06:00
randomuser 9a96685375 some experimental change 2024-02-24 17:32:04 -06:00
randomuser 83c2a195b2 some changes; read the diff for more info 2024-02-24 17:22:30 -06:00
randomuser 8dd113bd7a testing 2024-02-16 20:21:30 -06:00
randomuser 7a2763c2a2 add third monitor to mlg 2024-02-10 23:49:22 -06:00
randomuser 2b4fb558c3 make neomuttrc /home/usr agnostic 2024-02-10 18:55:05 -06:00
randomuser 445b97bf01 i'll get it this time(tm) 2024-02-10 18:49:00 -06:00
randomuser e29b43495c more speculative changes 2024-02-10 18:46:52 -06:00
randomuser 46701dd6dc speculative changes for the phone 2024-02-10 18:45:06 -06:00
randomuser 3677857763 restructure flake to make it more appearant what's going on 2024-02-10 18:42:50 -06:00
randomuser ceda644fab ease mail integration, also add rbw as interface for bitwarden 2024-02-10 18:40:24 -06:00
randomuser 64c7debf35 merge 2024-02-09 23:42:23 -06:00
randomuser ad423e9e57 restructure some utils, and move khal, vdirsyncer, isync, todoman into config 2024-02-09 23:41:19 -06:00
randomuser f481fd5f3f add nix-on-droid configuration 2024-02-09 23:33:03 -06:00
randomuser 7408a90720 some changes, redo nginx 2024-02-06 19:45:32 -06:00
randomuser 6e41fc9cca changes 2024-02-05 17:16:18 -06:00
randomuser 7a5220d5d8 merge mlg changes 2024-02-04 07:50:31 -06:00
randomuser 2f135dbb95 add support for x230(t), also vscodium 2024-02-04 07:48:42 -06:00
randomuser a261bccd0a some changes to mlg and global computers 2024-01-28 19:02:49 -06:00
randomuser 2624ed9e60 modify port forwarding for mainsail 2024-01-25 00:11:28 -06:00
randomuser 9bc783e711 added ssh-phone-home to mainsail, phoning to netbox 2024-01-24 23:44:47 -06:00
stupidcomputer e28e53b6db changes 2024-01-24 23:42:18 -06:00
randomuser 092c8a75f9 rid myself of the utilpkg flake and put a firewall on mlg 2024-01-24 23:27:38 -06:00
randomuser 21778be01c changes 2024-01-24 23:09:50 -06:00
randomuser 122a6adedb changes 2024-01-24 23:09:02 -06:00
randomuser 9fe5e89928 add mlg key 2024-01-24 23:04:51 -06:00
randomuser 4b40b38e5a temporary stop-gap solutions 2024-01-24 19:37:55 -06:00
randomuser 9fd284de41 merge (from mlg) 2024-01-24 19:06:57 -06:00
randomuser 80a23ec536 changes 2024-01-24 18:49:26 -06:00
stupidcomputer 22a282ea97 add python 3 so sshuttle can work 2024-01-21 12:55:01 -06:00
stupidcomputer a852816503 lock the stuff down 2024-01-21 12:40:51 -06:00
stupidcomputer 1e56e048a0 add stuff 2024-01-21 12:14:04 -06:00
randomuser 6b861b77b8 some changes, added remote key 2024-01-21 12:07:54 -06:00
stupidcomputer 4e1c5e8115 things 2024-01-20 11:25:54 -06:00
stupidcomputer 6fcc8c450f add a mail sync thing for gmail 2024-01-20 11:00:03 -06:00
randomuser 465bac892c marge remote and local + some changes 2024-01-20 08:56:36 -06:00
randomuser a7a7e090d7 selectively disable one display 2024-01-20 08:30:31 -06:00
stupidcomputer 195977e871 add cgit 2024-01-19 18:56:48 -06:00
randomuser 13d35c76b2 update readme + sh/capture 2024-01-18 05:07:53 -06:00
randomuser 5d75c42dbe merge from flakes_testing 2024-01-18 04:32:42 -06:00
stupidcomputer 381e229fb9 changes 2024-01-18 04:28:32 -06:00
randomuser 2a2571aae5 changes 2024-01-18 03:54:32 -06:00
randomuser 22d1ba38af crap ton of stuff 2024-01-15 03:52:45 -06:00
randomuser b36b585db3 changes 2024-01-09 08:05:49 -06:00
randomuser 66f4e6a7b0 changes 2024-01-08 20:44:38 -06:00
randomuser 894230ee8a more changes 2024-01-08 20:32:59 -06:00
randomuser 40fe8061c2 has my pain ended? 2024-01-07 23:08:20 -06:00
randomuser 5b01a13f3e please work 2024-01-07 22:16:14 -06:00
stupidcomputer 50ea65da10 move radicale to vps 2024-01-02 15:20:19 -06:00
randomuser 93c424af82 add changes 2023-12-31 18:54:59 -06:00
randomuser c3d25112b2 chagnes 2023-12-28 16:09:04 -06:00
randomuser d215844495 changes 2023-12-28 15:59:44 -06:00
randomuser c170d650c6 changes 2023-12-28 15:31:44 -06:00
randomuser e7f323f9bf changes 2023-12-28 15:27:31 -06:00
randomuser 543171202c disable powermanagement to (maybe) prevent mainsail sleeping 2023-12-28 14:59:51 -06:00
randomuser 7995c89087 changes 2023-12-28 00:21:34 -06:00
randomuser a052c6a758 changes 2023-12-28 00:20:13 -06:00
randomuser d6d7097b06 add some firefox things 2023-12-22 19:41:55 -06:00
randomuser 87d4cc1823 firefox addons workigngit add * git add * but they arn't enabled by default 2023-12-22 18:27:03 -06:00
randomuser 979e792904 changes 2023-12-21 17:22:54 -06:00
randomuser 4cacbe9592 changes 2023-12-21 16:06:12 -06:00
randomuser 7904c915ee changes 9 2023-12-21 15:26:09 -06:00
randomuser 160b98d984 changes 8 2023-12-20 22:33:00 -06:00
randomuser 62c11c447a changes 7 2023-12-21 02:48:32 +00:00
randomuser 00bfa4bd56 changes 6 2023-12-21 02:44:39 +00:00
randomuser 77124ef7d9 changes 5 2023-12-21 02:37:40 +00:00
randomuser 20a26d4b09 changes 3 2023-12-20 16:18:13 -06:00
randomuser 902ba05a54 changes 2 2023-12-20 15:45:45 -06:00
randomuser 48d9230d23 changes 2023-12-20 15:19:01 -06:00
randomuser fa82b10cbf bypass startup limits in the service files 2023-12-18 23:42:56 -06:00
stupidcomputer b247f9491f add a crap ton of aliases 2023-12-18 16:52:42 -06:00
randomuser 1f77bd54f3 make the ssh port forward services restart on fail 2023-12-18 16:44:44 -06:00
stupidcomputer 35cf2e5863 Merge branch 'master' of https://git.beepboop.systems/rndusr/dot_testing 2023-12-18 13:22:07 -06:00
stupidcomputer fb55e1d495 create the ryan user, accessable from outside 2023-12-18 13:21:51 -06:00
randomuser 2a8daf2aae refactor the ugly systemd service to a nice one 2023-12-18 13:19:58 -06:00
randomuser bfea41df54 misc changes, addition of getphone and lofi, and netbox now forwards radicale 2023-12-06 18:22:25 -06:00
randomuser f3f013d0da some changes 2023-12-05 21:43:38 -06:00
randomuser 58cc47b0ab add neomutt to desktop; configs coming later 2023-12-03 22:39:57 -06:00
stupidcomputer db949e2c7a add rss feeds and fail2ban 2023-12-03 21:46:37 -06:00
randomuser 20d7a2c02d add rss feeding 2023-12-03 20:48:49 -06:00
randomuser 2e07b8b018 improve paperless-activate 2023-12-03 20:15:14 -06:00
stupidcomputer 32bba7ff9a push changes 2023-12-03 20:02:19 -06:00
stupidcomputer 7ab1a08b43 emergency changes 2023-12-03 19:50:26 -06:00
randomuser 57cd79eb55 Merge branch 'master' of https://git.beepboop.systems/rndusr/dot_testing 2023-11-23 14:07:15 -06:00
randomuser 0b3b5c7d44 changes 2023-11-23 14:06:56 -06:00
randomuser 6e028d6bc3 whoops 2023-11-22 16:56:22 -06:00
randomuser 925de32e4f the great reconciliation 2023-11-22 16:54:06 -06:00
stupidcomputer 3d42877203 merge the two timelines 2023-11-22 16:32:47 -06:00
stupidcomputer 658701c197 add some server things 2023-11-22 16:31:31 -06:00
randomuser 3fc2dc19aa add additional configuration 2023-11-21 11:10:48 -06:00
randomuser d3fc9ff203 misc changes 2023-11-21 11:10:48 -06:00
randomuser 8cc0168d2a changes 2023-11-21 11:10:48 -06:00
randomuser 1d19db7c9e more update 2023-10-30 16:25:45 -05:00
randomuser e50b2dad66 ignore this, revert this later 2023-10-15 16:10:15 -05:00
randomuser 62bb8370d6 update install script 2023-10-15 13:33:13 -05:00
randomuser 8761dd3db5 add new machine 2023-10-15 13:31:54 -05:00
randomuser c9bc2af270 misc changes 2023-10-15 13:31:04 -05:00
randomuser ee083f8279 change everything 2023-09-23 03:42:22 -05:00
randomuser fb0ea84388 misc changes 2023-08-30 20:30:05 -05:00
randomuser 7e329b5c6e add some vim plugins and friends 2023-08-18 07:49:16 -05:00
randomuser c2d7704eeb random stuff 2023-08-13 20:13:48 -05:00
randomuser 945ce02505 add steam to mlg 2023-08-13 08:50:02 -05:00
randomuser c3c8089f2d xps changes 2023-08-13 08:49:35 -05:00
randomuser 3faafc94f9 small changes 2023-08-06 22:13:22 -05:00
randomuser feac80e929 yes, systemd-boot is good enough(tm) 2023-08-06 22:13:22 -05:00
randomuser d1522589f0 stuff 2023-08-03 22:10:01 -05:00
randomuser 33a01619cf add the nvidia and steam configurations for mlg 2023-08-03 14:32:53 -05:00
randomuser 0677189e4f a grabbag of update 2023-08-03 00:05:35 -05:00
randomuser be8eecab9b stupid bootloader error change 2023-08-01 23:03:39 -05:00
randomuser 839c85fd00 move the clock to the right 2023-08-01 15:54:39 -05:00
randomuser 9f02c94ee5 whoops again 2023-08-01 15:54:24 -05:00
randomuser 260b1e0d0a whoops 2023-08-01 15:50:52 -05:00
randomuser 360e549a5e move common files like the desktop configuration and main.nix to common/ 2023-08-01 15:46:57 -05:00
randomuser d4d25ff867 move the box-specific configuration to boxes/ 2023-08-01 15:43:38 -05:00
randomuser c2d03922a5 minor changes, new machine 2023-08-01 15:39:35 -05:00
randomuser ff1cc15a38 add xps configuration 2023-07-16 07:51:01 -05:00
randomuser accab35baf disable ntfy.sh on netbox 2023-07-15 23:53:22 -05:00
randomuser b3960bff1c add ntfy service 2023-07-15 23:10:22 -05:00
randomuser f8de34054e add a simple installer for nixos configs 2023-07-13 12:59:44 -05:00
randomuser af314b9066 add default usr password 2023-07-13 12:16:31 -05:00
randomuser f84fca3659 small changes 2023-07-12 20:13:14 -05:00
randomuser 5ce0cd230d changes to polybar 2023-07-11 21:20:30 -05:00
randomuser 30c8e822bb add nonpure scripts directory for non-nixos systems 2023-07-11 21:20:14 -05:00
randomuser 65da394c5d remove ssh askpass 2023-07-10 22:56:44 -05:00
randomuser a7f32dbbf0 trim out the bashrc 2023-07-10 22:55:37 -05:00
randomuser 220ec93a6a whoops, need to add license 2023-07-10 22:38:18 -05:00
randomuser 802f250f76 add ffmpeg 2023-07-10 22:38:02 -05:00
randomuser 7e336803d9 add readme 2023-07-10 22:37:56 -05:00
randomuser 2bf111ba8b remove remaining cruft 2023-07-10 22:03:38 -05:00
randomuser 5fbcf59f11 move mail.nix into modules 2023-07-10 22:02:46 -05:00
randomuser 562e72a91b move configuration.nix to main.nix to avoid autocomplete collision with config/ 2023-07-10 22:01:02 -05:00
randomuser f540d2b9dd add something to /etc/profile.local 2023-07-10 21:58:36 -05:00
randomuser 9d74bca144 update polybar configuration 2023-07-10 21:35:38 -05:00
randomuser d78c5a0afb add (simple) polybar config 2023-07-10 21:23:10 -05:00
randomuser 4b2b07b960 remove historical cruft and exchange homegrown statusbar to polybar
the statusbar program is being reworked. until then, we'll just use polybar.
2023-07-10 21:04:29 -05:00
randomuser 16c071c9a3 misc changes 2023-07-09 17:21:27 -05:00
randomuser dd1846046d add somemore supporting packages 2023-07-08 16:53:16 -05:00
randomuser 11deac87c5 add suggested changes via NixOS discord 2023-07-08 16:22:38 -05:00
randomuser c7b00fac22 test 2023-07-08 16:16:00 -05:00
randomuser a17c8f44d4 push changes 2023-07-08 14:22:13 -05:00
randomuser 1da95b53c1 preparing for netbox 2023-07-07 23:44:40 -05:00
randomuser c8c9826dd0 Merge branch 'master' of https://git.beepboop.systems/rndusr/dot_testing 2023-07-07 23:29:12 -05:00
randomuser 7688715da5 lib wasn't imported in virtbox.nix, so we'll include that 2023-07-07 23:28:18 -05:00
randomuser c25fd3471d aaaaaaaaaaaaaaaaa 2023-07-07 23:22:06 -05:00
randomuser ede69ca4be I can't do this anymore 2023-07-07 23:20:00 -05:00
randomuser 88412dd557 test 2023-07-07 23:19:21 -05:00
randomuser b6fa4de417 experimentation 2023-07-07 23:17:41 -05:00
randomuser 22ba0ba584 ah 2023-07-07 23:13:57 -05:00
randomuser 5cdce4a6e3 whoops, wrong module 2023-07-07 23:11:21 -05:00
randomuser 2830d98192 make changes to have a more modular config 2023-07-07 23:09:54 -05:00
randomuser 33c407edb3 split hardware configs into hardware-config directory 2023-07-07 19:09:12 -05:00
randomuser 8276988e17 fix path error 2023-07-07 19:01:55 -05:00
randomuser c64011493a add wallpapers to the home-manager portion of configuration.nix 2023-07-07 17:09:33 -05:00
randomuser c893b2d548 remove merge helper 2023-07-07 17:08:15 -05:00
randomuser 49410711fb Merge branch 'wallpaper_import' into 'master' 2023-07-07 17:07:50 -05:00
randomuser 48cc88e1de prepare for merge transaction on master 2023-07-07 17:07:27 -05:00
randomuser c30a11f3ff Merge remote-tracking branch 'wallpaper/master' into wallpaper_import 2023-07-07 17:06:44 -05:00
randomuser 8b3cd1a2cd initial commit 2023-07-07 17:04:55 -05:00
randomuser 013cbc1a0f smorgasboard (tm) 2023-07-07 16:55:42 -05:00
randomuser 9c49ea2dfd remove firefox setup script, will be superseded by configuration.nix and friends 2023-07-07 16:47:55 -05:00
randomuser 3aa3e10ce8 move all dotfiles to config/ 2023-07-07 16:47:16 -05:00
randomuser 2dffe34f1c remove the merging helper 2023-07-07 14:59:47 -05:00
randomuser ea581aa433 add utils into repo 2023-07-07 14:55:35 -05:00
randomuser 57a5314813 add some nixos configs 2023-06-24 16:55:54 -05:00
randomuser 804df59e8e some changes 2023-06-24 16:47:38 -05:00
randomuser e3bab8d377 misc changes 2023-05-28 17:34:55 -05:00
randomuser 96fdd5cfcc enable linebreak option neovim 2023-04-11 17:06:15 -05:00
randomuser 89c4530d2e do the things to init.lua 2023-04-10 08:58:48 -05:00
randomuser 3ea9e3389b bashrc 2023-04-10 08:58:18 -05:00
randomuser bda6135dad refactor sxrc 2023-04-10 08:57:54 -05:00
randomuser 562d6ff6a9 reverse the zoom controls 2023-04-02 12:49:14 -05:00
randomuser f58dbe9264 factor out tabbing thing 2023-04-02 12:47:07 -05:00
randomuser 73c39f9eeb misc changes 2023-03-24 10:24:33 -05:00
randomuser eebb40fc49 exit with code of subprocess 2023-02-04 15:27:01 -06:00
randomuser f69c20321b add new keybinding 2023-01-31 11:28:21 -06:00
randomuser f3db327f0c modify init.lua 2023-01-31 11:28:10 -06:00
randomuser 64284e3a4a add contingency script 2023-01-26 13:33:38 -06:00
randomuser c1e747a7c7 remove capture from bash/bashrc, move to randomuser/utils/sh/capture 2023-01-15 16:49:15 -06:00
randomuser ae09b5fff9 add functionality to record function 2023-01-15 16:41:46 -06:00
randomuser 2d8d1733be misc vim changes 2023-01-14 20:18:45 -06:00
randomuser 346fda912e misc changes 2023-01-14 20:17:33 -06:00
randomuser 6abaea7a5b port neovim configuration over 2023-01-14 20:17:04 -06:00
randomuser e7a152dd65 Merge branch 'master' of https://tildegit.org/randomuser/dot 2023-01-03 23:13:45 -06:00
randomuser b92b53b9cf misc changes 2023-01-03 23:13:10 -06:00
randomuser 967e496c7a whoops, forgot makefile 2023-01-03 23:12:51 -06:00
randomuser 2541707604 add a simple-ish gtk theme 2023-01-03 23:12:27 -06:00
randomuser ee4e159740 misc changes 2022-12-27 01:07:42 +00:00
randomuser c0fa23ca93 add testing lua nvim config 2022-12-27 01:07:42 +00:00
randomuser 0039d09e1f remove outdate zathura options 2022-12-27 01:07:42 +00:00
randomuser 8b6a308e60 add pre-authentication to bashrc function gp()
there is a program in randomuser/utils which acts as an
authentication manager for tildegit. it doesn't work right.
when the tildegit password has not been requested recently,
instead of popping up a prompt, it will just return an auth
error. i honestly don't know why this is happening, but doing
this makes gpg-agent aware of the decryption and allows the
password to be accessed by git without user intervention.
2022-12-24 00:55:49 -06:00
randomuser 0f59131666 add git-related function and alias 2022-12-24 00:54:45 -06:00
randomuser c0a77bcbce misc. changes 2022-12-24 00:42:10 -06:00
randomuser 97f19d49fe eliminate items from todolist 2022-12-24 00:41:50 -06:00
randomuser 82339255cc expand on todolist 2022-12-24 00:41:24 -06:00
randomuser ae780e50d4 change it back, doesn't work correctly 2022-12-22 15:32:05 -06:00
randomuser 06dd2f8566 change installation path 2022-12-22 15:30:55 -06:00
randomuser 9a1d81705a add bash/profile 2022-12-21 17:06:00 -06:00
randomuser 5af64d756c fixed stupid design in environ 2022-12-21 11:07:12 -06:00
randomuser f56b2bf059 add extension for firefox setup 2022-12-04 21:41:20 +00:00
randomuser 43f6291ee6 add changes 2022-12-04 21:32:50 +00:00
randomuser 7777ef23b6 make some changes to the profile: sfeed settings 2022-11-27 20:12:31 +00:00
randomuser 2f31ef10d7 change makefile 2022-11-27 20:12:11 +00:00
randomuser f6767f6a51 modify makefile and move walls to wallpapers 2022-11-27 20:08:21 +00:00
randomuser be04461863 make sure that .config directory is created 2022-11-27 19:18:44 +00:00
randomuser 40bdc21829 add rss functionk to bashrc 2022-11-27 19:17:51 +00:00
randomuser 79af52770e add a bashrc modification 2022-11-10 20:35:43 +00:00
randomuser 4105b86d7c add disp thing(tm) 2022-11-10 20:35:34 +00:00
randomuser 9766ec500a allow selection to disppaear when selected elsewhere 2022-11-10 13:43:06 +00:00
randomuser 3b5f0f2ecc make a proper .gitignore
add following files to gitignore:
  st
  st.o
  tags
  x.o
2022-11-10 13:41:42 +00:00
randomuser 71551993ee add -p flag to st 2022-11-10 13:40:39 +00:00
randomuser 29be0228c4 changes 2022-10-18 18:19:26 -05:00
randomuser 8c001d9b3d changes 2022-10-17 13:20:52 -05:00
randomuser 6e815831fa this is the final time, i promise 2022-09-14 21:04:13 -05:00
randomuser 12ccb8c97e password, again, again, again, again 2022-09-14 20:35:11 -05:00
randomuser 2dbff3b134 password, again, again, again 2022-09-14 20:19:53 -05:00
randomuser cd969ab95d password, again, again 2022-09-14 20:17:06 -05:00
randomuser 986f7cfcfb password, again 2022-09-14 20:13:23 -05:00
randomuser 7559332d8f password integration 2022-09-14 20:12:26 -05:00
randomuser ad1ad7f907 add DOTREMINDERS 2022-08-21 10:27:50 -05:00
randomuser 1ef025e1c0 update makefile so it doesn't automagically install firefox dots 2022-08-21 10:27:27 -05:00
randomuser bbc09fa9a2 add nnoremap to init.vim 2022-08-16 20:46:09 -05:00
randomuser 5375d27040 add bspwm and sxhkd configurations 2022-08-16 20:45:37 -05:00
randomuser 2df2fee5e0 vimrc changes 2022-08-09 08:31:29 -05:00
randomuser 2129db63c3 shift some rcfile commands over 2022-08-01 18:32:20 -05:00
randomuser 9acc377ad2 add suspend to sxhkdrc 2022-07-31 19:23:15 -05:00
randomuser 35bfa84896 changes 2022-07-18 22:20:53 -05:00
randomuser fda3468e06 add new plugin and update vimplug 2022-07-15 17:06:07 -05:00
randomuser 53784924ec misc changes 2022-07-15 16:35:22 -05:00
randomuser 43065d3c06 update .gitignore 2022-07-08 03:32:18 +00:00
randomuser 7d0da4d304 add bspwm-toggle-gaps 2022-07-08 03:30:59 +00:00
randomuser bf472e1d20 add bspwm-toggle-gaps 2022-07-08 03:29:17 +00:00
randomuser becbddcab5 minor changes 2022-07-07 21:55:06 -05:00
randomuser 88ca9051a1 add things 2022-07-06 00:36:14 -05:00
randomuser 206ec6a220 whoops 2022-07-05 23:05:46 -05:00
randomuser 265845b262 switch from simplestatus to status 2022-07-04 02:02:48 -05:00
randomuser b0168f8ace add automagic firefox configuration 2022-07-02 16:30:27 -05:00
randomuser 1b2527f5db misc changes 2022-06-26 19:57:05 -05:00
randomuser 367460872f modify sxhkdrc 2022-06-26 19:02:10 -05:00
randomuser f96930a2bd add xdg config 2022-06-26 19:01:20 -05:00
randomuser 056f0f4857 add repos function to chdir to repos dir 2022-06-26 19:01:06 -05:00
randomuser 6822520bac add volume keys 2022-06-18 16:33:49 -05:00
randomuser 3dfce291e5 update makefile 2022-06-18 15:45:50 -05:00
randomuser 467dfe5e34 python things 2022-06-18 15:41:52 -05:00
randomuser 064e39883a modify sxrc 2022-06-18 15:34:39 -05:00
randomuser 513f9a4e87 simplestatus improvements 2022-06-18 15:33:14 -05:00
randomuser 3b0804dde2 misc st patches and other things 2022-06-13 14:06:36 -05:00
randomuser 2090938b98 add .gitignore and htop 2022-06-13 14:01:29 -05:00
randomuser 931815e642 minor changes 2022-06-13 13:58:42 -05:00
randomuser e1c6d853a6 add tridactyl dotfiles 2022-06-07 23:46:20 -05:00
randomuser c3385a9c3b append bash/hist to gitignore, as it's included in symlinks 2022-06-07 23:44:03 -05:00
randomuser ef9189eb18 add some small misc vim changes 2022-06-07 23:43:31 -05:00
randomuser 69eb964b86 remove cp -r and replace with ln -sf for integration with git 2022-06-07 23:43:09 -05:00
randomuser e2b44e8ea2 improve environ installation script 2022-06-07 23:13:10 -05:00
randomuser 3fa80b84c9 no longer using vimb 2022-06-07 23:04:24 -05:00
randomuser 79b412b041 no longer using wyebadblock 2022-06-07 23:03:31 -05:00
randomuser 72d0d47817 colors at launch patch 2022-05-17 21:54:14 -05:00
randomuser 1bbc199286 add externalpipe patch 2022-05-17 21:53:15 -05:00
randomuser f380807190 some configuration changes 2022-05-17 21:44:46 -05:00
randomuser aac8698a43 add scrollback 0.8.5 patch 2022-05-17 21:33:17 -05:00
Hiltjo Posthuma baa9357e96 Makefile: add manual path for OpenBSD 2022-05-01 18:38:40 +02:00
NRK 8629d9a1da code-golfing: cleanup osc color related code
* adds missing function prototype
* move xgetcolor() prototype to win.h (that's where all the other x.c
  func prototype seems to be declared at)
* check for snprintf error/truncation
* reduces code duplication for osc 10/11/12
* unify osc_color_response() and osc4_color_response() into a single function

the latter two was suggested by Quentin Rameau in his patch review on
the hackers list.
2022-04-19 11:43:37 +02:00
randomuser 7d06762d40 more neovim stuff! 2022-03-31 12:05:22 -05:00
randomuser b81a026958 more neovim stuff! 2022-03-30 21:45:56 -05:00
randomuser e44cdd5779 revise neovim thing 2022-03-30 20:55:31 -05:00
randomuser a6f87394db add luakit 2022-03-22 21:59:37 -05:00
randomuser 47838bbb09 add todo file 2022-03-22 21:54:21 -05:00
NRK ef0551932f base64_digits: reduce scope, implicit zero, +1 size
the array is not accessed outside of base64dec() so it makes sense to
limit it's scope to the related function. the static-storage duration of
the array is kept intact.

this also removes unnecessary explicit zeroing from the start and end of
the array. anything that wasn't explicitly zero-ed will now be
implicitly zero-ed instead.

the validity of the new array can be easily confirmed via running this
trivial loop:

	for (int i = 0; i < 255; ++i)
		assert(base64_digits[i] == base64_digits_old[i]);

lastly, as pointed out by Roberto, the array needs to have 256 elements
in order to able access it as any unsigned char as an index; the
previous array had 255.

however, this array will only be accessed at indexes which are
isprint() || '=' (see `base64dec_getc()`), so reducing the size of the
array to the highest printable ascii char (127 AFAIK) + 1 might also be
a valid strategy.
2022-03-18 12:20:27 +01:00
NRK af3bb68add avoid potential UB when using isprint()
all the ctype.h functions' argument must be representable as an unsigned
char or as EOF, otherwise the behavior is undefined.
2022-03-18 12:11:27 +01:00
Zacchary Dempsey-Plante 2aefa348ba make underlines and strikethroughs respect `chscale` 2022-03-13 10:45:34 +01:00
randomuser c92c9cfef5 add alias for remind 2022-02-22 13:52:11 -06:00
randomuser cbc6ec572f update sxhkdrc, see HEAD~1 2022-02-22 12:40:24 -06:00
randomuser 938b76547b reflect the change in wallpapers in randomuser/utils 2022-02-22 12:39:37 -06:00
randomuser 43c343f263 add an alias for editing the reminders file 2022-02-19 23:42:51 +00:00
randomuser 01a756edf3 finalize the reminder dotfile situation after all 2022-02-19 23:39:30 +00:00
randomuser 25bde04e5e add reminder alias 2022-02-19 20:51:35 +00:00
Santtu Lakkala e823e2308f Delay redrawals on palette changes
Build on auto-sync and only mark window dirty on palette changes and let
the event handler do the actual draw.
2022-02-18 13:03:37 +01:00
randomuser b98a669371 additional tweaks to lemonbar's startup 2022-02-06 05:32:11 +00:00
randomuser 6a0cfdf6e2 more changes to dotfiles 2022-02-06 05:25:08 +00:00
randomuser e4b5e1f60b make vimb download to the correct place 2022-02-06 05:17:31 +00:00
randomuser 5f6fc1da03 more dotfiles! 2022-02-06 04:58:21 +00:00
randomuser a9b3355daa add capability for bash dotfiles to be stored in /home/usr/.config/bash 2022-02-06 04:29:46 +00:00
randomuser 9bed5a6420 make vimb use the font instead of squares on debian
on debian, the bottom bar renders as squares instead of the proper
font. this fixes this, but for some reason renders a serif font
instead of the proper Fantasque Sans Mono. for now, i'm to tired to
troubleshoot, so here's a patch to get this working for now.
2022-02-06 03:38:00 +00:00
randomuser 15e24a61f3 add walls 2022-02-05 19:23:34 -06:00
Hiltjo Posthuma 2c5edf28ec X10/SGR mouse: use alt as meta key instead of super/windows key 2022-01-12 09:44:27 +01:00
Hiltjo Posthuma b1d97fec47 LICENSE: bump year 2022-01-10 17:11:17 +01:00
robert ea7cd7b62f Fix mousereport
This patch replaces the previous one I sent.

The following changes are made in this patch:
 - Fix tracking of pressed buttons. Previously, pressing two buttons and
   then releasing one would make st think no buttons are pressed, which
   in particular broke MODE_MOUSEMOTION.
 - Always send the lowest-numbered pressed button on motion events; when
   no button is pressed for a motion event in MODE_MOUSEMANY, then send
   a release. This matches the behaviour of xterm. (Previously, st sent
   the most recently pressed button in the motion report.)
 - Remove UB (?) access to potentially inactive struct member
   e->xbutton.button of XEvent union.
 - Fix (unlikely) possibility of overflow for large button numbers.

The one discrepancy I found between st and xterm is that xterm sometimes
encodes buttons with large numbers (>5) strangely. E.g., xterm reports
presses of buttons 8 and 9 as releases, whereas st properly (?) encodes
them as presses.
2022-01-10 17:04:01 +01:00
Hiltjo Posthuma 7fb0c0cc68 bump version to 0.8.5 2022-01-07 12:39:57 +01:00
randomuser e67ddf9a7f add simplestatus configs 2022-01-07 02:40:12 -06:00
randomuser f6e5395aad small changes 2022-01-07 02:38:39 -06:00
Hiltjo Posthuma 7e1c68f25d FAQ: fix a typo, patch -> path 2022-01-02 12:16:57 +01:00
jamin 65f1dc4283 Fix overtyping wide characters.
Overtyping the first half of a wide character with the
second half of a wide character results in display garbage.
This is because the trailing dummy is not cleaned up.

i.e.  ATTR_WIDE, ATTR_WDUMMY, ATTR_WDUMMY

Here is a short script for demonstrating the behavior:

	#!/bin/sh
	alias printf=/usr/bin/printf
	printf こんにちは!; sleep 2
	printf '\x1b[5D'; sleep 2
	printf へ; sleep 2
	printf ' '; sleep 2
	echo
2021-12-30 18:37:17 +01:00
Jochen Sprickerhof a0467c802d Fix null pointer access in strhandle
According to the spec the argument is optional for 104, so p can be
NULL as can be tested with printf '\x1b]104\x07'. This is a regression
of 8e31030.
2021-12-27 13:07:11 +01:00
Hiltjo Posthuma 273db5ceaf follow-up fix for OSC color sequences, return
Otherwise the message "erresc: unknown str" is printed.
2021-12-26 19:00:41 +01:00
Raheman Vaiya 8e31030390 Add support for OSC color sequences 2021-12-26 18:57:44 +01:00
Hiltjo Posthuma 2f6e597ed8 fix possible rare crash when Xutf8TextPropertyToTextList fails
from the XmbTextListToTextProperty(3) man page:

"If insufficient memory is available for the new value string, the functions
return XNoMemory.  If the current locale is not supported, the functions return
XLocaleNotSupported.  In both of these error cases, the functions do not set
text_prop_return."

Reported by Steffen Nurpmeso <steffen@sdaoden.eu>, thanks!
2021-08-24 13:44:35 +02:00
Koichi Murase 1d3142da96 fix a problem that the standard streams are unexpectedly closed
In the current implementation, the slave PTY (assigned to the variable
`s') is always closed after duplicating it to file descriptors of
standard streams (0, 1, and 2).  However, when the allocated slave PTY
`s' is already one of 0, 1, or 2, this causes unexpected closing of a
standard stream.  The same problem occurs when the file descriptor of
the master PTY (the variable `m') is one of 0, 1, or 2.

In this patch, the original master PTY (m) is closed before it would
be overwritten by duplicated slave PTYs.  The original slave PTY (s)
is closed only when it is not one of the stanrad streams.
2021-08-24 13:30:11 +02:00
randomuser 52a52e26bf add emoji support 2021-07-26 01:24:16 -05:00
Petar Kapriš 2ec571a30c Add 14th bit to XK_SWITCH_MOD bitmask
The bits of uint signal in an XKeyEvent which concern the key group (keyboard
layout) are bits 13 and 14, as documented here:
https://www.x.org/releases/X11R7.7/doc/libX11/XKB/xkblib.html#Groups_and_Shift_Levels
In the older version, only bit 13 was marked as part of XK_SWITCH_MOD, this
causes issues for users who have more than two keymaps. the 14th bit is not
in ignoremod, key sequences are not caught by match(), if they switch to a third
or fourth keyboard.
2021-07-18 11:44:56 +02:00
randomuser 283bf16877 i have made a terrible mistake 2021-07-16 16:46:44 -05:00
randomuser 9cdd36d51a make some changes to the sxhkd configuration 2021-07-16 16:44:32 -05:00
randomuser c348631ea3 make pressing j to go down no longer annoying 2021-07-16 15:38:36 -05:00
randomuser 68c544ca10 add line to zathurarc 2021-07-11 22:54:33 -05:00
randomuser e383c98cb3 add ftp handler 2021-06-23 22:59:44 -05:00
randomuser 9b3fee0735 add xbattmon as a startup thing 2021-06-20 10:13:41 -05:00
randomuser c8e2e8f761 rename the wal shortcut from wall to wal 2021-06-20 10:09:35 -05:00
randomuser 3c90aaf6be add colorscheme to zathurarc 2021-05-25 16:28:00 -05:00
randomuser 2d3c346def Revert "Revert "Revert "retheme vimb"""
This reverts commit 4adb628f09.
this is for realzies now lol
2021-05-25 15:34:25 -05:00
randomuser 4adb628f09 Revert "Revert "retheme vimb""
This reverts commit 13139c0f2d.
2021-05-25 15:34:01 -05:00
randomuser 13139c0f2d Revert "retheme vimb"
This reverts commit 2a0ba83c9e.
2021-05-25 15:33:47 -05:00
randomuser 2a0ba83c9e retheme vimb 2021-05-25 13:07:11 -05:00
randomuser 7f83a3a121 rebase targets in the makefile 2021-05-25 12:47:11 -05:00
randomuser e3766a6b42 add weather bindings to bspwm 2021-05-12 12:47:00 -05:00
randomuser 6c4e4eacff add some keybindings to sxhkd 2021-05-12 07:22:20 -05:00
randomuser 860b1c0123 derp 2021-05-11 22:10:36 -05:00
randomuser d12e3aef99 add features to sxhkdrc 2021-05-11 22:09:38 -05:00
randomuser 2152272c43 add feature to sxhkd 2021-05-10 17:28:05 -05:00
randomuser 77fab4db44 switch to makefile 2021-05-10 17:27:15 -05:00
randomuser 1dc8f1eb41 add makefile 2021-05-10 17:20:47 -05:00
randomuser 5a07d9154f add wallpapers 2021-05-10 17:19:25 -05:00
randomuser c72d2f627d initial commit 2021-05-10 17:16:09 -05:00
randomuser 1e8c705afe add installation script 2021-05-09 20:32:46 -05:00
randomuser b9b6e09595 remove the spell directory, it's a pain 2021-05-09 19:27:21 -05:00
randomuser 74e2249c7e add wyebadblock 2021-05-09 19:08:19 -05:00
randomuser 0e0db81238 add vimb sxhkd 2021-05-09 19:04:25 -05:00
randomuser 67c5391904 add sxrc 2021-05-09 18:53:52 -05:00
randomuser 9fa9749fe8 add bspwm 2021-05-09 18:52:30 -05:00
randomuser 4ad51ce885 init 2021-05-09 18:31:48 -05:00
Markus F.X.J. Oberhumer 4536f46cff Mild const-correctness improvements.
Only touch a few things, the main focus is to
improve code readability.
2021-05-06 18:21:10 +02:00
Hiltjo Posthuma 9e68fdbcdb fix: correctly encode mouse buttons >= 8 in X10 and SGR mode
These are typically mapped in X11 to the side-buttons (backward/forwards) on
the mouse. A comparison of the button numbers in SGR mode (first field):

st old:
0 1 2 64 65 66 67 68 69 70

st new (it is the same as xterm now):
0 1 2 64 65 66 67 128 129 130

A script to test and reproduce it, first argument is "h" (on) or "l" (off):

	#!/bin/sh
	printf '\x1b[?1000%s\x1b[?1006%s' "$1" "$1"

	for n in 1 2 3 4 5 6 7 8 9 10; do
		printf 'button %d\n' "$n"
		xdotool click "$n"
		printf '\n\n'
	done
2021-03-19 11:58:59 +01:00
Hiltjo Posthuma 4ef0cbd8b9 remove unused variable from previous patch 2020-10-18 11:18:03 +02:00
John Collis 28b4c822c5 ST: Add WM_ICON_NAME property support
Also added _NET_WM_ICON_NAME.
2020-10-18 11:17:11 +02:00
Hiltjo Posthuma fa253f077f bump version to 0.8.4 2020-06-19 11:27:17 +02:00
Hiltjo Posthuma b27a383a3a config.mk: use PKG_CONFIG in commented OpenBSD section 2020-06-17 23:49:40 +02:00
Hiltjo Posthuma 81067c65ea LICENSE: bump years 2020-06-17 23:49:40 +02:00
Hiltjo Posthuma f74a9df6e1 remove sixel stub code
Remove stub code that was used for an experiment of adding sixel code to st
from the commit f7398434.
2020-06-17 23:49:22 +02:00
Hiltjo Posthuma 818ec746f4 fix unicode glitch in DCS strings, patch by Tim Allen
Reported on the mailinglist:

"
I discovered recently that if an application running inside st tries to
send a DCS string, subsequent Unicode characters get messed up. For
example, consider the following test-case:

    printf '\303\277\033P\033\\\303\277'

...where:

  - \303\277 is the UTF-8 encoding of U+00FF LATIN SMALL LETTER Y WITH
    DIAERESIS (ÿ).
  - \033P is ESC P, the token that begins a DCS string.
  - \033\\ is ESC \, a token that ends a DCS string.
  - \303\277 is the same ÿ character again.

If I run the above command in a VTE-based terminal, or xterm, or
QTerminal, or pterm (PuTTY), I get the output:

    ÿÿ

...which is to say, the empty DCS string is ignored. However, if I run
that command inside st (as of commit 9ba7ecf), I get:

    ÿÿ

...where those last two characters are \303\277 interpreted as ISO8859-1
characters, instead of UTF-8.

I spent some time tracing through the state machines in st.c, and so far
as I can tell, this is how it works currently:

  - ESC P sets the "ESC_DCS" and "ESC_STR" flags, indicating that
    incoming bytes should be collected into the strescseq buffer, rather
    than being interpreted.
  - ESC \ sets the "ESC_STR_END" flag (when ESC is received), and then
    calls strhandle() (when \ is received) to interpret the collected
    bytes.
  - If the collected bytes begin with 'P' (i.e. if this was a DCS
    string) strhandle() sets the "ESC_DCS" flag again, confusing the
    state machine.

If my understanding is correct, fixing the problem should be as easy as
removing the line that sets ESC_DCS from strhandle():

diff --git a/st.c b/st.c
index ef8abd5..b5b805a 100644
--- a/st.c
+++ b/st.c
@@ -1897,7 +1897,6 @@ strhandle(void)
		xsettitle(strescseq.args[0]);
		return;
	case 'P': /* DCS -- Device Control String */
-		term.mode |= ESC_DCS;
	case '_': /* APC -- Application Program Command */
	case '^': /* PM -- Privacy Message */
		return;

I've tried the above patch and it fixes my problem, but I don't know if
it introduces any others.
"
2020-06-17 21:35:39 +02:00
Hiltjo Posthuma 9ba7ecf7b1 FAQ: fix single-buffer patch
rebase against master
2020-06-01 14:09:46 +02:00
Hiltjo Posthuma a2a704492b config.def.h: add an option allowwindowops, by default off (secure)
Similar to the xterm AllowWindowOps option, this is an option to allow or
disallow certain (non-interactive) operations that can be insecure or
exploited.

NOTE: xsettitle() is not guarded by this because st does not support printing
the window title. Else this could be exploitable (arbitrary code execution).
Similar problems have been found in the past in other terminal emulators.

The sequence for base64-encoded clipboard copy is now guarded because it allows
a sequence written to the terminal to manipulate the clipboard of the running
user non-interactively, for example:

printf '\x1b]52;0;ZWNobyBoaQ0=\a'
2020-05-30 22:06:15 +02:00
Hiltjo Posthuma 0f8b40652b FAQ: add some details about the w3m img hack
... and an example patch to switch from double-buffering to a single buffer.
2020-05-30 22:05:17 +02:00
Hiltjo Posthuma e6e2c6199f tiny style fix 2020-05-30 22:05:17 +02:00
Hiltjo Posthuma 94b8ec0021 Partially add back in "support REP (repeat) escape sequence"
Add the functionality back in for xterm compatibility, but do not expose the
capability in st.info (yet).

Some notes:

It was reverted because it caused some issues with ncurses in some
configurations, namely when using BSD padding (--enable-bsdpad, BSD_TPUTS) in
ncurses it caused issues with repeating digits.

A fix has been upstreamed in ncurses since snapshot 20200523. The fix is also
backported to OpenBSD -current.
2020-05-30 22:04:28 +02:00
Steve Ward dec6b530a4 Call xsetcursor to set win.cursor in main
In xsetcursor, remove "DEFAULT(cursor, 1)" because 0 is a valid value.
Increase max allowed value of cursor from 6 to 7 (st extension).
2020-05-24 13:45:42 +02:00
Hiltjo Posthuma 475a0a36cb Revert "support REP (repeat) escape sequence"
This reverts commit e8392b282c.

There is currently a bug in older ncurses versions (like on OpenBSD) where a
fix for a bug with REP is not backported yet. Most likely in tty/tty_update.c:

Noticed while using lynx (which uses ncurses/curses).
To reproduce using lynx: echo "Z0000000" | lynx -stdin

or using the program:

int
main(void)
{
	WINDOW *win;
	win = initscr();

	printw("Z0000000");

	refresh();

	sleep(5);

	return 0;
}

This prints "ZZZZZZZ" (incorrectly).
2020-05-16 21:06:13 +02:00
Avi Halachmi (:avih) e8392b282c support REP (repeat) escape sequence
The sequence \e[Nb prints the last printed char N (more) times if it's
printable, and it's ignored after newline or other control chars.

This is Ecma-048/ANSI-X3.6 sequence and not DEC VT. It's supported by
xterm, and ncurses uses it when possible, e.g. when TERM is xterm* (and
with this commit also st*).

xterm supports only codepoints<=255, possibly due to internal limits.
We support any value/codepoint which was placed in a cell.

To test:
- tput rep 65 4 -> prints 'AAAA'
- printf "\342\225\246\033[4b" -> prints U+2566 1+4 times.
2020-05-16 14:08:10 +02:00
Roberto E. Vargas f8afebdfa0 Add rin terminfo capability
Tianlin Qu discovered that st is missing rin (scroll back #1 lines).
2020-05-16 14:07:31 +02:00
k0ga bda9c9ffa6 Make shift+wheel behaves as shift+Prev/Next
St uses a very good hack where mouse wheel genereates ^Y and ^E,
that are the same keys that less and vi uses for backward and
fordward scrolling. Scroll, as many terminal emulators, use
shift+Prev/Next for scrolling, but it is also using ^E and ^Y
for scroling, characters that are reserved in the POSIX shell
in emacs mode for end of line and yanking, making scroll unsable
in st.

This patch adds a new hack, making shift+wheel returning the
same sequences than shift+Prev/Next, meaning that scroll or
any other similar program will not be able to differentiate
between them.
2020-05-16 12:37:14 +02:00
Jakub Leszczak 045a0fab4f Fix selection: selscroll 2020-05-12 15:38:17 +02:00
Jakub Leszczak 9c30066e73 Fix selection: ignore ATTR_WRAP when rectangular selection in getsel 2020-05-12 15:38:02 +02:00
Jakub Leszczak 8304d4f059 Fix selection: selclear in tputc 2020-05-12 15:37:59 +02:00
Hiltjo Posthuma 914fb825df code-style: add fallthrough comment
Patch by Steve Ward, thanks.
2020-05-09 14:43:31 +02:00
Hiltjo Posthuma cde480c693 optimize column width calculation and utf-8 encode for ASCII
In particular on OpenBSD and on glibc wcwidth() is quite expensive.
On musl there is little difference.
2020-05-09 14:11:25 +02:00
Hiltjo Posthuma 8211e36d28 fix for incorrect (partial) written sequences when libc wcwidth() == -1
Fix an issue with incorrect (partial) written sequences when libc wcwidth() ==
-1. The sequence is updated to on wcwidth(u) == -1:

	c = "\357\277\275"

but len isn't.

A way to reproduce in practise:

* st -o dump.txt
* In the terminal: printf '\xcd\xb8'
- This is codepoint 888, on OpenBSD it reports wcwidth() == -1.
- Quit the terminal.
- Look in dump.txt (partial written sequence of "UTF_INVALID").

This was introduced in:

"	commit 11625c7166
	Author: czarkoff@gmail.com <czarkoff@gmail.com>
	Date:   Tue Oct 28 12:55:28 2014 +0100

	    Replace character with U+FFFD if wcwidth() is -1

	    Helpful when new Unicode codepoints are not recognized by libc."

Change:

Remove setting the sequence. If this happens to break something, another
solution could be setting len = 3 for the sequence.
2020-05-09 14:07:52 +02:00
Hiltjo Posthuma 87545c612e tiny code-style and typo-fix in comment 2020-05-09 14:05:04 +02:00
Avi Halachmi (:avih) 1d59091065 auto-sync: draw on idle to avoid flicker/tearing
st could easily tear/flicker with animation or other unattended
output. This commit eliminates most of the tear/flicker.

Before this commit, the display timing had two "modes":

- Interactively, st was waiting fixed `1000/xfps` ms after forwarding
  the kb/mouse event to the application and before drawing.

- Unattended, and specifically with animations, the draw frequency was
  throttled to `actionfps`. Animation at a higher rate would throttle
  and likely tear, and at lower rates it was tearing big frames
  (specifically, when one `read` didn't get a full "frame").

The interactive behavior was decent, but it was impossible to get good
unattended-draw behavior even with carefully chosen configuration.

This commit changes the behavior such that it draws on idle instead of
using fixed latency/frequency. This means that it tries to draw only
when it's very likely that the application has completed its output
(or after some duration without idle), so it mostly succeeds to avoid
tear, flicker, and partial drawing.

The config values minlatency/maxlatency replace xfps/actionfps and
define the range which the algorithm is allowed to wait from the
initial draw-trigger until the actual draw. The range enables the
flexibility to choose when to draw - when least likely to flicker.

It also unifies the interactive and unattended behavior and config
values, which makes the code simpler as well - without sacrificing
latency during interactive use, because typically interactively idle
arrives very quickly, so the wait is typically minlatency.

While it only slighly improves interactive behavior, for animations
and other unattended-drawing it improves greatly, as it effectively
adapts to any [animation] output rate without tearing, throttling,
redundant drawing, or unnecessary delays (sounds impossible, but it
works).
2020-05-09 13:53:50 +02:00
Jan Klemkow d6ea0a1a61 replace exit(3) by _exit(2) in signal handler sigchld()
exit(3) is not async-signal-safe but, _exit(2) is.
This change prevents st to crash and dump core.
2020-04-30 01:21:21 +02:00
Hiltjo Posthuma 43a395ae91 bump version to 0.8.3 2020-04-27 13:56:25 +02:00
Ivan Tham 72e3f6c7c0 Update XIM cursor position only if changed
Updating XIM cursor position is expensive, so only update it when cursor
position changed.
2020-04-19 19:39:48 +02:00
Hiltjo Posthuma 33a9a45664 just remove the EOF message 2020-04-11 15:45:06 +02:00
Roberto E. Vargas Caballero 771bc401f7 Add st-mono terminfo entry
This entry is intended for monocolor display and it is very
helpful for color haters.
2020-04-11 15:23:23 +02:00
Hiltjo Posthuma d66bd405c0 config.def.h: add a comment for the scroll variable 2020-04-11 15:23:23 +02:00
Hiltjo Posthuma e997303502 Fix small typos 2020-04-11 15:23:23 +02:00
Quentin Rameau c1145268f6 Launch scroll program with the default shell 2020-04-11 15:23:23 +02:00
Roberto E. Vargas Caballero 0b73612c0d Update FAQ with the last modifications 2020-04-11 15:23:23 +02:00
Roberto E. Vargas Caballero 019449a7e6 Add terminfo entries for backspace mode
St used to use backspace as BS until the commit 230d0c8, but due
to general lack of knowledge of lusers, we moved to the most common
configuration in linux to avoid answering the same question 3 times
per month. With the most common configuration we have a backspace
that returns a DEL, and we have a Delete key that doesn't return a
DEL character neither a BS.

When dealing with devices connected using a serial line (or even
with Plan9) it is more common Backspace as BS and Delete as DEL. For
this reason, st is not always the best tool when you talk with a
serial device.

This patch adds new terminfo entries for Backspace as BS and Delete
as DEL. A patch for confg.h is also added, to make easier switch
between both configurations.
2020-04-11 15:23:23 +02:00
Roberto E. Vargas Caballero fbae700a3f Fix style issue 2020-04-11 15:23:23 +02:00
Roberto E. Vargas Caballero e52319cc7d ttyread: test for EOF while reading tty
When a read operation returns 0 then it means that we arrived to the end of the
file, and new reads will return 0 unless you do some other operation such as
lseek(). This case happens with USB-232 adapters when they are unplugged.
2020-04-11 15:23:23 +02:00
Roberto E. Vargas Caballero 21e0d6e8b8 Add support for scroll(1)
Scroll is a program that stores all the lines of its child and be used in st as
a way of implementing scrollback.

This solution is much better than implementing the scrollback in st itself
because having a different program allows to use it in any other program
without doing modifications to those programs.
2020-04-11 15:23:20 +02:00
Hiltjo Posthuma 5703aa0390 make argv0 not static, fixes a warning with tcc
Reported by Aajonus, thanks!
2020-04-10 12:12:43 +02:00
Avi Halachmi (:avih) 28ad288399 mouseshortcuts: fix custom modifier on release
This line didn't work at mshortcuts at config.h:

  /*  mask       button   function  arg       release */
    { ShiftMask, Button2, selpaste, {.i = 0}, 1 },

and now it does work.

The issue was that XButtonEvent.state is "the logical state ... just prior
to the event", which means that on release the state has the Button2Mask
bit set because button2 was down just before it was released.

The issue didn't manifest with the default shift + middle-click on release
(to override mouse mode) because its specified modifier is XK_ANY_MOD, at
which case match(...) ignores any specific bits and simply returns true.

The issue also doesn't manifest on press, because prior to the event
Button<N> was not down and its mask bit is not set.

Fix by filtering out the mask of the button which we're currently matching.

We could have said "well, that's how button events behave, you should
use ShiftMask|Button2Mask for release", but this both not obvious to
figure out, and specifically here always filtering does not prevent
configuring any useful modifiers combination. So it's a win-win.
2020-04-02 14:41:03 +02:00
Ivan Tham 51e19ea11d Remove explicit XNFocusWindow
XCreateIC ICValues default XNFocusWindow to XNClientWindow if not
specified, it can be omitted since it is the same.

From the documentation
https://www.x.org/releases/current/doc/libX11/libX11/libX11.html

> Focus Window
>
> The XNFocusWindow argument specifies the focus window. The primary
> purpose of the XNFocusWindow is to identify the window that will receive
> the key event when input is composed.
>
> When this XIC value is left unspecified, the input method will use the
> client window as the default focus window.
2020-02-19 00:46:20 +01:00
Quentin Rameau 26cdfebf31 x: fix XIM handling
Do not try to set specific IM method, let the user specify it with
XMODIFIERS.

If the requested method is not available or opening fails, fallback to
the default input handler and register a handler on the new IM server
availability signal.

Do the same when the input server is closed and (re)started.
2020-02-02 22:56:51 +01:00
Quentin Rameau cd785755f2 x: check we still have an XIC context before accessing it 2020-02-02 22:56:51 +01:00
Quentin Rameau 2cb539142b x: do not instantiate a new nested list on each cursor move 2020-02-02 22:56:51 +01:00
Quentin Rameau 99de333951 x: move IME variables into XWindow ime embedded struct 2020-02-02 22:56:51 +01:00
Ivan Tham 895e5b50a8 Increase XmbLookupString buffer
Current buffer is too short to input medium to long sentences from IME.
Input with longer text will show the wrong input, taking 64 instead of
32 bytes should be enough for most of the cases. Broken cases before,

Chinese (taken from song 也可以)
可不可以轻轻的松开自己

Japanese (taken from bootleggers rom quote)
あなたは家のように感じる
2020-01-18 14:21:50 +01:00
Hiltjo Posthuma 384830110b update FAQ
- add common question about the w3m image drawing hack.
- remove some bad advise about $TERM.
- change some links to https.
2019-11-17 20:04:52 +01:00
Avi Halachmi (:avih) 2e54a21b5a OSC 52 - copy to clipboard: don't limit to 382 bytes
Strings which an application sends to the terminal in OSC, DCS, etc
are typically small (title, colors, etc) but one exception is OSC 52
which copies text to the clipboard, and is used for instance by tmux.

Previously st cropped these strings at 512 bytes, which for OSC 52
limited the copied text to 382 bytes (remaining buffer space before
base64). This made it less useful than it can be.

Now it's a dynamic growing buffer. It remains allocated after use,
resets to 512 when a new string starts, or leaked on exit.

Resetting/deallocating the buffer right after use (at strhandle) is
possible with some more code, however, it doesn't always end up used,
and to cover those cases too will require even more code, so resetting
only on new string is good enough for now.
2019-11-10 22:45:54 +01:00
Hiltjo Posthuma 289c52b7aa CSIEscape, STREscape: use size_t for buffer length 2019-11-10 22:45:54 +01:00
Avi Halachmi (:avih) 7ceb3d1f72 STREscape: don't trim prematurely
STRescape holds strings in escape sequences such as OSC and DCS, and
its buffer is 512 bytes.

If the input is too big then trailing chars are ignored, but the test
was off-by-1 such that it took 510 chars instead of 511 (before a
terminating NULL is added).

Now the full size can be utilized.
2019-11-10 22:45:54 +01:00
Avi Halachmi (:avih) ea4d933ed9 base64dec: don't read out of bounds
Previously, base64dec checked terminating input '\0' every 4 calls to
base64dec_getc, where the latter progressed one or more chars on each
call, and could read past '\0' in the way it was used.

The input to base64dec currently comes only from OSC 52 escape seq
(copy to clipboard), and reading past '\0' or even past the buffer
boundary was easy to trigger.

Also, even if we could trust external input to be valid base64, there
are different base64 standards, and not all of them require padding
to 4 bytes blocks (using trailing '=' chars).

It didn't affect short OSC 52 strings because the buffer is initialized
to 0's, so typically it did stop within the buffer, but if the string
was trimmed to fit (the buffer is 512 bytes) then it did also read past
the end of the buffer, and the decoded suffix ended up arbitrary.

This patch makes base64dec_getc not progress past '\0', and instead
produce fake trailing padding of '='.

Additionally, at base64dec, if padding is detected at the first or
second byte of a quartet, then we identify it as invalid and abort
(a valid quartet has at least two leading non-padding bytes).
2019-11-10 22:45:54 +01:00
Sebastian J. Bronner 83866428de Fix tmux terminfo extensions Se and Ss
The tmux terminfo extensions Ss and Se are currently specified as
booleans in `st.info`. They should be strings. See
eeedb43ae8/tty-term.c
lines 254 and 265.

I have used the values from
https://invisible-island.net/ncurses/terminfo.src.html#toc-_S_I_M_P_L_E_T_E_R_M
for this patch.
2019-11-05 19:51:35 +01:00
Ingo Lohmar 1f09f0b0bb apply hints before initial mapping (ICCCM)
For WM_CLASS this is mentioned in the ICCCM docs
https://tronche.com/gui/x/icccm/sec-4.html#s-4.1.2.5
(third sentence).

When changing the WM_CLASS from the command line, this is necessary for
window managers to pick it up before applying class-based rules.
2019-10-26 11:47:24 +02:00
Avi Halachmi (:avih) a2c479c4c8 mouse shortcuts: allow using forcemousemod (e.g. shift)
The recent mouse shurtcuts commits allow customization, but ignore
forcemousemod mask (default: shift) as a modifier, for no good reason
other than following the behavior of the KB shortcuts.

Allow using forcemousemod too, which now can be used to invoke
different shortcuts, though the automatic effect of forcemousemod will
be lost for buttons which use mask with forcemousemod.

E.g. the default is:

static uint forcemousemod = ShiftMask;
...
{ XK_ANY_MOD,           Button4, ttysend,        {.s = "\031"} },
...

where ttysend will be invoked for button4 with any mod when not in mouse
mode, and with shift when in mouse mode.

Now it's possible to do this:
{ ShiftMask,            Button4, ttysend,        {.s = "foo"} },
{ XK_ANY_MOD,           Button4, ttysend,        {.s = "\031"} },

Which will invoke ttysend("foo") while shift is held and ttysend("\031")
otherwise. Shift still overrides mouse mode, but will now send "foo".

Previously with this setup the second binding was always invoked
because the forceousemod mask was always removed from the event.

Buttons which don't use forcemousemod behave the same as before.

This is useful e.g. for the scrollback mouse patch, which wants to
configure shift+wheel for scrollback, while keeping the normal behavior
without shift.
2019-10-24 15:34:25 +02:00
Avi Halachmi (:avih) d2b75db8d7 mouse shortcuts: don't hardcode selpaste
Because selpaste is activated on release, a release flag was added to
mouse shortcuts which controls whether activation is on press/release,
and selpaste binding to button2 was moved to config.h .

button1 remains the only hardcoded mouse button - for selection + copy.
2019-10-13 21:46:31 +02:00
Avi Halachmi (:avih) b6d280de6d mouse shortcuts: allow override for all shortcuts
Allow forceselmod to override all mouse shortcuts rather than only
selection, and rename it to forcemousemod as it's now more appropriate.

This will affect mouse shortcuts which use mask other than XK_ANY_MOD.

This does not affect the default behavior because the default mouse
shortcuts (wheel) use XK_ANY_MOD, where forceselmod already activated
the override also before this change.

Previously, if a mouse shortcut was configured with a specific mod and
forceselmod was held, then the shortcut did not execute unless the
configured mod included forceselmod.
2019-10-13 21:46:31 +02:00
Avi Halachmi (:avih) ba7f4d69af mouse shortcuts: allow same functions as kb shortcuts
Previously mouse shortcuts supported only ttywrite.

This required adding an "Arg" function ttysend - which does what the
original mouse shortcuts did.
2019-10-13 21:46:31 +02:00
Hiltjo Posthuma 2b8333f553 config.def.h: remove crlf value section
this is not used anymore.

patch sent as an ed script using RFC2549 by k0ga.
2019-08-26 17:58:47 +02:00
Hiltjo Posthuma caa1d8fbea FAQ: add entry about color emoji Xft bug
This has been asked many times on IRC and the mailinglist. Make it easier to
find information about this particular Xft issue by adding it to the FAQ.
2019-05-17 13:00:10 +02:00
Avi Halachmi (:avih) f1546cf9c1 selection: fix view to match actual selection on first cell 2019-04-14 13:50:20 +02:00
Hiltjo Posthuma 21367a040f revert part of commit add0211522
"use iswspace()/iswpunct() to find word delimiters

    this inverts the configuration logic: you no longer provide a list of
    delimiters -- all space and punctuation characters are considered
    delimiters, unless listed in extrawordchars."

Feedback from IRC and personal preference.
2019-03-15 20:40:16 +01:00
Hiltjo Posthuma b650256044 dont print color warning on color reset OSC 104 without parameter
also print explicitly "(null)" when printf "%s" p=NULL.

noticed when exiting mutt: printf '\x1b]104\x07'
2019-03-15 14:47:08 +01:00
Hiltjo Posthuma 9acec468fb minor code-style, initialize var at the top of function 2019-03-15 14:42:50 +01:00
Hiltjo Posthuma 927621f6da config.def.h: tweak extra worddelimiters
This changes the selection more like xterm.
To test try: "find /" and select a path.
2019-03-15 12:31:54 +01:00
Lauri Tirkkonen add0211522 use iswspace()/iswpunct() to find word delimiters
this inverts the configuration logic: you no longer provide a list of
delimiters -- all space and punctuation characters are considered
delimiters, unless listed in extrawordchars.
2019-03-15 12:25:13 +01:00
Lauri Tirkkonen d5efd256aa replace utf8strchr with wcschr 2019-03-15 12:24:13 +01:00
Lauri Tirkkonen 75b4ba4b4b be silent about explicitly unhandled mouse modes 2019-03-13 17:51:58 +01:00
Hiltjo Posthuma ed68fe7dce simplify (greedy) font caching allocating a bit
POSIX says:
"If ptr is a null pointer, realloc() shall be equivalent to malloc() for the
 specified size."
2019-03-03 11:29:43 +01:00
Hiltjo Posthuma 4e0135afec style: remove double empty newlines 2019-03-03 11:23:54 +01:00
magras a8cb8e9454 fix use after free in font caching algorithm
Current font caching algorithm contains a use after free error. A font
removed from `frc` might be still listed in `wx.specbuf`. It will lead
to a crash inside `XftDrawGlyphFontSpec()`.

Steps to reproduce:
$ st -f 'Misc Tamsyn:scalable=false'
$ curl https://www.cl.cam.ac.uk/~mgk25/ucs/examples/UTF-8-demo.txt

Of course, result depends on fonts installed on a system and fontconfig.
In my case, I'm getting consistent segfaults with different fonts.

I replaced a fixed array with a simple unbounded buffer with a constant
growth rate. Cache starts with a capacity of 0, gets increments by 16,
and never shrinks. On my machine after `cat UTF-8-demo.txt` buffer
reaches a capacity of 192. During casual use capacity stays at 0.
2019-03-03 11:18:31 +01:00
Ivan Tham e85b6b6466 better Input Method Editor (IME) support
Features:

- Allow input methods swap with hotkey (E.g. left ctrl + left shift).
- Over-the-spot pre-editing style, pre-edit data placed over insertion point.
- Restart IME without segmentation fault.

TODO:

- Automatically pickup IME if st started before IME
2019-02-12 18:45:15 +01:00
Hiltjo Posthuma 75f92eb348 bump version to 0.8.2 2019-02-09 12:48:39 +01:00
Hiltjo Posthuma 3be4cf11d7 config: add Shift+Insert as selpaste() again
This was changed before in:
commit 20f713548d on Wed Jan 25 19:17:38 2017
2019-01-10 18:16:17 +01:00
Paride Legovini 16d98738e7 Let the user specify CPPFLAGS
This complements the work done in d4928ed, allowing the user to specify
the preprocessor flags with the CPPFLAGS environment variable. This is
useful for example to specify preprocessor macros with -D.

CFLAGS could be used instead, but CPPFLAGS is more correct and is expected
to be honored in some cases. For example, the helper scripts to build
Debian packages make use of CPPFLAGS, but the variable is currently
being ignored unless manually appended to CFLAGS.
2019-01-10 18:13:13 +01:00
Paride Legovini e23acb9188 Set the path of pkg-config in a variable instead of hardcoding it
In this way the path of pkg-config can be overridden from the command
line. This is useful for example when cross-compiling.
2019-01-04 16:00:54 +01:00
Hiltjo Posthuma 7e19e11676 Makefile: fix dependencies on config.h
patch by Younes Khoudli (changed slightly). Thanks
2019-01-04 12:33:01 +01:00
Lauri Tirkkonen 096b125db7 output child WEXITSTATUS/WTERMSIG on abnormal termination 2018-12-11 18:36:02 +01:00
Hiltjo Posthuma d7bf023b2f fix memory leak in xloadcols()
reported by Avi Halachmi (:avih)" <avihpit@yahoo.com>

patch slightly changed by me.
2018-11-04 14:35:07 +01:00
Hiltjo Posthuma b4d68d4daa st: small typofix in comment 2018-11-04 14:30:56 +01:00
Hiltjo Posthuma 30ec9a3dc3 small code-style fix 2018-09-11 19:06:35 +02:00
Quentin Rameau 67d0cb65d0 Remove the ISO 14755 feature
And move it to the patches section.
Keeping it would force to add an exec pledge on OpenBSD, and some
people think it's bloated, so bye!
2018-09-11 19:05:55 +02:00
Hiltjo Posthuma 4f4bccd162 Revert "Simplify cursor color handling"
This reverts commit 1911c9274d.
2018-07-17 20:01:58 +02:00
Hiltjo Posthuma 8ed7a4b3b7 Revert "Make cursor follow text color"
This reverts commit b51bcd5553.
2018-07-17 20:01:57 +02:00
Hiltjo Posthuma 732be223ee Revert "Fix crash when cursor color is truecolor"
This reverts commit 5535c1f04c.
2018-07-17 20:01:54 +02:00
Jules Maselbas 5535c1f04c Fix crash when cursor color is truecolor
Reported-by: Ivan Tham <pickfire@riseup.net>
2018-07-15 18:16:52 +02:00
Jules Maselbas b51bcd5553 Make cursor follow text color 2018-07-14 12:49:37 +02:00
Jules Maselbas 1911c9274d Simplify cursor color handling 2018-07-14 12:49:35 +02:00
Jules Maselbas 29f341da7c Fix crash on resize
Prevent to realloc xw.specbuc with a negative number of col.
Add proper hints for the minimal size, for one character.
2018-06-30 20:51:46 +02:00
Hiltjo Posthuma dc3b5babf1 config.mk: remove extra newline before EOF 2018-06-02 17:11:14 +02:00
Hiltjo Posthuma 235a783e03 code-style for pledge(2)
feedback from Klemens, thanks
2018-05-25 13:04:09 +02:00
Hiltjo Posthuma 30ce2cc002 Pledge on OpenBSD 2018-05-25 11:59:28 +02:00
Hiltjo Posthuma 041912a791 error message style and use strerror in a few places 2018-03-29 18:30:05 +02:00
Hiltjo Posthuma bd3f7fd842 st -v: remove years and copyright text 2018-03-29 18:18:30 +02:00
Daniel Tameling 74cff67bd7 set sel.alt in selstart instead of selextend 2018-03-29 18:15:29 +02:00
Hiltjo Posthuma 6f0f2b7ec3 bump version to 0.8.1 2018-03-20 21:29:10 +01:00
Hiltjo Posthuma f4020b2cc4 fix regression by selecting clipboard text
"restore the old behaviour that the primary doesn't get deleted by a simple
left click"

Patch by Daniel Tameling <tamelingdaniel@gmail.com>, thanks!
2018-03-20 21:25:30 +01:00
Hiltjo Posthuma a5a928bfc1 don't modify argv, use a counter
on some platforms (OpenBSD) this changes the exposed argv in tools using
the kvm_* interface, such as ps and pgrep.
2018-03-20 21:22:27 +01:00
Hiltjo Posthuma 6ac8c8aa50 selextend: clarify: !sel.mode == SEL_IDLE 2018-03-17 13:48:29 +01:00
Hiltjo Posthuma 5345db3c9b clipcopy: no need to check for free(NULL), set to NULL after free 2018-03-17 13:48:10 +01:00
Hiltjo Posthuma 7648697f71 minor code-style: whitespace fixes 2018-03-16 16:45:58 +01:00
Quentin Rameau 0b507bb731 Fix title initialization 2018-03-16 16:44:30 +01:00
Quentin Rameau e7ef3c4ce9 Fix regression from 69e32a6 when setting title. 2018-03-16 16:44:30 +01:00
Hiltjo Posthuma 8ab629031b LICENSE: fix a few years 2018-03-14 20:08:00 +01:00
Hiltjo Posthuma a712c2dd18 update LICENSE: major contributors 2018-03-14 20:00:35 +01:00
Hiltjo Posthuma 0f245dfeb9 Makefile: add all files to make dist 2018-03-14 19:54:50 +01:00
Hiltjo Posthuma 49a4f91fc5 bump version to 0.8 2018-03-14 19:50:37 +01:00
Hiltjo Posthuma c5ba9c025b use math.h for ceilf 2018-03-09 15:36:38 +01:00
Hiltjo Posthuma b81888ee7d xhints: no need to initialize sizeh 2018-03-09 15:36:25 +01:00
Hiltjo Posthuma 8b8255ac0e regression: include termios.h for tcsendbreak etc 2018-03-09 15:35:34 +01:00
Devin J. Pohly 20e0da7f14 General cleanup
Simplifies logic in a couple places and removes a redundant function
call.

Signed-off-by: Devin J. Pohly <djpohly@gmail.com>
2018-02-25 21:56:26 -06:00
Devin J. Pohly 403c57ebb5 Clean up #includes
Signed-off-by: Devin J. Pohly <djpohly@gmail.com>
2018-02-25 21:56:26 -06:00
Devin J. Pohly e0215d5377 Reduce visibility wherever possible
When possible, declare functions/variables static and move struct
definitions out of headers.  In order to allow utf8decode to become
internal, use codepoint for DECSCUSR extension directly.

Signed-off-by: Devin J. Pohly <djpohly@gmail.com>
2018-02-25 21:56:26 -06:00
Devin J. Pohly 30683c70ab Limit usage of extern to config.h globals
Prefer passing arguments to declaring external global variables.  The
only remaining usage of extern is for config.h variables which are
needed in st.c instead of x.c (where it is now included).

Signed-off-by: Devin J. Pohly <djpohly@gmail.com>
2018-02-25 21:56:26 -06:00
Devin J. Pohly a3beb626d2 Remove x.c dependency on term
The xinit function only needs to the rows/cols, so pass those in rather
than accessing term directly.  With a bit of arithmetic, we are able to
avoid the need for term.row and term.col in x2col, y2row, and
xdrawglyphfontspecs as well, completing the removal.

Term is now fully internal to st.c.

Signed-off-by: Devin J. Pohly <djpohly@gmail.com>
2018-02-25 21:56:26 -06:00
Devin J. Pohly a5dc1b4697 Pull term references out of xdrawcursor
Gradually reducing x.c dependency on Term object.  Old and new cursor
glyph/position are passed to xdrawcursor.  (There may be an opportunity
to refactor further if we can unify "clear old cursor" and "draw new
cursor" functionality.)

Signed-off-by: Devin J. Pohly <djpohly@gmail.com>
2018-02-25 21:56:26 -06:00
Devin J. Pohly 88d8293fb4 Move win-agnostic parts of draw/drawregion to st.c
Introduces three functions to encapsulate X-specific behavior:
 * xdrawline: draws a portion of a single line (used by drawregion)
 * xbegindraw: called to prepare for drawing (will be useful for e.g.
   Wayland) and returns true if drawing should happen
 * xfinishdraw: called to finish drawing (used by draw)

Signed-off-by: Devin J. Pohly <djpohly@gmail.com>
2018-02-25 21:56:26 -06:00
Devin J. Pohly 05c66cb37d Split mode bits between Term and TermWindow
Moves the mode bits used by x.c from Term to TermWindow, absorbing
UI/input-related mode bits (visible/focused/numlock) along the way.

This is gradually reducing external references to Term.  Since
TermWindow is already internal to x.c, we add xsetmode() to allow st to
modify window bits in accordance with escape sequences.

IS_SET() is redefined accordingly (term.mode in st.c, win.mode in x.c).

Signed-off-by: Devin J. Pohly <djpohly@gmail.com>
2018-02-25 21:56:26 -06:00
Devin J. Pohly 33201ac65f Move CRLF input processing into ttywrite
This also allows us to remove the crlf field from the Key struct, since
the only difference it made was converting "\r" to "\r\n" (which is now
done automatically in ttywrite).  In addition, MODE_CRLF is no longer
referenced from x.c.

Signed-off-by: Devin J. Pohly <djpohly@gmail.com>
2018-02-25 21:53:24 -06:00
Devin J. Pohly 52d6fb1ab1 Move terminal echo logic into st.c
The only thing differentiating ttywrite and ttysend was the potential
for echo; make this a parameter and remove ttysend.

Signed-off-by: Devin J. Pohly <djpohly@gmail.com>
2018-02-25 21:53:24 -06:00
Devin J. Pohly cfc7acdfd9 Move remaining selection mode logic into selextend
The "done" parameter indicates a change which finalizes the selection
(e.g. a mouse button release as opposed to motion).

Signed-off-by: Devin J. Pohly <djpohly@gmail.com>
2018-02-25 21:53:24 -06:00
Devin J. Pohly bcb5d3adbe Move terminal-related selection logic into st.c
The front-end determines information about mouse clicks and motion, and
the terminal handles the actual selection start/extend/dirty logic by
row and column.

While we're in the neighborhood, we'll also rename getbuttoninfo() to
mousesel() which is, at least, less wrong.

Signed-off-by: Devin J. Pohly <djpohly@gmail.com>
2018-02-25 21:53:24 -06:00
Devin J. Pohly 5683b1f80c Move X-specific selection info into XSelection
Data about PRIMARY/CLIPBOARD and clicks are part of the front-end, not
the terminal.

Signed-off-by: Devin J. Pohly <djpohly@gmail.com>
2018-02-25 21:53:24 -06:00
Devin J. Pohly 138caf294e Have selected() check whether selection exists
Signed-off-by: Devin J. Pohly <djpohly@gmail.com>
2018-02-25 21:53:24 -06:00
Devin J. Pohly d84f3f4bd1 Rely on ttyresize to set tty size
This removes ttynew's dependency on cresize being called first, and then
allows us to absorb the ttyresize call into cresize (which always
precedes it).

Signed-off-by: Devin J. Pohly <djpohly@gmail.com>
2018-02-25 21:53:24 -06:00
Devin J. Pohly 8b564c1a3f Remove X and fontconfig from st.c
None of the X-related includes are needed any longer.  In addition, move
the X modifier defines into x.c, as they are not used outside.

Signed-off-by: Devin J. Pohly <djpohly@gmail.com>
2018-02-25 21:53:24 -06:00
Devin J. Pohly 3bb900cd6c Remove Time argument from xsetsel
This is an X type and should be internal to x.c.

The selcopy() function was a single line and only used in one place, so
it was inlined to reduce LOC.

Signed-off-by: Devin J. Pohly <djpohly@gmail.com>
2018-02-25 21:53:24 -06:00
Devin J. Pohly 323d38da20 Make win variable internal to x.c
There was only a single reference to the `win` variable in st.c, so
exporting that to x.c allows us to rid ourselves of another extern.

Signed-off-by: Devin J. Pohly <djpohly@gmail.com>
2018-02-25 21:53:24 -06:00
Devin J. Pohly 416dd25727 Move X-related config.h types into x.c
No need to expose Shortcut, MouseShortcut, and Key anymore.

Signed-off-by: Devin J. Pohly <djpohly@gmail.com>
2018-02-25 21:53:24 -06:00
Devin J. Pohly 75c9a0ee1d Remove unneeded array-length variables
These were only used in x.c, which now has direct visibility of the
config.h arrays.

Signed-off-by: Devin J. Pohly <djpohly@gmail.com>
2018-02-25 21:53:24 -06:00
Devin J. Pohly 428f01969a Inline clipboard functions
No need to keep a function that only calls another function in the same
file.

Signed-off-by: Devin J. Pohly <djpohly@gmail.com>
2018-02-25 21:53:24 -06:00
Devin J. Pohly 65976c1a29 Move config.h include from st.c to x.c
config.h includes references to KeySyms and other X stuff.  Until we
come up with a cleaner way to separate configuration, it is simpler
(leads to more code removal) to have this here.

Signed-off-by: Devin J. Pohly <djpohly@gmail.com>
2018-02-25 21:53:24 -06:00
Devin J. Pohly 32d3b1d00f Factor out equivalent code from ttyread/ttysend
The echo-to-terminal portions of ttyread and ttysend were actually doing
the same thing.  New function twrite() now handles this.  The parameter
show_ctrl determines whether control characters are shown as "^A".  This
was the only difference between tputc and techo, and techo is now unused
and removed.

(This commit should not change st's behaviour.)

Signed-off-by: Devin J. Pohly <djpohly@gmail.com>
2018-02-25 21:53:24 -06:00
Devin J. Pohly 69e32a61df Move opt_* into same file as main()/run()
This commit is purely about reducing externs and LOC.  If the main and
run functions ever move elsewhere (which will probably make sense
eventually), these should come along with them.

Signed-off-by: Devin J. Pohly <djpohly@gmail.com>
2018-02-25 21:53:24 -06:00
Devin J. Pohly ed132e1127 Move key-matching functions into x.c
Modifiers and keysyms are specific to X, and the functions match and
kmap are only used in x.c.  Needed to global-ize the key arrays and
lengths from config.h (for now).

Signed-off-by: Devin J. Pohly <djpohly@gmail.com>
2018-02-25 21:53:24 -06:00
Devin J. Pohly dbe8676d7d Pass new dimensions into ttyresize
This removes another reference to TermWindow from st.c.

Signed-off-by: Devin J. Pohly <djpohly@gmail.com>
2018-02-25 21:53:24 -06:00
Devin J. Pohly a8314643b1 Move window-manipulating functions into x.c
xresize is now internal to x.c

Signed-off-by: Devin J. Pohly <djpohly@gmail.com>
2018-02-25 21:53:24 -06:00
Devin J. Pohly a09138afa5 Move font/fontspec variables into x.c and XWindow
Signed-off-by: Devin J. Pohly <djpohly@gmail.com>
2018-02-25 21:53:24 -06:00
Devin J. Pohly 626b0ae40c Move window urgency handling entirely into x.c
This allows us to make xseturgency internal.

Signed-off-by: Devin J. Pohly <djpohly@gmail.com>
2018-02-25 21:53:24 -06:00
Devin J. Pohly d5275012b4 Move zoom functions into x.c
This makes x(un)loadfonts internal to x.c.  Needed to reorder includes
and move a typedef to keep the compiler happy.

Signed-off-by: Devin J. Pohly <djpohly@gmail.com>
2018-02-25 21:53:24 -06:00
Devin J. Pohly 3518dba2a5 Move usage() to be with run() in x.c
run/usage/xinit are now all internal to x.c

Signed-off-by: Devin J. Pohly <djpohly@gmail.com>
2018-02-25 21:53:24 -06:00
Devin J. Pohly 3e44ee5569 Call xsetenv() in main process instead of child
This makes xsetenv internal to x.c, and allows iso14755's external
command to use $WINDOWID instead of having to snprintf it again.  (The
same benefit will apply to the externalpipe patch.)  The xwinid function
is no longer needed.

Signed-off-by: Devin J. Pohly <djpohly@gmail.com>
2018-02-25 21:53:24 -06:00
Benno Fünfstück 1f24bde82b Fix color with FAINT attribute
The alpha value needs to be initialized as well.
2017-12-26 22:54:44 +01:00
Benno Fünfstück e829e13bb1 Apply ATTR_REVERSE after ATTR_FAINT
An example where the new behaviour makes more sense:

Suppose some text is formatted with ATTR_FAINT for red for the foreground, so it
is rendered in a dark red. In that case, when selected with the mouse, the
intended behaviour is that foreground and background color are swapped: so the
selection should be rendered in dark red and the text in the default background
color.

Before this patch, what happened was that the selection would be in normal red
and the text in the darkened background color, making it almost unreadable.

For an example application that uses the FAINT attribute, try dmesg from
util-linux with color support, it uses FAINT for segfault messages.
2017-12-26 22:54:06 +01:00
George Ornbo c1d23afa9c Fix FAQ typo 2017-12-21 19:17:40 +01:00
Paride Legovini 0ac685fc01 Fix manpage typo
Signed-off-by: Paride Legovini <pl@ninthfloor.org>
2017-10-10 18:08:42 +02:00
Gary Allen Vollink b1338e91ed Add an error for XftFontOpenPattern failure. 2017-09-15 11:27:13 +02:00
Hiltjo Posthuma b2ac917753 Revert "Revert "fixed STLDFLAG order in broken st Makefile""
This reverts commit 274d46ace0.

Sorry, the original commit was correct after all. It allows has the
correct link order and supports static-linking also.

Just a reminder: it is important to give a (brief) rationale of the
patch intentions.
2017-09-15 11:16:37 +02:00
Suraj N. Kurapati ee5cc8e903 base64dec: skip non-printable characters like \r\n
Non-printable characters, such as line breaks, in a base64 encoded
string violate the "string length must be a multiple of four" rule.

This patch pads the result buffer by one extra unit of four bytes,
and skips over non-printable characters found in the input string.
2017-09-15 11:13:17 +02:00
Hiltjo Posthuma 274d46ace0 Revert "fixed STLDFLAG order in broken st Makefile"
This reverts commit 7f990328e4.

this was wrong as pointed out by k0ga:
"STLDFLAGS is about flags to the linker, for example -L
not about -l for that reason it must go before the object list".
2017-09-13 22:40:36 +02:00
Hiltjo Posthuma 9c61f29bb7 Revert "make clipboard patch obsolete"
This reverts commit 77c51c5a6b.

Having multiple clipboards are useful, for example for plumber scripts.
I've discussed this on IRC and it is useful to have.
2017-09-02 13:52:33 +02:00
Anselm R Garbe 77c51c5a6b make clipboard patch obsolete 2017-09-01 09:48:24 +02:00
Anselm R Garbe 7f990328e4 fixed STLDFLAG order in broken st Makefile 2017-07-23 11:17:26 +02:00
Quentin Rameau 8dacdfbab1 Revert "Add bold off SGR"
This reverts commit 6cb6d61525.
This wasn't a useful thing after all.
2017-07-12 13:29:31 +02:00
Quentin Rameau c0882f2ed1 Add dim/smxx/rmxx to terminfo, remove duplicate kich1 2017-07-12 13:29:30 +02:00
Quentin Rameau d4928edba0 Let the user specify C and LD FLAGS 2017-07-12 00:28:11 +02:00
Quentin Rameau fabd4602b3 Do not obfuscate what make is doing.
Change some styling too while we're at it.
2017-07-12 00:28:10 +02:00
Marc André Tanner b331da550b Add color change terminfo capabilities 2017-06-03 22:28:35 +02:00
Quentin Rameau 6cb6d61525 Add bold off SGR 2017-06-03 22:28:35 +02:00
greg.reagle@umbc.edu 5a10aca702 st.1: modify man page to accurately reflect default keybindings
Attached.

===> 2/ (text/x-patch) [file]
	cp /mail/fs/mbox/298/2/body /usr/k0ga/0001-st.1-modify-man-page-to-accurately-reflect-default-k.patch

From 265db94b1eca5850d484f86b7db4af8e57822cfe Mon Sep 17 00:00:00 2001
From: Greg Reagle <greg.reagle@umbc.edu>
Date: Sun, 9 Apr 2017 23:05:47 -0400
Subject: [PATCH] st.1: modify man page to accurately reflect default
 keybindings
2017-04-10 18:32:10 +02:00
Quentin Rameau 745c40f8b0 Simplify how we keep ATTRs under cursor
Thanks to tarug0 for the suggestion/patch.
2017-04-04 18:23:45 +02:00
Alexander Krotov 149c0d3aed Fix commented out code 2017-03-29 18:46:20 +02:00
Nils Reuße f2bfd513b1 keep some glyph modes for the cursor
st currently does not keep any mode for the cursor that was active
in the underlying glyph (e.g. italic text), the mode is always
ATTR_NULL [1].  At [2] you can find a screenshot that shows the
implications.  Other terminals (at least vte-based, such as
XFCE-terminal) keep some modes for the cursor.  I find the current
behaviour very disruptive, so here is a patch that keeps a few
(arbitrarily chosen) modes for the cursor.

[1] http://git.suckless.org/st/tree/st.c#n3963
[2] http://i.imgur.com/R2yCEaC.png
2017-03-29 18:39:21 +02:00
osandov@osandov.com e7ed326d2e Support xterm Ms feature to set clipboard
This is used by, e.g., tmux.
2017-03-19 20:32:22 +01:00
Roberto E. Vargas Caballero 20f713548d Change default keybindings
CTRL+SHIFT is an impossible combination in the terminal world
(0x20 | x & 0x1F), so it is perfect to be used for internals
shortcuts of terminals, and being a double combination
reduces the prossibility of having comflicts.
2017-01-25 19:17:38 +01:00
Michael Forney e2ee5ee611 Split X-specific code into x.c 2017-01-20 19:42:26 -08:00
fpqc c63a87cd93 Move column and row default numbers into config.h 2016-12-16 10:50:23 +01:00
Roberto E. Vargas Caballero e44832408b Revert "Initial font size issue."
This reverts commit 424202798b.
2016-11-24 20:21:19 +01:00
Spencer Phippen fa9a459972 Fixed 'missing glyph doesn't use fontconfig config substitutions' bug
XftFontMatch does display-specific font configuration (commit 528241a).
Nice. Unfortunately, when we switched from FcFontMatch, we also stopped
storing the post-Fc{Config,Default}Substitute FcPattern for future
lookups. The result is that if a glyph isn't found in the primary font,
secondary font lookups use the original FcPattern, not the configured
one. If you have custom fontconfig rules (like me), this can be
disappointing.

I basically just copied the guts out of XftFontMatch[1] and saved
the intermediate configured FcPattern. Could be related to the bug that
inspired commit 4242027.

[1]: https://cgit.freedesktop.org/xorg/lib/libXft/tree/src/xftfont.c
2016-11-24 20:20:45 +01:00
Manuel Tobias Schiller 740ada1447 make the various combinations of arrow keys and shift/control/meta work
When using st with screen, I've bound next, prev, new screen to
combinations like Ctrl-Alt-Right,Left,Down; xterm and (u)rxvt work fine
when this combination of modifiers is pressed, st does not seem to
transport all of them; a single modifier key is fine (e.g. Ctrl-Up,
Alt-Down etc., but combinations are not). While I'm not terribly
familiar with this, I have tried to hack config.h in a more or less
systematic way to generate the expected sequences.
2016-11-14 19:58:02 +01:00
ian@remmler.org 424202798b Initial font size issue.
Hi,

When I specify a font by point size (I'm using "Inconsolata:size=12"),
characters that are substituted from another font because they are not in the
main one appear too small.  Doing a zoom reset fixes it.  For example:

Before: http://i.imgur.com/G4Mfv4X.png
After:  http://i.imgur.com/PMDhfQA.png

I found that adding the pixel size (acquired from the initial font load) to the
pattern then reloading the font fixes the problem.  I'm not sure if this is a
proper fix, though.
2016-11-14 19:27:55 +01:00
pl@ninthfloor.org 3ca7249c86 tic -s -> tic -sx (Treat unknown capabilities as user-defined.) 2016-11-14 19:05:47 +01:00
pl@ninthfloor.org 06f8cf8ca8 Add tmux capabilities to st.info 2016-11-14 19:05:11 +01:00
pl@ninthfloor.org 902a392b90 Make strdump(), csidump(), print to stderr
The two functions strdump(), csidump() are called to show errors and
their output is introduced by a message printed to stderr. Thus, it it
more consistent to have them print to stderr.

Moreover stderr is unbuffered (at least on Linux), making problems
immediately visible.
2016-11-14 18:36:38 +01:00
Quentin Rameau 8c99915608 Do not use color when font attributes are supported
If fontconfig gives us a font without the attributes we asked for,
display an alternative color instead.
2016-10-23 17:56:46 +02:00
Quentin Rameau 7854fde1ff st.1: add an entry for ISO-14755 shortcut 2016-10-22 10:43:18 +02:00
Quentin Rameau 68bae9c7b1 Add support for iso14755
We launch dmenu for getting a codepoint, then convert it and send it to
the terminal.
2016-10-18 13:32:36 +02:00
Klemens Nanni 331033f1f6 Add missing device path to '-l' example
Also, it's ttyS0 not ttySO.
2016-10-13 17:25:17 +02:00
Roberto E. Vargas Caballero f7398434b8 Add parsing of DCS q sequences
These sequences are used to operate with sixels, but they are still
str sequences, so they are finished with \a, ST or with a C1 control
code. This patch also disables utf8 handling for the case of sixels.
2016-09-14 08:27:32 +02:00
Roberto E. Vargas Caballero f0e2d28732 Add support for enabling/disabling utf
There are some ocasions where we want to disable the enconding/decoding of utf8, mainly
because it adds an important overhead. This is partial patch for ESC % G and ESC % @,
where they modified the way that st reads and write from/to the serial line, but it does
not modifies how it interacts with the X window part.
2016-09-13 14:01:18 +02:00
Roberto E. Vargas Caballero 078337d745 Delete ncv capability from terminfo
We do not need to disable the previous ncv definition, because
there is not previous definition.
2016-09-09 13:11:06 +02:00
Quentin Rameau 5ce853a1c1 st.info: do not prevent st from displaying attributes
With ncv set to 3, we prevent st from displaying A_STANDOUT and
A_UNDERLINE with colors while our virtual terminal is capable of it.
2016-09-09 11:05:11 +02:00
Christoph Lohmann 023225ef40 Update the LICENSE.
This is for the next release.
2016-08-11 16:30:29 +02:00
Christoph Lohmann 6e79e8357e 0.7 release 2016-08-11 16:25:58 +02:00
Christoph Lohmann 308bfbf6be Change who's expanding tabs. 2016-07-20 13:56:15 +02:00
Christoph Lohmann c4f245eccd Add some hint to have the pseudo terminal in the right mode.
If you don't make sure that the terminal does not expand tabs to spaces, of
course such a setting won't work.
2016-07-20 13:52:31 +02:00
Christoph Lohmann 2251f6465a Add comment about tabspaces.
st.info needs to be changed too, when tabspaces are changed.
2016-07-20 13:00:43 +02:00
Alive 4ever 235b438e68 Consistent Alt+BackSpace behavior
The default config specifies BackSpace as "\177". The default behavior
should persist across modifier keys, commonly Mod1 (Alt or Meta) which
is widely used to delete a word on readline and text editors, notably
Emacs.

This will make Alt+BackSpace behaves as expected, i.e. sends "\033\177"
instead of "\033\010" as previous default behavior.

Signed-off-by: Christoph Lohmann <20h@r-36.net>
2016-07-12 15:25:08 +02:00
Christoph Lohmann 528241aa38 Use XftFontMatch in place of FcFontMatch.
git am -s didn't like your patch:

From: Mark Edgar <medgar123@gmail.com>

XftFontMatch calls XftDefaultSubstitute which configures various match
properties according to the user's configured Xft defaults (xrdb) as well as
according to the current display and screen. Most importantly, the screen DPI
is computed [1]. Without this, st uses a "default" DPI of 75 [2].

[1]: https://cgit.freedesktop.org/xorg/lib/libXft/tree/src/xftdpy.c?id=libXft-2.3.2#n535
[2]: https://cgit.freedesktop.org/fontconfig/tree/src/fcdefault.c?id=2.11.1#n255
2016-06-03 15:02:32 +02:00
v4hn 60aeb37edb delete clipboard properties after pasting them
https://tronche.com/gui/x/icccm/sec-2.html#s-2.4 specifies:
> Once all the data in the selection has been retrieved,
> the requestor should delete the property in the SelectionNotify request

Most Clipboard-Owners ignore whether or not the property is already set,
so this is mostly a cosmetic change to keep the windows property list clean.

However, at least synergy decides to wait for the requestor to delete
the properties if they are already set by a previous paste (from synergy).

Signed-off-by: Christoph Lohmann <20h@r-36.net>
2016-06-03 14:55:25 +02:00
Roberto E. Vargas Caballero 66556d9670 Remove stupid assignation in memcpy() 2016-04-15 07:58:26 +02:00
Tor Andersson 39964614b7 st: Fix off-by-one error when calculating character width.
LEN(str) is one larger than strlen(str) because it also counts the zero
terminator. The original code would include the .notdef glyph (since it'll
try to encode character 0, which gets encoded to the .notdef glyph) when
measuring the average dimensions of printable ascii characters.

This causes problems with fonts like GNU Unifont where the .notdef glyph is
not the same width as the usual half-width characters.

Signed-off-by: Christoph Lohmann <20h@r-36.net>
2016-03-09 22:01:25 +01:00
Ton van den Heuvel 0e48a1995e Fix vertical character alignment in some cases
The y-position of a character found by asking fontconfig for a matching
font does not take the border pixels into account, resulting in a
slightly misaligned vertical position.

Signed-off-by: Ton van den Heuvel <tonvandenheuvel@gmail.com>
Signed-off-by: Christoph Lohmann <20h@r-36.net>
2016-03-08 15:43:52 +01:00
Christoph Lohmann 6d8f85232e I like empty lines. 2016-03-08 13:55:22 +01:00
Ryusei Yamaguchi 034a5c8a09 Measure the single advance width with a heuristic method
This fix is needed to use dual-width fonts, which have double-width
glyphs (e.g. CJK unified ideographs).

Signed-off-by: Ryusei Yamaguchi <mandel59@gmail.com>
Signed-off-by: Christoph Lohmann <20h@r-36.net>
2016-03-08 13:46:42 +01:00
Christoph Lohmann 30440295bc xtermclear() is now done by xdrawglyphfontspecs()
Thanks Ton van den Heuvel for the proposal!
2016-03-07 14:33:05 +01:00
Lucas Gabriel Vuotto 4fdba860c8 arg.h: fixed argv checks order
This prevents accessing to a potentially out-of-bounds memory section.

Signed-off-by: Lucas Gabriel Vuotto <l.vuotto92@gmail.com>
Signed-off-by: Christoph Lohmann <20h@r-36.net>
2016-02-21 17:21:41 +01:00
Quentin Rameau 6d636beb22 Fix forgotten bracket and duplicate option in usage()
Scratch the preceding patch, this one is more correct
(don't forget to 'git am --scissors' ;))
-- >8 --

Also reformat the strings in a saner layout

Signed-off-by: Christoph Lohmann <20h@r-36.net>
2016-02-01 18:14:27 +01:00
Quentin Rameau 6e70bb97d4 Extract ttyresize() out of cresize()
This way we can call cresize() to set the terminal size before creating
a tty or spawning a process, which will start with the correct size.

Signed-off-by: Christoph Lohmann <20h@r-36.net>
2016-01-30 18:40:13 +01:00
Christoph Lohmann 82335583eb Ok, no need for a separate version function.
This is just redundant metadata. Please add Java comment meta classes too.
2016-01-30 09:50:18 +01:00
Quentin Rameau 0cd5117a2c Add -n option for setting WM_CLASS instance name
Signed-off-by: Christoph Lohmann <20h@r-36.net>
2016-01-30 09:45:23 +01:00
Quentin Rameau bd5fdbe64c Reformat usage and separate version from it
Signed-off-by: Christoph Lohmann <20h@r-36.net>
2016-01-30 09:44:41 +01:00
Christoph Lohmann 504a165277 Enforce a terminal size to reduce race conditions in too efficient apps.
dvtm is too fast in starting up. It will then have a race condition in finding
the right. terminal size.
2016-01-28 18:09:11 +01:00
Christoph Lohmann 9031e228ce Height is height. 2016-01-14 23:19:03 +01:00
Christoph Lohmann 610723a58f Bump year. 2016-01-01 14:18:43 +01:00
Christoph Lohmann ff241199ed Fixing the XClassHint setting in st. 2015-12-20 01:43:32 +01:00
Roberto E. Vargas Caballero 375b28720f Avoid recursive call to ttywrite from ttyread
Ttyread() calls to ttywrite, so if we check for reading before
that for writing in ttywrite we can get a circular call sequence.
2015-11-21 18:21:03 +01:00
Quentin Rameau d836561b96 arg.h: remove unused macros
ARGUM isn't used and ARGNUMF uses estrtol() that isn't defined anywhere.
Those were probably copied from sbase arg.h.

Signed-off-by: Christoph Lohmann <20h@r-36.net>
2015-11-08 20:33:56 +01:00
Christoph Lohmann 00873e65ee Introduce lim in all ttywrite() checks. 2015-11-06 20:46:23 +01:00
Roberto E. Vargas Caballero 9f6d8845df Fix ttywrite()
ttywrite was assuming that if it could not write then it could
read, but this is not necessarily true, there are some situations
where you cannot read or write. The correct behaviour is to detect
if you can read or/and write.
2015-11-06 20:01:00 +01:00
Ivan Tham f0398db4d1 Now the mshortcuts are even more consistent.
Keep everyone happy

Signed-off-by: Christoph Lohmann <20h@r-36.net>
2015-11-01 08:23:26 +01:00
Christoph Lohmann e2aa03e6b7 Now the Shortcuts are more consistent.
Keep the debile happy.
2015-10-31 09:29:04 +01:00
Jason Woofenden f56c58a968 fix bug where first selection snaps to lines 2015-10-11 11:44:34 +02:00
Quentin Rameau 293f573efd Fix the cursor colors selection
Signed-off-by: Christoph Lohmann <20h@r-36.net>
2015-10-06 17:36:02 +02:00
Christoph Lohmann 2ea02c937e Normalize the whole color selection in xdrawcursor. 2015-10-06 00:21:44 +02:00
Quentin Rameau 80fe97f8a6 Fix the cursor color when over selection.
If we want to show a custom selected cursor color, we must not set the
revert attribute to the drawn glyph.

Signed-off-by: Christoph Lohmann <20h@r-36.net>
2015-10-06 00:05:04 +02:00
Christoph Lohmann a2a60f0a2c Make the cursor shapes more descriptive.
»IBeam« is now »Bar« because it's named like that in the source code.
2015-10-05 23:05:38 +02:00
Christoph Lohmann 52d0e82df7 Snowman is everywhere. 2015-10-05 22:59:04 +02:00
Christoph Lohmann 78b04865fb Style normalisation in the config.def.h.
This adds an awareness commit for the big key array too.
2015-10-05 22:54:44 +02:00
Christoph Lohmann f7b80caebe The definition of the reverse cursor is now up to the user. 2015-10-05 22:38:19 +02:00
Christoph Lohmann 594a259836 Fixing the cursor movement in selections.
Before the fix the cursor wouldn't obey if it's in a selection. If it is
inside it will now change to the reverse. This patch also adds that the
defaultcs will be reversed for the manually drawn cursors.
2015-10-05 22:09:51 +02:00
Christoph Lohmann 91c70213d1 When the cursor is moved, clear the selection. 2015-10-05 21:18:34 +02:00
Christoph Lohmann 2677296147 Reverse the cursor on selection. 2015-10-05 21:06:42 +02:00
Christoph Lohmann 5ece2b5f4a More style changes. We forgot some switches. 2015-10-05 20:48:24 +02:00
Christoph Lohmann 2bef36ab81 Small style change. 2015-10-05 20:08:21 +02:00
Christoph Lohmann 1682484327 There's no need for libXext to compile st. 2015-09-28 20:08:58 +02:00
dequis 4be353e381 Fix extra bracketed paste markers when pasting >8kb
Before this patch, when pasting over BUFSIZE (8192 bytes here), st would
do the following:

    \e[200~...8192 bytes...\e[201~\e[200~...remaining bytes...\e[201~

With this patch, the start marker is only sent when the offset is 0 (at
the beginning of selnotify) and the end marker is only sent when the
remaining bytes to read are 0 (at the end).

For short pastes, both conditions are true in the same iteration.

For long pastes, it removes the extra markers in the middle, keeping the
intended wrapping:

    \e[200~...8192 bytes......remaining bytes...\e[201~

Signed-off-by: Christoph Lohmann <20h@r-36.net>
2015-09-25 20:16:30 +02:00
FRIGN 20d53cebc1 dup() -> dup2()
gcc would warn about an unused result. We know it is 0 and dup()
can't fail in these circumstances, as we closed fd0 previously.
Using dup2() to do the same saves one line and shuts gcc up, bringing
us a clean build back.
2015-09-22 14:15:24 +02:00
Christoph Lohmann bf8c71e429 The times of bad fonts are over.
The antialiasing was false due to circumstances that do not exist anymore. We
need antialiasing on big screens with big fonts. Autohinting too.
2015-09-12 16:43:32 +02:00
Roberto E. Vargas Caballero 5d2d9d540d Fix copy of line with len = 0
When a line has no any character linelen is 0, so last = &term.line[y][MIN(lastx, linelen-1)]
generated a pointer to the end of the previous line. The best thing we can do in this case
is to add a newline, because we don't have a glyph to print (and consult its state of
wrapping).
2015-09-10 11:53:11 +02:00
Roberto E. Vargas Caballero a1ed5071e5 Change Pause to Break in shortcut for serial break 2015-09-08 17:02:15 +02:00
Jan Christoph Ebersbach 3ba9c8fc3f Expose cursor shape in config.def.h
Signed-off-by: Christoph Lohmann <20h@r-36.net>
2015-09-08 16:29:05 +02:00
Roberto E. Vargas Caballero 1f087aa8b7 Add key to send a break to the serial line 2015-09-08 12:10:11 +02:00
Roberto E. Vargas Caballero 473326f2e3 Set default values of stty according to the man page
This configuration is basically 38400 8N1, without echo and
in raw mode. Kernel will not process any of the characters
sent by the user.
2015-09-08 10:47:31 +02:00
Christoph Lohmann aa5d4c3b34 Making st.1 more descriptive about -l and fix -l in st.c. 2015-09-07 22:59:05 +02:00
Christoph Lohmann 080a5ae425 Fix the st manpage for -l line. 2015-09-07 20:00:49 +02:00
Christoph Lohmann 9eeb4e1ea2 Reordering and adding control codes.
For completeness and documentation add all C1 control codes.
2015-08-31 15:26:21 +02:00
Christoph Lohmann 0c94f8621b Merge branch 'master' of ssh://suckless.org/gitrepos/st 2015-08-30 11:29:23 +02:00
Christoph Lohmann 0d838b7243 Don't read if we chunked the input data. 2015-08-30 11:28:35 +02:00
Roberto E. Vargas Caballero 7e61f5e4c5 Do not mark as invalid UTF8 control codes
wcwidth() returns -1 for all the non visible characters, but it doesn't
necessarilly mean that they are incorrect. It only means that they are not
printable.
2015-08-18 08:31:51 +02:00
Quentin Rameau 9984ad4ba7 st.info: replace the acsc entry from xterm to urxvt
The current acsc entry, copied from xterm was not exposing capability to
display arrows.
2015-08-12 09:02:12 +02:00
Alex Kozadaev ee5cad439b Adding mouse colour/shape settings 2015-07-28 12:21:11 +02:00
Christoph Lohmann dc33d1d66e Adding -T to the usage too. 2015-07-24 18:25:33 +02:00
Christoph Lohmann b5e29cce52 Add -T, as recommended by Dmitrij D. Czarkoff 2015-07-24 18:24:10 +02:00
Quentin Rameau 4a193b9686 Fix type for write(2) return variable.
A little fix in xwrite().

>From 3727d2e3344b57128ab51c7839795204f1f839ff Mon Sep 17 00:00:00 2001
From: Quentin Rameau <quinq@fifth.space>
Date: Fri, 24 Jul 2015 11:40:46 +0200
Subject: [PATCH] Fix type for write(2) return variable.

The allocated lengh of s fits into an integer so we can safely use
ssize_t here.
2015-07-24 12:01:56 +02:00
Mytchel Hammond 1d348e98e3 added note about the low precedence of shell to config.def.h 2015-07-24 08:15:55 +02:00
Roberto E. Vargas Caballero 62756fdb49 Fix style in execsh 2015-07-24 07:44:34 +02:00
Christoph Lohmann d032b61597 Make the comment for the IM XFilter more understandable. 2015-07-10 14:31:40 +02:00
Christoph Lohmann 684c72d05e Return style unification. 2015-07-10 14:30:37 +02:00
Christoph Lohmann b823f57fa0 Aligning the macros. 2015-07-10 14:21:52 +02:00
Christoph Lohmann 684f0a0729 Unix end of file. 2015-07-10 14:19:52 +02:00
Christoph Lohmann d3c7b6fb73 No inline declarations please. 2015-07-10 14:19:31 +02:00
Christoph Lohmann 41f70a1cff Typo and the missing incr atom from the patches. 2015-07-10 14:17:51 +02:00
Christoph Lohmann 261ea4b7e0 Implement chunked write to the cmdfd.
This is needed so big input like a paste of several megabyte does not clog our
I/O.
2015-07-10 14:15:39 +02:00
Christoph Lohmann f8c6e7d041 Implement INCR transfers in the clipboard. 2015-07-10 14:10:17 +02:00
FRIGN 539afe3af1 Update LICENSE
Signed-off-by: Christoph Lohmann <20h@r-36.net>
2015-07-10 13:59:08 +02:00
FRIGN f1307d91e2 Don't treat clauses like functions
and add a space between the keyword and the parentheses.

Signed-off-by: Christoph Lohmann <20h@r-36.net>
2015-07-10 13:58:31 +02:00
FRIGN 13233574ed Use BSD-style function notation
Put the opening brace on a new line. This was already used for some
functions inside st.c.

Signed-off-by: Christoph Lohmann <20h@r-36.net>
2015-07-10 13:58:09 +02:00
FRIGN 9de853a98d Unboolify st
This practice proved itself in sbase, ubase and a couple of other
projects.
Also remove the True and False defined in X11 and FcTrue and FcFalse
defined in Fontconfig.

Signed-off-by: Christoph Lohmann <20h@r-36.net>
2015-07-09 18:34:46 +02:00
FRIGN abfad4c4fc Remove insane *_FILENO and EXIT_* usage
Any system having different assignments than the usual 0, 1, 2 for
the standard file numbers and 0, 1 for the exit-statuses is broken
beyond repair.
Let's keep it simple and just use the numbers, no reason to fall
out of the window here and bend down for POSIX.
In one occasion, the ret-variable was not necessary. The check was
rewritten.

Signed-off-by: Christoph Lohmann <20h@r-36.net>
2015-07-09 18:34:41 +02:00
Christoph Lohmann 92e092efe6 Commit to push the 0.6 release. 2015-07-07 22:26:44 +02:00
Weng Xuetian 5f48e89716 Revert "Remove unnecessary XFilterEvent call."
This reverts commit d2937b05ae.
2015-07-02 11:11:55 +02:00
Quentin Rameau bdd649a102 do not truncate font size when zooming 2015-06-19 11:49:13 +02:00
Roberto E. Vargas Caballero 71fa10f613 Revert "Optimize memory footprint of line buffers"
This reverts commit 7ab6c92e18.
We need 32 bits for real color support.
2015-06-03 08:07:55 +02:00
Jan Christoph Ebersbach caa97cc781 Support UTF-8 characters as word delimiters
For a higher usefulness of the utf8strchr function, the index of the
UTF-8 character could be returned in addition with a Rune instead of a
char*.  Since utf8strchr is currently only used by ISDELIM I didn't
bother to increase the complexity.
2015-05-25 08:35:32 +02:00
Roberto E. Vargas Caballero c03548750b Merge branch 'master' of ssh://suckless.org/gitrepos/st 2015-05-15 07:51:58 +02:00
v4hn 8e15887de9 set selection to IDLE on clear
Otherwise a tangling bmotion event will consider
the selection still valid and selnormalize segfaults
because of an invalid sel.ob.y index.
2015-05-15 07:42:40 +02:00
suigin 89cf0fc597 Small bugfix for makeglyphfontspecs call in drawregion
Here's a patch that fixes a bug when calling `makedrawglyphfontspecs'
in `drawregion'. Wasn't offseting the pointer into the input glyphs
array by `x1'. The bug isn't causing any problems currently, because
`drawregion' is always called with `x1' and `y1' values of 0, but if
this ever changes in the future, the bug would certainly cause some
problems.
2015-05-12 07:37:13 +02:00
Christoph Lohmann 980991fa6e Fix the new -e handling. An empty cmd has to work for backwards compatibility. 2015-05-10 15:19:48 +02:00
suigin ae1923d275 Clean up xdraws and optimize glyph drawing with non-unit kerning values
I have another patch here for review that optimizes the performance of
glyph drawing, primarily when using non-unit kerning values, and fixes a
few other minor issues. It's dependent on the earlier patch from me that
stores unicode codepoints in a Rune type, typedef'd to uint_least32_t.

This patch is a pretty big change to xdraws so your scrutiny is
appreciated.

First, some performance numbers. I used Yu-Jie Lin termfps.sh shell
script to benchmark before and after, and you can find it in the
attachments. On my Kaveri A10 7850k machine, I get the following
results:

Before Patch
============

1) Font: "Liberation Mono:pixelsize=12:antialias=false:autohint=false"
   cwscale: 1.0, chscale: 1.0
   For 273x83 100 frames.
   Elapsed time :     1.553
   Frames/second:    64.352
   Chars /second: 1,458,159

2) Font: "Inconsolata:pixelsize=14:antialias=true:autohint=true"
   cwscale: 1.001, chscale: 1.001
   For 239x73 100 frames.
   Elapsed time :   159.286
   Frames/second:     0.627
   Chars /second:    10,953

After Patch
===========

3) Font: "Liberation Mono:pixelsize=12:antialias=false:autohint=false"
   cwscale: 1.0, chscale: 1.0
   For 273x83 100 frames.
   Elapsed time :     1.544
   Frames/second:    64.728
   Chars /second: 1,466,690

4) Font: "Inconsolata:pixelsize=14:antialias=true:autohint=true"
   cwscale: 1.001, chscale: 1.001
   For 239x73 100 frames.
   Elapsed time :     1.955
   Frames/second:    51.146
   Chars /second:   892,361

As you can see, while the improvements for fonts with unit-kerning is
marginal, there's a huge ~81x performance increase with the patch when
using kerning values other than 1.0.

So what does the patch do?

The `xdraws' function would render each glyph one at a time if non-unit
kerning values were configured, and this was the primary cause of the
slow down. Xft provides a handful of functions which allow you to render
multiple characters or glyphs at time, each with a unique <x,y> position,
so it was simply a matter of massaging the data into a format that would
allow us to use one of these functions.

I've split `xdraws' up into two functions. In the first pass with
`xmakeglyphfontspecs' it will iterate over all of the glyphs in a given
row and it will build up an array of corresponding XftGlyphFontSpec
records. Much of the old logic for resolving fonts for glyphs using Xft
and fontconfig went into this function.

The second pass is done with `xrenderglyphfontspecs' which contains the
old logic for determining colors, clearing the background, and finally
rendering the array of XftGlyphFontSpec records.

There's a couple of other things that have been improved by this patch.
For instance, the UTF-32 codepoints in the Line's were being re-encoded
back into UTF-8 strings to be passed to `xdraws' which in turn would then
decode back to UTF-32 to verify that the Font contained a matching glyph
for the code point. Next, the UTF-8 string was being passed to
`XftDrawStringUtf8' which internally mallocs a scratch buffer and decodes
back to UTF-32 and does the lookup of the glyphs all over again.

This patch gets rid of all of this redundant round-trip encoding and
decoding of characters to be rendered and only looks up the glyph index
once (per font) during the font resolution phase. So this is probably
what's responsible for the marginal improvements seen when kerning values
are kept to 1.0.

I imagine there are other performance improvements here too, not seen in
the above benchmarks, if the user has lots of non-ASCII code plane characters
on the screen, or several different fonts are being utilized during
screen redraw.

Anyway, if you see any problems, please let me know and I can fix them.
2015-05-07 12:03:44 +02:00
suigin 38af006b5e Changed type for UTF-32 codepoints from long to uint_least32_t 2015-05-06 08:15:41 +02:00
noname c990abfedf Fix empty selection highlighting bug.
When user clicks LMB, one character is selected, but will not be copied
to selection until the user moves cursor a bit. Therefore, the character
should not be highlighted as selected yet.

Before the patch, the trick was not to mark line as dirty to avoid
highlighting it. However, if user has already selected something and
clicks in line that contains selection, selclear sets the line as dirty
and one character is highlighted when it should not.

This patch replaces dirty trick with explicit check for sel.mode inside
selected().
2015-05-04 12:06:43 +02:00
noname 3cb7f27afe Fix indentation. 2015-05-04 12:00:10 +02:00
noname 1811b6030c Add enumeration for sel.mode
This patch also prevents sel.mode from increasing beyond 2. It is almost
impossible, but sel.mode may overflow if mouse is moved around for too
long while selecting.
2015-05-04 11:57:17 +02:00
noname 22571ea4e8 selnormalize: make special case explicit
Special case is when regular selection spans multiple lines.
Otherwise, just sort sel.ob.x and sel.ob.y.
2015-05-04 11:47:53 +02:00
noname 8751809aff selsnap: simplify SNAP_LINE case
Also make sure y never exceeds term.row-1 even if ATTR_WRAP is set for
some reason.
2015-05-04 11:41:55 +02:00
noname 765bb0fd14 Remove first argument of selsnap. 2015-05-04 11:16:08 +02:00
Jochen Sprickerhof 07ce96a3a0 Fix sigchld
Only wait for termination of the shell.
2015-05-04 10:57:40 +02:00
mvdan@mvdan.cc 190b94c7a2 len assignment is never used
Signed-off-by: Daniel Martí <mvdan@mvdan.cc>
2015-04-27 10:10:30 +02:00
mvdan@mvdan.cc 4f21c41a1c Clarify calculation precedence for '&' and '?'
Signed-off-by: Daniel Martí <mvdan@mvdan.cc>
2015-04-27 10:09:49 +02:00
mvdan@mvdan.cc 3a5053f6c1 Use %u for uint
Signed-off-by: Daniel Martí <mvdan@mvdan.cc>
2015-04-27 10:09:15 +02:00
suigin 7ab6c92e18 Optimize memory footprint of line buffers 2015-04-27 10:05:14 +02:00
noname@inventati.org 0622ad9bad Make tputc, tsetchar and techo accept unicode 2015-04-27 09:50:40 +02:00
noname@inventati.org 21f765426c Change internal character representation. 2015-04-27 09:50:01 +02:00
noname@inventati.org 753fe862b1 Remove last parameter of utf8encode
This parameter was always UTF_SIZ, so it is better remove it and
use directly UTF_SIZ in it.
2015-04-27 08:59:45 +02:00
noname@inventati.org 61c35cd246 Use utf8len instead of utf8decode. 2015-04-27 08:58:37 +02:00
alp@alexpilon.ca 742a41d655 Make build shut up about system() without return value check.
st.c:1321:2: warning: ignoring return value of function declared with warn_unused_result attribute [-Wunused-result]
            system(cmd);
            ^~~~~~ ~~~

Debatable whether an error here should case exit(EXIT_FAILURE). Just
preserving the existing behaviour for now.
2015-04-27 08:57:51 +02:00
Roberto E. Vargas Caballero f36dd277a2 Merge remote-tracking branch 'origin/master' 2015-04-23 17:59:39 +02:00
Roberto E. Vargas Caballero 0d7448dabc Fix segmentation fault in strhandle()
We cannot pass strescseq.args[0] to atoi when nargs is zero,
because in this case it will be null.
2015-04-23 17:59:10 +02:00
Roberto E. Vargas Caballero b17aa18f7c Uses a &[] pointer loop instead of + pointer loop 2015-04-23 17:59:10 +02:00
noname@inventati.org 736685d641 Do not set terminal title based on stty arguments. 2015-04-23 17:59:10 +02:00
noname@inventati.org 89807ed453 Move common code to xloadcolor 2015-04-21 09:48:33 +02:00
noname@inventati.org 84c756b97e Use LEN(dc.col) instead of LEN(colorname).
LEN(colorname) may be below 256 for some configurations.
2015-04-21 08:13:46 +02:00
noname@inventati.org 2fdcc5e5f6 Remove WIN_REDRAW flag.
WIN_REDRAW flag was not used since introduction of Xdbe
in commit 94771d0588
2015-04-21 07:49:07 +02:00
noname@inventati.org ab69ea89b7 Place memset arguments in the correct order. 2015-04-20 09:29:24 +02:00
noname@inventati.org 5528280fae Remove explicit 'return' from 'void' functions. 2015-04-20 09:28:14 +02:00
noname@inventati.org 6dc2b546ec Increment accuaracy in drawtime calculation
This way is a bit more accurate.
2015-04-20 09:20:35 +02:00
noname@inventati.org c27c731b9f Monotonic clock cannot jump backwards.
The check was introduced back when st used gettimeofday.
The condition is also modified to increment the accuaracy of the
calculation.
2015-04-20 09:18:40 +02:00
noname@inventati.org 6ee56d6590 Place tlinelen type on separate line. 2015-04-20 08:30:49 +02:00
Roberto E. Vargas Caballero 215bdb2da3 Add tty line support
Not always is desirable to create a pseudo terminal, and some times
we want to open a terminal emulator over a tty line. With this new
patch is possible to do someting like:

	$ st -l /dev/ttyS0 115200

Without this option was needed to launch another terminal emulator
over st (for example minicom, picocom, cu, ...).
2015-04-15 10:52:44 +02:00
sin 56abffb4b6 Fix memmove() invocation with src/dst being NULL
This fixes a segmentation fault on some systems.
2015-04-15 10:51:00 +02:00
noname@inventati.org aff35af275 Use as command arguments the remaining parameters
This change allows execute st as 'st mutt' while it keeps the
compability with xterm and urxt.
2015-04-14 09:55:15 +02:00
Roberto E. Vargas Caballero 83e73c6242 Merge branch 'master' of ssh://suckless.org/gitrepos/st 2015-04-14 09:47:19 +02:00
Markus Wichmann 42fa1f5ce4 Implement most ICCCM rules for selection handling.
ICCCM mandates the use of real timestamps to interact with the
selection, to rule out race conditions if the clients are run at
different speeds. I have implemented the low hanging fruit, putting the
timestamps into text selection. Also, ICCCM mandates a check for whether
XSetSelectionOwner() worked. Not sure my version is correct, though.
2015-04-13 22:18:45 +02:00
Roberto E. Vargas Caballero 23ed12857f Merge branch 'master' of ssh://suckless.org/gitrepos/st 2015-04-13 22:01:40 +02:00
noname@inventati.org 9eb70a2d3e Do not use tmoveto in tputtab.
tmoveto resets CURSOR_WRAPNEXT.

Simple testcase:

for i in $(seq 1 200); do
	printf '\t.';
	usleep 100000;
	printf '\t@';
	usleep 100000;
done

In st executing this script causes @ and . to overwrite each other in
the last column.
2015-04-13 21:33:36 +02:00
noname@inventati.org 9619760e12 tresize: remove unnecessary if 2015-04-13 17:12:49 +02:00
noname@inventati.org a6af2cc469 Remove old TODO entry.
It probably refers to
http://lists.suckless.org/dev/1211/13427.html
and does not seem like a bug in st.
2015-04-13 17:06:11 +02:00
noname@inventati.org b94ad75e5d Remove 'titles' variable.
We do not free it until exit anyway.
2015-04-13 17:00:08 +02:00
noname@inventati.org e6dd0f825d Remove useless if in tstrsequence. 2015-04-13 15:17:24 +02:00
noname@inventati.org b0310fba5d Simplify tmoveto.
LIMIT returns value. This fact is already used in x2col and y2row.
2015-04-13 15:15:47 +02:00
noname@inventati.org 9d1495f9ee Fix typo.
It seems that LICENSE files are more common than LICENCE files.
At least this patch makes spelling consistent.
2015-04-13 14:26:01 +02:00
noname@inventati.org c569e3146e Remove 'slide' variable in tresize. 2015-04-13 10:18:08 +02:00
noname@inventati.org 39ae1a4de5 Move tresize comments around. 2015-04-13 09:26:03 +02:00
noname@inventati.org 6352502d64 tresize: move for loop outside if
There is no need to check that slide > 0 before executing loop.
If slide <= 0, loop stops immediately.
2015-04-13 09:21:03 +02:00
noname@inventati.org b9390a5496 Simplify loop condition. 2015-04-13 09:20:00 +02:00
noname@inventati.org d2937b05ae Remove unnecessary XFilterEvent call.
XFilterEvent usually filters KeyPress events according to input method.
At this point the window is not mapped. The only events that we process
are ConfigureNotify and MapNotify. They should not be filtered by input
method.
2015-04-13 09:17:06 +02:00
noname@inventati.org d3e0f3444b Use do..while in window mapping loop. 2015-04-13 09:15:42 +02:00
Omar Sandoval ecac5ee35e Make DECSCUSR thickness configurable 2015-04-10 23:43:05 +02:00
noname 93b54cfcc4 Use MAX macro where possible. 2015-04-10 23:34:06 +02:00
noname 6f5f770186 Remove 'xloadfontset' function.
It was used only once and its return value was ignored.
2015-04-10 23:31:53 +02:00
noname 6524f022f7 Remove keywords from function definitions. 2015-04-10 23:28:21 +02:00
noname 9305f3c184 Remove variable names from function declarations. 2015-04-10 23:28:16 +02:00
Roberto E. Vargas Caballero 5bb90125c8 Remove redundant control check
control was set, but it was not ever used because it was set
again some lines later.
2015-04-06 10:55:00 +02:00
noname 69d1fe06a9 Fixed STR sequence termination condition
ascii code may only be checked for characters that have length equal to
1, not width equal to 1
2015-04-06 10:52:47 +02:00
Roberto E. Vargas Caballero 288f80cb06 Remove strsep() call
strsep() is not a POSIX function, and it means that every system
needs different defines to expose it. If the prototype of strsep
is not exposed then an ugly int/pointer is done and it might mean
a crash. The best solution?, to remove the strsep and make a custom
loop. If C programmers cannot do this kind of loops without calling
a library function, then maybe we should move all the suckless
software to Java.
2015-03-20 07:29:28 +00:00
Roberto E. Vargas Caballero c9357a8edf Merge remote-tracking branch 'origin/master' 2015-03-19 08:36:50 +00:00
LemonBoy 580302f317 Support the DECSCUSR CSI escape sequence 2015-03-19 05:36:54 +00:00
Christoph Lohmann 246c3481d7 arg.h wasn't used for dist. 2015-03-16 22:17:30 +01:00
Alex Pilon b341e51351 Handle pasting of empty selection.
Otherwise, pasting the X11 primary selection when empty results an
error and Xlib forcibly exits.

Signed-off-by: Christoph Lohmann <20h@r-36.net>
2015-03-16 20:31:15 +01:00
Roberto E. Vargas Caballero 86d1e432a8 Support XA_STRING in notify request
Some programs can only deal with XA_STRING, and it makes impossible st
be able of copying to them. This patch makes st answer also to XA_STRING,
althought it sends utf8 strings. It is not a problem because moderm
applications must support utf8.
2015-03-15 18:07:46 +00:00
Christoph Lohmann c7e24e44c8 TODO: Fix fontconfig 2015-03-14 08:53:41 +01:00
Christoph Lohmann 5406e655da Add the new selection shortcuts to the manpage. 2015-03-14 08:52:37 +01:00
Christoph Lohmann 72d2accc22 Glibc wants me to use _DEFAULT_SOURCe. I do obey. 2015-03-14 08:43:57 +01:00
Christoph Lohmann 2fcfea1bf1 Add Mod + Shift + c/v and no selclear.
Thanks to Alex Pilon <alp@alexpilon.ca>!

Now there is a distinction between the primary and clipboard selection. With
Mod + Shift + c/v the clipboard is handled. The old Insert behavious does
reside.
2015-03-14 07:41:59 +01:00
Roberto E. Vargas Caballero b746816b78 Allow combinations with Backspace
XN_ANY_MOD makes that any combination of backspace will return always
DEL. This patch lets to X to decide which value returns.
2015-03-13 07:26:16 +00:00
Alexander Huemer 4f60751440 FAQ: fix wording 2015-03-11 17:27:55 +00:00
Ivan Delalande f5075a9e9d Backspace value shouldn't depend on keypad state 2015-03-11 17:25:48 +00:00
Christoph Lohmann c87d45466b Merge branch 'master' of ssh://suckless.org/gitrepos/st 2015-03-10 21:59:41 +01:00
Christoph Lohmann 28259f5750 St now does only set PRIMARY on selection.
http://standards.freedesktop.org/clipboards-spec/clipboards-latest.txt
2015-03-10 21:58:32 +01:00
Alexander Huemer adeb2e95d6 FAQ: fix wording 2015-03-10 20:56:25 +00:00
Christoph Lohmann 9494362d0b Fixing the C reading test.
This was a test to see if anyone actually reads what is submitted. The list of
people not contributing will be valuable in the future.
2015-03-10 21:11:04 +01:00
Christoph Lohmann cf1fcc4d96 Change the FAQ for the new Backspace behaviour. 2015-03-10 00:20:28 +01:00
Christoph Lohmann 230d0c8428 Finally resolving the backspace problem.
The majority now using the Linux behaviour. Minorities have to live in their
ghettos.
2015-03-10 00:00:44 +01:00
Christoph Lohmann b0bddc694a Add a hack to handle unknown chars in fontconfig.
The unicode long is added to the cache. So when fontconfig does fall back to
the default font (where there is no easy way to find this out from the
pattern) it isn't reloaded.
2015-03-09 23:16:03 +01:00
Johannes Postma 487bbb24d0 Update kdch1 definition to three octal digits.
ncurses wasn't able to detect the delete-character key as KEY_DC.  This
patch fixes that.

kdch1 was defined as "\0177", but terminfo(5) states:
	... characters may be given as three octal digits after a \.

The delete-character key is correctly defined in config.def.h.
2015-03-07 18:21:19 +00:00
Roberto E. Vargas Caballero 29619a1a35 Small improvements to the FAQ 2015-02-28 16:15:16 +00:00
Greg Reagle b8804f9f67 document keys in man page 2015-02-23 11:14:21 +01:00
Ivan Delalande 1b514048b2 Let curses do the dirty work for flash
Use the terminfo delay syntax ($<x>) in our flash capability to avoid
hardcoding a fixed delay in redraw() when called from tsetmode() with
DECSCNM.
We need to turn on the npc capability so that delays are made with
xon/xoff instead of padding characters.
2015-02-22 11:53:34 +00:00
Roberto E. Vargas Caballero 3604445ffc Comment default CC assignment
CC by default is cc, so the assignment was doing nothing, but
it was using non standard syntax, so some system (NetBSD) fail
to compile.
2015-02-22 10:59:26 +00:00
Roberto E. Vargas Caballero ac11bbb03b Update dates in LICENSE 2015-02-22 10:58:37 +00:00
Nils Reuße c5f1d74fd8 Update year in usage() 2015-02-15 17:46:15 +01:00
Nils Reuße 7dd24bfb4c Fix crash on font resize resize
if you keep downsizing your fontsize until either xw.ch or xw.cw gets 0,
st crashes, because there is an unchecked division in cresize.
2015-02-15 17:12:36 +01:00
Rian Hunter aba6c292af Correct shift amount on MODE_INSERT in tputc()
When MODE_INSERT is set we'd shift characters on the same
line forward before inserting our character in tputc().
This did not account for wide characters where width != 1.
This patch makes it so we shift the correct amount.
2015-02-05 20:28:00 +01:00
Rian Hunter 4d14d97547 Fix crash due to wide characters
In tputc(), when a character wasn't large enough to fit
on the current line, we would call tnewline() to place it on
the next line. Unfortunately, we weren't resetting our glyph
pointer and this caused memory corruption when a
wide character (width == 2) was being written. This patch
resets our glyph pointer after calls to tnewline().
2015-02-05 20:28:00 +01:00
Ivan Delalande 708b697ed7 Fix crash due to invalid timespec given to pselect
If blinktimeout is set to a value greater than 1000, pselect will
receive a timeout argument with tv_nsec greater than 1E9 (1 sec), and
fail, making st crash. This patch just ensures that the timespec
structure is correctly filled with a value properly decomposed between
tv_sec and tv_nsec.

Reported by JasonWoof on IRC. Thanks!
2014-12-23 16:20:59 +01:00
Ivan Delalande 09f5d98251 Trim trailing whitespaces in every selection case
Trailing whitespaces are trimmed when copying from normal selection and
rectangular selection on lines that have their last character included
or on the left of the selection. It leads to inconsistent behaviors when
copying the exact same text from the left and right window in
applications with vertical splits.
This patch solves this issue by always trimming the selection.
2014-11-19 18:53:17 +01:00
sin 4418939dd9 Call _exit() instead of exit() if exec*() fails
exit() will also unwind the atexit() functions.  This is bad
because if exec*() fails the process is in an inconsistent state.
2014-11-19 18:52:42 +01:00
Eric Pruitt bafbba56cd Check for presence of SHELL environment variable
- POSIX states the SHELL environment variable "... shall represent a
  pathname of the user's preferred command language interpreter." As
  such, st should check for its presence when deciding what shell to
  use; just as HOME can be defined to override one's passwd-defined home
  directory, a user should also be able to override their passwd-defined
  shell using the SHELL environment variable.
2014-11-11 19:20:56 +01:00
czarkoff@gmail.com 11625c7166 Replace character with U+FFFD if wcwidth() is -1
Helpful when new Unicode codepoints are not recognized by libc.
2014-11-03 22:52:58 +01:00
Quentin Rameau 008aae541b Avoid failing when embedding with a Window id of 0
I'd like to let st run with its own window when trying to embed it to a window with id 0 instead of exiting with an error.
2014-10-21 18:18:26 +02:00
Christoph Lohmann cd159883d1 Reverting smacs and rmacs to the xterm defaults.
These are needed by ncurses to correctly handle the switch between line
drawing. The changes to the alternative characterset code already fixed the
urwid hack.
2014-10-21 16:36:01 +02:00
Roberto E. Vargas Caballero f9fb620914 Do not set SHELL to utmp ever
SHELL must be set to the SHELL of the user, but it was possible set
it to utmp.
2014-10-15 19:42:20 +02:00
CustaiCo 86633ada91 patch for bell in st
The XBell() call currently used when a bell is recieved sends a message
to the X server, but if the X server doesn't know how to sound it,
it just gets ignored and I have not been able to find anywhere in x.org's
code a way to configure the action that the server does.

However, if you use XkbBell() then you can have a process listening for
the XkbBellNotifyEvent that is produced and either alert you visually or
play an audio file or whatever you want as your notification. You have
to include one more header file but the function seems to be compiled as
part of Xlib, at least on my installation.

CustaiCo
2014-10-13 19:15:52 +02:00
Roberto E. Vargas Caballero dcfe505d3c Use G1 for alternate charset
St has enacs, which must be printed if a program requires to use
the alternate charset (graphic charset), that in st case was to
select charset graphic for G1, but it was not useful
at all because smacs and rmacs were always redefining the value
of G0.
2014-10-08 11:35:45 +02:00
Roberto E. Vargas Caballero 88429cdcbf Add LS2 and LS3
These sequences are the equivalents of LS0 and LS1, but for G2 and
G3.
2014-10-08 11:33:36 +02:00
Roberto E. Vargas Caballero 0c8feecbf7 Fix SI and SO
SI (0x0F or ^O) means Shift In, and it selects G1 charset definition,
and SO (0x0E or ^N) means Shift Out, and it selects G0 charset
definition, but st was doing just the inverse.
2014-10-08 11:28:54 +02:00
Christoph Lohmann a7eef8f230 Removing an extra space. 2014-09-29 15:41:10 +02:00
Christoph Lohmann 63a07eb19c Minor style changes for the last patch. 2014-09-29 15:40:37 +02:00
Christoph Lohmann dc8c5c82aa Implementing xzoomreset.
Thanks mvdan@mvdan.cc for proposing this.
2014-09-29 15:38:21 +02:00
Roberto E. Vargas Caballero c7a945c408 Add missed names of charset sequences 2014-09-23 07:16:58 +02:00
Roberto E. Vargas Caballero 5afb3862ba Add support for utmp in st
St runs an interactive shell and not a login shell, and it means
that profile is not loaded. The default terminal configuration
in some system is not the correct for st, but since profile is
not loaded there is no way of getting a script configures the
correct values.

St doesn't update the utmp files, this is the job of another
suckless tool, utmp. Utmp also opens a login shell (it is the
logical behaviour when you create a new user record) it is a
good option execute utmp and then get a correct input in
utmp, wtmp and lastlog file, and execute the content of the
profile.
2014-09-23 07:12:41 +02:00
Roberto E. Vargas Caballero 0392d165d0 Remove indentation level in xdrawcursor 2014-09-09 05:51:36 +02:00
Ben Hendrickson 98a1085d0e Removing wrapping newlines from selection
When getting selected text, lines that were wrapped because of length
ought not include the wrapping newline in the selection.

This comes up, for example, when copying a bash command that is long
enough to wrap from the console and pasting it back into the console.
The extra newline breaks it.

Similiarly, changes behavior when trimming whitespace from the end of a
physical line to only do so if the line does not wrap. Otherwise we are
trimming whitespace from the middle of a logical line, which may change
its meaning.

Signed-off-by: Roberto E. Vargas Caballero <k0ga@shike2.com>
2014-08-23 09:52:18 +02:00
Ivan Delalande 51466e019a Change the behavior of word snapping on delimiters
This makes any sequence of identical delimiters be considered a single
word in word-snapping mode. This seems more coherent for this mode and
is similar to what xterm does.

Signed-off-by: Roberto E. Vargas Caballero <k0ga@shike2.com>
2014-08-21 17:50:31 +02:00
Ivan Delalande c490a60b80 Move calls to selsnap into selnormalize
This simplifies getbuttoninfo() and bpress(), and fixes a bug which made word
snapping behave incorrectly when a delimiter was at the beginning or end of
line.

Signed-off-by: Roberto E. Vargas Caballero <k0ga@shike2.com>
2014-08-21 17:50:31 +02:00
Alexander Huemer 83dea7fd7b Improve readability of enum members
The 'left shift from one' notation of power of two integers is more
expressive than the result.

Signed-off-by: Alexander Huemer <alexander.huemer@xx.vu>
Signed-off-by: Roberto E. Vargas Caballero <k0ga@shike2.com>
2014-08-20 21:52:33 +02:00
Roberto E. Vargas Caballero e5f6736ee0 Add eschandle()
We already have a csihandle() function, where is located code about
CSI sequences, so it is logical do the same with ESC sequences.
This change helps to simplify tcontrol(), which has a complex flow
and should be rewritten.
2014-08-20 21:52:33 +02:00
Roberto E. Vargas Caballero a3549c2eec Improve execsh() and don't allow anonymous shells
This patch improves the shell selection on execsh and forbid
shell with users don't registered in the passwd file.
2014-08-20 09:03:44 +02:00
Roberto E. Vargas Caballero 8342036f98 Fix definition of CONTROLC0
DEL character is not thecnically talking a C0 control character,
although it has some common properties with them, so it is useful
for us consider it as C0. Before this patch DEL (\177), was not
ignored as it ought to be.
2014-08-19 12:57:44 +02:00
Roberto E. Vargas Caballero 9d9e049eac Make useful DEL in application mode
DEL key has to generate the sequence ^[P in application mode,
because such sequence means delete current character. It implies
that the character sent in keypad mode must be ^? (DEL character).
2014-08-19 12:57:43 +02:00
Quentin Carbonneaux 177d888dff reset the alt screen in treset
Signed-off-by: Roberto E. Vargas Caballero <k0ga@shike2.com>
2014-08-19 12:57:43 +02:00
Quentin Carbonneaux fa04911c91 simplify loop in tresize
Signed-off-by: Roberto E. Vargas Caballero <k0ga@shike2.com>
2014-08-19 12:57:43 +02:00
Alexander Huemer 1926305318 Simplify README
The term 'virtual terminal emulator' was broken. There is nothing
virtual about it, it's a terminal emulator.

Signed-off-by: Alexander Huemer <alexander.huemer@xx.vu>
Signed-off-by: Roberto E. Vargas Caballero <k0ga@shike2.com>
2014-08-18 12:12:26 +02:00
Roberto E. Vargas Caballero 8f3e6a577d Fix man page and usage()
Man page was repeating -f option, the second time instead of -i,
and this option was lost in usage() message. This patch also indent
the output of usage().
2014-08-17 20:49:33 +02:00
Roberto E. Vargas Caballero f8b4998b32 Convert VT102ID to a config variable
VT102ID is the sequence that the terminal returns when it is inquired
to identify itself. This value should be configurable in the same
way that another st parameters.
2014-08-15 15:00:48 +02:00
Roberto E. Vargas Caballero 6530025bca Fix portability problem in techo()
ISCONTROL chechks if a value is between 0 and 0x1f or
between 0x80 and 0x9f. Char signess depends of architecture
and compiler, so in some environment the second case is
always false (and wrong), Techo() calls ISCONTROL with a
char variable, whose type cannot be changed because tpuc()
expects a pointer to char, so the solution is to insert a
cast in the call to ISCONTROL.
2014-08-15 14:48:16 +02:00
noname d4a17316d3 Don't set dirty all lines because tswapcreen do it
Signed-off-by: Roberto E. Vargas Caballero <k0ga@shike2.com>
2014-08-10 22:22:42 +02:00
noname 20c4f12254 tresize return value is not used
Signed-off-by: Roberto E. Vargas Caballero <k0ga@shike2.com>
2014-08-10 22:16:21 +02:00
Roberto E. Vargas Caballero 821a6e00a5 Remove ul capability
This capability indicates that underscore '_' overstrike current
letter under the cursor. It means that you can generate a
underline 'b' using 'b^H_', because it writes a 'b' then backward
one characther and then overstrike '_'. St has not such behaviour,
so it is an error to have this capability.
2014-08-07 10:19:48 +02:00
Roberto E. Vargas Caballero 8de8ae3923 Unset mode when clearing regions
tclearregion() was clearing regions using spaces and the current
attributes of the terminal. It was correct with all the modes excepct
underline, because they didn't affect the space character, but in
the case of underline it was a problem. A easy way of seeing this
problem is writing this in the last line of the terminal:

	tput smul ; echo first; tput rmul; echo second; echo third

Fist was underlined, and second and third were not underlined, but
the spaces at the right of second was underlined becuause in the
previous scrool underline mode was set.
2014-08-07 10:11:38 +02:00
Roberto E. Vargas Caballero ec3268961d Add error message when child exits whit error
Master proccess was not showing any error message when the child
died with an error, and it was very confusing for the user (for
example with incorrect -e command).
2014-08-04 22:07:04 +02:00
Roberto E. Vargas Caballero 769d481807 Remove difference between fast and slow blinking
One blinking mode is good enough, and two is too much. The best aproach
is emulate the fast blinking with the slow blinking, that it is more
used.
It is removed the flag ATTR_FASTBLINK because it has not a different
meaning of ATTR_BLINK, so it is not needed.

Signed-off-by: Roberto E. Vargas Caballero <k0ga@shike2.com>
2014-07-31 19:40:37 +02:00
Michael Forney b4dfa18124 Fix disabling of bold and fastblink
According to ECMA-48¹ 8.3.117, an attribute value of 21 is "doubly
underlined", while 22 is "normal colour or normal intensity (neither
bold nor faint)".

Additionally, 25 is "steady (not blinking)", which likely means neither
slow blink nor fast blink.

¹: http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-048.pdf

Signed-off-by: Roberto E. Vargas Caballero <k0ga@shike2.com>
2014-07-26 10:13:11 +02:00
Wolfgang Corcoran-Mathe e8f3513bf4 Add info about Backspace and Delete to the FAQ
Here is a modest attempt at cleaning it up a little bit. I changed a
few phrases that seemed awkward, but I think the content is the same.

--
Wolfgang Corcoran-Mathe

Signed-off-by: Roberto E. Vargas Caballero <k0ga@shike2.com>
2014-07-26 10:11:08 +02:00
Roberto E. Vargas Caballero f210ea26c4 Add info about Backspace and Delete to the FAQ 2014-07-25 17:09:27 +02:00
Roberto E. Vargas Caballero 8306568bd0 Add information about librt and OpenBSD to the FAQ 2014-07-25 17:09:27 +02:00
Roberto E. Vargas Caballero 844cd7ce17 Add information about librt and OpenBSD to the FAQ 2014-07-24 19:50:38 +02:00
Roberto E. Vargas Caballero 8c5ba1cfb0 Add information about librt and OpenBSD to the FAQ 2014-07-21 17:44:31 +02:00
Wolfgang Corcoran-Mathe 3949aa7c5d Very minor grammar fixes in FAQ
Self-explanatory.

Signed-off-by: Roberto E. Vargas Caballero <k0ga@shike2.com>
2014-07-21 17:44:30 +02:00
Weng Xuetian 84ceefe089 Fix st with input method.
XFilterEvent need to be called against every event, otherwise it would
missing some message in the xim protocol and misbehave on some im server.

Signed-off-by: Roberto E. Vargas Caballero <k0ga@shike2.com>
2014-07-19 19:46:31 +02:00
Eric Pruitt b5d0a13c10 Changed inconsistent indent
- A line was indented using spaces despite the rest of the code using
  tabs.

Signed-off-by: Roberto E. Vargas Caballero <k0ga@shike2.com>
2014-07-15 19:30:48 +02:00
Roberto E. Vargas Caballero 984c12d2a6 Add 8 bit version of DCS, APC, PM, OSC
DCS, APC, PM, OSC version for 7 bits environments already was implemented
in st.  This patch adds the 8 bit version of it.
2014-07-08 23:32:28 +02:00
Roberto E. Vargas Caballero da78629cf5 Add 8 bit version of HTS
HTS version for 7 bits environments already was implemented in st.
This patch adds the 8 bit version of it.
2014-07-08 23:32:28 +02:00
Roberto E. Vargas Caballero f5356d0185 Add 8 bit version of NEL
NEL version for 7 bits environments already was implemented in st.
This patch adds the 8 bit version of it.
2014-07-08 23:32:25 +02:00
Roberto E. Vargas Caballero bcbaf5d9be Add 8 bit version of DECID
DECID version for 7 bits environments already was implemented in st.
This patch adds the 8 bit version of it.
2014-07-08 23:28:10 +02:00
Anders Eurenius f796533b1b Render faint attribute
Faint text is implemented by allocating a new color at one-half
intensity of each of the r, g, b components, or if the text bold at the
same time, it is not made lighter.

Signed-off-by: Roberto E. Vargas Caballero <k0ga@shike2.com>
Signed-off-by: Christoph Lohmann <20h@r-36.net>
2014-07-08 22:46:55 +02:00
Ivan Delalande 955923b38b Remove all strcmp and strlen calls on Glyph.c[]
There were a few occurrences of strcmp and strlen being called on Glyph.c[],
which is not always null-terminated (this actually depends on the last values in
the buffer s in ttyread()). This patch replace all the calls to strcmp with a
test on c[0] directly or a call to tlinelen, and the one to strlen with utf8len.
I also took the opportunity to refactor getsel and tdumpline.

Signed-off-by: Roberto E. Vargas Caballero <k0ga@shike2.com>
2014-07-08 09:21:48 +02:00
Christoph Lohmann 0015e198bf Making surf compile again with rt.
The clock_gettime patch needs librt to be linked to surf.

Thanks _odie for the hint.
2014-06-30 17:33:43 +02:00
Anders Eurenius 1fc4afd1e6 Render struck-out attribute
Implement crossed-out text with an XftDrawRect call, similar to how
underline is implemented. The line is drawn at 2/3 of the font ascent,
which seems to work nicely in practice.

Signed-off-by: Roberto E. Vargas Caballero <k0ga@shike2.com>
2014-06-27 14:07:22 +02:00
Anders Eurenius 21bd4f4f9d Render invisible attribute
Implement invisible mode by setting the foreground color to be the same
as the background color. Not rendering anything would also be an
alternative, but this seems less likely to cause surprises in
conjunction with any hacks.

Signed-off-by: Roberto E. Vargas Caballero <k0ga@shike2.com>
2014-06-27 14:06:21 +02:00
Anders Eurenius 50e6355e0d Reorder and extend glyph attributes
Faint, invisible, struck and fast blink are added as glyph attributes.
Since there's an edit here, let's take the opportunity to reorder them
so that they correspond to the two's power of the corresponding escape
code. (just for neatness, let's hope that property never gets used for
anything.)

Signed-off-by: Roberto E. Vargas Caballero <k0ga@shike2.com>
2014-06-27 14:04:47 +02:00
Roberto E. Vargas Caballero 77569526c0 Remove CEIL macro
This macro was not correct in some cases, and it was used only in
one place, where we did'nt get any benefit in performance of in size,
so the macro is removed and ceilf is used instead of it. The only
function needed from math.h is ceilf, so this patch defines the
prototype of it instead of including math.h.
2014-06-26 12:37:06 +02:00
Ivan Delalande 19d095717f Fixed wrong nanosecond factor 10E6.
Commit 5edeec1 introduced a wrong factor for nanosecond computation, the correct
value is 1E6. Time and timeout values are 10 times less than they should be and
this cause high CPU usage.

Reported by pyroh on IRC. Thanks!

Signed-off-by: Roberto E. Vargas Caballero <k0ga@shike2.com>
2014-06-26 12:33:55 +02:00
FRIGN 5edeec1b20 Use monotonic clock to prevent timing issues
This patch replaces the gettimeofday()/timeval-system with
uses of clock_gettime() with a monolithic clock and timespec-structs.
gettimeofday() is not accurate and prone to jumps and POSIX.1-2008
marks it as obsolete. Read more here [0].

The patch should speak for itself and decreases the binary
size for me by almost 200K(!).

[0]: http://blog.habets.pp.se/2010/09/gettimeofday-should-never-be-used-to-measure-time

Signed-off-by: Roberto E. Vargas Caballero <k0ga@shike2.com>
2014-06-24 21:45:36 +02:00
Eric Pruitt 738f555f66 Fix typo in config.def.h
Signed-off-by: Roberto E. Vargas Caballero <k0ga@shike2.com>
2014-06-21 10:24:36 +02:00
Troy Sankey 58eaa998b3 update size hints on zoom
On font zooming (i.e. xzoom()), window size hints are not updated.  This
patch does that.

Signed-off-by: Roberto E. Vargas Caballero <k0ga@shike2.com>
2014-06-21 10:03:41 +02:00
Silvan Jegen c2fd2754eb Refactor the innermost loop of the xdraws function
Signed-off-by: Silvan Jegen <s.jegen@gmail.com>
Signed-off-by: Christoph Lohmann <20h@r-36.net>
2014-06-15 12:12:23 +02:00
Hiltjo Posthuma 27b28f1dc2 FAQ: update typo and escape code for smkx
Signed-off-by: Roberto E. Vargas Caballero <k0ga@shike2.com>
2014-06-11 11:17:17 +02:00
Christoph Lohmann 587b443592 Style police. 2014-06-07 13:49:04 +02:00
Roberto E. Vargas Caballero 93661042a2 Simplify tdeftrans 2014-06-07 13:23:45 +02:00
FRIGN 18a05fdf43 Remove unnecessary typedef
This should also fix compiling-errors on OpenBSD,
as reported by Nils R. Thanks!

Signed-off-by: Roberto E. Vargas Caballero <k0ga@shike2.com>
2014-06-06 15:23:22 +02:00
Colona 5159d55c63 Refactor selsnap SNAP_WORD.
Refactor the SNAP_WORD part in selsnap, and fix a bug that caused the word
delimiters to be ignored if it was at the very beginning or end of a wrapped
line.

Signed-off-by: Roberto E. Vargas Caballero <k0ga@shike2.com>
2014-06-05 21:14:45 +02:00
Colona 6fd887077e Fix rectangular selection.
selsort computes the wrong normalized coordinates when rectangular
selection is enabled, causing rectangular selection to only work
when going toward either the top left corner, or the bottom right
one.

Signed-off-by: Roberto E. Vargas Caballero <k0ga@shike2.com>
2014-06-04 21:10:25 +02:00
Hiltjo Posthuma bb6dc33206 tiny cleanup
Signed-off-by: Roberto E. Vargas Caballero <k0ga@shike2.com>
2014-06-04 21:09:07 +02:00
Colona 2323e962e6 Make selection consistent over line breaks.
Currently, selection is expanded to the end of the line over line breaks only in
regular selection mode, when the line in not empty and when going down and/or
right. This covers all the cases including word selection mode, with the
exception of rectangular selection because it would make this mode too rigid.
This adjustment is made in selsort so I renamed it to selnormalize to better
reflect what it does now.

Signed-off-by: Roberto E. Vargas Caballero <k0ga@shike2.com>
2014-06-04 21:09:07 +02:00
Christoph Lohmann c6fcb78b3a Fixing color and refactor xsetcolorname.
By  the recommendation of FRIGN I refactored xsetcolorname to remove the
unnecessary r, g, b variables when allocating a new  color.  Colors  are
now freed and set to the new color. A die() should not happen here. Oth‐
erwise it is easy for applications to kill st. St should be resilent  to
malicious input.

Second  this  patch  standardises  the  naming  of  »color«. There is no
»colour« here. Maybe in some parts of the world.
2014-06-01 17:08:16 +02:00
Christoph Lohmann 8b4cfcea73 Revert "Refactor xsetcolorname()"
This reverts commit a32c5f5726.
2014-06-01 16:52:19 +02:00
FRIGN a32c5f5726 Refactor xsetcolorname()
I mainly improved the slightly off algorithm used to load colours in the 256-colour-space and
removed unnecessary local values (r,g,b,colour).
"colour" is not necessary as a punchbag for XftColorAlloc[Value,Name], as they don't mess with
the result-adress until they are absolutely sure everything worked out[0].

Being at it, I changed the error-returns for AllocValue to dies (just like in xloadcols()), as
a failure is most likely an OOM-situation you better catch early.
In case of an invalid name everything stays the same.

[0]: http://www.opensource.apple.com/source/X11libs/X11libs-40/libXft/libXft-2.1.13/src/xftcolor.c

Signed-off-by: Christoph Lohmann <20h@r-36.net>
2014-06-01 16:20:22 +02:00
Balazs Kezes ba36d1394b Don't report release events for mouse wheel
Signed-off-by: Christoph Lohmann <20h@r-36.net>
2014-06-01 15:57:03 +02:00
Christoph Lohmann ede83bd08b Fixing italic bold.
Thanks Felipe Spychalski <spychalski@gmail.com> for the patch!
2014-06-01 15:54:28 +02:00
Alexander 2411308bd2 Fixed copying empty lines inside selection.
The code was assuming that empty lines have implicit wrap-around attribute.

Signed-off-by: Roberto E. Vargas Caballero <k0ga@shike2.com>
2014-05-27 08:37:12 +02:00
Christoph Lohmann d03aa8d20b Fix some more LICENSE changes. 2014-05-24 21:27:54 +02:00
FRIGN 80d8051269 Add FRIGN to License, remove trailing whitespace
Signed-off-by: Christoph Lohmann <20h@r-36.net>
2014-05-24 21:27:30 +02:00
Christoph Lohmann 488977c8ef Brightening is again on the TODO list. 2014-05-24 13:52:24 +02:00
Christoph Lohmann f4ebb3180f Fixing trailing whitespaces. 2014-05-24 13:48:44 +02:00
FRIGN 3544e354b2 Fix colour-model and simplify xloadcols()
Signed-off-by: Christoph Lohmann <20h@r-36.net>
2014-05-24 13:47:00 +02:00
Hiltjo Posthuma cf890e5bf0 Allow mouse selection override using ShiftMask
Similar to xterm or urxvt holding shift before selecting text with the mouse
allows to override copying text. For example in tmux with "mode-mouse on" or
vim (compiled with --with-x), mc, htop, etc.

forceselmod in config.h sets the modifier to use this mode, by default
ShiftMask.

Signed-off-by: Hiltjo Posthuma <hiltjo@codemadness.org>
2014-05-14 07:48:25 +02:00
Christoph Lohmann bdb850a16a Redraw needs all dirty lines to have flash etc. work. 2014-05-09 17:12:58 +02:00
Colona e31829f659 End a sequence only on CAN, SUB, \a and C1s. 2014-05-09 10:25:29 +02:00
Colona 5e917ab287 Also clears ESC_START on interrupt characters during sequences.
Otherwise, the rest of the input is interpreted as a new escape
sequence.
For the ESC character, ESC_START is re-set in tcontrolcode.
2014-05-09 08:26:37 +02:00
noname 99fb365aa3 Consistent FALLTHROUGH comments. 2014-05-02 21:49:52 +02:00
Roberto E. Vargas Caballero 870f961c49 Fix displaying control code
Control code are never displayed. It is not important if graphic
charset is displayed or not.
2014-04-30 08:35:53 +02:00
Roberto E. Vargas Caballero 1629363f2d Remove ATTR_GFX and tselcs
ATTR_GFX was used long time ago to detect when terminal was in
graphic mode. Today graphic mode is implemented using a charset
pointer, so ATTR_GFX is not needed anymore because graphic
condition can be detected directly checking if current charset
is GRAPHICS C0.
2014-04-29 15:17:51 +02:00
noname 6b315558f8 Do not save cursor in tresize.
This patch fixes the bug introduced in
8f11e1cd03

To reproduce the bug:
1. Save cursor: printf '\e[s'
2. Load cursor: printf '\e[u'
3. Resize st window.
4. Load cursor again: printf '\e[u'
2014-04-29 15:17:50 +02:00
noname 5f91983541 Simplify selected(). 2014-04-28 18:49:45 +02:00
noname 9e3e8ce466 Do not export chscale and cwscale. 2014-04-28 18:49:05 +02:00
noname 0e439e5624 Simplify xunloadfonts. 2014-04-28 18:48:09 +02:00
noname 74962bf566 Remove one indentation level in getsel(). 2014-04-28 18:38:07 +02:00
noname 6681af165b Remove unused dump() function. 2014-04-28 18:38:07 +02:00
noname 1ae2745fd1 Add missing function prototypes. 2014-04-28 18:38:06 +02:00
noname a48f2be7f5 Use MODBIT in xseturgency. 2014-04-28 18:38:06 +02:00
noname 17fa1493ee Compute ena_sel as one expression. 2014-04-28 18:38:06 +02:00
Roberto E. Vargas Caballero a8a9e66a7d Simplify expressions in tputc() 2014-04-28 18:38:05 +02:00
Roberto E. Vargas Caballero 17290f493b Fix misplaced break
This misplaced break was causing an incorrect fall through
from DSR to DECSTBM.
2014-04-28 18:38:05 +02:00
Roberto E. Vargas Caballero 43d74ef362 Create a function for DEC test
Almost of the sequences execute their action in a separate function,
which is good because helps to read the full set of sequences
faster.
2014-04-28 18:38:05 +02:00
Roberto E. Vargas Caballero 3764f38fc8 Fix tputc control code handling
The patch 53105cf modified how control codes were detected, because
it tried to handle also C1 control codes (0x80-0x9f), that have
upper bit to 1, so they are multi byte character in utf8.
Code was checking the value of width in order to known that after
decoding the unicode point had a width of 1 byte, but it as incorrect
because this width is the columnb width.
2014-04-28 18:32:09 +02:00
Roberto E. Vargas Caballero 53105cf74f Remove repeated initialisation of term.esc
Once a sequence is completed term.esc must return to 0, so
instead of repeating this expression in all the cases is
better put it at the end of the block.
2014-04-27 11:30:21 +02:00
Roberto E. Vargas Caballero aa35bbd7a1 Cancel DCS with SUB, CAN, ESC or any CC1 code
From http://www.vt100.net/docs/vt510-rm/chapter4:

	*The VT510 ignores all following characters until it receives a
	 SUB, ST, or any other C1 control character.

So OSC, PM and APC sequence ends with a SUB (it cancels the sequence
and show a question mark as error), ST or any another C1 (8 bits)
code, or their C0 (7 bits) equivalent sequences (at this moment we
do not handle C1 codes, but we should). But it is also said that:

	Cancel  CAN
	1/8     Immediately cancels an escape sequence, control sequence,
		or device control string in progress. In this case, the
		VT510 does not display any error character.

	Escape  ESC
	1/11    Introduces an escape sequence. ESC also cancels any escape
		sequence, control sequence, or device control string in
		progress.
2014-04-27 11:30:13 +02:00
Markus Teich 704d12442e add break;s for last cases in switch statements 2014-04-27 10:34:57 +02:00
noname 02d2df5790 Do not eat ESC character if control string is not properly terminated.
Currently tputc handles the case of too long control string waiting for
the end of control string.

Another case is when there is ESC character is encountered but is not
followed by '\\'.  In this case st stops processing control string,
but ESC character is ignored.

After this patch st processes ESC characters in control strings properly.

Test case:
printf '\e]0;abc\e[1mBOLD\e[0m'

Also ^[\ is actually processed in the code that handles ST.
According to ECMA-048 ST stands for STRING TERMINATOR and is used to
close control strings.
2014-04-26 00:14:42 +02:00
noname c4b79b055d Fix for multibyte characters in techo.
Works for both signed and unsigned char.
2014-04-26 00:03:09 +02:00
noname 7f1e02e4db s/DSC/DCS/ DCS stands for DEVICE CONTROL STRING 2014-04-26 00:03:09 +02:00
noname 84f6dbffa5 Use xwrite instead of write. 2014-04-26 00:03:08 +02:00
noname 2d67f99d28 Remove unnecessary break 2014-04-26 00:03:08 +02:00
noname 4a8574b439 Comment fix. 2014-04-25 23:57:44 +02:00
Colona 8f11e1cd03 On terminal resize, clear the alt screen with its own cursor.
Currently the alternate screen get messed up on resize if it has
different colors or mode.
2014-04-25 23:57:44 +02:00
noname 844c503c80 Optimize tputtab.
Before this patch executing
	printf '\e[10000000000I'
or
	printf '\e[10000000000Z'
resulted in long delay.
2014-04-25 23:57:44 +02:00
noname 1b0b9759dc Use != instead of ^ for logical values.
sel.alt is only changed by
	sel.alt = IS_SET(MODE_ALTSCREEN);
2014-04-25 23:57:43 +02:00
noname 99d2d6007a Use BETWEEN macro in xsetcolorname and fix style. 2014-04-25 23:57:43 +02:00
Christoph Lohmann fe31a3f634 Conformity in the -g geometry handling.
Thanks to Yuri Karaban for suggesting this!

These changes make -g correspond to <cols>x<rows> and honor it so non-tiling
window managers can work with the size hints afterwards. It also adds a -i
flag to force the window size. This is needed so -g keeps being useful in dwm.
2014-04-25 22:34:24 +02:00
Roberto E. Vargas Caballero 6b7f63bac5 Simplify a bit more tdeletechar and tinsertblank
The large and repeated expression used in memmove to indirect
the line can be simplified using a pointer, that makes more
clear where begins and where ends the movement.
2014-04-25 17:25:59 +02:00
noname 80b32af794 Simplify tdeletechar and tinsertblank and fix memory corruption.
Current CSI parsing code uses strtol to parse arguments and allows them
to be negative. Negative argument is not properly handled in tdeletechar
and tinsertblank and results in memory corruption in memmove.

Reproduce with printf '\e[-500@'

Patch also removes special handling for corner case and simplifies
the code.

Removed
	term.dirty[term.c.y] = 1
because tclearregion sets dirty flag.
2014-04-25 17:17:48 +02:00
noname 16ac85bf54 Style fixes in tscrollup. 2014-04-23 20:38:04 +02:00
noname fe527aa508 Do not set dirty flag twice in tscrollup and tscrolldown. 2014-04-23 20:37:59 +02:00
noname 3afdb4ff04 Use tsetdirt in tscrollup and tscrolldown.
tscrollup and tscrolldown do not use tsetdirt, but their code is
equivalent to

        tsetdirt(orig, term.bot-n);
        tsetdirt(orig+n, term.bot);

tclearregion also marks cleared lines as dirty.
In tscrolldown it sets lines from term.bot-n+1 to term.bot dirty, and in
tscrollup it sets lines from orig to orig+n-1 dirty.

In both functions all lines from orig to term.bot are effectively set
dirty, but in tscrolldown lines from orig+n to term.bot are set dirty
twice, and in tscrollup lines from orig to term.bot-n are set dirty
twice.

These patches make it clear which lines are set dirty and sets them
dirty once in each funciton.
2014-04-23 20:35:16 +02:00
noname f9dc374ea0 Fix techo handling of control and multibyte characters.
techo compares signed char to '\x20'. Any character with code less then
'\x20' is treated as control character.  This way characters with MSB
set to 1 are considered control characters too.

Also this patch makes techo display DEL character as ^?.

To reprocuce the bug, enable echo mode using printf '\e[12l',
then type DEL character or any non-ASCII character.
2014-04-23 20:31:45 +02:00
noname fa19f241a3 Make xrealloc and xstrdup style consistent. 2014-04-23 15:39:04 +02:00
noname df1810dd8f Use BETWEEN in tsetchar. 2014-04-23 15:39:03 +02:00
noname ed855ea432 Use uint and uchar instead of unsigned int and unsigned char. 2014-04-23 15:39:03 +02:00
noname 68d97457ec Remove argument names from function prototypes. 2014-04-23 15:39:03 +02:00
noname 49672dac7b Style fix in tdumpsel. 2014-04-23 15:39:02 +02:00
noname f21e47f44a Use BETWEEN in tinsertblankline and tdeleteline. 2014-04-23 15:39:02 +02:00
Christoph Lohmann 87abc7cd59 It's 2014 now. 2014-04-22 19:22:58 +02:00
noname@inventati.org 1388870331 move MODBIT to Macros section
Patch moves MODBIT to macros section and uses it in tselcs.
2014-04-20 21:13:37 +02:00
noname@inventati.org 6b56cbf9cc misplaced parenthesis in LEN macro 2014-04-20 21:07:04 +02:00
Markus Teich 3269bf213d remove confusing SERRNO macro
I found the SERRNO Macro slightly confusing, since you have to look
it up, if you don't know it already. A web search showed it does
not seem to be any kind of standard. Also there was no reason in
the commit log when it was introduced in 2009. As you can see it
also leads to new patches, which don't use this macro (probably the
author did not know about it).
2014-04-20 21:00:46 +02:00
noname@inventati.org 4ad2fc7f18 Simplify techo
Remove special case for \e because it is handled well by "control code"
case.
2014-04-15 08:16:39 +02:00
noname@inventati.org dc74c4f729 typedefs instead of #defines
Replaced #defines with typedefs where possible, patch attached.
2014-04-15 08:14:46 +02:00
q@c9x.me b8d6171cb0 fix cursor handling when alt screen is disabled
I don't like this alt screen thing, but when
allowaltscreen == 0, the cursor is still saved
and restored after calling 'less' (or 'man').

This patch makes allowaltscreen == 0 usable.
2014-04-15 08:13:41 +02:00
Roberto E. Vargas Caballero ebb6e03201 Merge remote-tracking branch 'origin/master' into omaster 2014-04-15 08:11:47 +02:00
Christoph Lohmann f27b44b7c2 Removing two unnecessary gettimeofday(). 2014-04-11 18:11:25 +02:00
Toaster Toaster 3cb80840db Increment XSync consistency
This patch cleans up a style inconsistency.
2014-04-11 16:29:13 +02:00
Roberto E. Vargas Caballero c46d929fe1 Fix Backspace and Delete characters
Backspace key must generate the backspace character (\010) and
Delete key must generate the delete character (\0177). In
some systems the kernel configuration for erasing previous character
is \0177, so some programs (for example cat, ed, mail, ...), can not
understand the correct meaning of backspace. In this cases it is only
needed this command:

	stty erase 
2014-04-11 15:08:37 +02:00
Christoph Lohmann 0baf2d8be5 0.5 release. 2014-04-05 20:40:11 +02:00
Christoph Lohmann 62f9142478 Updating the TODO in preparating for 0.5. 2014-04-05 20:39:46 +02:00
Christoph Lohmann a495fce128 There is no need for a full dirt redraw. 2014-04-05 20:34:57 +02:00
Christoph Lohmann 6f4cfa5136 Fixing a compiler warning with the assignment. 2014-04-02 09:26:28 +02:00
Rafa Garcia Gallego 672e4e4b03 Fix segfault when pressing PrintScr without a selection 2014-03-27 07:48:32 +01:00
Damian Okrasa 45b808b88e new utf decoder
This patch replaces current utf decoder with a new one, which is ~50
lines shorter and should be easier to understand. Parsing 5 and 6
sequences, if necessary, requires trivial modification of UTF_SIZ
constant and utfbyte, utfmask, utfmin, utfmax arrays.
2014-03-27 07:19:37 +01:00
Roberto E. Vargas Caballero 71328cbcdc Merge branch 'master' of ssh://suckless.org/gitrepos/st 2014-03-10 15:16:26 +01:00
Roberto E. Vargas Caballero 85f8a414be Add terminfo entries for printer
These capabilities inform to programs how print in local printer
of the terminal.
2014-03-06 07:55:21 +01:00
Roberto E. Vargas Caballero 78f8843bc7 Add sequence for printing the current selection
This is very usefull in order to can select what is sent
to the plumber.
2014-03-06 07:55:07 +01:00
Roberto E. Vargas Caballero 96c230e476 Add key definition for printer sequences
These new combinations generate the same behaviour (basically) of
vt102. It is a good way of communicating st with other programs.

[0] http://www.vt100.net/docs/vt102-ug/chapter2.html
2014-03-06 07:53:15 +01:00
Roberto E. Vargas Caballero 6166a1afc8 Add MC for the full screen
This sequence is very useful because allows comunicate the content
of the terminal to another program.
2014-03-06 07:51:58 +01:00
Roberto E. Vargas Caballero cf332a325d Add MC for a single line
This sequence print the current line. It is different to the
'printer on' sequence, where all the characters that arrive to the
terminal are printer. Here only the ascii characters are printed.
2014-03-06 07:50:34 +01:00
Christoph Lohmann 1584956a60 Style cleanup.
Add some note about the main reason why st is still that big.
2014-03-01 11:04:03 +01:00
Christoph Lohmann d2ec39f0ef Style matters. 2014-03-01 09:22:57 +01:00
Roberto E. Vargas Caballero 1f0d981bd7 Add MC sequence
This sequence control when the printer is enabled or disabled. This
sequence control the behaviour of the -o option.
2014-02-22 11:54:30 +01:00
Roberto E. Vargas Caballero cdb3b1892a Add xstrdup function
Since we are using xmalloc, xrealloc ..., then it is not logical
call directly to strdup.

Signed-off-by: Roberto E. Vargas Caballero <k0ga@shike2.com>
2014-02-08 19:58:37 +01:00
Roberto E. Vargas Caballero 315b7ee9ce Merge remote-tracking branch 'origin/master' 2014-02-04 11:46:45 +01:00
Christoph Lohmann c2026a4950 Removing the w3img support.
The patch to add w3img support destroys our way to handle fps and so stop
wasting resources on fast scrolling. Due to w3img being a hack to display
images in an ugly way, is there no need to support this. Use some real way to
display images.
2014-02-03 20:54:25 +01:00
Roberto E. Vargas Caballero 6521b5dc32 Remove non defined behaviour in selcopy
It is not defined when lateral effects of expressions are
calculated, so an expression as:

	--last >= gp && !(selected(last - gp, y)

is non portable.
2014-02-02 19:42:01 +01:00
Roberto E. Vargas Caballero a8d5870073 Remove duplicated code in strhandle
The error condition was duplicated in two different switches.
This new version centralized the error handling in only one place.
2014-02-02 19:42:01 +01:00
Roberto E. Vargas Caballero 21d905c076 Make Shift+Home equal to CLS in ascii mode 2014-02-02 19:40:38 +01:00
Roberto E. Vargas Caballero 9523233e25 Make CONTROL + DELETE delete a line
If CONTROL + INSERT inserts a line then it seems natural CONTROL + DELETE
removes a line.
2014-02-02 19:30:38 +01:00
Roberto E. Vargas Caballero d2173cd716 Fix SHIFT+DEL definition
The AppMode and AsciiMode were inverted in the definition of this
combination.

Signed-off-by: Christoph Lohmann <20h@r-36.net>
2014-01-31 12:41:37 +01:00
Eric Pruitt 9559100130 Use character scaling in XCopyArea 2014-01-21 19:20:17 +01:00
Amadeusz Sławiński c0a56ef4be Make w3mimgdisplay work with st
Before this patch draw() calls drawregion which calls xdraws and then
updates whole window in one call thus overdrawing anything drawn by
w3mimgdisplay. After moving XCopyArea to xdraws it only updates the
regions which are being updated by XftDraw* functions. It may do a few
more calls to XCopyArea with this patch.

Signed-off-by: Amadeusz Sławiński <amade@asmblr.net>
2014-01-16 10:20:20 +01:00
Amadeusz Sławiński 9df9a4723d Fix truecolor escapes, when both bg and fg are set
for example
echo -e "\e[48;2;255;0;0m\e[38;2;0;0;255m test "
should render on red bg with blue fg

also now elinks works correctly when using 'truecolor' option
in preferences

Signed-off-by: Amadeusz Sławiński <amade@asmblr.net>
2014-01-03 15:28:16 +01:00
Eon S. Jeon e8dba89164 query pixel size from matched font
Sorry for another duplicated mail. I found the patch is malformed
significantly. I've been away from my laptop for a while, so I'm quite
unfamiliar with the settings on this system...
2014-01-03 15:26:25 +01:00
Roberto E. Vargas Caballero 33da67dac0 Update arg.h from sbase
sbase did some interesting modifications to arg.h (basically it
was fixed an incorrect use of the _ namespace), and this commit
take this last version for st.
2013-12-18 08:29:28 +01:00
Eon S. Jeon d60ee7337b Prevent resizing stdin
This fixes a bug that the parent tty gets resized whenever you launch
st through command line.

The problem was that ioctl was resizing cmdfd before it gets
initialized in ttynew. Since cmdfd is a global variable, its initial
value is 0, and consequently stdin was being resized.
2013-12-18 08:11:22 +01:00
Mark Edgar ef1dc9fc4b Replace alignment tabs with spaces. 2013-12-18 08:11:14 +01:00
Mark Edgar 6162d63151 Fix comments in config.def.h to match field names. 2013-12-18 08:10:44 +01:00
Mark Edgar fb8e3f67f7 Fix definition of F28 key.
Shitf modifier adds 12 to the function number of the function keys,
while Control adds 24, so Control + F4 generates F28
2013-12-18 08:10:22 +01:00
Eric Pruitt 39f28b18b7 Set _NET_WM_PID attribute 2013-12-11 21:33:52 +01:00
Eric Pruitt 2738592de6 Fix rmul definition
rmul means "exit underline mode", so a full reset of all
the attributes is not the correct way of exiting from
underline mode, because it is going to modify also another
attributes not related.
2013-12-10 17:21:12 +01:00
René Rietz 08a3eea571 Add stdint include
Since st is using now int32_t and uint32_t the inclusion of
stdint or inttype is mandatory, because in other case the
definition of these new types will not be known by the
compiler.
2013-11-25 16:08:01 +01:00
Roberto E. Vargas Caballero 53474391bc Fix stupid bug in tdefcolor returning -1 in unsigned function
k0ga misktook applying patch of others. Sorry guys!!!!
2013-11-25 14:09:53 +01:00
Johannes Hofmann 1fe0a5f39a Use int instead of long for color
This patch replaces long by int32_t. It saves
some memory on 64bit systems.
2013-11-24 10:43:35 +01:00
Carlos J. Torres 4435e0ee67 add _NET_WM_NAME 2013-11-23 10:54:57 +01:00
Mark Edgar 7263820759 Simplify logic in kmap(). 2013-10-28 19:28:52 +01:00
Mark Edgar 1fa27b93f9 Simplify logic in match(). 2013-10-28 19:28:35 +01:00
Roberto E. Vargas Caballero 3d3c37bc70 Merge remote-tracking branch 'origin/master' into omaster 2013-10-28 19:18:24 +01:00
Rob Pilling 489982d4b8 Fixed lock up when system time jumps backwards
Signed-off-by: Christoph Lohmann <20h@r-36.net>
2013-10-27 13:17:11 +01:00
Mark Edgar 297c886b72 Ignore numlock (Mod2Mask) for button events too.
Conflicts:
	config.def.h
	st.c
2013-10-20 09:53:34 +02:00
Mark Edgar 0f6942cdf6 Avoid buffer overrun in bpress()
Use correct type for Mousekey.b (XButtonEvent.button).
2013-10-15 17:46:17 +02:00
Mark Edgar 8e577322a3 New ttysend() function calls ttywrite() and techo(). Honor MODE_ECHO when pasting in selnotify(). 2013-10-07 21:05:21 +02:00
Mark Edgar 939e149544 Avoid buffer overrun in kpress() and remove limit on shortcut strings. 2013-10-07 21:03:51 +02:00
Mark Edgar 02ae3ce6fd Simplify Mod1 logic in kpress(), eliminating locals and a memcpy. 2013-10-07 20:56:51 +02:00
Roberto E. Vargas Caballero 7a4eefe87c Add support for multiple charset definitions
vt100 has support for two defined charset, G0 and G1. Each charset
can be defined, but in each moment is selected only one of both
charset. This is usually used selecting a national charset in G0
and graphic charset in G1, so you can switch between graphic
charset and text charset without losing the national charset
already defined.

st hasn't support for national charsets, because it is an utf8
based terminal emulator, but it has support for graphic
charset because it is heavily used, but it only supports G0,
without understanding G1 selection sequences, which causes some
programs in some moments can print some garbage in the screen.

This patch adds a fake support for multiple charset definitions,
where we only support graphic charset and us-ascii charset, but
we allow more of one charset definition.

This patch allow define G0 until G3 charsets, but only accepts
select G0 or G1, and it accepts some national charset definitions
but all of them are mapped to us-ascii.
2013-10-02 21:22:15 +02:00
Christoph Lohmann c5c2365ab7 People, learn to keep to styles. Thanks. 2013-10-02 21:06:50 +02:00
Mihail Zenkov 62ab938965 Fix save/restore cursor
st was assuming that save/restore cursor position was independent
of the screen that was shown in each moment, but it is not true,
because each screen has a different save/restore buffer. This
patch fixes it.
2013-10-02 20:47:19 +02:00
Mihail Zenkov 2b1bc8087f Add DSR cursor position sequence 2013-10-02 20:45:19 +02:00
Maurice Quennet eeae9b0cee Fix core in multi-line selection on OpenBSD
OpenBSD 5.3 amd64 release version with the most current st
version from git, crash and dump core when selecting multiple
lines whith the cursor.  This happens, because on line 964
of st.c (gp-1)->mode is accessed, although gp is still
pointing at the beginning of the array term.line[y] (see
line 939 for initialization of gp).
2013-09-23 19:26:24 +02:00
Egmont Koblinger 8ac0a5f872 Add bracketed paste mode
This patch enables bracketed paste mode (
http://invisible-island.net/xterm/ctlseqs/ctlseqs.html#Bracketed%20Paste%20Mode
).

It's mainly useful for text editors to disable line wrapping and auto
indentation when text is being pasted, rather than typed from keyboard.

On the emulator side, it is supported by at least xterm, urxvt,
gnome-terminal, putty, iterm2; and I have a patch for konsole.

On the application side, vim can be configured easily to handle this, and
I have pending patches for mcedit and joe. Probably many others also
support it.
2013-09-23 09:27:55 +02:00
Michael Forney eae31a532e Fix some bugs in mouse tracking logic
* Button number in X10 mode:

  I believe the button - 1 came from "C b is button - 1" from [0].
  However, above this section, it states

    "Normally, parameters (such as pointer poisition and button number)
     for all mouse tracking escape sequences generated by xterm encode
     numeric parameters in a single character as value+32. For example, !
     specifies the value 1."

  Also, from the description of SGR,

    "The encoded button value in this case does not add 32 since that
     was useful only in the X10 scheme for ensuring that the byte
     containing the button value is a printable code."

  This suggests that we should still add 32 to the button value when in
  MODE_MOUSEX10.

* No button release reporting in X10 mode:

    "X10 compatibility mode sends an escape sequence only on button press,
     encoding the location and the mouse button pressed."

* Fix MODE_MOUSEMOTION:

  Currently, motion reporting is skipped when oldbutton == 3
  (corresponding to no button being pressed). However, oldbutton is
  only set on a button press, which will never be 3.

[0]: http://invisible-island.net/xterm/ctlseqs/ctlseqs.html
2013-09-13 19:49:25 +02:00
Christoph Lohmann cc2ea3147a Default volume of the bell is 0. 2013-09-12 20:52:10 +02:00
Roberto E. Vargas Caballero bef599bb27 Add audible bell
\a is the character for bell, and st is only marking the window as urgent
if it is not active. This patch adds an audible bell which can be disable
with bellvolume variable.

Signed-off-by: Christoph Lohmann <20h@r-36.net>
2013-09-12 20:47:41 +02:00
Christoph Lohmann 210dda9570 Wide character support.
Thanks "Eon S. Jeon" <esjeon@hyunmu.am>!
2013-09-07 12:41:36 +02:00
Christoph Lohmann a4358a1fbd Adding some contributors. Thanks to you all! 2013-09-07 12:29:44 +02:00
Mark Edgar 4245ba0d12 Correctly initialize altscreen when defaultbg is not 0.
The alternate screen is not properly initialized when st starts. To see
this, set defaultbg in config.h to anything other than 0 (for example, swap
defaultfg and defaultbg), and run:

./st -e sh -c 'tput smcup; read'

You should see that the top-left 80x24 rectangle is black (or whatever
colorname[0] is), while the rest of the screen (if any) has the desired
colorname[defaultbg] color.

The attached patch fixes this by initializing term.c.attr in tnew() before
calling tresize(). It also removes the unnecessary xcalloc() calls, which
misled me on this bug hunt since it is really tclearregion() which
initializes term.lines and term.alt in tresize().
2013-09-04 18:33:02 +02:00
Eon S. Jeon f3d438b101 Regarding commit 7e3cff3
Hello.

I reviewed and tested commit 7e3cff3, and made a patch that fixes some
problems in it.

1. There's a semicolon after an if statement, which is obviously a
typo.

2. The current way of calculating text position in "xdraws" yields
inconsistent results in some cases. This is due to the use of
"font->width", which varies. Instead, "xw.cw" has to be used as the
character width.

Sincerely,
Eon
2013-08-30 07:50:05 +02:00
Christoph Lohmann 587bc939f6 Tmux is using C-b by default.
Thanks for noticing Fidel Barrera Cruz!
2013-08-22 19:32:49 +02:00
Christoph Lohmann 8d21ced085 Correcting the bitmask value check. 2013-08-20 18:18:48 +02:00
Roberto E. Vargas Caballero 4579693818 Add terminfo definitions for terminals with meta key
Some programs don't check the value of km and use smm and rmm
capabilites, and they cause the terminal change to meta enabled
mode even in cases where is not desirable.

Allmost all people is using the terminal waiting that meta sends
escape, so rmm and smm are not needed. If someone needs meta
sets 8 bit he can use the correct terminfo definition in TERM.
2013-08-12 16:53:09 +02:00
Eon S. Jeon 347a45c352 Fix signess of tdefcolor
tdefcolor() returns -1 on error, while its return type is
unsigned long. At the same time, line 1724 and 1731 are checking the
positivity of its unsigned return value.
2013-08-06 08:32:11 +02:00
Alexander Sedov 22eeda56b7 Fixed memory leak in xsettitle(). 2013-08-05 11:45:53 +02:00
Michael Forney 86c03ddc82 Fix blink mode check
ATTR_BLINK is an attribute for a Glyph and will not be set in term.mode.
2013-08-05 11:45:52 +02:00
Eric Pruitt 7e3cff33ff Use character size scaling factors
The bounding boxes for characters can be scaled using "cwscale" and "chscale"
to scale the width and height respectively.
2013-08-05 11:44:18 +02:00
Roberto E. Vargas Caballero aaee0e8b28 Reload colors in reset
Colors definition can be changed using a OSC sequence, so
we have to reload them if we want be sure all the colors
are the correct.

Could be desirable free the colors allocated due to rgb
colors and inverse colors (XftColorAllocValues in xdraws),
but it is impossible due we use the same structure for all
of them.
2013-07-20 23:25:46 +02:00
Roberto E. Vargas Caballero 8dde8cde41 Add RGB color definition
This patch uses the bit 24 in the color descriptor as an indicator
of RGB color, so we can take the values and generating the XftColour
directly in xdraws.
2013-07-20 23:25:38 +02:00
Eon S. Jeon 33ad83d492 Improved font caching
I made a patch that improves the performance of font caching mechanism.
This is based on a funny behaviour of FontConfig: it was handling
FcCharSet in a somewhat unexpected way.

So, we are currently adding "a character" to a new FcCharSet, and then
add it to a FcPattern. However, if we toss the FcPattern to FontConfig,
it loads the entire language(charset) that contains the character we
gave. That is, we don't always have to load a new font for each unknown
character. Instead, we can reused cached fonts, and this significantly
reduces the number of calls to extremely slow FontConfig matching
functions.

One more thing. I found that, in libXft, there's a function called
XftCharExists. XftCharIndex internally calls this function, and
does more stuffs if the character does exist. Since the returned index
is never used in st, we should call XftCharExists instead of
XftCharIndex. Please note that I already made this change in the patch.
2013-07-19 08:38:10 +02:00
Markus Teich 40e4d76d22 fix: whitespace 2013-07-04 09:58:14 +02:00
Alexander Sedov fbc589d506 Remove long text being cropped/wrapped to standard 80x24 on launch.
To be more specific, now tty creation is delayed until X window is
actually mapped; last ConfigureNotify before mapping determines
initial tty size.
Please report problems if there are any.
2013-07-04 09:36:22 +02:00
Markus Teich 6fc471ccc6 fix: consistent usage of bitmask operations on unicode functions 2013-07-04 09:28:19 +02:00
Markus Teich 8b602a37a6 fix: do not need an extra variable for a single read 2013-07-04 09:26:18 +02:00
Roberto E. Vargas Caballero 6e1c7c8afc Fix match function bugs
There were two problems with match denfinition.

1) There was a forward declaration in the form:

	static inline bool match(uint, uint);

but later the function was defined as:

	inline bool
	match(uint mask, uint state) {

This causes that there were two different functions in the code, one local
and inline, and other inline but extern. All was working without problems
due to we were using -Os, and the compiler was using the extern definition
and it was no expanding the static declaration. If you removed the -Os flag,
then you got linker errors due it was no able to find the static definition
of the static declaration.

2) The mask checking was incorrect because we were doing the test:

	(state & mask) != state

and this test only was saying that at least all the enabled bits of state
were enabled also in mask, but no all the possible bits in mask. This was
the origin of the bug reported by Xavier Cartron, where he said it was
possible activated some shortcuts with some of the modifiers defined in the
config.h file.
2013-07-04 09:21:57 +02:00
Roberto E. Vargas Caballero 90c6f055b6 Remove unneded call to draw
draw is the function which update the Xwindow with the information st has,
and it is designed in a way that it must be called once in the main loop
(run function), and calling it in other places it is a waste of time.
2013-07-04 09:14:50 +02:00
Roberto E. Vargas Caballero ebbac77d74 Fix selection clearing
The way st knows if there is a selection activated is checking if sel.ob.x
is equal to -1. In some parts of the code the way of disabling the selection
was only setting it to -1, but after it you can't be sure if the selection
is clearing from the terminal representation, because it is necessary mark
all the lines affected by the selection as dirty. Already there is a functon
which perform this task, selclear.
2013-07-04 09:14:50 +02:00
Markus Teich 7af030c999 fix PageUp Modifier Mask in config.def.h
Signed-off-by: Christoph Lohmann <20h@r-36.net>
2013-06-22 16:45:03 +02:00
Christoph Lohmann 5d3318c0c7 Fixing title setting with the title argument. 2013-06-09 15:52:35 +02:00
Christoph Lohmann 369734c80c Adding xterm behaviour to setting the title.
Thanks Airwave!
2013-06-06 19:09:18 +02:00
Christoph Lohmann 2cf4f366d6 Bumping up the xfps so mouse motion won't reap the CPU. 2013-06-01 14:39:13 +02:00
Christoph Lohmann 7530694987 Adding true mouse motion support. 2013-06-01 14:37:30 +02:00
Christoph Lohmann d743b93fda This is a shorter bit handling in MODE_MOUSE. 2013-06-01 13:17:20 +02:00
Christoph Lohmann 317b785921 Add some comments about the other mouse reporting modes. 2013-06-01 13:13:01 +02:00
Christoph Lohmann 405fd89ac1 Implementing mouse focus and all events. 2013-06-01 13:06:53 +02:00
Christoph Lohmann 8315dc4179 Fixing bad highlighting on first SNAP_WORD multiline select. 2013-06-01 12:23:55 +02:00
Christoph Lohmann b5144100a5 Fixing the selection in a single line again.
Thanks p37sitdu@lavabit.com!
2013-05-26 16:10:22 +02:00
Christoph Lohmann 8f1bef0502 Fixing the selection scrolling and the selection naming.
Thanks p37sitdu@lavabit.com!
2013-05-26 13:07:26 +02:00
Christoph Lohmann 8f47c4a4de Lazy font unloading too. 2013-05-11 21:59:55 +02:00
Christoph Lohmann 62502a88e9 Lazy fontset loading.
Thanks Johannes Hofmann <Johannes.Hofmann@gmx.de>!
2013-05-11 08:54:26 +02:00
Christoph Lohmann 678eff6e18 Removing an old select() regression. 2013-05-06 19:50:14 +02:00
Christoph Lohmann 8e968739c3 Allow more complex delimiters for word selections.
Thanks Alexander Rezinsky <alexrez@gmail.com>!
2013-05-04 19:04:20 +02:00
Christoph Lohmann 0c2b513d01 Expand the last line with '\n' in case of overselection.
Thanks Alexander Rezinsky <alexrez@gmail.com>!
2013-05-04 19:00:32 +02:00
Christoph Lohmann 634c247fa7 Select to the end of row if end of line is reached.
Thanks Alexander Rezinsky <alexrez@gmail.com>!
2013-05-04 08:05:11 +02:00
Christoph Lohmann 5938fa9d32 Better comments for the snapping code. 2013-05-04 08:01:17 +02:00
Christoph Lohmann 8618386de9 More stable blinking. 2013-05-01 13:14:46 +02:00
Christoph Lohmann e1458ef467 Explaining blinking for the dummies. 2013-04-28 21:32:42 +02:00
Christoph Lohmann 911ba5674b Selection snapping is now considering wrapping.
Thanks Alexander Rezinsky <alexrez@gmail.com> for mentioning this!
2013-04-28 18:14:15 +02:00
Christoph Lohmann a53017c8b4 Add a possibility to modify the string sent by mouse buttons.
Thanks Alexander Rezinsky <alexrez@gmail.com> for the suggestion!
2013-04-28 17:42:30 +02:00
Christoph Lohmann a77b01176a Be more efficient in blinking. 2013-04-26 18:55:40 +02:00
Christoph Lohmann 1e09726518 Enable blinking in st. 2013-04-26 18:41:54 +02:00
Christoph Lohmann 1b2751f5c2 Fixing the selection handling to allow one char selection.
Thanks Alexander Sedov <alex0player@gmail.com> for suggesting the fix!
2013-04-25 06:28:11 +02:00
Christoph Lohmann 0851f2be2a Fixing the selection issue in altscreens. 2013-04-24 21:30:59 +02:00
Alexander Sedov 011c0f9e5b Removed redundant check in draw code.
We're now clearing empty areas with spaces, so there is no point to check
if character contains non-empty string.

Signed-off-by: Christoph Lohmann <20h@r-36.net>
2013-04-24 21:27:56 +02:00
Roberto E. Vargas Caballero 048c54fd5b Fix selecting clearing and BCE
The commit b78c5085f7 changed the st behaviour enabling BCE capability,
that means erase regions using background color. Problem comes when you
clear a region with a selection, because in this case the real mode of the
Glyph is not the value of term.line[y][x], due in drawregion we had enabled
the ATTR_REVERSE bit.

Signed-off-by: Christoph Lohmann <20h@r-36.net>
2013-04-23 20:36:30 +02:00
Christoph Lohmann 6b03bb769a Now clipping is more clear. 2013-04-23 19:37:28 +02:00
Christoph Lohmann db6f796ecf Removing the overdrawing of some fonts. 2013-04-23 19:17:50 +02:00
Christoph Lohmann 7ea6863208 Yes, rs2 != is2. 2013-04-23 15:38:48 +02:00
Christoph Lohmann 8037dac847 There is no 8bit by default and reset 8bit too. 2013-04-23 15:33:21 +02:00
Christoph Lohmann 2bd6afd1c9 Implementing 8 bit mode for meta. 2013-04-23 15:22:14 +02:00
Christoph Lohmann b596d6ba3c Adding wrap handling in selection. 2013-04-21 13:01:16 +02:00
Alexander Sedov 872a7f18ea Added support for double/triple click+dragging.
Now double-click+dragging automatically snaps both ends to word boundaries
(unless on series of spaces), and triple-click selects whole lines.
As a side effect, snapping now occurs on button press, not button release
like it previously was, but I hope that won't be inconvenient for anyone.

Signed-off-by: Christoph Lohmann <20h@r-36.net>
2013-04-20 15:54:19 +02:00
Christoph Lohmann 3c546ae739 0.4.1 release. 2013-04-20 15:29:39 +02:00
Christoph Lohmann 645c1b0afc Making st compile on OpenBSD again. 2013-04-19 21:11:29 +02:00
Alexander Sedov e5ff746430 Selection now handles empty lines less counter-intuitively.
Now, when you are selecting a region, you will get all empty lines that happen
to be in it, including trailing ones. Last line terminator is omitted as it previously
was, though.

Signed-off-by: Christoph Lohmann <20h@r-36.net>
2013-04-18 16:51:52 +02:00
Christoph Lohmann da182612b7 Removing trailing whitespace. 2013-04-18 06:51:18 +02:00
Alexander Sedov b7e6a5c825 Got rid of redundant Glyph state.
Now, newly allocated Glyphs are set to spaces and current cursor colors
with tclearregion() routine.

Signed-off-by: Christoph Lohmann <20h@r-36.net>
2013-04-18 06:48:06 +02:00
Christoph Lohmann 3ae0299064 Removing unneeded comments. 2013-04-18 06:41:54 +02:00
Alexander Sedov fed9968ba5 Got rid of code duplication in tnew() and tresize().
Signed-off-by: Christoph Lohmann <20h@r-36.net>
2013-04-18 06:39:43 +02:00
Alexander Sedov 0ca0dd8b11 Strip trailing spaces from lines when copying selection.
Signed-off-by: Christoph Lohmann <20h@r-36.net>
2013-04-14 21:32:53 +02:00
Christoph Lohmann c371fe58a3 Enable BCE everywhere. 2013-04-14 18:30:10 +02:00
Christoph Lohmann 44db38a5f8 Fix the geometry handling. 2013-04-13 15:24:26 +02:00
Christoph Lohmann 4de64fa4d2 \033 should be used in printf in the FAQ.
Never apply patches of Apple users without shouting at them. The basic rule of
nature is that when you apply Appl users patches without shouting at them that
something will go horribly wrong.
2013-04-13 12:26:17 +02:00
Christoph Lohmann de4cd2f6af Resize now uses xclear(). 2013-04-13 09:49:11 +02:00
Christoph Lohmann 1e7816c202 Drawing a more visible rectangle as cursor on unfocus.
To have a more visible cursor on unfocused windows this patch makes st draw a
rectangle around the terminal cell.

Thanks Mark Hills <mark@xwax.org> for the suggestion!
2013-04-13 09:44:00 +02:00
Christoph Lohmann 5dc48af29e Patching while not really woken up. 2013-04-13 08:51:30 +02:00
Christoph Lohmann 5984657c00 Minor naming issue fixed. 2013-04-13 08:50:38 +02:00
Christoph Lohmann 4018b2c507 Making the copy and pasting consistent.
The copying and pasting in the terminald and GUI world is flawed. Due to the
discussion on the mailinglist it seems that sending '\n' is what GUIs expect
and '\r' what terminal applications want. St now implements that behaviour.
2013-04-13 08:48:17 +02:00
Kai Hendry ddd429ea24 Convert FAQ into Markdown, to make it easier to integrate it into http://st.suckless.org/
Signed-off-by: Christoph Lohmann <20h@r-36.net>
2013-04-13 08:25:07 +02:00
Christoph Lohmann 684cf55a0d Make st work with a plain -e command. 2013-04-10 17:48:32 +02:00
Christoph Lohmann b1813b14d9 Adopting arg.h with more flexible cmd handling. 2013-04-03 21:00:38 +02:00
Christoph Lohmann 580c8bbd46 Add an option to disable alternative screens. 2013-04-03 20:42:27 +02:00
Christoph Lohmann 502911e554 Updating the TODO file for after 0.4. 2013-03-29 19:44:37 +01:00
Christoph Lohmann a3a5b8e15e Releasing 0.4. 2013-03-29 19:13:26 +01:00
Christoph Lohmann 7e7760c2ed Add the possibility to have default highlight colors.
Thanks to stargrave@stargrave.org for the suggestion!
2013-03-29 19:01:24 +01:00
Christoph Lohmann adde5c6d9d Adding PgUp + Ctrl.
Thanks stargrave@stargrave.org!
2013-03-29 18:45:09 +01:00
Christoph Lohmann f876810626 Adding PgUp and PgDown + Ctrl to config.def.h
Thanks stargrave@stargrave.org!
2013-03-29 18:43:32 +01:00
Christoph Lohmann a1e3b94b37 Removing an undefined case. just do regular selections. 2013-03-29 18:39:01 +01:00
Christoph Lohmann 4b17dddb10 Making rectangular selection work again.
People sending me patches against strange revisions and basing on their own
revisions make me having to reapply them. Then such errors appear.

Thanks Alexander Sedov <alex0player@gmail.com> for noticing this.
2013-03-20 21:19:28 +01:00
Christoph Lohmann 55adf0aad1 Pange seems to use ascent + descent instead of height.
Thanks Bobby Powers <bobbypowers@gmail.com> for noticing this!
2013-03-10 21:16:51 +01:00
Christoph Lohmann 82494f248d Making st compile on OS X. 2013-03-05 22:12:11 +01:00
Christoph Lohmann c6b89f23e7 Using strsep and fixing null termination in csiparse.
Thanks for the hint from Alexander Sedov <alex0player@gmail.com>!
2013-02-26 21:43:40 +01:00
Christoph Lohmann 1c1621da69 Changing the way how paste is handled, just for the nano people. 2013-02-26 19:08:51 +01:00
Christoph Lohmann 1aa26b4ecd Fixing a bug while parsing empty arguments in csiparse. 2013-02-26 19:07:23 +01:00
Christoph Lohmann 7d32471eff Fixing bugs in the strtol and strtok_r replacements.
Thanks "Roberto E. Vargas Caballero" <k0ga@shike2.com> for the comments!
2013-02-26 18:19:44 +01:00
Christoph Lohmann 7cb0d95509 Using strtok_r for the string parsing. 2013-02-25 13:36:40 +01:00
Christoph Lohmann 37863356b0 Using strtol with overflow checking. 2013-02-25 13:23:56 +01:00
Christoph Lohmann be7c6d7fb0 Add insert for the primary clipboard to MOD + Shift + Ins.
Thanks Mantas Mikulėnas <grawity@gmail.com> for the patch!
2013-02-23 21:50:13 +01:00
Christoph Lohmann e40d8da194 Removing dbe and introducing umlauts to titles.
Thanks Alexander Sedov <alex0player@gmail.com> for the title patch!
2013-02-23 21:44:06 +01:00
Christoph Lohmann efaf1c2a94 Add umlaut support for title change.
Thanks Alexander Sedov <alex0player@gmail.com>!
2013-02-23 21:20:21 +01:00
Christoph Lohmann 1b6c6535c1 Replace parse_int with atoi(). 2013-02-23 21:17:25 +01:00
Alexander Sedov 800800a3bb Added basic xterm-ish palette swap support.
Signed-off-by: Christoph Lohmann <20h@r-36.net>
2013-02-19 19:12:42 +01:00
Christoph Lohmann 3865e9eaaf Implement rectangular mouse selection.
Thanks Alexander Sedov <alex0player@gmail.com>!
2013-02-19 19:08:41 +01:00
joe9 e5295629cd ensure that the italic font has the same weight as the normal font
The specified font[] pattern need not have a medium weight. It could be
specified as a number too or have a different weight other than medium.

Signed-off-by: Christoph Lohmann <20h@r-36.net>
2013-02-19 16:09:05 +01:00
Christoph Lohmann 0e738c3d72 Style inquisition. 2013-02-19 16:04:54 +01:00
Christoph Lohmann 7f297e297c Fixing the reverse mode of st colors.
Thanks Alexander Sedov <alex0player@gmail.com> for finding this!
2013-02-19 15:51:25 +01:00
Christoph Lohmann f4a6c20f46 Adding a way to ignore bits in the state. 2013-02-16 13:57:12 +01:00
Christoph Lohmann e0ec2cf984 Style inquisition. 2013-02-15 19:36:20 +01:00
Christoph Lohmann a92a678e25 The refresh rate for the action needs to be high too. 2013-02-15 19:34:53 +01:00
Christoph Lohmann de7e0e9c8d Changing the fps to something reasonable high. 2013-02-15 19:32:37 +01:00
Christoph Lohmann 086cd61511 Doing it like the new run() was proposed. 2013-02-15 19:30:43 +01:00
Christoph Lohmann 95033753be Adding a more efficient drawing code.
Thanks Mihail Zenkov <mihail.zenkov@gmail.com> for giving the hint!
2013-02-15 19:10:22 +01:00
Christoph Lohmann b7261c84aa Tmux wants this to be mutually exclusive.
Thanks Egmont Koblinger <egmont@gmail.com> for noticing this!
2013-02-15 17:45:38 +01:00
Christoph Lohmann 05a1ff03e9 Adding mor explict font patterns. 2013-02-13 21:35:27 +01:00
Christoph Lohmann eeffbe11ab Making st not activate the cursor in case of Mod + k in dwm.
Thanks Jens Nyberg <jens.nyberg@gmail.com>!
2013-02-11 22:20:16 +01:00
Christoph Lohmann 8a9475a0dd Setting the surrounding border to defaultbg.
Thanks Stephen Caraher <moskvax@gmail.com>!
2013-02-10 16:36:03 +01:00
Christoph Lohmann ce3efa9e9b Removing some debug messages. 2013-02-08 20:24:26 +01:00
Christoph Lohmann efd04ccad6 Fixing the menus in mc. 2013-01-27 17:48:01 +01:00
Christoph Lohmann 26c101b706 Fixing the black remaining lines in mc and dialog.
This also applies some style fixes and handles some old blink codes.
2013-01-27 13:26:06 +01:00
Christoph Lohmann 384fabdb5b Adding extended mouse reporting in st.
Thanks Egmont Koblinger <egmont@gmail.com>!
2013-01-26 15:13:56 +01:00
Christoph Lohmann deb720af7f Removing the debug messages again. 2013-01-20 17:13:48 +01:00
Christoph Lohmann 57f39defaf Fixing the clipboard copying to st itself. 2013-01-20 17:12:41 +01:00
Christoph Lohmann 3036051fb1 St is in 2013 now. 2013-01-20 15:12:45 +01:00
Christoph Lohmann d8f3809345 Removing BCE from the TODO list. 2013-01-20 14:55:08 +01:00
Christoph Lohmann b78c5085f7 Implementing Back Color Erase (BCE). 2013-01-20 14:54:35 +01:00
Christoph Lohmann b4b513c791 Make line drawing work again. 2013-01-19 18:38:28 +01:00
Christoph Lohmann 15c2bff9fa Yes, xft should be on the buffer. Thanks Mihail Zenkov. 2013-01-19 15:49:34 +01:00
Christoph Lohmann c7b033b8f0 Trying out the double buffering without dbe. 2013-01-19 15:00:16 +01:00
Christoph Lohmann 0e232a4115 Dbe is not required anymore. 2013-01-19 09:13:52 +01:00
Christoph Lohmann 3ce96aea8a Adding the FAQ entry for zsh.
Thanks Roberto E. Vargas Caballero! You were committing this patch against the
wrong version of the FAQ, so I had to rewrite it.
2013-01-18 19:22:11 +01:00
Christoph Lohmann ed90afb743 The title can now be set with UTF-8 characters.
Thanks Mihail Zenkov <mihail.zenkov@gmail.com>!
2013-01-18 19:11:25 +01:00
Christoph Lohmann c9bd58e4dd Adding a nasty resize bug. Maybe it can be fixed. 2013-01-16 18:53:32 +01:00
Christoph Lohmann f25c75d72a Removing the .hgtags file. Thanks ilf. 2013-01-09 17:36:59 +01:00
Christoph Lohmann 1827e0643f Standout mode has changed. Thanks p37sitdu@lavabit.com! 2013-01-08 20:36:49 +01:00
Christoph Lohmann b3326ab63b A different double buffering strategy so the background is default set. 2013-01-08 20:09:33 +01:00
Christoph Lohmann f741df9cda Standout is now reverse. This makes bsd-games work in st. 2013-01-08 19:46:28 +01:00
Christoph Lohmann 73879c1729 Adding an FAQ entry for the keypad handling.
Thanks "Roberto E. Vargas Caballero" <k0ga@shike2.com>!
2013-01-07 19:53:41 +01:00
Christoph Lohmann 5facd29f75 Synchronizing the FAQ of the website and the repository. 2013-01-06 09:52:03 +01:00
Christoph Lohmann b233007e0f Damn, my fault. The cache should have at least some entries. 2013-01-05 20:56:58 +01:00
Christoph Lohmann c772a6e571 Applying the changes to the docs; by Peter Hartman. 2013-01-05 20:30:25 +01:00
Christoph Lohmann 4682cc9596 Making the fontconfig and freetype paths portable in config.mk. 2013-01-04 20:52:22 +01:00
Christoph Lohmann 4e14a4a97f A fix for the XopenIM() errors. 2013-01-01 13:15:43 +01:00
Christoph Lohmann c99db5b017 Increasing font cache for speeding up UTF8 demos. 2012-12-30 17:35:41 +01:00
Christoph Lohmann 44e1b79abf Removing the warning about extents. 2012-12-30 17:35:15 +01:00
Christoph Lohmann 08e06ef079 Fixing the font unloading in case of zoom. 2012-12-29 16:24:33 +01:00
Christoph Lohmann addc848345 Speeding up the drawing, then all characters are known. 2012-12-29 15:03:03 +01:00
Christoph Lohmann 9c44229c62 Adding fallback support to st. 2012-12-28 23:52:04 +01:00
Christoph Lohmann 082bab29f3 Fixing a compile error. 2012-12-22 19:50:02 +01:00
Christoph Lohmann ac4c6da4ef Fixing a off-by-one error in the penultimate row drawing. 2012-12-22 13:39:27 +01:00
Christoph Lohmann 4d37763ee7 Fixing a precedence problem. Thanks tridactyla! 2012-12-18 13:00:00 +01:00
Christoph Lohmann fc2b366968 Checking for the lower X11 special keys too. Thanks Benjamin R. Haskell! 2012-12-13 20:57:15 +01:00
Christoph Lohmann 3c6ec1995d Adding error checks for XCreateIC and XOpenIM. 2012-12-11 08:32:08 +01:00
Christoph Lohmann 2696f81875 Be careful about mar77i's patches. 2012-12-10 23:02:58 +01:00
Christoph Lohmann 78215c8ee0 Fixing the nasty selection bug. Thanks p37sitdu@lavabit.com! 2012-12-10 20:45:46 +01:00
Christoph Lohmann fe3fb82d29 Applying the patch of mar771 right. 2012-12-10 15:02:32 +01:00
Christoph Lohmann fdce8bba1a Applying the change of the Del key assingment. Thanks Martti Kühne! 2012-12-09 21:39:02 +01:00
Roberto E. Vargas Caballero d5994b43ca Add support for End key
- Shift + End : Delete until end of line.
    - Control + End : Delete until end of screen.

When  the End  key is  pressed  without any  modifier is  not generated  the
correct sequence for it  (going to the end of the  screen), because the size
of the  terminal is not known,  so it is  not possible write a  sequence for
this purpouse.
---
 config.def.h |   10 ++++++++--
 st.info      |    2 ++
 2 files changed, 10 insertions(+), 2 deletions(-)
2012-11-25 22:13:29 +01:00
Roberto E. Vargas Caballero 7c34ff1703 Add support for Supr key
Del : Delete character under cursor.
    Shift + Del : Delete the line under cursor.
    Ctrl + Del: Delete the full screen.
---
 config.def.h |   16 ++++++++++++----
 st.info      |    2 ++
 2 files changed, 14 insertions(+), 4 deletions(-)
2012-11-25 22:13:24 +01:00
Roberto E. Vargas Caballero 3c99be68e8 Add support for insert key
Insert key stands for a key which allows enter or leaves insert mode, so let
it generates the correct sequence to change between these modes:

   - Insert: Enter in insert mode.
   - Shift + Insert: Leave insert mode (replace mode).
   - Control + Insert: Insert a blank line.

Like Shift + Insert also paste text, if a user want this feature be full
functional he has to modify such shortcut.
---
 config.def.h |   16 ++++++++++++----
 st.info      |    3 +++
 2 files changed, 15 insertions(+), 4 deletions(-)
2012-11-25 22:13:19 +01:00
Roberto E. Vargas Caballero e7904128c6 Fix value of ka1 terminfo capability
ka1 stands for upper left of keypad, so the correct value is the one
generated by Home in application keypad mode.
---
 st.info |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
2012-11-25 22:13:13 +01:00
Christoph Lohmann 61b20f4bc1 Add a notice in the config.def.h file how to obtain the syntax for
xft/fontcache.
2012-11-25 15:59:16 +01:00
Christoph Lohmann 373a8f5628 The style inquisition was here. 2012-11-25 09:23:34 +01:00
Roberto E. Vargas Caballero 172f65436c Add key for toogling numlock handling
Keypad will generate keycodes when keypad application mode is enabled. It
can cause problems with some programs like vi, which operates in such
mode.

This patch change by default don't generate the keycodes never, but this
behaviour can be changed using the combination Alt + NumLock.
---
 config.def.h |   34 ++++++++++++++++++----------------
 st.c         |   17 +++++++++++++++--
 2 files changed, 33 insertions(+), 18 deletions(-)
2012-11-25 09:23:02 +01:00
Christoph Lohmann b26df1d0d3 Fixing the calculation of the base tty pixel size. 2012-11-21 20:38:15 +01:00
Christoph Lohmann cf04354e06 Restoring the Alt + Backspace functionality. Thanks Brandon Invergo! 2012-11-19 17:22:32 +01:00
Roberto E. Vargas Caballero 55087ec2c7 Add application cursor sequences for Home
The commit 'Fixing some key issues with mc' fix the problem where mc didn't
recognize home key because the generated code and the terminfo entry were
different (terminfo khome = \E[1~ but generates \033[H).

Home key in ansi mode should generate the sequence CUP (\033[H) to 0,0 (home
position), but it is also interesting generate a application code which
identifies the key. Real vt520 only generates the ansi sequence CUP, linux
console generates only the application code \033[1~, xterm generates CUP in
ansi mode and \033OH in cursor application mode, rxvt only generates the
application code \033[7~.

This patch sets CUP in ansi mode and \033[1~ in cursor application mode, so
it can be used in both modes and the application mode value is similar to
near values (insert = \033[2~, Prior = \033[5~, Next = \033[6~, End =
\033[4~, Supr = \033[3).
---
 config.def.h |    7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
2012-11-16 11:32:17 +01:00
Christoph Lohmann 1cbe56026b Fixing some key issues with mc. Thanks nsz! 2012-11-16 05:43:00 +01:00
Christoph Lohmann 440a19a662 Getbuttoninfo is always used the same and just a helper function. Shrinking it
a bit. Thanks nsz!
2012-11-15 21:42:58 +01:00
Roberto E. Vargas Caballero 6312f76ca4 Fix speech error in comment
---
 st.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
2012-11-15 20:57:37 +01:00
Roberto E. Vargas Caballero 0df350cd0b Remove unused fields in cursor_movement
---
 st.c |    4 ----
 1 file changed, 4 deletions(-)
2012-11-15 20:57:33 +01:00
Christoph Lohmann 1cea02be8d Removing my debug fprintf(). 2012-11-15 20:25:16 +01:00
Christoph Lohmann 2b6521f5d2 Optimizing the key lookup to the X11 function key. It is still possible to
remap other keys.
2012-11-15 20:19:35 +01:00
Christoph Lohmann 927d8fb459 Making all function keys accessible. 2012-11-15 20:03:18 +01:00
Christoph Lohmann a29ab30f25 Adding support for XK_F35. 2012-11-15 20:00:46 +01:00
Roberto E. Vargas Caballero 90e1427632 Fix Shift + Insert shortcut
This patch apply the same code for shortcuts that it is used now for defined
keys. So it is possible use now XK_NO_MOD and XK_ANY_MOD for defining shortcuts.
---
 st.c |   35 ++++++++++++++++++++---------------
 1 file changed, 20 insertions(+), 15 deletions(-)
2012-11-15 19:01:16 +01:00
Christoph Lohmann cc86d148cb Changing the TODO to the current state. 2012-11-15 16:36:48 +01:00
Christoph Lohmann d5640c7729 Fixing the return and keypad enter sent characters. Terminals produce \r. And
some minor style changes.
2012-11-15 16:26:50 +01:00
Christoph Lohmann 801ea034b6 Import the patch of Eckehard Berns to add insert mode. Thanks! 2012-11-15 16:21:23 +01:00
Christoph Lohmann e87d21bb3d The crlf mode was reversed. 2012-11-15 15:57:01 +01:00
Christoph Lohmann e7bb14e03e Fixing Return in non-crlf mode. 2012-11-15 15:54:34 +01:00
Roberto E. Vargas Caballero 4389f2eb1b Use XK_ANY_MOD instead of XK_NO_MOD in key definition
Usually terminal emulators don't generate any sequence for a combination
they don't have registered, for example Shift + Next, but st behavior
previous to the keyboard patch generates the sequence without the modifier,
in this example Next. This patch uses the XK_ANY_MOD in order to get this
same behaviour.
---
 config.def.h |  114 ++++++++++++++++++++++++++++++----------------------------
 1 file changed, 59 insertions(+), 55 deletions(-)
2012-11-15 15:36:20 +01:00
Roberto E. Vargas Caballero 88bb76c1bc Fix XK_NO_MOD and XK_ANY_MOD behavior
XK_NO_MOD match a key without modifiers and XK_ANY_MOD match a key does not
matter what modifiers are pressed to. Like they are mask the best value for
XK_ANY_MOD is all the bits to 1, so the and with any state will be equal to
the state. This also imply that is necessary check the case for XK_NO_MOD
(no modifiers at all) with some modifier in state, and the inverse
(some mask different to XK_ANY_MOD or XK_NO_MOD and no modifiers in state).
---
 st.c |   12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)
2012-11-15 15:36:13 +01:00
Roberto E. Vargas Caballero 16ccf344de Fix tab key
When Shift + Tab is pressed X server send the event XK_ISO_Left_Tab with
ShiftMask, so this is the entry we need in config.def.h

This patch also revert the previous patch for this issue because it breaks
the keyboard.
---
 config.def.h |    2 +-
 st.c         |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
2012-11-14 11:14:29 +01:00
Christoph Lohmann 461aac159c Fixing the tab key, when no mask is wanted. 2012-11-14 06:37:24 +01:00
Christoph Lohmann 7474a2fc37 The style inquisition was here again. 2012-11-13 20:13:39 +01:00
Roberto E. Vargas Caballero 620e3bb39e Add missed key definitions
This patch adds the keys for the keypad (in both modes, application mode or
ansi mode) and function keys. It uses the same convention than xterm and
instead of using the XK_Fxx values it generates them using F1-F12 and
modifiers. For example:

   F1 -> ^[OP
   F1 + Shift = F13 -> ^[[1;2P
   F1 + Control = F25 -> ^[[1;5P
   F1 + Mod2 = F37 -> ^[[1;6P
   F1 + Mod1 = F49 -> ^[[1;3P
   F1 + Mod3 = F61 -> ^[[1;4P

It is also important notice than the terminfo capability kIC (shifted insert
key) only can be generated using the keypad keyboard, because the shorcut
for selection paste is using the same combination.

After this path the number of elements in the Key array becomes high, and
maybe a sequencial search is not enough efficient now.
---
 TODO         |    6 +---
 config.def.h |  102 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++-
 st.info      |   70 ++++++++++++++++++++++++++++++++++++++--
 3 files changed, 169 insertions(+), 9 deletions(-)
2012-11-13 20:05:02 +01:00
Roberto E. Vargas Caballero 44597b359e Add control and meta combinations for arrow keys
Since there isn't any terminfo capability for control and meta modifiers for
arrows keys it is necessary use the same that almost terminal emulators use,
because there are a lot of programs which have these codes hardcoded.

This cause also that shift combinations are also changed, but in this case
this is not a problem since there are terminfo capabilities for them. After
this patch shift-up and shift-down continue not working in emacs with
TERM=st, but they work with TERM=xterm, so it is possible some other changes
are necessary in the terminfo entry.
---
 config.def.h |   16 ++++++++++++----
 st.info      |    8 ++++----
 2 files changed, 16 insertions(+), 8 deletions(-)
2012-11-13 20:04:54 +01:00
Roberto E. Vargas Caballero 3b16695f4e Fix arrow keys terminfo capabilities
Usually the arrow keys generate the ANSI sequence which terminal will
understand like a movement, so it is not necessary any dealing for them, the
program can not know if the sequence is generate for a echo key or directly
from the program. If you need really know if the key was pressed then you
need activate the keypad mode where the keys will generate a special code
for each keypad key.

The terminfo capabilities kcub1, kcud1, kcuf1 and kcuu1 are used for this
keypad code, not for the sequence generate in the ansi mode.
---
 st.info |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
2012-11-13 20:04:50 +01:00
Roberto E. Vargas Caballero ea782bfc5d Remove hardcoded keys form kpress
Some keys were in the Key array while others were hardcoded in
kpress().This cause some problems with some keys which can generate more of
one string based in the configuration of the terminal.
---
 config.def.h |   70 ++++++++++++++++++++++++++++++++++++++++-----------------
 st.c         |   71 +++++++++++++++++++++++++---------------------------------
 2 files changed, 79 insertions(+), 62 deletions(-)
2012-11-13 20:04:45 +01:00
Roberto E. Vargas Caballero 93f31166bf Move Shift + Insert to shortcut
Shift + Insert is used like a hot key for paste the selection, so it is more
logical move it to shortcut array instead of having special code for it.
---
 config.def.h |    1 +
 st.c         |   13 +++----------
 2 files changed, 4 insertions(+), 10 deletions(-)
2012-11-13 20:04:39 +01:00
Roberto E. Vargas Caballero 69ee3ba3a7 Fix keypad mode and cursor mode
Keypad mode is used for detecting when keys in the auxiliary keypad are
pressed, while cursor mode is used for detecting when a cursor is pressed,
but they are different modes.

St was mixing both modes and DECPAM and DECPNM modified the cursor mode, and
this was incorrect.
---
 st.c    |    5 +++--
 st.info |    4 ++--
 2 files changed, 5 insertions(+), 4 deletions(-)
2012-11-13 20:04:34 +01:00
Roberto E. Vargas Caballero 73177ba366 Add SRM sequence
This sequence enable/disable the local echo.
---
 st.c |   76 ++++++++++++++++++++++++++++++++++++++++++++++++------------------
 1 file changed, 56 insertions(+), 20 deletions(-)
2012-11-13 20:04:26 +01:00
Christoph Lohmann ace789a79f Gc is not used anymore. 2012-11-11 19:46:34 +01:00
Christoph Lohmann c4a9ccec19 Removing some xft naming cruft. 2012-11-11 19:38:41 +01:00
Christoph Lohmann 5d5a7c627a Moving the alt declaration to the beginning of the function. 2012-11-08 17:22:48 +01:00
Roberto E. Vargas Caballero 8665905216 Move unsupported sequences to ignored.
These sequences will be never implemented and in this moment they are
generating a lot of noise.
---
 st.c |   14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)
2012-11-08 17:22:04 +01:00
Roberto E. Vargas Caballero 27468403cc Ignore DECARM sequence
DECARM modify the auto repeat settings in the keyboard, and since we can not
modify this setting in the Xserver the best solution is only ignore it.
---
 st.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
2012-11-08 17:21:41 +01:00
Roberto E. Vargas Caballero d5b80e05e8 Fix VPR sequence
VPR stands for Move cursor down a number of rows, and the code was moving
the cursor up instead of moving it down.
---
 st.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
2012-11-08 17:21:24 +01:00
Roberto E. Vargas Caballero 5260a9ea22 Add DECOM sequence
DECOM sequence allows to the user defines a new home position. The home
position is used as base for all the movement commands except HVP and
VPA. It is important notice than DECSLM moves cursor to absolute position
0,0.
---
 st.c |   33 ++++++++++++++++++++++++++-------
 1 file changed, 26 insertions(+), 7 deletions(-)
2012-11-08 17:21:10 +01:00
Roberto E. Vargas Caballero ee3e0a9fd0 Save cursor position in terminal reset
After terminal reset saved terminal position is reset to 0, allowing know
where cursor will go in next restore cursor operation.
---
 st.c |    2 ++
 1 file changed, 2 insertions(+)
2012-11-08 17:20:15 +01:00
Roberto E. Vargas Caballero ba9d0365ac Clarify some or exclusive expressions
Since relational expresions are always evaluated to 0 or 1, we can use
bitwise xor operator instead of using more complex boolean expressions.
---
 st.c |   14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)
2012-11-08 17:17:26 +01:00
Roberto E. Vargas Caballero 950ff21e17 Fix bug restoring cursor position
Sequences like DECSC, DECRC, ESC [?1047l or ESC [?1047h save and restore
cursor attributes, than taken from vt100 manual are:

       Save Cursor (DECSC) ESC   7
       ===========================
       Saves the following in terminal memory.

      - cursor position
      - graphic rendition
      - character set shift state
      - state of wrap flag
      - state of origin mode

      Restore Cursor (DECRC) ESC 8
      ===========================
      Restores the states described for (DECSC) above. If none of these
      characteristics were saved, the cursor moves to home position; origin
      mode is reset; no character attributes are assigned; and the default
      character set mapping is established.

This implies that hide attribute of the cursor should not be saved/restored
in these sequences. The best way to fix this problem is moving hide
attribute into the terminal mode, instead of having it in the cursor state.
---
 st.c |   12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
2012-11-08 17:15:26 +01:00
Christoph Lohmann 5d39afc902 Adding scrollwheel support. Thanks Brandon Invergo! 2012-11-06 23:44:37 +01:00
Christoph Lohmann 9df1e56142 Changing the license to MIT/X. 2012-11-05 04:02:20 +01:00
Christoph Lohmann 0fbe1559c8 Fixing meta+return. Thanks Szabolcs Nagy! 2012-11-04 00:04:56 +01:00
Christoph Lohmann 86261187ab Removing the debugging for the last fix too. 2012-11-03 14:05:45 +01:00
Christoph Lohmann 9888c5064b Fixing a resize bug, if a smaller amount than the lineheight is resized.
Thanks c00kiemon5ter!
2012-11-03 14:05:15 +01:00
Christoph Lohmann f8db65439a Fixing bold fonts in reverse mode. 2012-11-03 13:43:20 +01:00
Christoph Lohmann 76a8e5f72b Now italic and bold works. 2012-11-03 08:35:32 +01:00
Christoph Lohmann abe85c0e99 Fixing an out-of-bound bug in the selection code. Thanks Szabolczs Nagy! 2012-11-03 03:24:22 +01:00
Christoph Lohmann 091ae143ce Fixing the italic-bold font check. Thanks nsz. 2012-11-02 23:19:56 +01:00
Christoph Lohmann cd90969cab Added tag 0.3 for changeset 9d54ce4daf34 2012-11-02 20:08:51 +01:00
Christoph Lohmann b0ed3e2897 0.3 release. 2012-11-02 20:08:27 +01:00
Christoph Lohmann c631e9bb91 Make it possible to use the corefont font description too. It is not very
useful, but easy to implement.
2012-11-02 20:07:11 +01:00
Christoph Lohmann 393825f9f8 Moving to the dwm config.h variable usage. 2012-11-02 19:56:02 +01:00
Christoph Lohmann e5d7c5a69e Adding a FAQ to reference utmp(1). 2012-10-31 20:36:32 +01:00
Christoph Lohmann 784765ca35 Cleaning up the TODO file. 2012-10-31 20:35:07 +01:00
Christoph Lohmann 1d378227c0 Removing the now senseless comment in config.def.h. Thanks to bnwe! 2012-10-28 14:13:39 +01:00
Christoph Lohmann c5dd7fb377 Applying the patch of the little girl <yui@blekksprut.net> to make cjk input
possible. Thanks!
2012-10-28 13:37:11 +01:00
Christoph Lohmann b56a0da283 Applying the tab expansion patch from koga. 2012-10-28 13:35:00 +01:00
Christoph Lohmann 71b09ec4f1 Adding a more flexible fontstring handling, shortcuts and a zoom function. 2012-10-28 13:25:53 +01:00
Christoph Lohmann 6d4e525ed9 Applying the patch of Roberto Caballero to set WINDOWID and all the pwuid()
variables. Thanks! xinit() and ttynew() had to be switched in their
call-appearance. Otherwise xw.win is not set.
2012-10-28 06:54:08 +01:00
Christoph Lohmann 35421371ca Applying the patch of Rafa Garcia Gallega <rafael.garcia.gallego@gmail.com> to
not emulate the vt100 behaviour of selecting all whitespaces. Thanks!
2012-10-28 06:32:54 +01:00
Roberto E. Vargas Caballero ee3fbeb6c8 Add error control to iofile
write can write less bytes than we request, so it is necessary check the
return value, in case of error print a message and don't continnue writing
in the file.
---
 st.c |   39 ++++++++++++++++++++++++++++++---------
 1 file changed, 30 insertions(+), 9 deletions(-)
2012-10-28 06:27:42 +01:00
Christoph Lohmann 2e38ab7afd Well, I was confused. Damn state exams. Instead of discussing this shit I
should really learn opthalmology instead. :O
2012-10-09 19:40:37 +02:00
Christoph Lohmann eb6713acf1 If there is really someone without SHELL set, help him/her. 2012-10-09 19:33:26 +02:00
Roberto E. Vargas Caballero 9e813947cf Add DEC alignment test
This sequence was used by DEC personal in to for verifying the screen adjust
of terminals. It is the unique test sequence implemented by all the
emulators, and I think it is because they want be conforms with vttest which
uses this sequence in some tests.
---
 st.c |   31 +++++++++++++++++++++++--------
 1 file changed, 23 insertions(+), 8 deletions(-)
2012-10-07 11:06:17 +02:00
Roberto E. Vargas Caballero b7a7f171ef Avoid initialization of vt100_0 in each call to tsetchar
If vt100_0 is a automatic variable then it is initializated in each call to
tsetchar, but if the variable is static it is initializated only in compile
time.
---
 st.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
2012-10-07 11:06:08 +02:00
Roberto E. Vargas Caballero 25f47cb83a Fix Identification sequences
Do not send NUL character in the identification (use (sizeof(VT102ID) - 1),
and finish  the sequence once you execute it.
---
 st.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
2012-10-07 11:06:00 +02:00
Roberto E. Vargas Caballero ffeeb678c5 Add DA and DECID sequences
These sequences are used by the host in order to can detect which kind of
terminal is connected. St will answer like a vt102 terminal with this patch.
---
 st.c |    9 +++++++++
 1 file changed, 9 insertions(+)
2012-10-06 21:19:56 +02:00
Christoph Lohmann bffa6e5cc6 Fixing a typo. 2012-10-06 21:02:25 +02:00
Christoph Lohmann b16b5d77d3 Fixing a off-by-one error in the new border clearing code. 2012-10-06 20:52:22 +02:00
Roberto E. Vargas Caballero 2bd0c23fa7 Print control codes only in graphic mode
Non handled codes must be ignored, except in graphic mode. Also STR
sequences have higher priority than control codes, so they must be handled
before of them.
---
 st.c |  160 ++++++++++++++++++++++++++++++++++++------------------------------
 1 file changed, 87 insertions(+), 73 deletions(-)
2012-10-06 19:15:30 +02:00
Roberto E. Vargas Caballero 034dc71fb8 Add SI and SO control codes
SI and SO allows change the G0 and G1 selection. This implementation is not
full vt100 compatible, but it is complatible with linux virtual terminal
implementation. For full vt100 compatibility we need remake a lot of stuff
relate to the different charmaps.
---
 st.c |    7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
2012-10-06 19:13:36 +02:00
Roberto E. Vargas Caballero fbfa1f83eb Add SUB and CAN control codes
These control codes reset any escape sequence already initialised.
---
 st.c |    7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
2012-10-06 19:13:08 +02:00
Roberto E. Vargas Caballero ac8f05c45a Add documentation to control codes
Add the documentation from the vt100 manual programmer:

Control 	Octal      Action Taken
Character	Code
-------------------------------------------
NUL		000	Ignored on input (not stored in input buffer;
			see full duplex protocol).
ENQ		005	Transmit answerback message.
BEL		007	Sound bell tone from keyboard.
BS		010	Move the cursor to the left one character position,
			unless it is at the left margin,
			in which case no action occurs.
HT		011	Move the cursor to the next tab stop,
			or to the right margin if no further tab stops
			are present on the line.
LF		012	This code causes a line feed or
			a new line operation. (See new line mode).
VT		013	Interpreted as LF.
FF		014	Interpreted as LF.
CR		015	Move cursor to the left margin on the current line.
SO		016	Invoke G1 character set, as designated by SCS
			control sequence.
SI		017	Select G0 character set, as selected by ESC ( sequence.
XON		021	Causes terminal to resume transmission.
XOFF		023	Causes terminal to stop transmitted all codes
			except XOFF and XON.
CAN		030	If sent during a control sequence, the sequence is
			immediately terminated and not executed. It also causes
			the error character to be displayed.
SUB		032	Interpreted as CAN.
ESC		033	Invokes a control sequence.
DEL		177	Ignored on input (not stored in input buffer).
--------------------------------------------
---
 st.c |   28 +++++++++++++++++++---------
 1 file changed, 19 insertions(+), 9 deletions(-)
2012-10-06 19:12:46 +02:00
Christoph Lohmann 02f3b37a2d Forgot to remove the xclearborders() definition from the last commit. 2012-10-06 13:45:14 +02:00
Christoph Lohmann 0cc7ee5e73 Removing the xclearborders() hack. St now cleans up the parts of the border,
if something needs to be drawn close to it.
2012-10-06 13:43:01 +02:00
Christoph Lohmann 4eddf19fdc The style inquisition was here. Yes, making it a unified style. The last
infidels will be squashed too!
2012-10-06 09:58:45 +02:00
Christoph Lohmann 7efa4514d1 Adding the patch of David Dufberg Töttrup to implement WM_DELETE_WINDOW. Thank you! 2012-10-05 22:59:08 +02:00
Christoph Lohmann bf6cf05ba5 Fixing the brightening on bold. For the 256 colors and greyscale I assumed a
reasonable solution.
2012-10-05 22:51:08 +02:00
Christoph Lohmann 5caa46cf57 Turning on antialias by default really makes it more unreadable. Maybe if once
the majority has bigger screens, this can be turned on by default again.
Thanks pancake, for the hint.
2012-10-05 11:07:55 +02:00
Christoph Lohmann 0b489c4a6a When the drawing behaviour was changed underline was not corrected.
Thanks to Peter A. Shevtsov!
2012-10-05 09:38:10 +02:00
Christoph Lohmann 2752018e27 This adds the fontcache dependency to try something out. Additionally the
invert mode now works as expected. In the config.def.h autohint is set to
false, so the fonts are drawn correctly, without any overlapping.
2012-10-04 22:59:45 +02:00
Christoph Lohmann 0d88f1ef75 Thanks to c00kiemon5ter. Not changing bold to bright colors seems to be the
right choice.
2012-10-02 12:48:55 +02:00
Christoph Lohmann af9e248f97 Removing the now obsolete definitions from the config.def.h file. 2012-09-30 20:23:45 +02:00
Christoph Lohmann 5dfd5df4fe This changes -f to be the parameter for the font. Now -f is -o.
The parameters were reordered according to the alphabet too.
2012-09-30 20:23:10 +02:00
Christoph Lohmann 9cae1eb0de Remove the cruft of the user to have to define the different font styles. 2012-09-30 20:10:58 +02:00
Christoph Lohmann ed5b8700a6 We need all the colors to be available, so die() on some not available.
This is a new opportunity to see if X11 somewhen handled colors in a strange
way.
2012-09-29 11:23:34 +02:00
Christoph Lohmann d7b1e31eec All xcolors are not Xft colors and the clearing of the borders has been
optimized. There is a speedup when resizing windows.
2012-09-29 11:17:16 +02:00
Christoph Lohmann 29b209f5f5 Vt escape sequences allow escape sequences in escape sequences and escape
sequences, so we have to support escape sequences in escape sequences that
escape sequences in escape sequences – setting a title won't notify you
anymore.
2012-09-27 19:28:44 +02:00
Roberto E. Vargas Caballero 3af49e34f6 Allow control characters inside escape sequences
Taken from vt100 manual programmer:

	Control characters (codes \0 to \37 inclusive) are specifically
	excluded from the control sequence syntax, but may be embedded
	within a control sequence. Embedded control characters are executed
	as soon as they are encountered by the VT100. The processing of the
	control sequence then continues with the next character received.
---
 st.c |   68 +++++++++++++++++++++++++++++++++---------------------------------
 1 file changed, 34 insertions(+), 34 deletions(-)
2012-09-26 20:55:18 +02:00
Roberto E. Vargas Caballero a7d7e29300 Ignore all control characters not handled
Taken from vt100 programmer manual:

	Control characters have values of \000 - \037, and \177. The control
	characters recognized by the VT100 are shown in Table 3-10. All
	other control codes cause no action to be taken.

We have to take attention when we are using alternate charset, because in
this cases they are not used as control characters.
---
 st.c |   20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)
2012-09-26 20:53:46 +02:00
Christoph Lohmann 375b6e5b17 Switching to Liberation Mono as default solely because of line drawing. A next
patch to fix the font symbols in all fonts should make it easier to choose a
better font.
2012-09-26 20:21:59 +02:00
Christoph Lohmann 3a095984b0 Implementing line drawing right. 2012-09-26 20:21:08 +02:00
Christoph Lohmann c3b0e2202b A reset should reset the line drawing too. 2012-09-25 21:39:25 +02:00
Christoph Lohmann 980c5956ed Enabling enacs and adding compatibility to xterm and urxvt for alternative
charsets.
2012-09-25 21:17:43 +02:00
Roberto E. Vargas Caballero eb360e5fd1 Fix bug in tputc writing to io file
If -f options is enabled then tputc() writes all the data to a file. Actual
code assumes that all the strings in 'c' parameters have always 1 byte
length, but this is not always true, because due to utf-8 encoding some
characters can have a diferent length. So it is necessary pass string length
to tputc in order it can call to write() correctly.
---
 st.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
2012-09-25 21:04:35 +02:00
Christoph Lohmann 246d704ba0 Changing the default font to DejaVu Sans Mono, which is more appealing and
activating antialiasing.
2012-09-24 14:01:59 +02:00
Christoph Lohmann 055a4f6d2c The xinit() call needs to be behind all the tty init, otherwise all the
allocated structures are wrong. The xclear() is now done on purpose. Please
keep X11 calls out of the way of pure tty-related calls.
2012-09-24 11:04:26 +02:00
Christoph Lohmann e9c677816c Adding a TODO for xft fallback. 2012-09-24 10:31:35 +02:00
Roberto E. Vargas Caballero 74d6abfee5 Add some documentetion to tsetmode
The names of the terminal modes supported by vt102 are (taken from the VT220
programmer reference manual):

Table 4-7 ANSI-Standardized Modes
Name  Mnemonic		    Parameter (Ps)
Error (ignored)		    -         0 (3/0)
Keyboard action		    KAM	      2 (3/2)
Insert/replace		    IRM	      4 (3/4)
Send/receive		    SRM	      12 (3/1 3/2)
Line feed/new line	    LNM       20 (3/2 3/0)

Table 4-8 ANSI-Compatible DEC Private Modes
Name  Mnemonic		  Parameter (Ps)
Error (ignored)		  -	    0 (3/0)
Cursor key		  DECCKM    1 (3/1)
ANSI/VT52		  DECANM    2 (3/2)
Column			  DECCOLM   3 (3/3)
Scroll			  DECSCLM   4 (3/4)
Screen			  DECSCNM   5 (3/5)
Origin			  DECOM	    6 (3/6)
Auto wrap		  DECAWM    7 (3/7)
Auto repeat		  DECARM    8 (3/8)
Printer form feed	  DECPFF    18 (3/1 3/8)
Printer extent		  DECPEX    19 (3/1 3/9)
Text cursor enable	  DECTCEM   25 (3/2 3/5)
National replacement character sets DECNRCM 42 (3/4 3/2)

This patch adds a comment for each one of these sequences.
---
 st.c |   26 +++++++++++++++++++++-----
 1 file changed, 21 insertions(+), 5 deletions(-)
2012-09-24 10:29:37 +02:00
Roberto E. Vargas Caballero c3b6345595 Fix LNM sequence
LNM sequence is a standard ANSI mode, not a DEC private mode.
---
 st.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
2012-09-24 10:28:35 +02:00
Roberto E. Vargas Caballero 2f215654a4 Add KAM sequence
This sequence lock/unlock the keyboard ignoring all the key pressing events
from X server.
---
 st.c |    8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
2012-09-24 10:28:05 +02:00
Roberto E. Vargas Caballero 11bec67875 Remove unused parameters in ttyresize
---
 st.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
2012-09-24 10:27:22 +02:00
Roberto E. Vargas Caballero b6cfff1625 Clear X window in tsetreset()
tsetreset() is called when it is necessary a full initialization of the
terminal, so it also should clean the full X window and not only the
terminal content. It is necessary change the order of the
initialization in main(), and put xinit before of tnew(), because tnew()
calls to tsetreset(), and  this can cause a call to xreset() with
incorrect values.
---
 st.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
2012-09-24 10:26:50 +02:00
Christoph Lohmann 21a0c4a2e0 Merging xft and current st heads. 2012-09-24 10:24:36 +02:00
Christoph Lohmann 2b3c1219c8 Initial Xft support for st. More to follow. 2012-09-24 10:20:45 +02:00
Aurélien Aptel 816a70c01b use typedef'd unsigned type and regular bool type. 2012-09-19 16:03:16 +02:00
Aurélien Aptel 1ba5f4172f config.def.h: typo in comment. 2012-09-18 19:13:19 +02:00
Aurélien Aptel 50a619cee3 LEGACY: typo. 2012-09-18 19:08:03 +02:00
Christoph Lohmann 0eaed8f085 Redrawing is fixed. 2012-09-17 23:14:40 +02:00
Christoph Lohmann e4bf2679c1 Fixing the redrawing patch of k0ga, so it's using xclear() in redraw() too. 2012-09-17 22:44:27 +02:00
Roberto E. Vargas Caballero 4876d6e05b Clean windows display after resizing
Some times the size after a resizing is not an exact multiply of a number of
characters, so redrawn the screen using the lines and columns of the neww
size can cause that some old graphics keep in the screen. Solution is clean
all the windows with the background color.
---
 st.c |    3 +++
 1 file changed, 3 insertions(+)
2012-09-17 22:13:17 +02:00
Roberto E. Vargas Caballero 88a8f85a8a Copy non set positions as spaces
st selection don't insert in the selection position whose value is not
set. This is correct for the positions in the end of the line, but cause
some problems in the beginning. For example echo -e 'a\tb' will print in the
screen:

a	b

but after selecting and copying in some place you get:

ab

because positions from 1 to 7 don't have any value. This patch deals all
positions without value as blank (even at the end of the line).
---
 st.c |   17 ++++++++++-------
 1 file changed, 10 insertions(+), 7 deletions(-)
2012-09-17 22:13:09 +02:00
Roberto E. Vargas Caballero 111199cf22 Add newline in error messages
---
 st.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
2012-09-17 22:11:28 +02:00
Roberto E. Vargas Caballero e3671006db Add xcalloc wrapper
malloc and realloc are called through xmalloc and xrealloc, so calloc should
be called through xcalloc.
---
 st.c |   13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)
2012-09-17 22:11:20 +02:00
Christoph Lohmann 426887ccec Applying a shortening proposal for the run loop of k0ga. 2012-09-16 20:43:51 +02:00
Roberto E. Vargas Caballero 58a57a2305 Remove call to draw in resize
In previous commits draw was removed from all the X events, but I forgot do
it in resize.
---
 st.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
2012-09-16 14:02:35 +02:00
Christoph Lohmann 2257932261 Adding some more fields to the manpage, like authors, license etc. 2012-09-16 13:59:10 +02:00
Christoph Lohmann b93741e34d Remove some solved issues and add some new. 2012-09-16 13:50:07 +02:00
Christoph Lohmann 9fbafe55c9 Preliminary solution to the stuttering problem. 2012-09-16 13:22:23 +02:00
Roberto E. Vargas Caballero d81250e5f9 Fix selection bug
After the commit named "Remove timeout in the main loop", selection is not
working in the proper way. After selecting something, press mouse button in
a line outside of selection causes an incorrect highlight. This patch fix
the problem forcing a draw after the press event, but this is only a fast
hack. Real solution means rewriting selection code.
---
 st.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
2012-09-16 10:49:12 +02:00
Roberto E. Vargas Caballero c5a9b799d4 Render only once in each main loop iteration
draw() runs over all lines of the screen and renders only the dirty lines,
this avoids render lines which are not modified since last draw() call. In
this moment the main loop is something like:

     - Wait something to read from file descriptors
     - Read from pseudo tty
     - Call draw() for rending
     - Read X events

This cause the problem that all the X events that have to update the screen
have to call draw() (because draw() is called before of X events handling),
so you can have multiples renderings in only one iteration, that will waste
a lot of resources.

This patch change the main loop to:

     - Wait something to read from file descriptors
     - Read from pseudo tty
     - Read X events
     - Call draw() for rending

So X events don't have to worry about rendering, because draw() is called
after them.

The only place where draw is called outside of the main loop is in redraw(),
but it is necessary for getting a good tput flash.
---
 st.c |   29 ++++++-----------------------
 1 file changed, 6 insertions(+), 23 deletions(-)
2012-09-16 10:48:38 +02:00
Roberto E. Vargas Caballero 85849ce72a Remove timeout in the main loop
The main loop waits until there is some data to read in file descriptors of
the X server or the pseudo tty. But it uses a timeout in select(), which
causes that st awake each 20 ms, even it doesn't have something to do. This
patch removes this problem removing the timeout, which is not needed.
---
 TODO |    1 -
 st.c |   27 +++------------------------
 2 files changed, 3 insertions(+), 25 deletions(-)
2012-09-16 10:47:21 +02:00
Roberto E. Vargas Caballero 15cc8754c2 Call XSync in redraw
It is necessary call to XSync if you want a good tput flash, because in
other way you can not be sure that white screen will be shown.
---
 st.c |    1 +
 1 file changed, 1 insertion(+)
2012-09-16 10:46:08 +02:00
Roberto E. Vargas Caballero ba1e9daeef Call XdbeQueryExtension before of calling any Xdbe function
XdbeQueryExtension() tells to the caller if the Xdbe extension is present in
the X server, so it should be called for sanity. But like is said in
XdbeQueryExtension(3):

	No other Xdbe functions may be called before this function.  If a
	client violates this rule, the effects of all subsequent Xdbe calls
	that it makes are undefined.

it is mandatory call this function.
---
 st.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
2012-09-16 10:45:36 +02:00
Christoph Lohmann a62789788c Implementing italic-bold. This will require an increase of the avgWdth. 2012-09-14 19:46:07 +02:00
Christoph Lohmann b156352656 Ignore NUL character as a padding character. Telnet may use this. Patch of
Roberto Vargas.
2012-09-13 23:21:40 +02:00
Christoph Lohmann 776a022e39 Importing the patch of Roberto Vargas to inherit signal handlers. 2012-09-13 23:19:57 +02:00
Christoph Lohmann fe2ba95b3d Reset window title on terminal reset too. 2012-09-13 07:16:38 +02:00
Christoph Lohmann 977c5d9089 Adding a statemant on legacy support. 2012-09-13 07:04:59 +02:00
Christoph Lohmann d018c9c8ef Adding another bold off sequence. 2012-09-13 07:04:34 +02:00
Roberto E. Vargas Caballero 720cb816dc Remove buffering to fileio instead of calling fflush
By default text files are line buffered, and this means that -f option will
not write the line until a \n is printed. This is not very useful for
debugging, so a call to fflush was added. This patch substitute this call
(which will be done by each character painted) by the full remove of the
buffering in the file.
---
 st.c |   12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)
2012-09-12 21:51:55 +02:00
Roberto E. Vargas Caballero b9d5fec4f2 Add xmalloc and xrealloc wrappers
If malloc  or realloc fail they return NULL. Theorically this condition
should be tested in the code, but it's a strange condition today (basically
if this is hapenning thenyou have a big problem), and even Linux never returns
NULL in the default configuration (only if the process don't have room in
the space address, something a bit impossible in the case of st). But stis
enough small for being executed in low resources computers where this can be
a real problem. So the easy way is creating a wrappers function for them and
call to die in case of error.
---
 st.c |   44 +++++++++++++++++++++++++++++++-------------
 1 file changed, 31 insertions(+), 13 deletions(-)
2012-09-12 21:25:35 +02:00
Christoph Lohmann 8f1144edee Make nyancat(1) work. Important release feature! 2012-09-12 13:20:10 +02:00
Christoph Lohmann 121d9109e8 Add preliminary blink stubs. Real implementation is still missing. 2012-09-12 13:08:26 +02:00
Christoph Lohmann c092bce366 Add another obscure way to set a window title. 2012-09-12 13:00:39 +02:00
Christoph Lohmann af29fb2a50 Fixing the too small window in non-tiling window managers. 2012-09-10 13:39:41 +02:00
Christoph Lohmann 122ed57702 Making the selection work again. 2012-09-06 08:02:56 +02:00
Christoph Lohmann a1cd28f809 Allow simpler stdout -f handling. 2012-09-06 00:00:50 +02:00
Christoph Lohmann f2da43a0b6 Adding instantenous debug output and fixing italic with a reset. 2012-09-05 23:38:57 +02:00
Christoph Lohmann 86cf8e3073 Adding the removal of the timeouts to the TODO. 2012-09-05 23:06:59 +02:00
Christoph Lohmann 4a4ae19158 Removing masks for unhandled enter and leaving events. 2012-09-05 22:39:09 +02:00
Christoph Lohmann dd0b7a077f If the selection is cleared, draw() and do it on button press too. 2012-09-05 22:17:42 +02:00
Roberto E. Vargas Caballero f471a32d29 Unhighlight selection when selection is owner by other window
st marks the active selection using reverse colors in the box selection, but
once that another window becomes owner of the selection, it is very
confusing that st keeps highlight the old selection. Usually terminal
emulators remove the highlight when it is not valid anymore.

X sends a SelectionClear event in this situation, so we only have to add a
callback which unhighlight the selectin box.
---
 st.c |    9 +++++++++
 1 file changed, 9 insertions(+)
2012-09-05 21:55:45 +02:00
Christoph Lohmann 017af76f5c Forcing the parameter limit to xcopy() and selpaste(). Thanks to Rob Pilling. 2012-09-05 21:54:52 +02:00
Christoph Lohmann 42505c5215 Removing unneeded arguments to copy(). Thanks to Andrew Hills. 2012-09-05 21:52:01 +02:00
Christoph Lohmann 462a966ee2 Implement italic font support. 2012-09-05 21:48:26 +02:00
Christoph Lohmann 56c551e4f4 Add to TODO to make function keys work. 2012-09-05 01:32:42 +02:00
Christoph Lohmann a61b9ea82e Enable keypad set and unset commands. 2012-09-05 01:25:37 +02:00
Christoph Lohmann da4a77edbe Disable BCE again. 2012-09-05 00:58:17 +02:00
Christoph Lohmann 98dc91eb82 Removing the resize issue from the TODO file. 2012-09-05 00:09:13 +02:00
Christoph Lohmann 67c1a23053 Fixing the resizing behaviour. 2012-09-05 00:08:13 +02:00
Christoph Lohmann e09709d92d Forgot one line. It's late. 2012-09-04 22:51:29 +02:00
Christoph Lohmann b1d383a0a3 Cleaning up the fixed window size and the resizing of clients. 2012-09-04 22:44:33 +02:00
Christoph Lohmann e02d72441a Another thing for TODO – resize. 2012-09-04 22:06:54 +02:00
Christoph Lohmann 052a617828 Updating the TODO and enabling BCE. 2012-09-04 22:05:24 +02:00
Christoph Lohmann 6e88c7f602 CUP == HVP; CHA == HPA; 2012-09-04 21:56:55 +02:00
Christoph Lohmann 59fe59d3d1 Unifying the old style. 2012-09-04 20:34:43 +02:00
Roberto E. Vargas Caballero 98b6f84bfc Check alternative screen before drawing box selection
Some programs use the alternative screen (vi, less, ...), whose
content is different of the main screen. If you select text in one of
the screen, you don't wait the box selection is painted in the other
screen, so it is necessary check if the selection was done in the same
screen we are going to paint. Before to this commit, you could do
something like:

	$ LESS="" ls | less
	(select some code)
	q

and selection box remains drawing in the main screen, but the content
of selection keeps text of the alternate screen.
---
 st.c |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
2012-09-04 20:33:01 +02:00
Roberto E. Vargas Caballero 66669a5585 Add newline to stderr message
---
 st.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
2012-09-04 20:31:21 +02:00
Christoph Lohmann 1d6702024b Fixing the border pixel when there is a negative position. 2012-09-03 23:09:34 +02:00
Christoph Lohmann 579f12d47b Add -g geometry to st and the manpage. 2012-09-03 23:02:29 +02:00
Christoph Lohmann 466decd535 Fixing a type in in2 in the st.info. 2012-09-03 21:54:40 +02:00
Roberto E. Vargas Caballero 930b2c4a7f Force redisplay of all lines in DECSCNM
When it is called DECSCNM all lines become dirty, because it is necessary
redraw all lines for getting the new colors. It is easy see the problem
running 'echo ^[[?5h'.

In order to get a correct flash when running tput flash is necessary wait
after DECSCNM, until the changes are displayed, because in other case the
switch between reverse on/reverse off will be too much fast and nothing will
happen.
---
 st.c |   12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)
2012-09-03 21:52:34 +02:00
Roberto E. Vargas Caballero a984ffc4cb Add write I/O to file
This is a theorical feature listed in http://st.suckless.org/goals. All the
input/output of the terminal will be written to a file, which can be very
useful for debugging, and also allow interconnect st to other process
through named pipes.
---
 st.1 |    6 ++++++
 st.c |   14 +++++++++++++-
 2 files changed, 19 insertions(+), 1 deletion(-)
2012-09-03 21:52:21 +02:00
Christoph Lohmann cfefa054e8 Patch from Roberto Vargas. »Add initialization strings in terminfo«
Taken from the description:

When tput init is executed the list of task performed are (taken from
terminfo(5)):

              run the program
                     iprog

              output is1 is2

              set the margins using
                     mgc, smgl and smgr

              set tabs using
                     tbc and hts

              print the file
                     if

              and finally
                     output is3.

When reset is executed, a more stronger initialization process is performed,
so the terminal can return from an unknown state. rs1, rs2 and rs3 are used
in this case instead of
using is1, is2 and is3.

This patch makes is2 = rs2, resets insert mode and set normal keypad
mode. For rs1 it performs a full initilization using ^[c.
2012-09-03 21:50:22 +02:00
Christoph Lohmann b11d85c9be Add standout mode. 2012-09-02 19:53:50 +02:00
Christoph Lohmann 7f17a70834 Cleaning up lonely tabs. 2012-09-02 19:43:29 +02:00
Christoph Lohmann 588ba51a53 Make it more obvious where the wrong attribute is used. 2012-09-02 19:42:00 +02:00
Roberto E. Vargas Caballero c79df9f78d Enable multiple arguments in SM and RM
SM and RM can receive multiple parameters, but the code only was accepting
only one. This patch join the code of set and reset modes (SM and RM) in a
common function and uses a loop which deals with all the arguments of the
sequence. This patch improves xterm and vt100 compability.
---
 st.c |  180 ++++++++++++++++++++++++++++--------------------------------------
 1 file changed, 76 insertions(+), 104 deletions(-)
2012-09-02 19:09:35 +02:00
Roberto E. Vargas Caballero 4cdcc39539 Add vpa terminfo capability
---
 st.info |    2 ++
 1 file changed, 2 insertions(+)
2012-09-02 19:08:52 +02:00
Christoph Lohmann 81c678e53e Silencing the compiler but keeping strparse.
This will really be needed when there is a full 256 color support.
2012-08-30 21:19:53 +02:00
Christoph Lohmann c58950f2ef Applying the CBT patch of Roberto Vargas. Thanks. 2012-08-30 21:17:54 +02:00
Christoph Lohmann 91fa81dbac Never trust terminfo fata morganas. And adding other xterm compatibility. 2012-08-30 07:38:47 +02:00
Christoph Lohmann 6696ef8563 Add OSC, DSC, PM, APC and settitle. 2012-08-29 23:14:20 +02:00
Christoph Lohmann ff040e9894 Adding setb and setf and a comment about terminfo installation. 2012-08-29 21:13:47 +02:00
Roberto E. Vargas Caballero aaef13aaaa Add CHT sequence
This sequence performs "Cursor Forward Tabulation <n> tab stops", which
although is not present in vt100 or vt102, xterm accepts it.
---
 st.c |    5 +++++
 1 file changed, 5 insertions(+)
2012-08-29 20:05:25 +02:00
Christoph Lohmann 12de47a933 Applying the patches of k0ga and changing the LICENSE file in the appropriate
way.
2012-08-29 20:01:34 +02:00
Roberto E. Vargas Caballero c084c06b40 Add TBC sequence
This sequence clears tab stops in the terminal. If the argument is not present
or is zero, then removes the tab stop of the current horizontal position. If
the argument is 3 then removes all the tab stops of the terminal. It was
necessary modify the terminfo entry tbc, because it has \E[2g instead of the
correct \E[3g.

Signed-off-by: Roberto E. Vargas Caballero <k0ga@shike2.com>
---
 st.c    |   12 ++++++++++++
 st.info |    2 +-
 2 files changed, 13 insertions(+), 1 deletion(-)
2012-08-29 19:59:47 +02:00
Roberto E. Vargas Caballero 93901ca4fe Add HTS sequence
This sequence adds a new tab stop in the current horizontal position. This
means that tputtab must be look for the next tab stop in the tabs array
instead of using a hard coded value offset. Also, CHT sequence XXX message
is removed because it is not a vt10x sequence (as far as I know it is a
vt50x sequence), and it is not implemented by linux virtual terminal neither
by xterm.

Signed-off-by: Roberto E. Vargas Caballero <k0ga@shike2.com>
---
 st.c |   12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)
2012-08-29 19:59:43 +02:00
Roberto E. Vargas Caballero ee7fd748ac Add tabs field into Term struct
Tabs stop are simulated in st using a fixed size of 8, always, without be
worried about sequences changing the tab stops. A user can put a tab stop in
each horizontal position of the screen, so we need at least one flag for
each column of the screen. In the same way as dirty flags is used for the
rows, it is used a bool dinamic array.

Signed-off-by: Roberto E. Vargas Caballero <k0ga@shike2.com>
---
 st.c |   22 +++++++++++++++++++---
 1 file changed, 19 insertions(+), 3 deletions(-)
2012-08-29 19:59:37 +02:00
Brandon Invergo c6853fe185 apply post-XDBE patch BORDER fix 2012-08-03 14:46:40 +02:00
Brandon Invergo 94771d0588 Implement Xdbe-based double-buffering 2012-07-28 14:27:26 +02:00
Aurélien Aptel 8fdba7494f update TODO. 2012-02-27 12:48:13 +01:00
Aurélien Aptel cfea72c7b4 cleanup. refactored dirt-related function. 2012-02-27 12:44:02 +01:00
Aurélien Aptel 6c0a1eff2f use SHELL as default shell. 2012-02-16 19:24:46 +01:00
Aurélien Aptel 7823aeb1f9 revert to "tip" in VERSION. 2012-02-16 01:06:45 +01:00
Aurélien Aptel 83b0656588 Added tag 0.2.1 for changeset 108926a0fe61 2012-02-16 01:05:26 +01:00
Aurélien Aptel 970d44a60d bump version. 2012-02-16 01:05:14 +01:00
Aurélien Aptel ff5edcfd70 replace fwrite by printf. 2012-02-16 00:59:26 +01:00
Aurélien Aptel cb2e0e9c31 rewrite csidump(). 2012-02-16 00:58:16 +01:00
Aurélien Aptel 53ac69e90d clean and name enum definitions. 2012-02-16 00:33:11 +01:00
Aurélien Aptel 751fb765e4 fix default color overwriten bug. 2012-02-16 00:10:32 +01:00
Aurélien Aptel be2877cd04 show dark cursor when unfocused. 2012-02-15 19:33:48 +01:00
Aurélien Aptel d8e11bdb0e document possible configuration. 2012-02-15 19:11:07 +01:00
Aurélien Aptel 33558ca042 handle dim/bright colors. 2012-02-15 19:10:31 +01:00
Aurélien Aptel 6de1ba6e74 merge 2012-02-13 01:01:41 +01:00
anselm@garbe.us b11e22df7d some minor fixes 2012-02-11 10:48:18 +01:00
Aurélien Aptel cee6ccc6ee reduce size of each glyph for faster copy. 2012-02-08 16:45:52 +01:00
Aurélien Aptel b6b90253b8 Added tag 0.2 for changeset 3c2f9f2ab5e4 2012-02-07 23:53:45 +01:00
Aurélien Aptel bcb7ec68c2 cosmetic, whitespace, etc. 2012-01-21 23:43:03 +01:00
Aurélien Aptel df54ab0405 fix PRINT/DRAW _TIMEOUT and fix redrawing bug. 2012-01-21 23:26:53 +01:00
Aurélien Aptel 896310e592 copy dirty lines to screen, add select() timeout & min time between draw() calls.
* add a timeout value (SELECT_TIMEOUT) of 20ms in the select() call
* wait at least 20ms (DRAW_TIMEOUT) between draw() calls
* only copy dirty lines from the buffer to the screen

what draw() does:
* clears dirty lines in the buffer
* draws the longest same-attributes string of each
  dirty line to the buffer with multiple xdraws() call
* copies the current dirty line from buffer to the screen with a single
  xcopy() call

this changeset makes st run ~10x faster.
2012-01-21 23:14:41 +01:00
Aurélien Aptel 13a8eeb810 fix segfault in selection. (thx Martti Kühne) 2012-01-10 22:21:03 +01:00
Aurélien Aptel ab9c9a4e3a merge. 2011-11-01 16:37:16 +01:00
Aurélien Aptel a20125a3d1 fix selection. (thx Tarmo Heiskanen) 2011-11-01 16:33:43 +01:00
Aurélien Aptel 23bb97d9f3 drawregion() only copies region on screen. 2011-10-20 23:26:58 +02:00
Aurélien Aptel 0dbf9c8c12 add dirty flag for lines 2011-10-20 23:20:59 +02:00
Aurélien Aptel 907cb8bfa6 no palette limit (thx Nick) 2011-10-06 21:32:34 +02:00
Aurélien Aptel 9d613092d6 simplify version format. 2011-09-22 10:04:58 +02:00
Aurélien Aptel 4bd087766f selection is removed or scrolled properly. (thx Rafa Garcia Gallego) 2011-09-16 18:48:16 +02:00
Aurélien Aptel b032814e25 working on old repo, merging recent changesets. 2011-09-16 18:24:13 +02:00
Aurélien Aptel 8e66b5cc16 move xembedatom in XWindow struct, add link to xembed specs. 2011-09-16 18:21:48 +02:00
Aurélien Aptel 8d2d8848e8 tweak focus to support XEMBED client message and remove focus on EnterNotify. (thx Adrian) 2011-09-16 18:03:44 +02:00
Aurélien Aptel d5f3d120ea remove dup of default window size. 2011-09-16 17:57:56 +02:00
Aurélien Aptel f78b793d91 change "op" cap in terminfo entry to xterm/rxvt value. 2011-08-14 17:15:19 +02:00
Aurélien Aptel 6f260ba164 fix custom key handling. 2011-08-14 17:13:59 +02:00
Aurélien Aptel 8503f954a1 fix focus state when embed in another window. 2011-06-09 18:25:56 +02:00
Aurélien Aptel cddbd6eee5 fix segfault with mouse selection. (thx anonymous) 2011-06-09 14:27:07 +02:00
Aurélien Aptel 3959a99293 add -w option to embed st. (thx nodus cursorius) 2011-06-08 21:35:58 +02:00
Aurélien Aptel 4736edd469 applied parts of "anonymous" cleanup patch. 2011-06-08 20:26:00 +02:00
Aurélien Aptel 189a81caa1 add altscreen escseq alias & caps to terminfo entry. (thx Bert Münnich) 2011-06-08 20:22:38 +02:00
Aurélien Aptel 9b404c0dfb disable mouse highlight when mouse report enabled. (thx Bert Münnich) 2011-06-08 19:32:10 +02:00
Aurélien Aptel d59f92d6f1 reverse video mode. (thx Bert Münnich) 2011-06-08 12:40:35 +02:00
Aurélien Aptel b2db58c2a0 add status bar (window title) to terminfo. (thx Rafa Gallego) 2011-06-01 19:57:48 +02:00
Aurélien Aptel 6734de9b6e set title before mapping window (thx Kamil Cholewiński). 2011-05-22 16:57:27 +02:00
Aurélien Aptel 7d352f1436 applied parts of Connor Lane Smith's cleanup patch. 2011-05-14 17:47:37 +02:00
Aurélien Aptel 5beae6a62e macro cleanup. 2011-05-10 22:55:35 +02:00
Aurélien Aptel 0107293a44 add mouse report escape to terminfo entry. 2011-05-10 22:54:30 +02:00
Aurélien Aptel 80da37203e support for x11 xterm mouse reporting 2011-05-10 22:22:44 +02:00
Aurélien Aptel 8eaed2cdda whitespace. 2011-04-26 20:29:28 +02:00
Aurélien Aptel babf4db52b cleanup. 2011-04-26 20:22:15 +02:00
Aurélien Aptel aede91e22a update TODO 2011-04-22 00:42:58 +02:00
Aurélien Aptel 9d5ea14b9d selection clicks, shift+arrow keys, fast(er) redraw, key mask in config.h (thx Magnus Leuthner) 2011-04-22 00:18:53 +02:00
Aurélien Aptel d3c5aba2d9 update README. 2011-04-03 21:40:33 +02:00
Aurélien Aptel 742a4a18c2 quick bug-fixing 0.1.1 release. 2011-04-03 21:05:41 +02:00
Aurélien Aptel 73e37f5629 update VERSION. 2011-04-03 21:04:45 +02:00
Aurélien Aptel 89c8a3a2d9 take BORDER into account for selection. (thx Petr Sabata) 2011-04-03 21:03:48 +02:00
Aurélien Aptel 9b63dd9f43 fix utf8 clipboard. (thx Petr Sabata) 2011-04-03 21:00:55 +02:00
Aurélien Aptel 1adf2e3978 Added tag 0.1 for changeset cbc18c988236 2011-04-03 02:02:31 +02:00
Aurélien Aptel 674434ef6f add support for utf8 clipboard. fix usage message. 2011-04-03 00:35:02 +02:00
pancake@nopcode.org a047431d34 do not add newline to selection text if next line not selected (Nick) 2011-04-01 09:35:38 +02:00
pancake@nopcode.org fe72483686 remove debugging printf 2011-04-01 09:33:28 +02:00
pancake@nopcode.org 1ab42fd49e apply Nick's patch to fix some error printf to use stderr 2011-04-01 09:32:41 +02:00
Aurélien Aptel 4d649c2403 fix insert key, terminfo and changed TERM back to st. (thx Ondrej Martinek) 2011-01-23 12:30:01 +01:00
Aurélien Aptel 0a208cb616 change X cursor to "I". 2010-12-12 13:32:13 +01:00
Aurélien Aptel e8b18dd97b update terminfo entry. 2010-12-08 18:41:55 +01:00
Aurélien Aptel fd1149866f add new line glitch to terminfo entry. 2010-12-08 18:09:39 +01:00
Aurélien Aptel 86c5cb6de6 change -e behaviour and update man page. 2010-11-30 22:55:44 +01:00
Aurélien Aptel 732b9601ed -e flag handles arguments. 2010-11-28 13:17:20 +01:00
Aurélien Aptel 54bc450dbf use memmove() instead of memcpy() in ttyread(). 2010-11-28 01:40:39 +01:00
Aurélien Aptel af75c433e5 fix and clean ttyread(). buf wasn't static. 2010-11-27 21:19:31 +01:00
Aurélien Aptel 41a4497ecf merge. 2010-11-26 22:12:54 +01:00
Aurélien Aptel 00ba6969f8 s/xw.dis/xw.dpy/ 2010-11-26 22:11:31 +01:00
pancake@nopcode.org eaf38bf310 Fix unused variable issue and OSX includes 2010-11-24 14:27:44 +01:00
Aurélien Aptel b61925b5d6 cleanup & bugfix in xdraws(). 2010-11-20 22:24:04 +01:00
Aurélien Aptel 81a048d6cf clean comment regarding redrawing in bmotion(). 2010-11-19 22:32:39 +01:00
Gregor Best b61afd24be Add -c option to override the default window class 2010-11-19 17:13:13 +01:00
Aurélien Aptel 70464e2080 some code cleaning. 2010-11-18 12:43:33 +01:00
Aurélien Aptel 9b74fcadc4 utf8 support! print text in delicious unicode greatness! all hail to the glorious Damian Okrasa for the patch!
TERM set back to xterm.
changed default fonts.
Note: drawing is now (even) slower.
2010-11-18 01:00:04 +01:00
Aurélien Aptel d581bfccd7 selection code cleanup. 2010-11-08 19:49:13 +01:00
Aurélien Aptel b1e6099220 fixed ED. 2010-10-31 20:29:22 +01:00
Devin J. Pohly edfbc9b432 redraw if we scroll on resize 2010-10-25 16:45:13 -04:00
Devin J. Pohly 638a30359d get rid of artifacts in border on resize down 2010-10-25 16:00:10 -04:00
Devin J. Pohly d85f7319a2 copy old pixmap to new on resize 2010-10-25 15:26:47 -04:00
Devin J. Pohly 1243581772 move code into new xresize func, add early exit to resize 2010-10-25 15:10:41 -04:00
Aurélien Aptel 722688d989 \v and \f are have the same behaviour of \n. 2010-10-16 20:54:19 +02:00
Aurélien Aptel 6f87a39444 added LNM mode; re-organized kpress() to handle it. 2010-10-16 20:50:29 +02:00
Aurélien Aptel ce27e63491 redraw optimization. 2010-10-16 17:13:22 +02:00
Aurélien Aptel 9e004846de fixed newline bug. 2010-10-14 19:21:12 +02:00
Aurélien Aptel 68d8fcf62a replaced memset by loops in tresize(); turns out it's faster. 2010-10-13 01:27:09 +02:00
Aurélien Aptel e4bf56ae1a remove useless draw(). 2010-10-13 01:25:04 +02:00
Aurélien Aptel d693b304c7 applied xclipboard patch. thx David Isaac Wolinsky. 2010-10-13 01:24:11 +02:00
Aurélien Aptel 3a50a4fd93 clean button selection code. 2010-10-13 00:50:18 +02:00
Aurélien Aptel 3470e3af23 compose key patch. thx federico luna. 2010-09-21 16:04:13 +02:00
Aurélien Aptel 6faedce53a s/hasfocus/focus/ for consistency. 2010-09-11 16:07:36 +02:00
Aurélien Aptel ab7037cb33 don't draw if the window is not visible. 2010-09-11 16:05:57 +02:00
Aurélien Aptel f693476365 use xclear() in draw(). 2010-09-11 16:01:41 +02:00
Aurélien Aptel 8c3757986a use XCreateWindow(), set gravity bit. 2010-09-11 15:59:54 +02:00
Aurélien Aptel 273d4ba938 cleaning st.info. added comment in st.c for DECSCNM. 2010-09-03 00:15:43 +02:00
Aurélien Aptel c43526153f cleaning st.info. fixed cvvis. 2010-09-03 00:00:41 +02:00
Aurélien Aptel 58083da61f set terminal colors to xterm default ones. 2010-09-02 22:35:55 +02:00
Aurélien Aptel ebc287271c removed gfx chars not present in xterm acsc. 2010-09-02 21:59:05 +02:00
Aurélien Aptel 7d325a3797 fixed start/end sequence of gfx. 2010-09-02 20:24:33 +02:00
Aurélien Aptel 223909e008 undefined gfx doesn't draw \0. 2010-09-02 20:21:40 +02:00
Aurélien Aptel b6af0fdc20 fixed makefile. 2010-09-02 02:03:53 +02:00
Aurélien Aptel 2080dfebea added manpage. 2010-09-02 02:02:56 +02:00
Aurélien Aptel fbc6ec3207 resize from the top. 2010-09-02 01:42:03 +02:00
Aurélien Aptel 9d82bdd947 added -e and -t option. 2010-09-02 01:37:01 +02:00
Aurélien Aptel 97695baf4f factored code and fixed behaviour of tnewline(). 2010-09-01 23:20:54 +02:00
Aurélien Aptel 32e160c939 updated TODO. 2010-09-01 22:54:28 +02:00
Aurélien Aptel 42344b7154 started to go through st.info and fix things. 2010-09-01 22:54:07 +02:00
Aurélien Aptel a79bc96c94 capabilities sorted by capname in st.info. copy acsc from xterm. 2010-09-01 19:47:46 +02:00
Aurélien Aptel df5c5ed045 removed debug code. 2010-09-01 18:12:54 +02:00
Aurélien Aptel 5ce6c5c032 fixed IL and DL. 2010-09-01 17:21:09 +02:00
Aurélien Aptel ef69118028 factor and cleanup code. 2010-09-01 16:26:12 +02:00
Aurélien Aptel f732ca5f1f added correct line drawing characters for default font. 2010-09-01 00:30:39 +02:00
Aurélien Aptel cfe897554d use struct instead of array. 2010-08-31 18:30:18 +02:00
Aurélien Aptel 9703859e6c cleanup. 2010-08-31 18:22:59 +02:00
pancake@nopcode.org 591d147af7 fix segfault when selecting big buffers
shift+insert paste clipboard
honor CFLAGS and LDFLAGS in config.mk
2010-08-31 17:36:55 +02:00
Aurélien Aptel 1132d9e2d6 fix build. 2010-08-31 16:56:27 +02:00
Aurélien Aptel c4225bdcc9 add selinit() and renamed clipboard_* to sel*. 2010-08-31 16:53:34 +02:00
Aurélien Aptel f211bc2eed move event configuration in xinit(). 2010-08-31 16:30:11 +02:00
Aurélien Aptel ee858b4805 use one global struct instead of many vars for selection. Cleanup. 2010-08-31 15:36:13 +02:00
Aurélien Aptel 80f70f1c22 use GLYPH_SET to test if a char is set; cleanup. 2010-08-31 14:52:52 +02:00
pancake@nopcode.org 23cc3fc571 fix crash for small windows
use unconditional infinite loops
2010-08-31 11:40:57 +02:00
Aurélien Aptel 160bda1b60 toggle ATTR_REVERSE on selected text, factored some code and fixed Makefile. 2010-08-31 11:02:17 +02:00
pancake 596bb133a5 fix build
use config.def.h mechanism
add SHELL in config.h
2010-08-30 23:49:15 +02:00
pancake 0ba53e48c7 initial implementation of selection and clipboard 2010-08-30 23:41:37 +02:00
pancake@nopcode.org e1ce89f267 fix segfault 2010-08-30 17:07:54 +02:00
Aurélien Aptel 12c25bcea9 added support for alternate screen. 2010-08-30 16:48:18 +02:00
Aurélien Aptel 326586ba43 cursor is hid when unfocused. 2010-08-30 15:28:29 +02:00
Aurélien Aptel ae5baac932 use predefined OS macro instead of uname. 2010-08-30 13:04:19 +02:00
Aurélien Aptel bef87acd0d st should compile on NetBSD. 2010-08-30 01:20:38 +02:00
Aurélien Aptel 1bb7398f4b removed pty.h. minimal system guessing added in config.mk. 2010-08-30 03:12:11 +02:00
Aurélien Aptel e851736e8b removed (visual) bell. '\a' sets the urgency flag if st is unfocused. 2010-08-30 03:05:05 +02:00
Aurélien Aptel 188293c828 removed useless cursor init. and renamed xcursor() to xdrawcursor(). 2010-08-30 01:45:57 +02:00
Aurélien Aptel 7d88cf88d0 added support for the "magic margin", changed c.hide to c.state, changed xcursor() to use term instead of a
parameter and fixed the cursor position after setting a scrolling region.
2010-08-30 01:35:37 +02:00
Aurélien Aptel 1f6e7b84c6 removed old VT52 escapes, fixed VT100 IND. 2010-08-30 01:19:05 +02:00
pancake 581ae58b41 fix warning 2010-08-30 00:32:49 +02:00
Aurélien Aptel 5258d60545 fixed optimized drawing routine and factored some code. 2010-08-29 20:12:44 +02:00
Aurélien Aptel b4f623f910 fixed pixmap buffer drawing. 2010-08-29 19:41:36 +02:00
Aurélien Aptel eab9aad1dc added a XFlush() in xbell(). 2010-08-29 19:14:05 +02:00
Aurélien Aptel 2181040594 moved term.hidec in term.c for consistency, put back delay in xbell()
along with duration in config.h, factored some code in tnew()/treset()
and cleaned some code.
2010-08-29 18:55:15 +02:00
Aurélien Aptel c186c8ef9a merged tscroll() with tscrollup(). 2010-08-29 12:27:59 +02:00
Aurélien Aptel 6db6980e27 st now runs on Linux, OpenBSD and FreeBSD. 2010-08-28 03:18:22 +02:00
Aurélien Aptel c563328571 removed XINERAMA from config.mk and fixed a segfault when st is
started without a display. (thx Hiltjo Posthuma)
2010-08-27 13:53:27 +02:00
Aurélien Aptel a1018e0e9e fixed potential bug in IS_SET(). 2010-08-27 00:58:28 +02:00
Aurélien Aptel fbb66da9a9 merged tcursorwrap() with tnewline(), added few comments and updated copyright. 2010-08-27 00:28:27 +02:00
Aurélien Aptel 42b2912e21 cleaned some spaces. 2010-08-27 00:05:50 +02:00
Aurélien Aptel 5d611cd547 added macro to test flags, removed tmovecursor(). 2010-08-26 23:43:08 +02:00
Aurélien Aptel 4db3df312a faster resizing. 2010-08-26 21:37:12 +02:00
Aurélien Aptel e8c13ebe80 close master/slave pty in the shell process. 2010-08-26 21:36:21 +02:00
Aurélien Aptel 5c93f399c5 clean \t. 2010-08-26 21:34:37 +02:00
Aurélien Aptel 44226483fb update function prototypes. 2010-08-26 21:33:53 +02:00
Aurélien Aptel b09401b96b fix \b and clean \t. 2010-08-26 21:32:34 +02:00
Aurélien Aptel a7922bd1d9 added F1-12 key, fixed DCH and ICH. 2010-08-22 19:46:46 +02:00
Aurélien Aptel ce3f4fc647 fixed backspace problem, updated terminfo entry and moved TNAME in config.h. 2010-08-19 12:46:54 +02:00
Aurélien Aptel d2f157c741 renamed a function. 2010-08-13 22:43:30 +02:00
Anselm R Garbe 10e49a0505 applied Devin J Pohly's st color info patches, thanks Devin! 2010-07-24 12:09:14 +01:00
pancake@nopcode.org 9e8f5f1348 fix gcc warnings 2010-07-08 17:34:02 +02:00
Aurélien Aptel 499c70cda0 fixed background color bug (thx Devin J. Pohly). 2010-07-08 16:31:41 +02:00
Aurélien Aptel 2f96cfeada added PBaseSize hint and set default title to "st". 2010-06-03 23:14:37 +02:00
Aurélien Aptel 2f5ebe0a4d rearranged code, resize fixed. 2010-06-02 16:01:30 +02:00
Aurélien Aptel 476f93794a little clean up. 2010-04-27 00:04:29 +02:00
Aurélien Aptel d01c55c9ab use SHELL environment variable (thx Thomas Adam) 2010-04-26 19:20:53 +02:00
Aurélien Aptel b3b7ffce5f double-buffering added using pixmap (finally).
results in a lot of simplification :
	- no more dirty flags (perf are good enough).
	- no more ugly gfx call in emulation functions.
LINESPACE removed from config.h.
BORDER is now handled correctly.
2010-03-15 23:56:38 +01:00
Aurélien Aptel 0f4dd5035e bold attribute is back.
visibility of the cursor is not saved/loaded anymore.
scrolling up/down is fixed.
added RI and RIS sequences.
fixed cursor drawing bug.
2010-03-11 23:50:50 +01:00
Aurélien Aptel 7cdaf130b1 added VT100 NEL. 2010-02-21 14:59:32 +01:00
Aurélien Aptel 639f16d200 added VT100 RI. 2010-02-21 14:39:31 +01:00
Aurélien Aptel 636c369d86 added VT100 save&load cursor support. 2010-02-21 14:28:32 +01:00
Aurélien Aptel 3ba517e796 ECH handled correctly. 2010-02-21 14:14:58 +01:00
Aurélien Aptel eff05c7b90 more escapes & more compability:
cursor keys are handled in kpress according to the Application Mode (DECPAM).
define & enum were renamed.
tcursor() is now tmovecursor() which is more correct.
tcpos() is now tcursor(), as DECSC is also supposed to save attributes.
capnames are indicated whenever possible.

Currently:
alsamixer looks fine, totally usable.
ncmpc is almost ok.
emacs looks like shit.
2010-02-08 23:16:55 +01:00
Aurélien Aptel e6b3f5c755 graphic charset and a few more escapes. 2010-02-03 16:18:04 +01:00
Aurélien Aptel 0981437524 TERM set to xterm by default (which broke a lot of stuff), better escape handling (title), and a little clean up. 2010-02-03 03:25:35 +01:00
Aurélien Aptel f2dff29a16 drawing is faster but the bold attr is not supported anymore. 2009-10-28 14:34:22 +01:00
Aurélien Aptel 4e6915a16b Fixed possible segfault by reverting to the key struct (again). 2009-09-07 21:19:29 +02:00
Anselm R Garbe dab8326e64 only compile tdump if DEBUG flag is set 2009-07-10 16:27:14 +01:00
Anselm R Garbe cf65699a29 we definately need pixmaps for the drawing, currently drawing into the window is painfully slow! much more slower than drawing into a pixmap and mapping that when finished -- several optimisations 2009-07-10 16:23:11 +01:00
Aurélien Aptel 0a5e510209 reverted back to the old Key struct. 2009-06-21 19:52:06 +02:00
Aurélien Aptel 4d794b3479 updated "key" to a lookup table. 2009-06-21 19:37:12 +02:00
Aurélien Aptel 44d8c319a9 removed old unused cursor() proto. 2009-06-17 20:44:36 +02:00
Aurélien Aptel b8ffa1d7e9 fixed the scrolling bug and cleaned some stuff. 2009-06-17 02:58:40 +02:00
Aurélien Aptel d5f4554431 dump escseq if not handled. 2009-06-16 12:34:10 +02:00
Aurélien Aptel 53937e045a clean up. 2009-06-16 02:41:45 +02:00
Aurélien Aptel 2e37752961 added/removed files, updated Makefile. 2009-06-16 02:33:38 +02:00
Aurélien Aptel 8b4bfe31ec made kpress() more flexible, removed st.h, added config.h. 2009-06-16 02:23:46 +02:00
Aurélien Aptel 5d8aa08ba5 updated TODO. 2009-06-11 17:03:25 +02:00
Aurélien Aptel ad39f000be added sigchld handler, cleaned error checking. 2009-06-11 16:41:14 +02:00
Aurélien Aptel 2f35cef54b cleaned up (removed space indentation). select/event bug fixed. 2009-05-28 01:33:01 +02:00
Aurélien Aptel 129bcd7586 fixed a memory leak & segfault in tresize. 2009-05-26 02:21:02 +02:00
Aurélien Aptel 059d2ba264 updated TODO. 2009-05-15 00:40:47 +02:00
Aurélien Aptel a866108af2 tab moves the cursor instead of inserting spaces. 2009-05-15 00:39:51 +02:00
Aurélien Aptel 1cf8b77d27 handle tabulation (still not perfect) 2009-05-14 01:03:17 +02:00
Aurélien Aptel 0ecfcc39b0 removed truecolor stuff 2009-05-14 00:28:10 +02:00
Aurélien Aptel abe6f3b0e4 removed the truecolor stuff 2009-05-14 00:27:37 +02:00
Aurélien Aptel 86fa756033 same thing, really fixed this time. 2009-05-14 00:18:05 +02:00
Aurélien Aptel ccafacb3ff added some error checking in xinit (fixed the segfault caused by a missing font) 2009-05-14 00:04:34 +02:00
Aurélien Aptel fd281ad336 Removed unused variable and cleaned some comment. 2009-05-10 23:32:21 +02:00
Anselm R Garbe d58dd3b8bc backport of local changes 2009-05-10 13:17:09 +01:00
Matthias-Christian Ott 802f1922f9 add accidentally omitted word 2008-09-05 20:25:34 +02:00
Matthias-Christian Ott a7f50ebb64 use stdio(3) 2008-08-25 17:56:00 +02:00
Matthias-Christian Ott 07d1edcd76 add description of std 2008-08-25 16:29:37 +02:00
Matthias-Christian Ott d61a2a8fce add prototype for command parsing 2008-08-07 10:38:54 +02:00
Matthias-Christian Ott 240411e7d0 correct year of copyright notice 2008-07-21 17:10:33 +02:00
Matthias-Christian Ott e0d0a2b96e simplify Makefile
Due to consideration of POSIX compliance issues config.mk had
to be removed. Configuration variables can be overridden by
environment variables or specified via command line.

Additionally all pretty-printed messages were removed and
built-in rules are used. This also simplifies and purges
the Makefile.
2008-07-21 17:06:59 +02:00
Matthias-Christian Ott 082d8bb82b reunite pty.c with std.c 2008-07-21 10:34:02 +02:00
Matthias-Christian Ott 6c6b65ea6e correct programme name 2008-07-21 09:25:47 +02:00
Matthias-Christian Ott 746931a3d4 use errx() for help and version messages 2008-07-21 09:25:25 +02:00
Matthias-Christian Ott a95f4f2ed9 merge with backout head 2008-07-10 22:43:24 +02:00
Matthias-Christian Ott 7a132bd6ac Backed out changeset d2bb4220fdf3
Ptm and pts are used by pty.c, thus they have to be non-static.
2008-07-10 22:42:10 +02:00
Matthias-Christian Ott fb4508b0b7 remove TODO 2008-07-09 11:10:38 +02:00
Matthias-Christian Ott 0cbcedb89f make ptm and pts static 2008-07-09 10:50:44 +02:00
Matthias-Christian Ott afc73c920d remove useless variable 2008-07-05 13:29:21 +02:00
Matthias-Christian Ott b3902ca178 remove emallocz() 2008-07-04 18:18:51 +02:00
Matthias-Christian Ott f982c1c37c replace eprint() functions with BSD error functions 2008-07-04 18:05:08 +02:00
Matthias-Christian Ott d83cbc27b9 simplify flushing 2008-06-15 17:31:24 +02:00
Matthias-Christian Ott 3cb6793781 correct buffering 2008-06-15 09:19:22 +02:00
Matthias-Christian Ott cf147ae9da make local functions and variables static 2008-06-14 23:29:11 +02:00
Matthias-Christian Ott f9a0524f94 add select(2)-based i/o multiplexing 2008-06-14 23:24:12 +02:00
Matthias-Christian Ott a49919a10c drop stdio usage
Std requires I/O multiplexing which is very complicated with
stdio, because it provides no transparent buffering.
2008-06-14 23:12:07 +02:00
Matthias-Christian Ott 0c0ada8a7f make st and std separate programmes 2008-06-14 11:03:29 +02:00
Matthias-Christian Ott 339e7f3571 add missing header file 2008-06-10 18:01:15 +02:00
Matthias-Christian Ott 09fe1e22ce assume glibc by default 2008-06-10 18:00:15 +02:00
Matthias-Christian Ott 5f28725471 source utility functions out to util.c 2008-06-10 17:56:57 +02:00
Matthias-Christian Ott 05ebee6084 add copyright comment 2008-06-10 17:32:15 +02:00
Matthias-Christian Ott 47d8633f15 source getpty() out to pty.c 2008-06-10 17:30:15 +02:00
Matthias-Christian Ott 0dedee5de8 update TODO 2008-06-09 22:24:44 +02:00
Matthias-Christian Ott 0dce422d31 correct function name 2008-06-09 22:21:37 +02:00
Matthias-Christian Ott b8f79f0ed0 remove xinerama flags
The xinerama related variables in config.mk are a relict of
dwm and therefore should be removed.
2008-06-08 21:36:58 +02:00
Matthias-Christian Ott 5e680d7102 add missing header file 2008-06-08 21:18:49 +02:00
Matthias-Christian Ott dc01596e6d add parser loop 2008-06-08 21:17:02 +02:00
Matthias-Christian Ott 5d055fdc7c remove useless variable 2008-06-08 20:55:42 +02:00
Matthias-Christian Ott a6efc851b6 replace state with separate variables 2008-06-08 20:47:08 +02:00
Matthias-Christian Ott 50b4785f26 terminate error message with newline 2008-06-04 19:52:59 +02:00
Matthias-Christian Ott c61b34e8e1 correct LENGTH() 2008-06-02 20:15:52 +02:00
Matthias-Christian Ott 693e2413c8 simplify control flow 2008-06-02 20:01:35 +02:00
Matthias-Christian Ott 0b3510df45 remove debug code 2008-06-02 18:42:23 +02:00
Matthias-Christian Ott 40c0ecfe82 remove stdio slave pty opening 2008-06-02 18:41:23 +02:00
Matthias-Christian Ott e2ac1676b1 drop support for proprietary UNIX variants
Proprietary UNIX variants like AIX, HP-UX or SCO UNIX
are nowadays rarely used and maintaining compatibility to
non-standard operating systems interfaces is wasteful and
practically useless.

Projects like xterm suffer from backward compatibility to decades-old
UNIX variants and terminal standards. This does not conform to st's
design goals.
2008-06-02 18:40:22 +02:00
Anselm R Garbe 375efb8891 slight changes 2008-06-01 18:04:49 +01:00
Anselm R Garbe 771ece25e8 applied Matthias-Christians changes to std.c 2008-06-01 18:02:48 +01:00
Anselm R Garbe 1987ae4bac added some new files for the initial rewrite of st from scratch 2008-05-20 10:03:59 +01:00
arg@localhost.localdomain 16f373e36c added new TODO 2008-05-11 16:36:13 +00:00
385 changed files with 46589 additions and 1958 deletions

4
.config/.gitignore vendored Normal file
View File

@ -0,0 +1,4 @@
.config
mimeapps.list
pulse/
chromium/

1
.config/bash/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
hist

102
.config/bash/bashrc Normal file
View File

@ -0,0 +1,102 @@
#!/bin/bash
# if not interactive, don't do anything
[ -z "$PS1" ] && return
# some housekeeping
alias ls="ls --color=auto"
alias ll="ls -lah --color=auto"
function cd() {
builtin cd "$@" && ls --color=auto
}
# history
HISTCONTROL=ignorespace:ignoredups:erasedups
HISTFILESIZE=9999999999
HISTSIZE=9999999999
# bash specific settings
set -o vi # vim mode
shopt -s autocd
shopt -s cmdhist
shopt -s histreedit
shopt -s histappend
shopt -s histverify
PS1="\w\$ "
if [ -n "$IN_NIX_SHELL" ]; then
NIX_SHELL_PS1="nix:"
fi
if [ "$USER" = "root" ]; then
USER_PREFIX="\[\033[41m\]root:\[\033[0;0m\]"
elif [ "$USER" == "ryan" ] && [ "$HOSTNAME" = "netbox" ]; then
USER_PREFIX=""
elif [ "$USER" != "usr" ]; then
USER_PREFIX="$USER:"
fi
# hostname shenanigans
case "$HOSTNAME" in
"aristotle")
PS1="$USER_PREFIX\[\033[36;1m\]${NIX_SHELL_PS1}arist:$PS1\[\033[0;0m\]"
;;
"copernicus")
PS1="$USER_PREFIX\[\033[97;1m\]${NIX_SHELL_PS1}coper:$PS1\[\033[0;0m\]"
;;
"x230t")
PS1="$USER_PREFIX\[\033[93;1m\]${NIX_SHELL_PS1}x230t:$PS1\[\033[0;0m\]"
;;
"mlg")
PS1="$USER_PREFIX\[\033[94;1m\]${NIX_SHELL_PS1}mlg:$PS1\[\033[0;0m\]"
;;
"netbox")
PS1="$USER_PREFIX\[\033[95;1m\]${NIX_SHELL_PS1}net:$PS1\[\033[0;0m\]"
;;
*)
PS1="$USER_PREFIX\[\033[96;1m\]${NIX_SHELL_PS1}unk:$PS1\[\033[0;0m\]"
;;
esac
repos() {
sel="$(ls ~/git | fzy | awk '{print "/home/usr/git/"$1}')"
[ "$?" -eq 1 ] && exit
cd "$sel"
}
hist() {
res=$(cat ~/.config/bash/hist | \
sort | \
uniq | \
shuf | \
fzy)
[ -n "$res" ] && $($res)
}
search() {
if [ "$1" = '-a' ]; then
res=$(find /home/usr/ /home/usr/doc/ \
-mindepth 1 \
-not -path '*/.*' \
-not -path './Mail/*' \
-not -path './vdir/*' \
-not -path '*venv*' \
-not -path '*node_modules*' \
-not -path '*__pycache__*' \
-type d | cut -c 11- | fzy)
else
res=$(find $(pwd) \
-mindepth 1 \
-not -path '*/.*' \
-not -path './Mail/*' \
-not -path './vdir/*' \
-not -path '*venv*' \
-not -path '*node_modules*' \
-not -path '*__pycache__*' \
-type d | cut -c 11- | fzy)
fi
[ -n "$res" ] && cd /home/usr/"$res"
}

66
.config/bash/profile Normal file
View File

@ -0,0 +1,66 @@
#!/bin/bash
# paths and stuff
export PATH="$PATH:$HOME/.local/bin"
if [ $(hostname) = "localhost" ]; then # this is phone
export PATH="$PATH:$HOME/dot_testing/boxes/phone/out-of-tree/git-annex.linux"
fi
export MANPATH="$(manpath -q):$HOME/.local/share/man"
export EDITOR="nvim"
mkdir -p "$HOME/.local/bin" "$HOME/.share/man"
# program exports to keep the $HOME neat and tidy
# bash
export HISTFILE="$HOME/.config/bash/hist"
export HISTFILESIZE=3000
# python
export PYTHONSTARTUP="$HOME/.config/python/pythonrc.py"
# less
export LESSHISTFILE="-"
# gnupg
export GNUPGHOME="$HOME/.local/share/gnupg"
# remind
export DOTREMINDERS="$HOME/git/calendar/reminders"
# XDG config
export XDG_CONFIG_HOME="$HOME/.config"
export XDG_CACHE_HOME="$HOME/.cache"
export XDG_DATA_HOME="$HOME/.local/share"
export XDG_STATE_HOME="$HOME/.local/state"
# reminders
export DOTREMINDERS="$XDG_DATA_HOME/reminders/remind"
# ls
export LS_COLORS='rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.zst=01;31:*.tzst=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.wim=01;31:*.swm=01;31:*.dwm=01;31:*.esd=01;31:*.jpg=01;35:*.jpeg=01;35:*.mjpg=01;35:*.mjpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.webp=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36:';
# sfeed
SFEED_URL_FILE="$HOME/.local/share/sfeed"
mkdir -p $SFEED_URL_FILE
touch "$SFEED_URL_FILE"
export SFEED_URL_FILE="$SFEED_URL_FILE/.urls"
export $(dbus-launch)
export GTK_THEME="earth"
# elinks
export ELINKS_CONFDIR="$HOME/.config/elinks"
# dbus configuration
export DBUS_SESSION_BUS_ADDRESS="unix:path=$XDG_RUNTIME_DIR/bus"
# make nix-shell respect our PS1
export NIX_SHELL_PRESERVE_PROMPT=1
# source the bashrc(s)
[ -f $HOME/.config/bash/bashrc ] && . $HOME/.config/bash/bashrc
[ -f $HOME/.bashrc ] && . $HOME/.bashrc
# if we're interactive and the tty is /dev/tty1 then start xorg
[ "$(tty)" = "/dev/tty1" ] && sx

30
.config/bspwm/bspwmrc Executable file
View File

@ -0,0 +1,30 @@
#!/bin/sh
# rndusr's bspwmrc
bspc rule -a st-gpg-menu state=floating
bspc rule -a statusbar border=off sticky=on state=floating manage=off
bspc rule -a tmenu-prompt border=on sticky=on state=floating
bspc rule -a Xmessage border=on state=floating
bspc rule -a Zathura state=tiled
bspc rule -a generic-st-window state=floating manage=on sticky=on border=on
bspc rule -a floating-feh state=floating
bspc rule -a send-to-9 desktop=9
bspc rule -a steam desktop=1
bspc rule -a discord desktop=2
bspc config normal_border_color "#161510"
bspc config active_border_color "#161510"
bspc config focused_border_color "#727A18"
bspc config pointer_follows_focus true
bspc config pointer_follows_monitor true
bspc config focus_follows_pointer true
bspc config window_gap 0
bspc config top_padding 20
# post-wm configuration
disp
bspc desktop -f 1

BIN
.config/dunst/beep.m4a Normal file

Binary file not shown.

24
.config/dunst/dunstrc Normal file
View File

@ -0,0 +1,24 @@
[global]
follow = mouse
font = Fantasque Sans Mono 20
frame_width = 1
always_run_script = true
[urgency_low]
background = "#161510"
foreground = "#cccccc"
frame_color = "#727a18"
[urgency_normal]
background = "#161510"
foreground = "#cccccc"
frame_color = "#727a18"
[urgency_critical]
background = "#161510"
foreground = "#cccccc"
frame_color = "#727a18"
[notify]
summary = "*"
script = ~/.config/dunst/notification_handler.sh

View File

@ -0,0 +1,3 @@
#!/bin/sh
mpv ~/.config/dunst/beep.m4a

3
.config/elinks/.gitignore vendored Normal file
View File

@ -0,0 +1,3 @@
bookmarks
globhist
gotohist

524
.config/elinks/elinks.conf Normal file
View File

@ -0,0 +1,524 @@
## ELinks 0.16.1.1 configuration file
## This is ELinks configuration file. You can edit it manually,
## if you wish so; this file is edited by ELinks when you save
## options through UI, however only option values will be altered
## and missing options will be added at the end of file; if option
## is not written in this file, but in some file included from it,
## it is NOT counted as missing. Note that all your formatting,
## own comments and so on will be kept as-is.
##
## Obviously, if you don't like what ELinks is going to do with
## this file, you can change it by altering the config.saving_style
## option. Come on, aren't we friendly guys after all?
##############################
# Automatically saved options
#
## config
# Configuration handling options.
## config.saving_style_w [0|1]
# This is internal option used when displaying a warning about obsolete
# config.saving_style. You shouldn't touch it.
set config.saving_style_w = 1
## terminal
# Terminal options.
## terminal.st-256color
# Options specific to this terminal type (according to $TERM value).
## terminal.st-256color.transparency [0|1]
set terminal.st-256color.transparency = 1
## ui
# User interface options.
## ui.language <language>
# Language of user interface. 'System' means that the language will be
# extracted from the environment dynamically.
set ui.language = "System"
##############################
# Automatically saved options
#
## terminal
# Terminal options.
## terminal.st-256color
# Options specific to this terminal type (according to $TERM value).
## terminal.st-256color.colors <num>
set terminal.st-256color.colors = 1
##############################
# Automatically saved options
#
## cookies
# Cookies options.
## cookies.accept_policy <num>
# Cookies accepting policy:
# 0 is accept no cookies
# 1 is ask for confirmation before accepting cookie
# 2 is accept all cookies
set cookies.accept_policy = 0
## ui
# User interface options.
## ui.colors
# Default user interface color settings.
## ui.colors.color
# Color settings for color terminal.
## ui.colors.color.mainmenu
# Main menu bar colors.
## ui.colors.color.mainmenu.normal
# Unselected main menu bar item colors.
## ui.colors.color.mainmenu.normal.text <color|#rrggbb>
# Default text color.
set ui.colors.color.mainmenu.normal.text = "white"
## ui.colors.color.mainmenu.normal.background <color|#rrggbb>
# Default background color.
set ui.colors.color.mainmenu.normal.background = "black"
## ui.colors.color.mainmenu.selected
# Selected main menu bar item colors.
## ui.colors.color.mainmenu.selected.text <color|#rrggbb>
# Default text color.
set ui.colors.color.mainmenu.selected.text = "black"
## ui.colors.color.mainmenu.selected.background <color|#rrggbb>
# Default background color.
set ui.colors.color.mainmenu.selected.background = "white"
## ui.colors.color.mainmenu.hotkey
# Main menu hotkey colors.
## ui.colors.color.mainmenu.hotkey.normal
# Main menu unselected hotkey colors.
## ui.colors.color.mainmenu.hotkey.normal.text <color|#rrggbb>
# Default text color.
set ui.colors.color.mainmenu.hotkey.normal.text = "black"
## ui.colors.color.mainmenu.hotkey.normal.background <color|#rrggbb>
# Default background color.
set ui.colors.color.mainmenu.hotkey.normal.background = "white"
## ui.colors.color.mainmenu.hotkey.selected
# Main menu selected hotkey colors.
## ui.colors.color.mainmenu.hotkey.selected.text <color|#rrggbb>
# Default text color.
set ui.colors.color.mainmenu.hotkey.selected.text = "white"
## ui.colors.color.mainmenu.hotkey.selected.background <color|#rrggbb>
# Default background color.
set ui.colors.color.mainmenu.hotkey.selected.background = "black"
## ui.colors.color.menu
# Menu bar colors.
## ui.colors.color.menu.normal
# Unselected menu item colors.
## ui.colors.color.menu.normal.text <color|#rrggbb>
# Default text color.
set ui.colors.color.menu.normal.text = "white"
## ui.colors.color.menu.normal.background <color|#rrggbb>
# Default background color.
set ui.colors.color.menu.normal.background = "black"
## ui.colors.color.menu.selected
# Selected menu item colors.
## ui.colors.color.menu.selected.text <color|#rrggbb>
# Default text color.
set ui.colors.color.menu.selected.text = "black"
## ui.colors.color.menu.selected.background <color|#rrggbb>
# Default background color.
set ui.colors.color.menu.selected.background = "white"
## ui.colors.color.menu.marked
# Marked menu item colors.
## ui.colors.color.menu.marked.text <color|#rrggbb>
# Default text color.
set ui.colors.color.menu.marked.text = "red"
## ui.colors.color.menu.marked.background <color|#rrggbb>
# Default background color.
set ui.colors.color.menu.marked.background = "black"
## ui.colors.color.menu.hotkey
# Menu item hotkey colors.
## ui.colors.color.menu.hotkey.normal
# Menu item unselected hotkey colors.
## ui.colors.color.menu.hotkey.normal.text <color|#rrggbb>
# Default text color.
set ui.colors.color.menu.hotkey.normal.text = "black"
## ui.colors.color.menu.hotkey.normal.background <color|#rrggbb>
# Default background color.
set ui.colors.color.menu.hotkey.normal.background = "white"
## ui.colors.color.menu.hotkey.selected
# Menu item selected hotkey colors.
## ui.colors.color.menu.hotkey.selected.text <color|#rrggbb>
# Default text color.
set ui.colors.color.menu.hotkey.selected.text = "white"
## ui.colors.color.menu.hotkey.selected.background <color|#rrggbb>
# Default background color.
set ui.colors.color.menu.hotkey.selected.background = "black"
## ui.colors.color.menu.frame
# Menu frame colors.
## ui.colors.color.menu.frame.text <color|#rrggbb>
# Default text color.
set ui.colors.color.menu.frame.text = "white"
## ui.colors.color.menu.frame.background <color|#rrggbb>
# Default background color.
set ui.colors.color.menu.frame.background = "black"
## ui.colors.color.dialog
# Dialog colors.
## ui.colors.color.dialog.generic
# Generic dialog colors.
## ui.colors.color.dialog.generic.text <color|#rrggbb>
# Default text color.
set ui.colors.color.dialog.generic.text = "white"
## ui.colors.color.dialog.generic.background <color|#rrggbb>
# Default background color.
set ui.colors.color.dialog.generic.background = "black"
## ui.colors.color.dialog.frame
# Dialog frame colors.
## ui.colors.color.dialog.frame.text <color|#rrggbb>
# Default text color.
set ui.colors.color.dialog.frame.text = "white"
## ui.colors.color.dialog.frame.background <color|#rrggbb>
# Default background color.
set ui.colors.color.dialog.frame.background = "black"
## ui.colors.color.dialog.title
# Dialog title colors.
## ui.colors.color.dialog.title.text <color|#rrggbb>
# Default text color.
set ui.colors.color.dialog.title.text = "white"
## ui.colors.color.dialog.title.background <color|#rrggbb>
# Default background color.
set ui.colors.color.dialog.title.background = "black"
## ui.colors.color.dialog.text
# Dialog text colors.
## ui.colors.color.dialog.text.text <color|#rrggbb>
# Default text color.
set ui.colors.color.dialog.text.text = "white"
## ui.colors.color.dialog.text.background <color|#rrggbb>
# Default background color.
set ui.colors.color.dialog.text.background = "black"
## ui.colors.color.dialog.checkbox
# Dialog checkbox colors.
## ui.colors.color.dialog.checkbox.text <color|#rrggbb>
# Default text color.
set ui.colors.color.dialog.checkbox.text = "darkred"
## ui.colors.color.dialog.checkbox.background <color|#rrggbb>
# Default background color.
set ui.colors.color.dialog.checkbox.background = "black"
## ui.colors.color.dialog.checkbox-selected
# Dialog selected checkbox colors.
## ui.colors.color.dialog.checkbox-selected.text <color|#rrggbb>
# Default text color.
set ui.colors.color.dialog.checkbox-selected.text = "yellow"
## ui.colors.color.title
# Title bar colors.
## ui.colors.color.title.title-bar
# Generic title bar colors.
## ui.colors.color.title.title-bar.text <color|#rrggbb>
# Default text color.
set ui.colors.color.title.title-bar.text = "white"
## ui.colors.color.title.title-bar.background <color|#rrggbb>
# Default background color.
set ui.colors.color.title.title-bar.background = "black"
## ui.colors.color.title.title-text
# Title bar text colors.
## ui.colors.color.title.title-text.text <color|#rrggbb>
# Default text color.
set ui.colors.color.title.title-text.text = "white"
## ui.colors.color.title.title-text.background <color|#rrggbb>
# Default background color.
set ui.colors.color.title.title-text.background = "black"
## ui.colors.color.status
# Status bar colors.
## ui.colors.color.status.showip-text
# Status bar show ip text colors.
## ui.colors.color.status.showip-text.text <color|#rrggbb>
# Default text color.
set ui.colors.color.status.showip-text.text = "white"
## ui.colors.color.status.showip-text.background <color|#rrggbb>
# Default background color.
set ui.colors.color.status.showip-text.background = "black"
## ui.colors.color.status.status-bar
# Generic status bar colors.
## ui.colors.color.status.status-bar.text <color|#rrggbb>
# Default text color.
set ui.colors.color.status.status-bar.text = "white"
## ui.colors.color.status.status-bar.background <color|#rrggbb>
# Default background color.
set ui.colors.color.status.status-bar.background = "black"
## ui.colors.color.status.status-text
# Status bar text colors.
## ui.colors.color.status.status-text.text <color|#rrggbb>
# Default text color.
set ui.colors.color.status.status-text.text = "white"
## ui.colors.color.status.status-text.background <color|#rrggbb>
# Default background color.
set ui.colors.color.status.status-text.background = "black"
## ui.colors.color.tabs
# Tabs bar colors.
## ui.colors.color.tabs.unvisited
# Tab colors for tabs that have not been selected since they completed
# loading.
## ui.colors.color.tabs.unvisited.text <color|#rrggbb>
# Default text color.
set ui.colors.color.tabs.unvisited.text = "white"
## ui.colors.color.tabs.unvisited.background <color|#rrggbb>
# Default background color.
set ui.colors.color.tabs.unvisited.background = "black"
## ui.colors.color.tabs.normal
# Unselected tab colors.
## ui.colors.color.tabs.normal.text <color|#rrggbb>
# Default text color.
set ui.colors.color.tabs.normal.text = "white"
## ui.colors.color.tabs.normal.background <color|#rrggbb>
# Default background color.
set ui.colors.color.tabs.normal.background = "black"
## ui.colors.color.tabs.loading
# Tab colors for tabs that are loading in the background.
## ui.colors.color.tabs.loading.text <color|#rrggbb>
# Default text color.
set ui.colors.color.tabs.loading.text = "darkred"
## ui.colors.color.tabs.loading.background <color|#rrggbb>
# Default background color.
set ui.colors.color.tabs.loading.background = "black"
## ui.colors.color.tabs.selected
# Selected tab colors.
## ui.colors.color.tabs.selected.text <color|#rrggbb>
# Default text color.
set ui.colors.color.tabs.selected.text = "black"
## ui.colors.color.tabs.selected.background <color|#rrggbb>
# Default background color.
set ui.colors.color.tabs.selected.background = "white"
## ui.colors.color.tabs.separator
# Tab separator colors.
## ui.colors.color.tabs.separator.text <color|#rrggbb>
# Default text color.
set ui.colors.color.tabs.separator.text = "white"
## ui.colors.color.tabs.separator.background <color|#rrggbb>
# Default background color.
set ui.colors.color.tabs.separator.background = "black"
## ui.colors.color.desktop
# Desktop background.
## ui.colors.color.desktop.text <color|#rrggbb>
# Default text color.
set ui.colors.color.desktop.text = "white"
## ui.colors.color.desktop.background <color|#rrggbb>
# Default background color.
set ui.colors.color.desktop.background = "black"
## ui.background_char <num>
# Integer value of background character.
set ui.background_char = 32
## ui.show_ip [0|1]
# Whether to display IP of the document in the status bar.
set ui.show_ip = 1
## ui.show_menu_bar_always [0|1]
# Always show menu bar on the screen.
set ui.show_menu_bar_always = 1
## ui.show_status_bar [0|1]
# Show status bar on the screen.
set ui.show_status_bar = 1
## ui.show_title_bar [0|1]
# Show title bar on the screen.
set ui.show_title_bar = 1
##################################
# Automatically saved keybindings
#
bind "main" "k" = "none"
##############################
# Automatically saved options
#
## document
# Document options.
## document.colors
# Default document color settings.
## document.colors.use_document_colors <num>
# Use colors specified in document:
# 0 is use always the default settings
# 1 is use document colors if available, except background
# 2 is use document colors, including background. This can
# mostly look very impressive, but some sites will appear
# really ugly. Note, that obviously if the background is
# not black, it will break the behaviour of transparency.
set document.colors.use_document_colors = 1
##############################
# Automatically saved options
#
## document
# Document options.
## document.browse
# Document browsing options (mainly interactivity).
## document.browse.forms
# Options for handling of the forms interaction.
## document.browse.forms.confirm_submit [0|1]
# Ask for confirmation when submitting a form.
set document.browse.forms.confirm_submit = 0

168
.config/emacs/init.el Normal file
View File

@ -0,0 +1,168 @@
;; rndusr's init.el
;; configure the package manager
(require 'package)
(add-to-list 'package-archives
'("melpa" . "https://melpa.org/packages/"))
(package-initialize)
;; (package-refresh-contents)
; disable annoying ui features
(menu-bar-mode -1)
(tool-bar-mode -1)
(scroll-bar-mode -1)
(setq auto-save-default nil)
(add-hook 'prog-mode-hook 'display-line-numbers-mode)
(defun keymap-symbol (keymap)
"Return the symbol to which KEYMAP is bound, or nil if no such symbol exists."
(catch 'gotit
(mapatoms (lambda (sym)
(and (boundp sym)
(eq (symbol-value sym) keymap)
(not (eq sym 'keymap))
(throw 'gotit sym))))))
(defun get-local-map () (interactive) (message "Current mapping: %S" (keymap-symbol (current-local-map))))
;; download packages
(unless (package-installed-p 'evil)
(package-install 'evil))
(unless (package-installed-p 'org)
(package-install 'org))
(unless (package-installed-p 'org-drill)
(package-install 'org-drill))
(unless (package-installed-p 'accent)
(package-install 'accent))
(unless (package-installed-p 'elfeed)
(package-install 'elfeed))
(unless (package-installed-p 'hackernews)
(package-install 'hackernews))
(unless (package-installed-p 'emms)
(package-install 'emms))
(unless (package-installed-p 'company)
(package-install 'company))
(unless (package-installed-p 'anaconda-mode)
(package-install 'anaconda-mode))
(unless (package-installed-p 'company-anaconda)
(package-install 'company-anaconda))
(unless (package-installed-p 'calfw)
(package-install 'calfw))
(unless (package-installed-p 'calfw-org)
(package-install 'calfw-org))
(unless (package-installed-p 'calfw-ical)
(package-install 'calfw-ical))
;; activate packages
(require 'evil)
(require 'org)
(require 'calfw)
(require 'calfw-org)
(require 'calfw-ical)
(require 'org-drill)
(require 'accent)
(require 'elfeed)
(require 'hackernews)
(require 'emms)
(require 'company)
(require 'anaconda-mode)
(require 'company-anaconda)
;; configure packages
;; - evil-mode
(evil-set-initial-state 'elfeed-search 'emacs)
;; swap ; and :
(with-eval-after-load 'evil-maps
(define-key evil-motion-state-map (kbd ";") 'evil-ex))
(evil-set-leader 'normal (kbd "<SPC>"))
(defun configreload () (interactive) (load "~/.config/emacs/init.el"))
(defun configread () (interactive) (find-file-noselect "~/dot_testing/config/emacs/init.el"))
(defun nixrebuild () (interactive) (term "rebuild"))
(evil-define-key 'normal 'global (kbd "<leader>rr") 'configreload)
(evil-define-key 'normal 'global (kbd "<leader>re") 'configread)
(evil-define-key 'normal 'global (kbd "<leader>nrr") 'nixrebuild)
(evil-ex-define-cmd "get-current-mapping" 'get-local-map)
(evil-mode 1)
;; company-mode
(add-hook 'after-init-hook 'global-company-mode)
(setq company-idle-delay 1
company-tooltip-idle-delay 10
company-require-match nil
company-frontends
'(company-pseudo-tooltip-unless-just-one-frontend-with-delay
company-preview-frontend
company-echo-metadata-frontend)
company-backends '(company-capf))
(setq company-tooltip-align-annotations t)
(add-to-list 'company-backends 'company-anaconda)
(add-hook 'python-mode-hook 'anaconda-mode)
;; org
(setq org-agenda-files '("~/org"))
(setq calendar-week-start-day 1)
(setq org-todo-keywords '((type "MEETING" "CLASS" "TODO" "REHERSAL" "|" "DONE")))
(setq org-return-follows-link t)
;; calfw
(defun google-calendar (id) (concatenate 'string "https://calendar.google.com/calendar/ical/" id "%40group.calendar.google.com/public/basic.ics"))
(defun my-open-calendar ()
(interactive)
(cfw:open-calendar-buffer
:contents-sources
(list
(cfw:org-create-source "Green")
(cfw:ical-create-source "wcs" (google-calendar "c_037e243v5md54rj8kp1k898oo4") "IndianRed")
(cfw:ical-create-source "band" (google-calendar "i6bong6iferbcuf1u25jg47t7k") "Blue")
(cfw:ical-create-source "schoology" "https://wcschools.schoology.com/calendar/feed/ical/1692031887/ef3eab3f5ac45935472a9fa6f601a63a/ical.ics" "Yellow")
)))
;; emms
(require 'emms-player-simple)
(require 'emms-source-file)
(require 'emms-source-playlist)
(emms-all)
(emms-default-players)
(evil-define-key 'normal 'emms-browser-mode-map (kbd "z") 'emms-browser-expand-one-level)
(evil-define-key 'normal 'emms-browser-mode-map (kbd "RET") 'emms-browser-add-tracks-and-play)
(evil-define-key 'normal 'emms-browser-mode-map (kbd "e") 'emms-browser-add-tracks)
;; - elfeed
(global-set-key (kbd "C-x w") 'elfeed)
(setq elfeed-feeds
'("http://nullprogram.com/feed/"
"https://drewdevault.com/blog/index.xml"
"https://digitallibrary.un.org/rss?ln=en&p=libya&rg=50&c=Resource%20Type&c=UN%20Bodies"
"https://planet.emacslife.com/atom.xml"))
(setq elfeed-db-directory "~/.cache/elfeed")
;; - accent.el
(evil-define-key 'insert 'global (kbd "C-k") 'accent-menu)
;; fonts
(set-face-attribute 'default nil
:font "Fantasque Sans Mono 10"
:foreground "white" :background "gray8")
(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(package-selected-packages
'(company-anaconda anaconda-mode company emms bongo accent org-drill hackernews evil elfeed)))
(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
)

21
.config/git/config Normal file
View File

@ -0,0 +1,21 @@
[user]
email = ryan@beepboop.systems
name = stupidcomputer
[credential "https://git.beepboop.systems"]
helper = !git-rbw-wrap gitea
[credential "https://github.com"]
helper = !git-rbw-wrap github-pat
[advice]
addIgnoredFile = false
[init]
defaultBranch = main
[help]
autocorrect = prompt
[push]
autoSetupRemote = true

39
.config/htop/htoprc Normal file
View File

@ -0,0 +1,39 @@
# Beware! This file is rewritten by htop when settings are changed in the interface.
# The parser is also very primitive, and not human-friendly.
fields=0 48 17 18 38 39 40 2 46 47 49 1
sort_key=46
sort_direction=-1
tree_sort_key=0
tree_sort_direction=1
hide_kernel_threads=1
hide_userland_threads=0
shadow_other_users=0
show_thread_names=0
show_program_path=1
highlight_base_name=0
highlight_megabytes=1
highlight_threads=1
highlight_changes=0
highlight_changes_delay_secs=5
find_comm_in_cmdline=1
strip_exe_from_cmdline=1
show_merged_command=0
tree_view=1
tree_view_always_by_pid=1
header_margin=1
detailed_cpu_time=0
cpu_count_from_one=0
show_cpu_usage=1
show_cpu_frequency=0
show_cpu_temperature=1
degree_fahrenheit=1
update_process_names=0
account_guest_in_cpu_meter=0
color_scheme=0
enable_mouse=1
delay=15
left_meters=AllCPUs Memory Swap
left_meter_modes=1 1 1
right_meters=Tasks LoadAverage Uptime
right_meter_modes=2 2 2
hide_function_bar=0

20
.config/isync/config Normal file
View File

@ -0,0 +1,20 @@
IMAPStore main-remote
Host mail.beepboop.systems
Port 993
User ryan@beepboop.systems
PassCmd "rbw get mail.beepboop.systems"
SSLType IMAPS
CertificateFile /etc/ssl/certs/ca-certificates.crt
MaildirStore main-local
Path ~/Mail/main/
Inbox ~/Mail/main/INBOX
Subfolders Verbatim
Channel main
Far :main-remote:
Near :main-local:
Create Both
Expunge Both
Patterns *
SyncState *

View File

@ -0,0 +1,21 @@
IMAPStore main-remote
Host mail.beepboop.systems
Port 993
User ryan@beepboop.systems
PassCmd "rbw get mail.beepboop.systems"
SSLType IMAPS
# termux is weird
CertificateFile /data/data/com.termux/files/usr/etc/tls
MaildirStore main-local
Path ~/Mail/main/
Inbox ~/Mail/main/INBOX
Subfolders Verbatim
Channel main
Far :main-remote:
Near :main-local:
Create Both
Expunge Both
Patterns *
SyncState *

23
.config/khal/config Normal file
View File

@ -0,0 +1,23 @@
[calendars]
[[home]]
path = "~/vdir/calendar/personal/edfbeaf1-e9f3-4d94-a512-40cdafdbc7a0"
color = dark green
[[band]]
path = "~/vdir/calendar/band"
color = light cyan
[[pco]]
path = "~/vdir/calendar/pco"
color = yellow
[[school]]
path = "~/vdir/calendar/school"
color = dark red
[locale]
timeformat = %H:%M
dateformat = %Y-%m-%d
longdateformat = %Y-%m-%d %a
datetimeformat = %Y-%m-%d %H:%M
longdatetimeformat = %Y-%m-%d %H:%M

19
.config/khard/khard.conf Normal file
View File

@ -0,0 +1,19 @@
[addressbooks]
[[main]]
path = ~/vdir/people/main/20cda0dd-5922-4905-8956-859c989a6519
[general]
default_action = list
editor = nvim
merge_editor = nvim, -d
[contact table]
display = first_name
group_by_addressbook = no
reverse = no
show_nicknames = no
show_uids = yes
show_kinds = no
sort = last_name
localize_dates = yes
preferred_phone_number_type = pref, cell, home
preferred_email_address_type = pref, work, home

12
.config/msmtp/config Normal file
View File

@ -0,0 +1,12 @@
defaults
auth on
tls on
tls_trust_file /etc/ssl/certs/ca-certificates.crt
account default
host mail.beepboop.systems
port 587
tls_starttls on
from ryan@beepboop.systems
user ryan@beepboop.systems
passwordeval rbw get "mail.beepboop.systems"

29
.config/neomutt/neomuttrc Normal file
View File

@ -0,0 +1,29 @@
set editor = "nvim"
set my_name = "Ryan Marina"
set fast_reply
set mbox_type = Maildir
set folder = "~/Mail/main"
set sidebar_visible
set sidebar_format = "%B%<F? [%F}>%* %<N?%N/>%S"
set mail_check_stats
set sendmail = "msmtp -a default -C $HOME/.config/msmtp/config"
set from = "ryan@beepboop.systems"
set spoolfile = +INBOX
set record = "+Sent"
set trash = "+Trash"
set postponed = "+Drafts"
mailboxes +SMS +INBOX "+College Messages" +"Internship 24"
unset wait_key
macro index S "<shell-escape>mbsync --config=$HOME/.config/isync/config main; vdirsyncer sync<enter>"
set use_threads = yes
set sort_aux = reverse-last-date-received
set imap_keepalive = 300
set query_command = "khard email --parsable --search-in-source-files '%s'"

1
.config/nvim/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
plugin

View File

@ -0,0 +1,48 @@
set background=dark
highlight clear
if exists("syntax_on")
syntax reset
endif
let g:colors_name = "earth"
hi Normal ctermbg=black ctermfg=NONE cterm=NONE
hi Comment ctermbg=NONE ctermfg=darkblue cterm=NONE
hi Operator ctermbg=NONE ctermfg=green cterm=NONE
hi Statement ctermbg=NONE ctermfg=green cterm=NONE
hi link Keyword Operator
hi Label ctermbg=NONE ctermfg=darkyellow cterm=NONE
hi link Function Label
hi link Repeat Label
hi link Conditional Label
hi link Exception Label
hi Identifier ctermbg=NONE ctermfg=blue cterm=NONE
hi link Constant Identifier
hi PreProc ctermbg=NONE ctermfg=darkblue cterm=NONE
hi link Include PreProc
hi link Define PreProc
hi link Macro PreProc
hi link PreCondit PreProc
hi Type ctermbg=NONE ctermfg=blue cterm=NONE
hi Constant ctermbg=NONE ctermfg=blue cterm=NONE
hi Error ctermbg=darkred ctermfg=white cterm=NONE
hi Todo ctermbg=darkyellow ctermfg=black cterm=NONE
hi Search ctermbg=NONE ctermfg=red cterm=NONE
hi LineNr ctermbg=black ctermfg=gray
hi Pmenu ctermbg=blue ctermfg=black
hi PmenuSel ctermbg=green ctermfg=black
hi VertSplit ctermbg=NONE ctermfg=white cterm=NONE
hi StatusLine ctermbg=black ctermfg=white cterm=NONE gui=NONE
hi StatusLineNC ctermbg=white ctermfg=black cterm=NONE gui=NONE
hi SpellBad ctermbg=NONE ctermfg=red cterm=NONE
hi SpellCap ctermbg=NONE ctermfg=12 cterm=NONE
hi SpellRare ctermbg=NONE ctermfg=13 cterm=NONE
hi SpellLocal ctermbg=NONE ctermfg=14 cterm=NONE

197
.config/nvim/init.lua Normal file
View File

@ -0,0 +1,197 @@
-- randomuser's
-- _ _ _ _
-- (_)_ __ (_) |_ | |_ _ __ _
-- | | '_ \| | __| | | | | |/ _` |
-- | | | | | | |_ _| | |_| | (_| |
-- |_|_| |_|_|\__(_)_|\__,_|\__,_|
-- helper functions {{{
local keymapper = vim.keymap
local globals = vim.g
local opt = vim.o
local cmd = vim.cmd
function nnoremap(l, r)
keymapper.set('n', l, r) -- noremap is implied
end
function inoremap(l, r)
keymapper.set('i', l, r)
end
function tnoremap(l, r)
keymapper.set('t', l, r)
end
-- }}}
-- custom mappings {{{
globals.mapleader = ' '
nnoremap(';', ':')
nnoremap(':', ';')
nnoremap('<leader><leader>', ':')
-- source init.vim
-- requires rebuilding the configuration first
nnoremap('<leader>rr', function()
cmd.source('~/.config/nvim/init.lua')
end)
-- edit init.vim
nnoremap('<leader>re', function()
cmd.edit('~/dot_testing/config/nvim/init.lua')
end)
-- openup netrw
nnoremap('<leader>fs', function()
cmd.Lexplore()
end)
inoremap('qp', '<c-g>u<Esc>[s1z=`]a<c-g>u')
inoremap("<C-a>", "<Esc>mZ0i<Tab><Esc>`ZlA")
inoremap('jk', '<Esc>')
inoremap('zz', '<Esc>:w!<CR>a')
tnoremap('<Esc>', '<C-\\><C-n>')
-- }}}
-- vim options {{{
opt.compatible = false
opt.number = true
opt.foldmethod = 'marker'
opt.encoding = 'utf8'
opt.list = true
opt.lcs = 'tab:->,trail:_,eol:^'
opt.clipboard = 'unnamedplus'
opt.spell = true
opt.spelllang = "en_us"
opt.title = true
opt.ts = 2
opt.sw = 2
opt.hlsearch = true
opt.incsearch = true
opt.ignorecase = true
opt.smartcase = true
opt.inccommand = 'nosplit'
opt.hidden = true
opt.linebreak = true
opt.path = '.,/usr/include,**'
vim.cmd.colorscheme('earth')
opt.statusline="%f %r%m%q%h%=%y 0x%02B %04l:%03c:%03p"
vim.api.nvim_exec("let &titlestring='%{expand(\"%:p\")}'", true)
globals.vimtex_view_method = 'zathura'
-- }}}
-- autocommands {{{
function setTabbing(lang, width)
vim.api.nvim_create_autocmd({"Filetype"}, {
pattern = {lang},
callback = function()
vim.bo.expandtab = true
vim.bo.tabstop = width
vim.bo.shiftwidth = width
end
})
end
setTabbing("python", 4)
setTabbing("htmldjango", 4)
setTabbing("javascript", 4)
setTabbing("css", 4)
setTabbing("html", 4)
setTabbing("nix", 2)
vim.api.nvim_create_autocmd({"TermOpen"}, {
pattern = {"*"},
callback = function()
vim.wo.number = false
end
})
-- }}}
-- netrw options {{{
globals.netrw_winsize = -28
globals.netrw_banner = 0
-- for tree view
globals.netrw_liststyle = 3
-- use previous window to open files
globals.netrw_browser_split = 4
-- }}}
-- packer.nvim {{{
-- taken from packer.nvim readme
local ensure_packer = function()
local fn = vim.fn
local install_path = fn.stdpath('data') .. '/site/pack/packer/start/packer.nvim'
if fn.empty(fn.glob(install_path)) > 0 then
fn.system({'git', 'clone', '--depth', '1', 'https://github.com/wbthomason/packer.nvim', install_path})
vim.cmd [[packadd packer.nvim]]
return true
end
return false
end
local packer_bootstrap = ensure_packer()
local packer = require('packer').startup(function(use)
use 'wbthomason/packer.nvim'
use 'nvim-lua/plenary.nvim'
use 'nvim-telescope/telescope.nvim'
use 'octarect/telescope-menu.nvim'
use 'VonHeikemen/lsp-zero.nvim'
use 'neovim/nvim-lspconfig'
use 'hrsh7th/nvim-cmp'
use 'hrsh7th/cmp-nvim-lsp'
use 'L3MON4D3/LuaSnip'
use 'saadparwaiz1/cmp_luasnip'
use 'lervag/vimtex'
use 'https://github.com/protex/better-digraphs.nvim'
if packer_bootstrap then
require('packer').sync()
end
end);
-- -- }}}
nnoremap('<leader>ff', function()
require('telescope.builtin').find_files()
end)
inoremap('<C-k><C-k>', function()
require('better-digraphs').digraphs("insert")
end)
-- lsp config {{{
local lsp_zero = require('lsp-zero')
lsp_zero.on_attach(function(client, bufnr)
-- see :help lsp-zero-keybindings
-- to learn the available actions
lsp_zero.default_keymaps({buffer = bufnr})
end)
require('lspconfig').lua_ls.setup({})
require('lspconfig').texlab.setup({})
require('lspconfig').pylyzer.setup({})
-- }}}
-- luasnip configuration {{{
local luasnip = require("luasnip")
local ls_extras = require("luasnip.extras")
require("luasnip.loaders.from_snipmate").lazy_load()
vim.cmd[[
imap <silent><expr> <Tab> luasnip#expand_or_jumpable() ? '<Plug>luasnip-expand-or-jump' : '<Tab>'
]]
luasnip.add_snippets("tex", {
luasnip.snippet("env", {
luasnip.text_node("\\begin{"), luasnip.insert_node(1), luasnip.text_node("}"),
luasnip.text_node({ "", "\t" }), luasnip.insert_node(0),
luasnip.text_node({ "", "\\end{" }), ls_extras.rep(1), luasnip.text_node("}")
})
})
luasnip.add_snippets("tex", {
luasnip.snippet("desc", {
luasnip.text_node("\\begin{description}"),
luasnip.text_node({ "", "\t\\item " }), luasnip.insert_node(1),
luasnip.text_node({ "", "\\end{description}" })
})
})
-- }}}

111
.config/nvim/init.min.lua Normal file
View File

@ -0,0 +1,111 @@
-- init.min.lua - a stripped down init.vim for environments
-- in which packer.nvim is inappropriate
-- helper functions {{{
local keymapper = vim.keymap
local globals = vim.g
local opt = vim.o
local cmd = vim.cmd
function nnoremap(l, r)
keymapper.set('n', l, r) -- noremap is implied
end
function inoremap(l, r)
keymapper.set('i', l, r)
end
function tnoremap(l, r)
keymapper.set('t', l, r)
end
-- }}}
-- custom mappings {{{
globals.mapleader = ' '
nnoremap(';', ':')
nnoremap(':', ';')
nnoremap('<leader><leader>', ':')
-- source init.vim
-- requires rebuilding the configuration first
nnoremap('<leader>rr', function()
cmd.source('~/.config/nvim/init.lua')
end)
-- edit init.vim
nnoremap('<leader>re', function()
cmd.edit('~/dot_testing/config/nvim/init.lua')
end)
-- openup netrw
nnoremap('<leader>fs', function()
cmd.Lexplore()
end)
inoremap('qp', '<c-g>u<Esc>[s1z=`]a<c-g>u')
inoremap("<C-a>", "<Esc>mZ0i<Tab><Esc>`ZlA")
inoremap('jk', '<Esc>')
inoremap('zz', '<Esc>:w!<CR>a')
tnoremap('<Esc>', '<C-\\><C-n>')
-- }}}
-- vim options {{{
opt.compatible = false
opt.number = true
opt.foldmethod = 'marker'
opt.encoding = 'utf8'
opt.list = true
opt.lcs = 'tab:->,trail:_,eol:^'
opt.clipboard = 'unnamedplus'
opt.spell = true
opt.spelllang = "en_us"
opt.title = true
opt.ts = 2
opt.sw = 2
opt.hlsearch = true
opt.incsearch = true
opt.ignorecase = true
opt.smartcase = true
opt.inccommand = 'nosplit'
opt.hidden = true
opt.linebreak = true
opt.path = '.,/usr/include,**'
opt.statusline="%f %r%m%q%h%=%y 0x%02B %04l:%03c:%03p"
vim.api.nvim_exec("let &titlestring='%{expand(\"%:p\")}'", true)
globals.vimtex_view_method = 'zathura'
-- }}}
-- autocommands {{{
function setTabbing(lang, width)
vim.api.nvim_create_autocmd({"Filetype"}, {
pattern = {lang},
callback = function()
vim.bo.expandtab = true
vim.bo.tabstop = width
vim.bo.shiftwidth = width
end
})
end
setTabbing("python", 4)
setTabbing("htmldjango", 4)
setTabbing("javascript", 4)
setTabbing("css", 4)
setTabbing("html", 4)
setTabbing("nix", 2)
vim.api.nvim_create_autocmd({"TermOpen"}, {
pattern = {"*"},
callback = function()
vim.wo.number = false
end
})
-- }}}
-- netrw options {{{
globals.netrw_winsize = -28
globals.netrw_banner = 0
-- for tree view
globals.netrw_liststyle = 3
-- use previous window to open files
globals.netrw_browser_split = 4
-- }}}

View File

@ -0,0 +1,17 @@
import os
import atexit
import readline
history = os.path.join(os.path.expanduser('~'), '.cache/python_history')
try:
readline.read_history_file(history)
except OSError:
pass
def write_history():
try:
readline.write_history_file(history)
except OSError:
pass
atexit.register(write_history)

6
.config/rbw/config.json Normal file
View File

@ -0,0 +1,6 @@
{
"base_url": "https://bitwarden.beepboop.systems",
"email": "bit@beepboop.systems",
"identity_url": null,
"lock_timeout": 3600
}

30
.config/ssh/config Normal file
View File

@ -0,0 +1,30 @@
Host mainsail
User usr
Port 22
Host phone
User u0_a193
Port 8022
Host netbox
HostName beepboop.systems
User ryan
Port 443
Host mainsail-prox
HostName localhost
User usr
Port 55554
ProxyJump netbox
Host mlg-prox
HostName localhost
User usr
Port 2222
ProxyJump mainsail-prox
Host x230t-prox
HostName x230t
User usr
Port 22
ProxyJump mainsail-prox

3
.config/sx/sxrc Executable file
View File

@ -0,0 +1,3 @@
# start the wm
mode sxhkdrc
bspwm

50
.config/sxhkd/mouse Normal file
View File

@ -0,0 +1,50 @@
# exit mouse mode
Escape
mode sxhkdrc
w
mode sxhkdrc
# send the escape key
]
xdotool key Escape
# move left
{ctrl +,shift +,_} h
xdotool mousemove_relative -- {-5,-50,-20} 0
# move down
{ctrl +,shift +,_} j
xdotool mousemove_relative -- 0 {5,50,20}
# move up
{ctrl +,shift +,_} k
xdotool mousemove_relative -- 0 {-5,-50,-20}
# move right
{ctrl +,shift +,_} l
xdotool mousemove_relative -- {5,50,20} 0
# left, middle, right click
{ctrl +,_} {a,s,d}
xdotool {mousedown,click} {1,2,3}
# let go of clicked button
q
xdotool mouseup 1; xdotool mouseup 2; xdotool mouseup 3
# move the mouse to the top of the window
g ; g
mousehelper top
# ditto for bottom
G
mousehelper bottom
# ditto for left
0
mousehelper left
# ditto for right
dollar
mousehelper right

98
.config/sxhkd/sxhkdrc Normal file
View File

@ -0,0 +1,98 @@
# spawn a terminal
super + Return
st
ctrl + b; c
st
ctrl + b; Return
st
# spawn the launcher
super + d
tmenu_run
ctrl + b; d
tmenu_run
# kill sxhkd with USR1 and restart bspwm
super + r
pkill -USR1 -x sxhkd; \
bspc wm -r
ctrl + b; r
pkill -USR1 -x sxhkd; \
bspc wm -r
# show nws radar
super + {_,shift + }n
nws {local,national}
# switch to "mouse mode"
super + m
mode mouse
ctrl + b; m
mode mouse
# kill the current node
super + q
bspc node -c
ctrl + b; q
bspc node -c
# kill bspwm
super + e
bspc quit 0
ctrl + b; e
bspc quit 0; \
pkill X # phone starts bspwm differently
# to take everything down, we need to kill X
# systemctl suspend
super + shift + e
systemctl suspend
# password menu
super + z
passmenu
ctrl + b; z
passmenu
# manipulate a node
super + {_,ctrl +,shift + }{h,j,k,l}
bspc node -{f,p,s} {west,south,north,east}
ctrl + b; {_,ctrl +,shift + }{h,j,k,l}
bspc node -{f,p,s} {west,south,north,east}
# change to or move a node to a desktop
super + {_,shift + } {1-9,0}
bspc {desktop -f,node -d} '0{1-9,0}'
super + space; {_,shift + } {1-9,0}
bspc {desktop -f,node -d} '1{1-9,0}'
ctrl + b; {_,shift + } {1-9,0}
bspc {desktop -f,node -d} '0{1-9,0}'
# change a node to tiling, floating, or fullscreen
super + {t,f,s}
bspc node -t {tiled,floating,fullscreen}
ctrl + b; {t,f,s}
bspc node -t {tiled,floating,fullscreen}
# x230t specific -- activate the tablet menu
XF86RotateWindows
tabletmenu
shift + Insert
special_ins
# phone specific -- send the escape key since we can't use it
super + b; [
xdotool key Escape

View File

@ -0,0 +1,5 @@
path = "~/vdir/calendar/personal/*"
date_format = "%m-%d-%Y"
time_format = "%H:%M"
default_due = 0
default_list = "edfbeaf1-e9f3-4d94-a512-40cdafdbc7a0"

View File

@ -0,0 +1,92 @@
sanitize commandline tridactyllocal tridactylsync
" better thean google
set searchengine duckduckgo
" redirect youtube, reddit, twitter to proxies
autocmd DocStart https://www.youtube.com js let vsites = ["invidious.snopyta.org", "yewtu.be", "invidious.kavin.rocks", "vid.puffyan.us"]; tri.excmds.urlmodify("-t", "www.youtube.com", vsites[Math.floor(Math.random() * vsites.length)])
autocmd DocStart https://www.reddit.com js let rsites = ["libredd.it", "libreddit.spike.codes", "libreddit.kavin.rocks", "reddit.invak.id", "reddit.phii.me"]; tri.excmds.urlmodify("-t", "www.reddit.com", rsites[Math.floor(Math.random() * rsites.length)])
autocmd DocStart https://twitter.com js let tsites = ["nitter.dcs0.hu", "twitter.dr460nf1r3.org", "n.ramle.be", "nitter.cz", "nitter.nl"]; tri.excmds.urlmodify("-t", "www.twitter.com", tsites[Math.floor(Math.random() * tsites.length)])
" shamelessly stolen from glacambre
alias clone jsb -p tri.native.run("git clone '" + JS_ARG "' /home/usr/git" + JS_ARG.split("/").slide(-1))
alias so source ~/.tridactylrc
alias cookie sanitize cookies
alias clearhistory sanitize history
unbind <C-f>
set hintchars asdfhjkl
set incsearch true
set modindicatorshowkeys true
colors dark
" crap ton of setprefs
setpref app.normandy.first_run false
setpref app.normandy.migrationsApplied 10
setpref app.shield.optoutstudies.enabled false
setpref browser.aboutConfig.showWarning false
setpref browser.laterrun.enabled false
setpref browser.newtabpage.activity-stream.discoverystream.endpointSpocsClear "http://example.com"
setpref browser.newtabpage.activity-stream.discoverystream.endpoints "http://example.com"
setpref browser.newtabpage.activity-stream.feeds.section.highlights false
setpref browser.newtabpage.activity-stream.feeds.section.topstories false
setpref browser.newtabpage.activity-stream.feeds.snippets false
setpref browser.newtabpage.activity-stream.feeds.telemetry false
setpref browser.newtabpage.activity-stream.feeds.topsites false
setpref browser.newtabpage.activity-stream.impressionId "hmmst"
setpref browser.newtabpage.activity-stream.showSearch false
setpref browser.newtabpage.activity-stream.telemetry false
setpref browser.newtabpage.activity-stream.telemetry.structuredIngestion false
setpref browser.newtabpage.activity-stream.telemetry.structuredIngestion.endpoint "http://example.com"
setpref browser.ping-centre.telemetry false
setpref browser.search.suggest.enabled false
setpref browser.safebrowsing.appRepURL ""
setpref browser.safebrowsing.blockedURIs.enabled false
setpref browser.safebrowsing.downloads.remote.enabled false
setpref browser.safebrowsing.downloads.remote.url ""
setpref browser.safebrowsing.gethashURL ""
setpref browser.safebrowsing.malware.enabled false
setpref browser.safebrowsing.malware.reportURL ""
setpref browser.safebrowsing.phishing.enabled false
setpref browser.safebrowsing.provider.google.gethashURL ""
setpref browser.safebrowsing.provider.google.lists ""
setpref browser.safebrowsing.provider.google.reportMalwareMistakeURL ""
setpref browser.safebrowsing.provider.google.reportPhishMistakeURL ""
setpref browser.safebrowsing.provider.google.reportURL ""
setpref browser.safebrowsing.provider.google.updateURL ""
setpref browser.safebrowsing.provider.google4.dataSharing.enabled false
setpref browser.safebrowsing.provider.google4.dataSharingURL ""
setpref browser.safebrowsing.provider.google4.reportMalwareMistakeURL ""
setpref browser.safebrowsing.provider.google4.reportPhishMistakeURL ""
setpref browser.safebrowsing.provider.google4.reportURL ""
setpref browser.safebrowsing.provider.mozilla.gethashURL ""
setpref browser.safebrowsing.provider.mozilla.updateURL ""
setpref browser.safebrowsing.reportPhishURL ""
setpref browser.safebrowsing.reportURL ""
setpref browser.safebrowsing.updateURL ""
setpref dom.push.connection.enabled false
setpref dom.presentation.receiver.enabled
setpref extensions.pocket.api "example.com"
setpref extensions.pocket.enabled true
setpref geo.enabled false
setpref identity.fxaccounts.pairing.enabled false
setpref privacy.resistFingerprinting true
setpref privacy.trackingprotection.socialtracking.enabled true
setpref security.app_menu.recordEventTelemetry false
setpref security.certerrors.recordEventTelemetry false
setpref security.identitypopup.recordEventTelemetry false
setpref security.protectionspopup.recordEventTelemetry false
setpref toolkit.telemetry.archive.enabled false
setpref toolkit.telemetry.bhrPing.enabled false
setpref toolkit.telemetry.firstShutdownPing.enabled false
setpref toolkit.telemetry.newProfilePing.enabled false
setpref toolkit.telemetry.reportingpolicy.firstRun false
setpref toolkit.telemetry.server "http://example.com"
setpref toolkit.telemetry.server "IANA/IETF"
setpref toolkit.telemetry.shutdownPingSender.enabled false
setpref toolkit.telemetry.unified false
setpref toolkit.telemetry.updatePing.enabled false
setpref browser.newtabpage.activity-stream.discoverystream.enabled false
setpref browser.uiCustomization.state '{"placements":{"widget-overflow-fixed-list":[],"nav-bar":["back-button","forward-button","umatrix_raymondhill_net-browser-action","stop-reload-button","downloads-button","urlbar-container","vim-vixen_i-beam_org-browser-action"],"toolbar-menubar":["menubar-items"],"TabsToolbar":["tabbrowser-tabs","new-tab-button","alltabs-button"],"PersonalToolbar":["personal-bookmarks"]},"seen":["developer-button","umatrix_raymondhill_net-browser-action","vim-vixen_i-beam_org-browser-action"],"dirtyAreaCache":["nav-bar","toolbar-menubar","TabsToolbar","PersonalToolbar"],"currentVersion":16,"newElementCount":4}'
setpref privacy.resistFingerprinting.letterboxing false

79
.config/vdirsyncer/config Normal file
View File

@ -0,0 +1,79 @@
[general]
status_path = "~/vdir/status"
[pair contacts]
a = "contacts_local"
b = "contacts_remote"
collections = ["from a", "from b"]
[pair calendar]
a = "calendar_local"
b = "calendar_remote"
collections = ["from a", "from b"]
[pair band_calendar]
a = "band_calendar_local"
b = "band_calendar_remote"
collections = null
[pair pco_calendar]
a = "pco_local"
b = "pco_remote"
collections = null
[pair school_calendar]
a = "school_local"
b = "school_remote"
collections = null
[storage contacts_local]
type = "filesystem"
path = "~/vdir/people/main"
fileext = ".vcf"
[storage calendar_local]
type = "filesystem"
path = "~/vdir/calendar/personal"
fileext = ".ics"
[storage band_calendar_local]
type = "filesystem"
path = "~/vdir/calendar/band"
fileext = ".ics"
[storage pco_local]
type = "filesystem"
path = "~/vdir/calendar/pco"
fileext = ".ics"
[storage school_local]
type = "filesystem"
path = "~/vdir/calendar/school"
fileext = ".ics"
[storage contacts_remote]
type = "carddav"
url = "https://radicale.beepboop.systems/ryan/20cda0dd-5922-4905-8956-859c989a6519/"
username = "ryan"
password.fetch = ["command", "rbw", "get", "radicale"]
[storage band_calendar_remote]
type = "http"
url = "https://calendar.google.com/calendar/ical/i6bong6iferbcuf1u25jg47t7k%40group.calendar.google.com/public/basic.ics"
[storage pco_remote]
type = "http"
url.fetch = ["command", "rbw", "get", "pco-ical-sync"]
[storage school_remote]
type = "http"
url.fetch = ["command", "rbw", "get", "school-ical-sync"]
[storage calendar_remote]
type = "caldav"
url = "https://radicale.beepboop.systems/ryan/edfbeaf1-e9f3-4d94-a512-40cdafdbc7a0/"
username = "ryan"
password.fetch = ["command", "rbw", "get", "radicale"]

View File

@ -0,0 +1,300 @@
# XScreenSaver Preferences File
# Written by xscreensaver-settings 6.08 for usr on Sat Aug 31 19:23:22 2024.
# https://www.jwz.org/xscreensaver/
timeout: 0:10:00
cycle: 0:10:00
lock: False
lockTimeout: 0:00:00
passwdTimeout: 0:00:30
visualID: default
installColormap: True
verbose: False
splash: True
splashDuration: 0:00:05
demoCommand: xscreensaver-settings
nice: 10
fade: True
unfade: True
fadeSeconds: 0:00:03
ignoreUninstalledPrograms:False
dpmsEnabled: False
dpmsQuickOff: False
dpmsStandby: 2:00:00
dpmsSuspend: 2:00:00
dpmsOff: 4:00:00
grabDesktopImages: True
grabVideoFrames: False
chooseRandomImages: False
imageDirectory:
mode: one
selected: 24
textMode: url
textLiteral: XScreenSaver
textFile:
textProgram: fortune
textURL: https://en.wikipedia.org/w/index.php?title=Special:NewPages&feed=rss
dialogTheme: default
settingsGeom: 761,550 0,0
programs: \
maze --root \n\
GL: superquadrics --root \n\
attraction --root \n\
blitspin --root \n\
greynetic --root \n\
helix --root \n\
hopalong --root \n\
imsmap --root \n\
- noseguy --root \n\
- pyro --root \n\
qix --root \n\
- rocks --root \n\
rorschach --root \n\
decayscreen --root \n\
flame --root \n\
halo --root \n\
slidescreen --root \n\
pedal --root \n\
bouboule --root \n\
- braid --root \n\
coral --root \n\
deco --root \n\
drift --root \n\
- fadeplot --root \n\
galaxy --root --delay 82787 --ncolors 143 \
--no-spin \n\
goop --root \n\
grav --root \n\
ifs --root \n\
GL: jigsaw --root \n\
julia --root \n\
- kaleidescope --root \n\
GL: moebius --root \n\
moire --root \n\
GL: morph3d --root \n\
mountain --root \n\
munch --root \n\
penrose --root \n\
GL: pipes --root \n\
rdbomb --root \n\
GL: rubik --root \n\
- sierpinski --root \n\
slip --root \n\
GL: sproingies --root \n\
starfish --root \n\
strange --root \n\
swirl --root \n\
triangle --root \n\
xjack --root \n\
xlyap --root \n\
GL: atlantis --root \n\
bsod --root \n\
GL: bubble3d --root \n\
GL: cage --root \n\
- crystal --root \n\
cynosure --root \n\
discrete --root \n\
distort --root \n\
epicycle --root \n\
flow --root \n\
GL: glplanet --root \n\
interference --root \n\
kumppa --root \n\
GL: lament --root \n\
moire2 --root \n\
GL: sonar --root \n\
GL: stairs --root \n\
truchet --root \n\
- vidwhacker --root \n\
- webcollage --root \n\
blaster --root \n\
bumps --root \n\
ccurve --root \n\
compass --root \n\
deluxe --root \n\
- demon --root \n\
GL: extrusion --root \n\
- loop --root \n\
penetrate --root \n\
petri --root \n\
phosphor --root \n\
GL: pulsar --root \n\
ripples --root \n\
shadebobs --root \n\
GL: sierpinski3d --root \n\
spotlight --root \n\
squiral --root \n\
wander --root \n\
xflame --root \n\
xmatrix --root \n\
GL: gflux --root \n\
- nerverot --root \n\
xrayswarm --root \n\
xspirograph --root \n\
GL: circuit --root \n\
GL: dangerball --root \n\
- GL: dnalogo --root \n\
GL: engine --root \n\
GL: flipscreen3d --root \n\
GL: gltext --root \n\
GL: menger --root \n\
GL: molecule --root \n\
rotzoomer --root \n\
scooter --root \n\
speedmine --root \n\
GL: starwars --root \n\
GL: stonerview --root \n\
vermiculate --root \n\
whirlwindwarp --root \n\
zoom --root \n\
anemone --root \n\
apollonian --root \n\
GL: boxed --root \n\
GL: cubenetic --root \n\
GL: endgame --root \n\
euler2d --root \n\
fluidballs --root \n\
GL: flurry --root \n\
- GL: glblur --root \n\
GL: glsnake --root \n\
halftone --root \n\
GL: juggler3d --root \n\
GL: lavalite --root \n\
- polyominoes --root \n\
GL: queens --root \n\
- GL: sballs --root \n\
GL: spheremonics --root \n\
twang --root \n\
- GL: antspotlight --root \n\
apple2 --root \n\
GL: atunnel --root \n\
barcode --root \n\
GL: blinkbox --root \n\
GL: blocktube --root \n\
GL: bouncingcow --root \n\
cloudlife --root \n\
GL: cubestorm --root \n\
eruption --root \n\
GL: flipflop --root \n\
GL: flyingtoasters --root \n\
fontglide --root \n\
GL: gleidescope --root \n\
GL: glknots --root \n\
GL: glmatrix --root \n\
- GL: glslideshow --root \n\
GL: hypertorus --root \n\
- GL: jigglypuff --root \n\
metaballs --root \n\
GL: mirrorblob --root \n\
piecewise --root \n\
GL: polytopes --root \n\
pong --root \n\
popsquares --root \n\
GL: surfaces --root \n\
xanalogtv --root \n\
abstractile --root \n\
anemotaxis --root \n\
- GL: antinspect --root \n\
fireworkx --root \n\
fuzzyflakes --root \n\
interaggregate --root \n\
intermomentary --root \n\
memscroller --root \n\
GL: noof --root \n\
pacman --root \n\
GL: pinion --root \n\
GL: polyhedra --root \n\
- GL: providence --root \n\
substrate --root \n\
wormhole --root \n\
- GL: antmaze --root \n\
GL: boing --root \n\
boxfit --root \n\
GL: carousel --root \n\
celtic --root \n\
GL: crackberg --root \n\
GL: cube21 --root \n\
fiberlamp --root \n\
GL: fliptext --root \n\
GL: glhanoi --root \n\
GL: tangram --root \n\
GL: timetunnel --root \n\
GL: glschool --root \n\
GL: topblock --root \n\
GL: cubicgrid --root \n\
cwaves --root \n\
GL: gears --root \n\
GL: glcells --root \n\
GL: lockward --root \n\
m6502 --root \n\
GL: moebiusgears --root \n\
GL: voronoi --root \n\
GL: hypnowheel --root \n\
GL: klein --root \n\
- lcdscrub --root \n\
GL: photopile --root \n\
GL: skytentacles --root \n\
GL: rubikblocks --root \n\
GL: companioncube --root \n\
GL: hilbert --root \n\
GL: tronbit --root \n\
GL: geodesic --root \n\
hexadrop --root \n\
GL: kaleidocycle --root \n\
GL: quasicrystal --root \n\
GL: unknownpleasures --root \n\
binaryring --root \n\
GL: cityflow --root \n\
GL: geodesicgears --root \n\
GL: projectiveplane --root \n\
GL: romanboy --root \n\
tessellimage --root \n\
GL: winduprobot --root \n\
GL: splitflap --root \n\
GL: cubestack --root \n\
GL: cubetwist --root \n\
GL: discoball --root \n\
GL: dymaxionmap --root \n\
GL: energystream --root \n\
GL: hexstrut --root \n\
GL: hydrostat --root \n\
GL: raverhoop --root \n\
GL: splodesic --root \n\
GL: unicrud --root \n\
GL: esper --root \n\
GL: vigilance --root \n\
GL: crumbler --root \n\
filmleader --root \n\
glitchpeg --root \n\
GL: handsy --root \n\
GL: maze3d --root \n\
GL: peepers --root \n\
GL: razzledazzle --root \n\
vfeedback --root \n\
GL: deepstars --root \n\
GL: gravitywell --root \n\
GL: beats --root \n\
GL: covid19 --root \n\
GL: etruscanvenus --root \n\
GL: gibson --root \n\
GL: headroom --root \n\
GL: sphereeversion --root \n\
binaryhorizon --root \n\
marbling --root \n\
GL: chompytower --root \n\
GL: hextrail --root \n\
GL: mapscroller --root \n\
GL: nakagin --root \n\
GL: squirtorus --root \n\
GL: cubocteversion --root \n\
droste --root \n\
GL: papercube --root \n\
GL: skulloop --root \n\
pointerHysteresis: 10
authWarningSlack: 20

59
.config/zathura/zathurarc Normal file
View File

@ -0,0 +1,59 @@
set adjust-open "best-fit"
set pages-per-row 1
set selection-clipboard clipboard
set scroll-page-aware "true"
set zoom-min 10
set font "Fantasque Sans Mono 11"
" set show-scrollbars "false"
set database "plain"
set dbus-service "false"
set filemonitor "glib"
set synctex "false"
map ; feedkeys :
# themes
set recolor "true"
set recolor-reverse-video "true"
set recolor-lightcolor "#161510"
set recolor-darkcolor "#ccbc8e"
set completion-bg "#161510"
set completion-fg "#ccbc8e"
set completion-group-bg "#161510"
set completion-group-fg "#ccbc8e"
set completion-highlight-bg "#ccbc8e"
set completion-highlight-fg "#161510"
set default-bg "#161510"
set default-fg "#ccbc8e"
set inputbar-bg "#161510"
set inputbar-fg "#ccbc8e"
set statusbar-bg "#161510"
set statusbar-fg "#ccbc8e"
set index-bg "#161510"
set index-fg "#ccbc8e"
set index-active-bg "#ccbc8e"
set index-active-fg "#161510"
" set tabbar-bg "#161510"
" set tabbar-fg "#ccbc8e"
" set tabbar-focus-bg "#ccbc8e"
" set tabbar-focus-fg "#161510"
set notification-bg "#161510"
set notification-fg "#ccbc8e"
set notification-warning-bg "#161510"
set notification-warning-fg "#cc9528"
set notification-error-bg "#161510"
set notification-error-fg "#cc3214"
set highlight-color "#a37720"
set highlight-active-color "#727a18"
set highlight-transparency 0.25
set render-loading-bg "#161510"
set render-loading-fg "#ccbc8e"

12
.gitignore vendored
View File

@ -1,10 +1,2 @@
*.swp
*.tmp
c/scream
c/xgetnewwindow
c/timer
c/boid
c/a.out
c/anaconda
c/colors
c/tmessage
.environment
.firefox_env

4
.mailmap Normal file
View File

@ -0,0 +1,4 @@
stupidcomputer <ryan@beepboop.systems> <randomuser@tilde.club>
stupidcomputer <ryan@beepboop.systems>
stupidcomputer <ryan@beepboop.systems> <rndusr@beepboop.systems>
stupidcomputer <ryan@beepboop.systems> <Unixsys@github.com>

View File

@ -1 +0,0 @@
test

619
LICENSE Normal file
View File

@ -0,0 +1,619 @@
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. You must make sure that they, too, receive
or can get the source code. And you must show them these terms so they
know their rights.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.

41
README.md Normal file
View File

@ -0,0 +1,41 @@
randomuser's dotfiles
=====================
![an image of the desktop while editing this repo's flake.nix](./demo.png)
features
--------
- `bspwm` + `sxhkd` + `st` + `firefox`
- most everything on the desktop save for the browser, media viewers, and desktop background, is a terminal
- on the server, runs gitea + simple-nixos-mailserver
- built with NixOS flakes
installation
------------
`sudo nixos-rebuild --flake .#your-flake-name-here switch`
if you're trying to install `netbox`, then use the `--impure` flag:
`sudo nixos-rebuild --flake .#netbox switch --impure`
for installation onto Termux, run `make`.
things to do
------------
- integrate `disko` and `sops-nix` into the setup
- establish backup infrastructure for `netbox`
- move gmail-mail-bridge into mail-sync repo
* (perhaps figure out how to produce a flake for it)
license
-------
all materials in this repository, except for:
* `./home/wallpapers/pape.jpg`, which is of unknown license, and
* `./builds/st`, which is licensed under MIT, persuant to `./builds/st/LICENSE`,
is (c) rndusr, randomuser, stupidcomputer, etc 2024 and licensed under the GPLv3 (see `./LICENSE`)

View File

@ -0,0 +1,58 @@
{ lib, config, pkgs, ...}:
{
imports = [
./hardware-configuration.nix
../../modules/bootstrap.nix
../../modules/common.nix
../../modules/x11.nix
../../modules/pulse.nix
../../modules/hosts.nix
../../modules/tlp.nix
../../modules/media.nix
../../modules/anki.nix
../../modules/power-control.nix
../../modules/adb.nix
../../modules/rbw.nix
];
environment.systemPackages = with pkgs; [
xscreensaver
texliveFull
libreoffice
ecryptfs
ffmpeg
thunderbird
ledger
ranger
];
hardware.bluetooth = {
enable = true;
};
services.printing.enable = true;
services.avahi = {
enable = true;
nssmdns4 = true;
openFirewall = true;
};
users.users.usr.extraGroups = [ "input" ];
services.getty.autologinUser = "usr";
boot.loader = {
systemd-boot.enable = true;
efi.canTouchEfiVariables = true;
};
hardware.pulseaudio.enable = true;
networking.hostName = "aristotle";
powerManagement.cpuFreqGovernor = "powersave";
system.stateVersion = "24.05";
}

View File

@ -0,0 +1,39 @@
# Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }:
{
imports =
[ (modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/bcae81bd-95d9-457f-8694-709f887cf2e2";
fsType = "ext4";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/CAEA-2672";
fsType = "vfat";
options = [ "fmask=0077" "dmask=0077" ];
};
swapDevices = [ ];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (the default) this is the recommended approach. When using systemd-networkd it's
# still possible to use this option, but it's recommended to use it in conjunction
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
networking.useDHCP = lib.mkDefault true;
# networking.interfaces.enp0s31f6.useDHCP = lib.mkDefault true;
# networking.interfaces.wlp4s0.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}

10
boxes/aristotle/home.nix Normal file
View File

@ -0,0 +1,10 @@
{ lib, inputs, config, pkgs, home, ... }:
{
imports = [
../../home/x11.nix
../../home/chromium
];
home.stateVersion = "24.05";
}

View File

@ -0,0 +1,6 @@
Git.Git
CollegeBoard.Bluebook
AutoHotKey.AutoHotKey
Brave.Brave
Google.Chrome.EXE
Bitwarden.Bitwarden

View File

@ -0,0 +1,141 @@
{ lib, config, pkgs, ...}:
{
imports = [
./hardware-configuration.nix
./nvidia.nix
./services
../x230t/special-ssh-magic.nix
../../modules/ssh-phone-home.nix
../../modules/hosts.nix
../../modules/bootstrap.nix
../../modules/common.nix
../../modules/x11.nix
../../modules/rbw.nix
];
virtualisation.docker.enable = true;
users.users.usr.extraGroups = [
"docker"
"adbusers"
];
environment.systemPackages = with pkgs; [
wine
xdotool
qemu
virt-manager
libreoffice
nomacs
vscodium
thunderbird
libreoffice
texliveMedium
kdePackages.kdenlive
audacity
bespokesynth
puddletag
musescore
unzip
ledger
unzip
imagemagick
pciutils
usbutils
pwvucontrol
dunst
libnotify
ffmpeg
mdadm
git-annex
tigervnc
(pkgs.callPackage ../../builds/archutils.nix {})
(pkgs.callPackage ../../builds/sssg.nix {})
];
services.hardware.bolt.enable = true; # thunderbolt support
hardware.bluetooth = {
enable = true;
settings = {
General = {
AutoEnable = true;
Enable = "Source,Sink,Media,Socket";
ControllerMode = "bredr";
};
};
};
virtualisation.virtualbox.host.enable = true;
boot.loader = {
efi = {
canTouchEfiVariables = true;
efiSysMountPoint = "/boot";
};
grub = {
efiSupport = true;
device = "nodev";
};
};
services = {
# enable printing
printing.enable = true;
avahi = {
enable = true; # runs the Avahi daemon
nssmdns4 = true; # enables the mDNS NSS plug-in
openFirewall = true; # opens the firewall for UDP port 5353
};
pipewire = {
enable = true;
alsa = {
enable = true;
support32Bit = true;
};
pulse.enable = true;
};
};
programs.adb.enable = true;
powerManagement.cpuFreqGovernor = "performance";
nixpkgs.config.allowUnfree = true;
networking = {
hostName = "copernicus";
firewall = {
enable = true;
interfaces = {
eno1 = {
allowedTCPPorts = [ 6000 ];
allowedTCPPortRanges = [
{ from = 1714; to = 1764; } # KDE Connect
];
allowedUDPPortRanges = [
{ from = 1714; to = 1764; } # KDE Connect
];
};
wg0 = {
# allow everything bound to the wg0 interface
allowedTCPPortRanges = [
{ from = 1; to = 35565; }
];
allowedUDPPortRanges = [
{ from = 1; to = 35565; }
];
};
};
};
};
programs.kdeconnect.enable = true;
system.stateVersion = "24.05"; # don't change this, lol
}

View File

@ -0,0 +1,40 @@
# Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }:
{
imports =
[ (modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "vmd" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/8182bde6-7213-4108-9dbf-951f76870207";
fsType = "ext4";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/0D21-265A";
fsType = "vfat";
options = [ "fmask=0022" "dmask=0022" ];
};
swapDevices =
[ { device = "/dev/disk/by-uuid/fc5366cc-2cec-415e-85dd-7c01a4e4fb4f"; }
];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (the default) this is the recommended approach. When using systemd-networkd it's
# still possible to use this option, but it's recommended to use it in conjunction
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
networking.useDHCP = lib.mkDefault true;
# networking.interfaces.eno1.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}

10
boxes/copernicus/home.nix Normal file
View File

@ -0,0 +1,10 @@
{ lib, inputs, config, pkgs, home, ... }:
{
imports = [
../../home/x11.nix
../../home/chromium
];
home.stateVersion = "23.11";
}

View File

@ -0,0 +1,39 @@
{ config, lib, pkgs, ... }:
{
# Make sure opengl is enabled
hardware.opengl = {
enable = true;
driSupport = true;
driSupport32Bit = true;
};
environment.systemPackages = with pkgs; [
glxinfo
];
# Tell Xorg to use the nvidia driver (also valid for Wayland)
services.xserver.videoDrivers = ["nvidia"];
hardware.nvidia = {
# Modesetting is needed for most Wayland compositors
modesetting.enable = true;
# Use the open source version of the kernel module
# Only available on driver 515.43.04+
open = false;
# Enable the nvidia settings menu
nvidiaSettings = true;
# Optionally, you may need to select the appropriate driver version for your specific GPU.
package = config.boot.kernelPackages.nvidiaPackages.stable;
prime = {
sync.enable = true;
intelBusId = "PCI:0:2:0";
nvidiaBusId = "PCI:1:0:0";
};
};
}

View File

@ -0,0 +1,9 @@
{ lib, config, pkgs, ...}:
{
imports = [
./wireguard.nix
./grafana.nix
./nextcloud.nix
];
}

View File

@ -0,0 +1,44 @@
{ lib, config, pkgs, ...}:
{
services.grafana = {
enable = true;
settings = {
server = {
http_addr = "10.100.0.2";
http_port = 9802;
domain = "grafana.beepboop.systems";
};
};
};
services.prometheus = {
enable = true;
listenAddress = "10.100.0.2";
port = 9001;
exporters = {
node = {
enable = true;
enabledCollectors = [ "systemd" ];
listenAddress = "10.100.0.2";
port = 9002;
};
};
scrapeConfigs = [
{
job_name = "copernicus";
static_configs = [{
targets = [ "10.100.0.2:9002" ];
}];
}
{
job_name = "netbox";
static_configs = [{
targets = [ "10.100.0.1:9002" ];
}];
}
];
};
}

View File

@ -0,0 +1,25 @@
{ lib, config, pkgs, ...}:
{
services.nextcloud = {
enable = true;
package = pkgs.nextcloud30;
hostName = "nextcloud.beepboop.systems";
config.adminpassFile = "/etc/nextcloud-admin";
settings.overwriteprotocol = "https";
extraApps = {
inherit (config.services.nextcloud.package.packages.apps) contacts calendar tasks;
phonetrack = pkgs.fetchNextcloudApp {
sha256 = "sha256-V92f+FiS5vZEkq15A51pHoDpUOBfUOEVIcsXdP/rSMQ=";
license = "agpl3Only";
url = "https://github.com/julien-nc/phonetrack/releases/download/v0.8.1/phonetrack-0.8.1.tar.gz";
};
};
extraAppsEnable = true;
};
services.nginx.virtualHosts."${config.services.nextcloud.hostName}".listen = [ {
addr = "10.100.0.2";
port = 5028;
} ];
}

View File

@ -0,0 +1,16 @@
{ lib, config, pkgs, ...}:
{
services.photoprism = {
enable = true;
originalsPath = "/var/lib/photoprism/originals";
address = "10.100.0.2";
settings = {
PHOTOPRISM_ADMIN_USER = "usr";
PHOTOPRISM_ADMIN_PASSWORD = "testing"; # THIS IS AN INITIAL PASSWORD -- changed later
PHOTOPRISM_SITE_TITLE = "photos.beepboop.systems";
PHOTOPRISM_SITE_URL = "https://photos.beepboop.systems";
PHOTOPRISM_DEFAULT_LOCALE = "en";
};
};
}

View File

@ -0,0 +1,24 @@
{ lib, config, pkgs, ... }:
{
networking = {
firewall.allowedUDPPorts = [ 50000 ];
wireguard.interfaces = {
wg0 = {
ips = [ "10.100.0.2/24" ];
listenPort = 50000;
privateKeyFile = "/home/usr/wg-keys/private";
peers = [
{ # netbox
publicKey = "0fOqAfsYO4HvshMPnlkKL7Z1RChq98hjDr0Q8o7OJFE=";
allowedIPs = [ "10.100.0.0/24" ]; # only stuff in the wg-subnet (10.100.0.*)
endpoint = "149.28.63.115:50000";
persistentKeepalive = 25;
}
];
};
};
};
}

View File

@ -0,0 +1,82 @@
{ lib, config, pkgs, ...}:
{
imports = [
./hardware-configuration.nix
../../modules/ssh-phone-home.nix
../../modules/bootstrap.nix
../../modules/hosts.nix
../../modules/common.nix
];
# nix optimization
nix.optimise = {
automatic = true;
dates = [ "03:45" ];
};
boot.loader.grub.enable = true;
boot.loader.grub.device = "/dev/sda";
networking.hostName = "mainsail";
services.getty.greetingLine = "
welcome to mainsail |`-:_
,----....____ | `+.
( ````----....|___ |
\\ _ ````----....____
\\ _) ```---.._
\\ \\
)`.\\ )`. )`. )`. )`. )`. )`. )`. )`. )`. )`.
-' `-' `-' `-' `-' `-' `-' `-' `-' `-' `-' `
";
environment.systemPackages = with pkgs; [
neovim
git
curl
];
services.home-assistant = {
enable = true;
extraComponents = [
# Components required to complete the onboarding
"netgear"
"hue"
"nest"
"esphome"
"met"
"radio_browser"
];
config = {
# Includes dependencies for a basic setup
# https://www.home-assistant.io/integrations/default_config/
default_config = {};
};
openFirewall = true;
};
services.openssh = {
enable = true;
settings = {
PermitRootLogin = "no";
PasswordAuthentication = false;
};
};
services.ssh-phone-home = {
enable = true;
localUser = "usr";
remoteHostname = "beepboop.systems";
remotePort = 443;
remoteUser = "ryan";
bindPort = 55554;
};
users.users.usr.openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKbhM3wj0oqjR3pUaZgpfX4Xo4dlzvBTbQ48zHyg7Pwx usr" # x230t
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIB2xUbQw9+RCPVw7qCFm4NNCP/MpS2BIArcwMv0KdKOI usr" # mlg
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHZw5bg0TrvSkW/XQa4c+2iLbIKOxfMGbjy5Nb3HSfBv usr" # phone
];
system.stateVersion = "23.11";
}

View File

@ -0,0 +1,32 @@
# Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }:
{
imports =
[ (modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "xhci_pci" "ehci_pci" "ahci" "usbhid" "usb_storage" "ums_realtek" "sd_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/948aeaf8-cb7e-4f85-ae3e-1bc6a25ec156";
fsType = "ext4";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/617cb1ae-a788-429a-b0d4-63d46d8a4e1b";
fsType = "ext4";
};
swapDevices =
[ { device = "/dev/disk/by-uuid/d82ae76c-68f4-4e70-9162-5dab5f84375b"; }
];
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}

98
boxes/mlg/default.nix Normal file
View File

@ -0,0 +1,98 @@
{ lib, config, pkgs, ...}:
{
imports = [
./hardware-configuration.nix
./nvidia.nix
../../modules/ssh-phone-home.nix
../../modules/hosts.nix
../../modules/bootstrap.nix
../../modules/common.nix
../../modules/x11.nix
../../modules/pulse.nix
../../modules/discord.nix
# ../../modules/gaming.nix
../../modules/rbw.nix
];
virtualisation.docker.enable = true;
users.users.usr.extraGroups = [
"docker"
];
environment.systemPackages = with pkgs; [
wine
xdotool
qemu
virt-manager
libreoffice
nomacs
vscodium
thunderbird
libreoffice
texliveMedium
ledger
git-annex
];
services.hardware.bolt.enable = true; # thunderbolt support
hardware.bluetooth = {
enable = true;
settings = {
General = {
Enable = "Source,Sink,Media,Socket";
ControllerMode = "bredr";
};
};
};
services.openssh.enable = true;
services.ssh-phone-home = {
enable = true;
localUser = "usr";
remoteHostname = "mainsail";
remotePort = 22;
remoteUser = "usr";
bindPort = 2222;
};
boot.loader = {
efi = {
canTouchEfiVariables = true;
efiSysMountPoint = "/boot";
};
grub = {
efiSupport = true;
device = "nodev";
};
};
services.printing.enable = true;
services.avahi.enable = true; # runs the Avahi daemon
services.avahi.nssmdns4 = true; # enables the mDNS NSS plug-in
services.avahi.openFirewall = true; # opens the firewall for UDP port 5353
powerManagement.cpuFreqGovernor = "performance";
nixpkgs.config.allowUnfree = true;
networking = {
hostName = "mlg";
firewall = {
enable = true;
allowedTCPPorts = [ 6000 8000 ];
allowedTCPPortRanges = [
{ from = 1714; to = 1764; } # KDE Connect
];
allowedUDPPortRanges = [
{ from = 1714; to = 1764; } # KDE Connect
];
};
};
programs.kdeconnect.enable = true;
system.stateVersion = "23.11"; # don't change this, lol
}

View File

@ -0,0 +1,41 @@
# Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes
# testing
# to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }:
{
imports =
[ (modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "xhci_pci" "thunderbolt" "vmd" "nvme" "usb_storage" "sd_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/eada30c2-ffc5-4410-b1cf-fcea6a4040ff";
fsType = "ext4";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/5318-1A44";
fsType = "vfat";
};
swapDevices = [ ];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (the default) this is the recommended approach. When using systemd-networkd it's
# still possible to use this option, but it's recommended to use it in conjunction
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
networking.useDHCP = lib.mkDefault true;
# networking.interfaces.enp58s0.useDHCP = lib.mkDefault true;
# networking.interfaces.enp7s0.useDHCP = lib.mkDefault true;
# networking.interfaces.wlp0s20f3.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}

10
boxes/mlg/home.nix Normal file
View File

@ -0,0 +1,10 @@
{ lib, inputs, config, pkgs, home, ... }:
{
imports = [
../../home/x11.nix
../../home/chromium
];
home.stateVersion = "23.11";
}

39
boxes/mlg/nvidia.nix Normal file
View File

@ -0,0 +1,39 @@
{ config, lib, pkgs, ... }:
{
# Make sure opengl is enabled
hardware.opengl = {
enable = true;
driSupport = true;
driSupport32Bit = true;
};
environment.systemPackages = with pkgs; [
glxinfo
];
# Tell Xorg to use the nvidia driver (also valid for Wayland)
services.xserver.videoDrivers = ["nvidia"];
hardware.nvidia = {
# Modesetting is needed for most Wayland compositors
modesetting.enable = true;
# Use the open source version of the kernel module
# Only available on driver 515.43.04+
open = false;
# Enable the nvidia settings menu
nvidiaSettings = true;
# Optionally, you may need to select the appropriate driver version for your specific GPU.
package = config.boot.kernelPackages.nvidiaPackages.stable;
prime = {
sync.enable = true;
intelBusId = "PCI:0:2:0";
nvidiaBusId = "PCI:1:0:0";
};
};
}

View File

@ -0,0 +1 @@
sudo nixos-rebuild --flake . switch --impure -I nixos-config=./

133
boxes/netbox/default.nix Normal file
View File

@ -0,0 +1,133 @@
{ lib, config, pkgs, ... }:
{
imports =
[
./hardware-configuration.nix
../../modules/bootstrap.nix
./radicale.nix
./ssh.nix
./gitea.nix
./radicale.nix
./vaultwarden.nix
./sslh.nix
./rss2email.nix
./fail2ban.nix
./nginx.nix
./franklincce.nix
./wireguard.nix
./nextcloud-bridge.nix
./grafana-bridge.nix
./prometheus.nix
./socks.nix
];
nix = {
optimise = {
automatic = true;
dates = [ "02:30" ];
};
gc = {
automatic = true;
dates = "03:15";
options = "-d";
};
};
time.timeZone = "America/Chicago";
i18n.defaultLocale = "en_US.UTF-8";
console = {
font = "Lat2-Terminus16";
keyMap = "us";
};
environment.systemPackages = with pkgs; [
python3
curl
htop
git
tree
dig
htop
neovim
];
system = {
copySystemConfiguration = true;
stateVersion = "23.05"; # don't change this, lol
};
services.journald.extraConfig = ''
SystemMaxUse=1G
'';
system.userActivationScripts = {
copyEssentialConfiguration = {
# we don't want to bring in the entirety of home-manager for this, so just
# write some files as a hack
text = ''
${pkgs.coreutils}/bin/cp /home/ryan/dot_testing/.config/bash/bashrc /home/ryan/.bashrc
${pkgs.coreutils}/bin/cp /home/ryan/dot_testing/.config/bash/profile /home/ryan/.bash_profile
${pkgs.coreutils}/bin/mkdir -p /home/ryan/.config/nvim
${pkgs.coreutils}/bin/cp /home/ryan/dot_testing/.config/nvim/init.min.lua /home/ryan/.config/nvim/init.lua
'';
deps = [];
};
};
system.activationScripts = {
copyEssentialConfiguration = {
text = ''
${pkgs.coreutils}/bin/cp /home/ryan/dot_testing/.config/bash/bashrc /root/.bashrc
${pkgs.coreutils}/bin/cp /home/ryan/dot_testing/.config/bash/profile /root/.bash_profile
${pkgs.coreutils}/bin/mkdir -p /root/.config/nvim
${pkgs.coreutils}/bin/cp /home/ryan/dot_testing/.config/nvim/init.min.lua /root/.config/nvim/init.lua
'';
deps = [];
};
};
boot.loader = {
grub.enable = true;
grub.device = "/dev/vda";
};
users.users.ryan = {
openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKbhM3wj0oqjR3pUaZgpfX4Xo4dlzvBTbQ48zHyg7Pwx usr" # x230t
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILBGh1FHPneg7PCDkhMs2BCJPTIRVJkRTKpOj1w02ydD usr" # copernicus
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGrpVDLQszFKoYbvYKRyVTTpehxR0BVU47SXkz39l2wK usr" # mainsail
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIB2xUbQw9+RCPVw7qCFm4NNCP/MpS2BIArcwMv0KdKOI usr" # mlg
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILuVT5W3kzjzsuMIWk1oeGtL8jZGtAhRSx8dK8oBJQcG u0_a291" # phone
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDCufie2JWc4ylZHIi03uR0RB/79/hTacn9qnlzqs+kaWcdk7eyHqpg3zmVrETCZQxJ8ssZx4+tlwC0+seOjgIfNktfKjiRpes2Sib0MowO3lRgzqJ0pZ5AEA/pc4314meAZP/CibFw54CWxOySEXsCWKm157HVJHpJ7P0HwqzHod4jXxUWKwMoZo5XyOTTMHv4oytcHTydIeiSymw3RtvEtqpBCRE3W5kIiJNuCXnZGZBxvOnhJsQ0FkeXgByeXOLFxUw0ma6Jy/621T2GrBnmFhiSIV+T7xk/cfgP+D1V9x2wCLX5gPQaNzwL03v3xohxnJwRa6EXTR9LzXE7Rhnolbmkb/YPPpI6U0RpueZrHv/1CIA3OSKnQh1cp/jMeP4DfeO+fSY1SsRZICQ3ndlnYkXtalEzGPxeLUgLsh6SxSIK+7jjlDGrJCUbOMHhR+92vBXy7XE8tgO2FuhrAIiroIsaWmZO/7sike3ps3GFEZHZMEe2v3IDqfX/Iecn++U= usr" # aristotle
];
isNormalUser = true;
extraGroups = [ "wheel" "docker" ];
};
networking = {
usePredictableInterfaceNames = false;
networkmanager.enable = true;
hostName = "netbox";
firewall = {
enable = true;
interfaces = {
eth0 = {
allowedTCPPorts = [ 80 443 ];
};
wg0 = {
# allow everything bound to the wg0 interface
allowedTCPPortRanges = [
{ from = 1; to = 35565; }
];
allowedUDPPortRanges = [
{ from = 1; to = 35565; }
];
};
};
};
};
}

42
boxes/netbox/fail2ban.nix Normal file
View File

@ -0,0 +1,42 @@
{ lib, config, pkgs, ... }:
{
services.fail2ban = {
enable = true;
ignoreIP = [
"192.168.1.0/24"
];
extraPackages = [pkgs.ipset];
banaction = "iptables-ipset-proto6-allports";
jails = {
"nginx-bruteforce" = ''
enabled = true
filter = nginx-bruteforce
logpath = /var/log/nginx/access.log
backend = auto
maxretry = 6
findtime = 600
'';
"postfix-bruteforce" = ''
enabled = true
filter = postfix-bruteforce
maxretry = 6
findtime = 600
'';
};
};
environment.etc = {
"fail2ban/filter.d/nginx-bruteforce.conf".text = ''
[Definition]
failregex = ^<HOST>.*GET.*(matrix/server|\.php|admin|wp\-).* HTTP/\d.\d\" 404.*$
'';
"fail2ban/filter.d/postfix-bruteforce.conf".text = ''
[Definition]
failregex = warning: [\w\.\-]+\[<HOST>\]: SASL LOGIN authentication failed.*$
journalmatch = _SYSTEMD_UNIT=postfix.service
'';
};
}

View File

@ -0,0 +1,41 @@
{ lib, config, pkgs, ... }:
{
virtualisation.docker.enable = true;
services.nginx.virtualHosts."franklincce.beepboop.systems" = {
forceSSL = true;
enableACME = true;
locations."/" = {
proxyPass = "http://localhost:1337";
};
};
# WARNING WARNING WARNING
# the below is SUPER BAD and should not be copied ANYWHERE
# the docker container should be initialized by a flake or other nix concept,
# not this nonsense
systemd.services.franklincce = {
description = "the docker container that runs the franklincce app";
environment = { # this is EVIL, NEVER DO THIS!!!111!
NIX_PATH = "nixpkgs=flake:nixpkgs:/nix/var/nix/profiles/per-user/root/channels";
};
script = ''
cd /home/ryan
# don't fail if cloning the git repo fails
${pkgs.git}/bin/git clone https://git.beepboop.systems/stupidcomputer/yig yig || true
cd /home/ryan/yig
${pkgs.nix}/bin/nix-shell --command make
'';
serviceConfig = {
User = "ryan";
};
wantedBy = [ "multi-user.target" ];
};
}

46
boxes/netbox/gitea.nix Normal file
View File

@ -0,0 +1,46 @@
{ lib, config, pkgs, ... }:
{
services.gitea = {
enable = true;
appName = "beepboop.systems"; # Give the site a name
database = {
type = "postgres";
passwordFile = "/etc/gittea-pass";
};
settings.security.INSTALL_LOCK = true;
settings.service = {
SHOW_REGISTRATION_BUTTON = false;
DISABLE_REGISTRATION = true;
};
settings.ui.DEFAULT_THEME = "arc-green";
settings.api.ENABLE_SWAGGER = false;
settings.server = {
DOMAIN = "git.beepboop.systems";
ROOT_URL = "https://git.beepboop.systems/";
LANDING_PAGE = "explore";
HTTP_PORT = 3001;
};
};
services.postgresql = {
enable = true; # Ensure postgresql is enabled
authentication = ''
local gitea all ident map=gitea-users
'';
identMap = # Map the gitea user to postgresql
''
gitea-users gitea gitea
'';
};
services.nginx.virtualHosts."git.beepboop.systems" = {
forceSSL = true;
enableACME = true;
locations."/" = {
proxyPass = "http://localhost:3001";
};
locations."/bridge" = {
proxyPass = "http://localhost:5000";
};
};
}

View File

@ -0,0 +1,16 @@
{ lib, config, pkgs, ... }:
{
services.nginx.virtualHosts."grafana.beepboop.systems" = {
forceSSL = true;
enableACME = true;
locations."/" = {
proxyPass = "http://10.100.0.2:9802";
proxyWebsockets = true;
extraConfig = ''
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $host;
proxy_buffering off;
'';
};
};
}

View File

@ -0,0 +1,37 @@
# Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }:
{
imports = [ ];
boot.initrd.availableKernelModules = [ "ata_piix" "uhci_hcd" "virtio_pci" "sr_mod" "virtio_blk" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/a57b82ca-7bfd-458e-b3e8-4962511cc0b8";
fsType = "ext4";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/DF39-1ECE";
fsType = "vfat";
};
swapDevices =
[ { device = "/dev/disk/by-uuid/57fbd850-1ced-4e21-9e52-4f3b529c61b0"; }
];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (the default) this is the recommended approach. When using systemd-networkd it's
# still possible to use this option, but it's recommended to use it in conjunction
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
networking.useDHCP = lib.mkDefault true;
# networking.interfaces.ens3.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
virtualisation.hypervGuest.enable = true;
}

View File

@ -0,0 +1,16 @@
{ lib, config, pkgs, ... }:
{
services.nginx.virtualHosts."nextcloud.beepboop.systems" = {
forceSSL = true;
enableACME = true;
locations."/" = {
proxyPass = "http://10.100.0.2:5028";
proxyWebsockets = true;
extraConfig = ''
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $host;
proxy_buffering off;
'';
};
};
}

38
boxes/netbox/nginx.nix Normal file
View File

@ -0,0 +1,38 @@
{ lib, config, pkgs, ... }:
{
services.nginx.enable = true;
services.nginx.clientMaxBodySize = "100m";
services.nginx.defaultSSLListenPort = 442;
services.nginx.virtualHosts."beepboop.systems" = {
forceSSL = true;
enableACME = true;
root = "/var/www/beepboop.systems";
locations."/" = {
extraConfig = ''
port_in_redirect off;
absolute_redirect off;
'';
};
};
services.nginx.virtualHosts."tfb.beepboop.systems" = {
forceSSL = true;
enableACME = true;
root = "/var/www/tfb.beepboop.systems";
locations."/" = {
extraConfig = ''
port_in_redirect off;
absolute_redirect off;
'';
};
locations."/groupme" = {
proxyPass = "http://10.100.0.2:7439";
};
};
security.acme = {
acceptTerms = true;
defaults.email = "nickforanick@protonmail.com";
};
}

View File

@ -0,0 +1,13 @@
{ lib, config, pkgs, ... }:
{
services.prometheus = {
exporters = {
node = {
enable = true;
enabledCollectors = [ "systemd" ];
listenAddress = "10.100.0.1";
port = 9002;
};
};
};
}

38
boxes/netbox/radicale.nix Normal file
View File

@ -0,0 +1,38 @@
{ lib, config, pkgs, ... }:
{
services.radicale = {
enable = true;
settings = {
auth = {
type = "htpasswd";
htpasswd_filename = "radicale-passwd";
htpasswd_encryption = "plain";
};
};
};
services.nginx.virtualHosts."radicale.beepboop.systems" = {
forceSSL = true;
enableACME = true;
locations."/" = {
proxyPass = "http://127.0.0.1:5232";
extraConfig = ''
proxy_set_header X-Script-Name /;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass_header Authorization;
'';
};
};
services.nginx.virtualHosts."calendar.beepboop.systems" = {
forceSSL = true;
enableACME = true;
globalRedirect = "radicale.beepboop.systems";
};
services.nginx.virtualHosts."cal.beepboop.systems" = {
forceSSL = true;
enableACME = true;
globalRedirect = "radicale.beepboop.systems";
};
}

View File

@ -0,0 +1,24 @@
{ lib, config, pkgs, ... }:
{
services.rss2email = {
enable = true;
to = "ryan@beepboop.systems";
feeds = {
"eff" = {
url = "https://www.eff.org/rss/updates.xml";
};
"nixos" = {
url = "https://nixos.org/blog/announcements-rss.xml";
};
"drewdevault" = {
url = "https://drewdevault.com/blog/index.xml";
};
"nullprogram" = {
url = "https://nullprogram.com/feed/";
};
"computersarebad" = {
url = "https://computer.rip/rss.xml";
};
};
};
}

14
boxes/netbox/socks.nix Normal file
View File

@ -0,0 +1,14 @@
{ lib, config, pkgs, ... }:
{
services._3proxy = {
enable = true;
services = [
{
type = "socks";
auth = [ "none" ];
bindAddress = "10.100.0.1";
bindPort = 3128;
}
];
};
}

13
boxes/netbox/ssh.nix Normal file
View File

@ -0,0 +1,13 @@
{ lib, config, pkgs, ... }:
{
services.openssh = {
enable = true;
ports = [55555];
settings = {
X11Forwarding = false;
PermitRootLogin = "no";
PasswordAuthentication = false;
};
};
}

19
boxes/netbox/sslh.nix Normal file
View File

@ -0,0 +1,19 @@
{ lib, config, pkgs, ... }:
{
services.sslh = {
enable = true;
settings.protocols = [
{
host = "localhost";
name = "ssh";
port = "55555";
service = "ssh";
}
{
host = "localhost";
name = "tls";
port = "442";
}
];
};
}

View File

@ -0,0 +1,22 @@
{ lib, config, pkgs, ... }:
{
services.vaultwarden.enable = true;
services.vaultwarden.config = {
DOMAIN = "https://bitwarden.beepboop.systems";
SIGNUPS_ALLOWED = false;
};
services.nginx.virtualHosts."bit.beepboop.systems" = {
forceSSL = true;
enableACME = true;
globalRedirect = "bitwarden.beepboop.systems";
};
services.nginx.virtualHosts."bitwarden.beepboop.systems" = {
forceSSL = true;
enableACME = true;
locations."/" = {
proxyPass = "http://127.0.0.1:8000";
};
};
}

View File

@ -0,0 +1,40 @@
{ lib, config, pkgs, ... }:
{
networking = {
nat = {
enable = true;
externalInterface = "eth0";
internalInterfaces = [ "wg0" ];
};
firewall.allowedUDPPorts = [ 50000 ];
wireguard.interfaces = {
wg0 = {
ips = [ "10.100.0.1/24" ];
listenPort = 50000;
postSetup = ''
${pkgs.iptables}/bin/iptables -t nat -A POSTROUTING -s 10.100.0.0/24 -o eth0 -j MASQUERADE
'';
postShutdown = ''
${pkgs.iptables}/bin/iptables -t nat -D POSTROUTING -s 10.100.0.0/24 -o eth0 -j MASQUERADE
'';
privateKeyFile = "/home/ryan/wg-keys/private";
peers = [
{ # copernicus
publicKey = "JlH1X4KRT+B8Uau+qTLtBqyapkbGClIj1db7znU77kc=";
allowedIPs = [ "10.100.0.2/32" ];
}
{ # aristotle
publicKey = "Sw2yyMhyS8GOCWm1VuGn3Y7cfx606dXOGK5mux8ckQU=";
allowedIPs = [ "10.100.0.3/32" ];
}
];
};
};
};
}

View File

@ -0,0 +1,7 @@
{ config, pkgs, ... }:
{
nix.extraOptions = ''
experimental-features = nix-command flakes
'';
}

31
boxes/phone/default.nix Normal file
View File

@ -0,0 +1,31 @@
{ config, lib, pkgs, ... }:
{
imports = [
./bootstrap.nix
];
home-manager = {
backupFileExtension = "hm-bak";
useGlobalPkgs = true;
config = ./home.nix;
};
environment.packages = with pkgs; [
tigervnc
git
tmux
hostname
tigervnc
xorg.xinit
# tar
# awk
# sed
elinks
];
environment.etcBackupExtension = ".bak";
system.stateVersion = "23.05";
time.timeZone = "America/Chicago";
}

18
boxes/phone/home.nix Normal file
View File

@ -0,0 +1,18 @@
{ lib, pkgs, home, ... }:
{
imports = [
../../home/nvim
../../home/ssh
../../home/git # needed for flakes
../../home/vdirsyncer
../../home/isync
../../home/khal
../../home/todoman
../../home/msmtp
../../home/neomutt
../../home/rbw
( import ../../home/bash { isRoot = true; } )
];
home.stateVersion = "23.05";
}

2
boxes/phone/init/.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
app_cache/
gpapp_cache/

18
boxes/phone/init/apps Normal file
View File

@ -0,0 +1,18 @@
https://f-droid.org/repo/com.termux_1020.apk
https://f-droid.org/repo/com.termux.api_51.apk
https://f-droid.org/repo/com.termux.widget_13.apk
https://f-droid.org/repo/com.coboltforge.dontmind.multivnc_101.apk
https://f-droid.org/repo/com.kylecorry.trail_sense_124.apk
https://f-droid.org/repo/org.ligi.survivalmanual_428.apk
https://github.com/bitwarden/android/releases/download/v2024.4.0/com.x8bit.bitwarden.apk
https://f-droid.org/repo/at.bitfire.icsdroid_81.apk
https://f-droid.org/repo/ws.xsoh.etar_47.apk
https://f-droid.org/repo/at.bitfire.davdroid_404030200.apk
https://f-droid.org/repo/org.oxycblt.auxio_53.apk
https://f-droid.org/repo/de.danoeh.antennapod_3050095.apk
https://f-droid.org/repo/eu.faircode.email_2241.apk
https://f-droid.org/repo/org.koreader.launcher.fdroid_105232.apk
https://f-droid.org/repo/at.techbee.jtx_209010003.apk
https://f-droid.org/repo/mn.tck.semitone_4.apk
https://f-droid.org/repo/de.moekadu.tuner_38.apk
https://f-droid.org/repo/io.github.domi04151309.home_1100.apk

3
boxes/phone/init/gpapps Normal file
View File

@ -0,0 +1,3 @@
com.ministrycentered.PlanningCenter
com.groupme.android
com.brivo.pass

34
boxes/phone/init/main.sh Executable file
View File

@ -0,0 +1,34 @@
mkdir -p app_cache
for i in $(cat apps); do
output_name=$(echo $i | awk -F'/' '{print $NF}')
curl "$i" --max-redirs 999 -L -C - -o "app_cache/$output_name"
adb install "app_cache/$output_name"
done
mkdir -p gpapp_cache
for i in $(cat gpapps); do
apkeep -a "$i" ./gpapp_cache/
done
for i in $(ls gpapp_cache/ | grep xapk); do
# this is specific to planning center online
xapk_playground=$(mktemp)
rm $xapk_playground
mkdir $xapk_playground
cp gpapp_cache/$i $xapk_playground
cd $xapk_playground
mkdir out
unzip $i -d out
cd -
cd $xapk_playground/out
rm icon.png
rm manifest.json
adb install-multiple *
cd -
done
cd gpapp_cache
for i in $(ls | grep '\.apk'); do
adb install $i
done

View File

@ -0,0 +1,7 @@
{ pkgs ? import <nixpkgs> {} }:
pkgs.mkShell {
packages = [
pkgs.apkeep
];
}

4
boxes/phone/out-of-tree/.gitignore vendored Normal file
View File

@ -0,0 +1,4 @@
git-annex-install
git-annex-install.*
git-annex.linux

View File

@ -0,0 +1,90 @@
termux: termux-pkgs termux-dots utils-sh rebuild-sh st pip-pkgs git-annex.linux sssg statusbar-polyfill
list: options # alias
options:
@echo specific options
@echo st - rebuild st
@echo utils-sh - copy utilities
@echo pip-pkgs - install pip packages
@echo termux-pkgs - install termux pkgs
@echo termux-dots - install termux dotfiles
@echo git-annex.linux - install git-annex
@echo sssg - install sssg
st:
-cd ../../../builds/st/ && CFLAGS="-DIS_PHONE" CC=clang make && cp st ~/.local/bin/st
utils-sh:
mkdir -p ~/.local/bin
cp ../../../builds/utils/* ~/.local/bin
rebuild-sh:
mkdir -p ~/.local/bin
cp ../../../builds/rebuild/* ~/.local/bin
pip-pkgs:
pip3 install vdirsyncer
pip3 install khal
# pip3 install khard
termux-pkgs:
pkg install -y \
tur-repo \
x11-repo
pkg install -y \
neovim \
python-pip \
feh \
xdotool \
git \
tig \
tigervnc \
sxhkd \
clang \
elinks \
tmux \
fontconfig \
xorgproto \
fzy \
man \
libxft \
firefox \
mupdf \
texlive-bin \
htop \
rbw \
pkg-config \
xorg-xrandr \
bspwm \
termux-api \
jq \
xclip \
isync \
neomutt \
pandoc \
wget \
which \
rsync \
openssl \
chromium
termux-dots:
mkdir -p ~/.local/bin
ln -sf $(CURDIR)/../../../.config ~/.config
ln -sf $(CURDIR)/../../../.config/ssh/config ~/.ssh/config
ln -sf ~/.config/bash/bashrc ~/.bashrc
ln -sf ~/.config/bash/profile ~/.bash_profile
mkdir -p ~/.local/share
cp $(CURDIR)/../../../home/wallpapers/pape.jpg ~/.local/share
mkdir -p ~/.shortcuts
cp $(CURDIR)/shortcuts/* ~/.shortcuts
git-annex.linux:
bash install-git-annex.sh
sssg:
-cp ~/git/sssg/sssg.sh ~/.local/bin/sssg
-chmod +x ~/.local/bin/sssg
statusbar-polyfill:
cp ~/dot_testing/builds/statusbar/termux-statusbar-polyfill ~/.local/bin

View File

@ -0,0 +1,7 @@
wget https://git-annex.branchable.com/install/Android/git-annex-install
MY_WD=$(pwd)
source git-annex-install || printf "failed\n"
cd "$MY_WD"
mv ~/git-annex.linux ./

View File

@ -0,0 +1,19 @@
#!/bin/sh
today=$(date "+%m/%d/%Y")
printf "Inputting height and weight information for today\n\n"
printf "Height?\n"
read -p "?>" height
printf "Weight?\n"
read -p "?>" weight
cd ~/pdbs
printf "\n%s %i" "$today" "$weight" >> weight.timeseries
printf "\n%s %i" "$today" "$height" >> height.timeseries
git add weight.timeseries height.timeseries
git commit -m "added height, weight data for $today"

View File

@ -0,0 +1,19 @@
#!/bin/sh
today=$(date "+%m/%d/%Y")
ledgerdate=$(date "+%Y/%m/%d")
printf "Inputting an expense for today\n\n"
printf "Payee name?\n"
read -p "?>" payee
printf "Amount?\n"
read -p "?>" amount
cd ~/pdbs
printf '%s * %s\n\tExpenses:%s $%s\n\tAssets:Greencard 4154\n\n' "$ledgerdate" "$payee" "$payee" "$amount" >> phone.ledger
git add phone.ledger
git commit -m "added an expense for $today"

View File

@ -0,0 +1,9 @@
register_habits=$(ls ~/pdbs/ |
grep '\.habit$' |
fzy)
if [ -z "$register_habits" ]; then
echo "you didn't choose one!"
else
date "+%m/%d/%Y" >> ~/pdbs/$register_habits
fi

View File

@ -0,0 +1,31 @@
#!/bin/sh
day5=$(date --date="5 days ago" "+%m/%d/%Y")
day4=$(date --date="4 days ago" "+%m/%d/%Y")
day3=$(date --date="3 days ago" "+%m/%d/%Y")
day2=$(date --date="2 days ago" "+%m/%d/%Y")
day1=$(date --date="1 days ago" "+%m/%d/%Y")
today=$(date "+%m/%d/%Y")
# $1 -- habit filename
show_past_habit () {
printf "%25s =========\n" "$1"
donein5days=$(grep -c "$day5" "$HOME/pdbs/$1")
donein4days=$(grep -c "$day4" "$HOME/pdbs/$1")
donein3days=$(grep -c "$day3" "$HOME/pdbs/$1")
donein2days=$(grep -c "$day2" "$HOME/pdbs/$1")
donein1days=$(grep -c "$day1" "$HOME/pdbs/$1")
donetoday=$(grep -c "$today" "$HOME/pdbs/$1")
printf "%.5s %.5s %.5s %.5s %.5s %.5s\n%5s %5s %5s %5s %5s %5s\n\n" \
"$day5" "$day4" "$day3" "$day2" "$day1" "$today" \
"$donein5days" "$donein4days" "$donein3days" \
"$donein2days" "$donein1days" "$donetoday"
}
habits=$(ls ~/pdbs | grep '\.habit$')
for i in $habits; do
show_past_habit "$i"
done
read THROWAWAY

20
boxes/virtbox/default.nix Normal file
View File

@ -0,0 +1,20 @@
{ lib, config, pkgs, ...}:
{
imports = [
./hardware-configuration.nix
../../modules/bootstrap.nix
../../modules/hosts.nix
../../modules/common.nix
../../modules/x11.nix
../../modules/pulse.nix
../../modules/discord.nix
];
boot.loader.grub.enable = true;
boot.loader.grub.device = "/dev/vda";
networking.hostName = "virtbox";
system.stateVersion = "23.11";
}

View File

@ -0,0 +1,31 @@
# Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }:
{
imports =
[ (modulesPath + "/profiles/qemu-guest.nix")
];
boot.initrd.availableKernelModules = [ "ahci" "xhci_pci" "virtio_pci" "sr_mod" "virtio_blk" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/7b70ab88-296c-4737-90b2-267cb2432dc1";
fsType = "ext4";
};
swapDevices = [ ];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (the default) this is the recommended approach. When using systemd-networkd it's
# still possible to use this option, but it's recommended to use it in conjunction
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
networking.useDHCP = lib.mkDefault true;
# networking.interfaces.enp1s0.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
}

9
boxes/virtbox/home.nix Normal file
View File

@ -0,0 +1,9 @@
{ lib, inputs, config, pkgs, home, ... }:
{
imports = [
../../home/x11.nix
];
home.stateVersion = "23.11";
}

66
boxes/x230t/default.nix Normal file
View File

@ -0,0 +1,66 @@
{ lib, config, pkgs, ...}:
{
imports = [
./hardware-configuration.nix
./special-ssh-magic.nix
../../modules/bootstrap.nix
../../modules/common.nix
../../modules/x11.nix
../../modules/pulse.nix
../../modules/hosts.nix
../../modules/tlp.nix
../../modules/media.nix
../../modules/anki.nix
../../modules/power-control.nix
../../modules/adb.nix
../../modules/rbw.nix
];
environment.systemPackages = with pkgs; [
xscreensaver
texliveFull
libreoffice
ecryptfs
ffmpeg
thunderbird
ledger
ranger
];
hardware.bluetooth = {
enable = true;
};
services.printing.enable = true;
services.avahi = {
enable = true;
nssmdns = true;
openFirewall = true;
};
services.udev.extraRules = ''
ACTION=="add", SUBSYSTEM=="input", KERNEL=="event[0-20]*", ENV{ID_INPUT_TOUCHSCREEN}=="1", MODE:="0666" GROUP="usr", SYMLINK+="input/touchscreen"
'';
users.users.usr.extraGroups = [ "input" ];
services.getty.autologinUser = "usr";
boot.loader = {
grub = {
timeoutStyle = "hidden";
enable = true;
device = "/dev/sda";
splashImage = null;
};
timeout = 1;
};
hardware.pulseaudio.enable = true;
networking.hostName = "x230t";
system.stateVersion = "23.11";
}

View File

@ -0,0 +1,33 @@
# Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }:
{
imports =
[ (modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "xhci_pci" "ehci_pci" "ahci" "usb_storage" "sd_mod" "sdhci_pci" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/772f67d6-9434-42f1-aa3e-153e41affe4c";
fsType = "ext4";
};
swapDevices = [ ];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (the default) this is the recommended approach. When using systemd-networkd it's
# still possible to use this option, but it's recommended to use it in conjunction
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
networking.useDHCP = lib.mkDefault true;
# networking.interfaces.enp0s25.useDHCP = lib.mkDefault true;
# networking.interfaces.wlp3s0.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}

10
boxes/x230t/home.nix Normal file
View File

@ -0,0 +1,10 @@
{ lib, inputs, config, pkgs, home, ... }:
{
imports = [
../../home/x11.nix
../../home/chromium
];
home.stateVersion = "23.11";
}

View File

@ -0,0 +1,6 @@
{ lib, config, pkgs, ...}:
{
services.sshd.enable = true;
systemd.services.sshd.wantedBy = lib.mkForce [];
}

39
builds/archutils.nix Normal file
View File

@ -0,0 +1,39 @@
{ stdenv
, lib
, pkgs
, makeWrapper
, sxhkd
, bash
, feh
, jq
, fzy
, curl
, texliveFull
}:
stdenv.mkDerivation rec {
pname = "archutils";
version = "1.01";
src = ./archutils;
nativeBuildInputs = [ makeWrapper ];
buildInputs = [
bash
feh
jq
curl
fzy
texliveFull
];
installPhase = ''
mkdir -p $out/bin
for i in $(ls $src/); do
cp $src/$i $out/bin
ln -sf $out/bin/tmenu_run $out/bin/regenerate
wrapProgram $out/bin/$i --prefix PATH : ${lib.makeBinPath [ bash feh jq curl fzy texliveFull ]}
done
'';
}

View File

@ -0,0 +1,118 @@
#!/bin/sh
working_directory=$(date +%Y-%m-%d)
human_readable=$(date "+%d %b %Y")
cd ~/annex/briefs/
mkdir "$working_directory"
cd "$working_directory"
cat > main.tex <<EOF
\documentclass[oneside]{article}
\usepackage{amssymb}
\usepackage[left=1.5cm, right=1.5cm, top=1.5cm, bottom=1.5cm]{geometry}
\pagenumbering{gobble}
\begin{document}
\noindent {\Large Ryan Marina} \hspace{\fill} {\Large Briefing for $human_readable}
\noindent \textsc{Internal Document System} \hspace{\fill} $ \square $ \textit{scanned?} $ \square $ \textit{not scanned?}
\noindent \textit{Digital Archive Supplement} \hspace{\fill} internal notes: \rule{3cm}{0.4pt}
\noindent \texttt{iref:annex/briefs/$working_directory}
\vspace{0.4cm}
\noindent \textsc{Schedule}
\vspace{-0.30cm}
\noindent \rule{\textwidth}{0.4pt}
EOF
schedule=$(
khal list today today --format "{calendar}|{categories}|{start-time}|{end-time}|{title}" |
grep -E '^home\|school\||band\|'
)
IFS='
'
for class in $schedule; do
echo "$class" |
awk -F'|' '{
print "\\noindent " $5 " \\hspace{\\fill} \\textit{(" $3 "-" $4 ")}\n\n"
}' >> main.tex
done
cat >> main.tex <<EOF
\vspace{0.4cm}
\noindent \textsc{Unresolved Items}
\vspace{-0.30cm}
\noindent \rule{\textwidth}{0.4pt}
EOF
todo_items=$(
todo --porcelain |
jq -r '.[].summary'
)
IFS='
'
for todo in $todo_items; do
printf '\\noindent $ \\square $ %s\n\n' "$todo" >> main.tex
done
cat >> main.tex <<EOF
\vspace{0.4cm}
EOF
# generate notices
ssh netbox df -h |
grep /dev/vda3 |
awk -F' ' '{print "\\item \\texttt{" $1 "} on \\texttt{netbox} is at " $5 " utilization."}' |
sed 's/\%/\\%/g' > notices.tex
if [ -f notices.tex ]; then
cat >> main.tex <<EOF
\noindent \textsc{Procedural Notices}
\vspace{-0.30cm}
\noindent \rule{\textwidth}{0.4pt}
\begin{enumerate}
\input{notices}
\end{enumerate}
\vspace{0.4cm}
EOF
fi
cat >> main.tex <<EOF
\noindent \textsc{Items to be Appended to the Agenda}
\vspace{-0.30cm}
\noindent \rule{\textwidth}{0.4pt}
\end{document}
EOF
pdflatex main.tex
printf "[!] briefing generated\n"
printf "file:///home/usr/annex/briefs/%s/main.pdf\n" "$working_directory"

11
builds/archutils/masstodo Executable file
View File

@ -0,0 +1,11 @@
#!/bin/sh
temp=$(mktemp)
nvim $temp
IFS='
'
for i in $(cat $temp); do
todo new "$i"
done

Some files were not shown because too many files have changed in this diff Show More