Outils pour utilisateurs

Outils du site


issue141:c_c

Ceci est une ancienne révision du document !


Carrying on from last month’s article, I thought I’d cover a few aspects of theming my setup – that I’ve done to start the new year off with a fresh look. I’ll cover setting terminal themes, a few websites and tools for generating colorschemes, and a few aspects of my particular system.

Poursuivons l'article du mois dernier. J'ai pensé que je pourrais présenter quelques aspects des thèmes de mon paramétrage - que j'ai fait pour démarrer la nouvelle année avec une nouvele présentation. Je présenterai le paramétrage des thèmes du terminal, queqlques sites Web et des outils pour générer des jeux de couleurs et en particulier quelques détails de mon système.

Terminal Color Scheme I spent some time in December converting my favourite syntax color scheme from VS Code (City Lights) into something usable in my Terminal of choice (Kitty). Since I also run i3, this included colors that i3 uses, and needed to also be carried over to Polybar. I did it all manually first, and then created a color scheme json file for Pywal.

Jeux de couleurs pour le terminal

J'ai passé un peu de temps en décembre pour convertir mon jeu de couleur favori pour la syntaxe de VS Code (City Lights) en quelque chose d'utilisable dans mon terminal préféré (Kitty). Depuis que je fais aussi tourner le i3, ceci comprend les couleurs que le i3 utilise, lesquelles ont aussi besoin d'être aussi transportées vers Polybar. J'ai d'abord tout fait manuellement, puis j'ai créé un fichier json du jeu de couleurs pour Pywal.

The exact method of changing your terminal colors will, of course, depend on your terminal itself - urxvt pulls the data from .Xresources (like Xterm), Gnome-terminal has a settings panel (and so does Terminator), while Kitty has a configuration file. As such, you’ll need to check where your colors are stored and in what format. Below is the set of colors I’ve ended up using to replicate City Lights. It’s not perfect, and some colors are simply doubled up since the light or dark variants are a little too frequently used for my taste. These are all pulled from my .Xresources, as this should be the most commonly used format.

Laméthode exacte pour chaner les couleurs de votre terminal dépendra, bien sûr, de votre terminal lui-même - urxvt tire ses données de .Xresources (comme Xterm). Le terminal GNOME a un panneau de paramétrage (de même que Terminator), alors que Kitty a un fichier de configuration. Dans ce cas, vous devrez vérifier quelqles sont les couleurs stockées et dans quel format. Ci-dessous, voici le jeu de couleurs que j'ai fini par utiliser pour répliquer City Lights. Ce n'est pas parfait, et certaines couleurs sont en double simplement parce que les variantes lumineuses ou sombres sont un peu trop utilisées à mon goût. Elles sont toutes tirées de mon .Xresources, ce qui doit être le format classiquement le plus utilisé.

*foreground: #b7c5d3 *background: #181e24 ! Black *color0: #333f4a *color8: #41505e ! Red *color1: #d95468 *color9: #d95468 ! Green *color2: #8bd49c *color10: #8bd49c ! Yellow *color3: #ebbf83 *color11: #f7dab3 ! Blue *color4: #539afc *color12: #5ec4ff ! Magenta *color5: #d44b7e *color13: #b62d65 ! Cyan *color6: #70e1e8 *color14: #70e1e8 ! White *color7: #718ca1 *color15: #b7c5d3

Alternatively, if you want to use pywal to generate this you can create the below file: {“special”:{“background”:“#181e24”,“foreground”:“#b7c5d3”,“cursor”:“#b7c5d3”},“colors”:{“color0”:“#333f4a”,“color1”:“#d95468”,“color2”:“#8bd49c”,“color3”:“#ebbf83”,“color4”:“#539afc”,“color5”:“#d44b7e”,“color6”:“#70e1e8”,“color7”:“#718ca1”,“color8”:“#41505e”,“color9”:“#d95468”,“color10”:“#8bd49c”,“color11”:“#f7dab3”,“color12”:“#5ec4ff”,“color13”:“#b62d65”,“color14”:“#70e1e8”,“color15”:“#b7c5d3”}}

Autrement, si vous voulez utiliser pywal pour générer ceci, vous pouvez créer le fichier ci-dessous :

{“special”:{“background”:“#181e24”,“foreground”:“#b7c5d3”,“cursor”:“#b7c5d3”},“colors”:{“color0”:“#333f4a”,“color1”:“#d95468”,“color2”:“#8bd49c”,“color3”:“#ebbf83”,“color4”:“#539afc”,“color5”:“#d44b7e”,“color6”:“#70e1e8”,“color7”:“#718ca1”,“color8”:“#41505e”,“color9”:“#d95468”,“color10”:“#8bd49c”,“color11”:“#f7dab3”,“color12”:“#5ec4ff”,“color13”:“#b62d65”,“color14”:“#70e1e8”,“color15”:“#b7c5d3”}}

Save this somewhere you’ll remember as citylights.json, and then run: wal -f /path/to/citylights.json This is simply a copy of their included Monokai theme that I adapted and edited. Naturally, Pywal is intended to create/select a theme to match a wallpaper, but this purpose seems to work as well. If you want to create your own scheme from scratch, something like http://terminal.sexy/ might be what you’re looking for.

Sauvez-le comme citylights.json à un endroit quelconque dont vous vous souviendrez, puis lancez :

wal -f /path/to/citylights.json

Ceci fait simplement une copie de leur thème Monokai intégré que j'ai adapté et modifié. Naturellement, Pywal est capable de créer/sélectionner un thème qui correspond à un fond d'écran ; ce point semble bien fonctionner.

Si vous voulez créer votre propre jeu de couleurs à partir de rien, quelque chose comme http://terminal.sexy/ pourait être ce que vous cherchez.

GTK+ Theme, Cursor & Icons I didn’t go so far as to create a custom GTK+ theme to utilize the citylights.json theme (though it should be possible with oomox and pywal). Instead, I just selected one that I liked the look of (Adapta-Nokto-Eta). It’s not perfect, but as I don’t tend to see a lot of GTK applications, I haven’t had any real issues with it. Icon-wise I’m just using Lüv, which is a nice blue-tinged set of icons. I have noticed in some dialog boxes that the icons are showing up funny, but it doesn’t happen often enough for me to track down the cause. The cursor I use is StormDrops dark. It’s overall a nice mouse cursor with sharp lines and a normal angle to the cursor. The only cursor I’m not sold on is the hand, which just feels out of place. I haven’t yet found a better option for a dark-colored cursor though.

Fonts Lastly, one of the most important parts of anyone’s setup - their fonts! Terminal/Polybar: Hack, FontAwesome, M+ GTK: Cantarell VS Code: Fira Code (with ligatures enabled) The first line has 3 fonts listed, as each one is progressively used as a fallback. FontAwesome gives me icons for use in Polybar (which I use for a couple of workspaces), and M+ gives me support for Kanji and Hiragana. I highly recommend Hack as a terminal font, as it even includes Powerline icons by default (in case you use Powerline). Even if not, it’s very legible and offers some defining characteristics on symbols you may confuse (such as a dot in the 0 [zero]). I even used it in VS Code for a while, but have since changed to Fira Code.

Future Plans I’m debating about trying Herbstluftwm instead of i3, simply for a little bit of a change. I’d also like to re-work my workspace names using Kanji or other icons, instead of largely being numbers. I also want to tweak Polybar a bit more, especially to see if I can improve the appearance of the tray. I may also start using Conky again to see more information about my system.

Naturally, if any of my readers have preferred themes, icons, or fonts, I’m more than happy to feature them in a later article (and possibly use them myself!). As always, I hope this article might have inspired at least a couple of you to try something new or to rework their system for the new year. If you have any issues, corrections, or questions for me, you can reach me at lswest34+fcm@gmail.com.

issue141/c_c.1548524028.txt.gz · Dernière modification : 2019/01/26 18:33 de d52fr