Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Show HN: On the fly color scheme selection for rxvt-unicode (gitlab.com/trobador)
32 points by pera on Feb 18, 2019 | hide | past | favorite | 7 comments


urxvt is my favorite terminal emulator, but one thing I've always missed is the lack of some profile/theme selector functionality, so I created this Perl extension that implements this using dynamic colors and good old X resources :)


Perl is not needed.

URxvt.keysym.M-C-minus: command:\033]4;0;#333333\007\033]4;1;#cd3333\007\033]4;2;#33cd33\007\033]4;3;#cdcd33\007\033]4;4;#3333cd\007\033]4;5;#cd33cd\007\033]4;6;#33cdcd\007\033]4;7;#cdcdcd\007\033]4;8;#656565\007\033]4;9;#ff6565\007\033]4;10;#65ff65\007\033]4;11;#ffff65\007\033]4;12;#6565ff\007\033]4;13;#ff65ff\007\033]4;14;#65ffff\007\033]4;15;#ffffff\007\033]11;#101010\007\033]12;white


Yeah, actually I first thought about writing a script to translates normal X resources color schemes into urxvt keybinding commands with escape sequences like yours, but then while I was reading the documentation I discovered that urxvt has support for pop-up menus, so I created this Perl extension instead.


In case you need something more generic: https://github.com/dylanaraps/pywal


Does it support direct RGB colors (true color)?


To be honest I'm not sure, does vanilla urxvt supports direct colors?


Not completely, but there are patches and forks for this.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: