1. 20

  2. 2

    Off topic: what is the reasoning behind the URL setup? I am redirected to https://https.www.google.com.tedunangst.com (which has a valid certificate). I tried finding a post on there explaining why or how it is set up like that, but couldn’t find it, but seems there’s a story here?

    1. 3

      It’s just a subdomain, tedu hosts his own CA on the main site (view the certificate on the main non-redirecting site and you can see it’s signed by ‘ca.teduangst.com’). My guess is he got annoyed at everyone telling him that his cert was invalid and hosted a trolly subdomain to equally confuse people and maybe get crawlers to play nice.

      1. 2

        If you’re using macOS and iTerm I wrote of a similar approach. I wrote a vanilla bash function that automatically (or manually [see just function i in the diff]) changes between Solarized Light and Dark both in iTerm and Vim.

        (If you want to go one step further, I wrote how to automate the whole Mojave Dark - Light dingus in my blog.)

        1. 2

          meanwhile in arcan/durden land:

          echo 1 > /mnt/durden-menufs/windows/type/terminal/video/shader/invert

          The slightly more ambitious approach would be to enable transparency for the terminals and use a recoloring shader that re-maps the colors over a LUT and use the alpha channel to distinguish between FG/BG. Extra points for a time-of-day uniform as an interpolation weight :-)

          1. 2

            I solved this by using this framework:

            It lets me switch xterm back and forth between colors with a single command (it helps that I typically only have one term open)

            Here are the commands I use to switch: github

            And here is a video of it in action: https://m.youtube.com/watch?v=4mgUtUE4Yqg

            1. 2

              Heartening to see people still using xterm. Most of the time these days I’m using Konsole or Gnome Terminal or whatever my desktop provides.

              Remember when xterm was considered too heavyweight and everyone was running rxvt as a lightweight alternative? :)

              1. 2

                I remember compiling rxvt!

              2. 1

                Funny though, while not totally related, the post’s remark about sending the same keystroke to multiple xterms, reminded me of the xkey.c snooper.

                1. 1

                  Somewhat related, but I remember once seeing a command-line client for sending messages to X, kind of like Ted is doing. Does anyone know what I’m talking about? I have to send “m” and “return” around 4000 times to my browser and don’t want to do it by hand.

                  1. 1
                  2. 1

                    A possibly lighter approach is to take advantage of /dev/pts/* – have a light-mode / dark-mode print standard color code instructions to each of the digit-named files in that directory, and like magic your terminal uses a new color scheme. You can redefine colors using the scheme via:

                        if OS == "Darwin" and index < 20:
                            return "\033]P%1x%s\033\\" % (index, color.strip("#"))
                        return "\033]4;%s;%s\033\\" % (index, color)

                    where color is #RRGGBB. (code lifted from pywal.)

                    1. 1

                      OSX doesn’t have /dev/pts, but you can use ps -ef to find the controlling tty of all the xterm on both:

                      ps -ef |grep xter[m] | awk '{ print "/dev/"$6 }'
                    2. 1

                      I have a hotkey for running xcalib -invert -alter, which affects the whole screen; presumably that’s the “invert gamma” mentioned in this article, which the author avoided because it affects things like the Web browser.

                      I use it precisely because it affects the browser: I can toggle it to read bright pages more comfortably, then toggle back to anything else (terminals, Emacs, GTK, Qt, etc.) which are always set to use dark themes.

                      1. 1

                        I feel Ted’s pain.

                        I like solarized. Sadly inverting solarized doesn’t give a nice colour scheme.

                        So this leaves me with having to update my xterm and vim settings manually.