GithubHelp home page GithubHelp logo

urxvt-font's Introduction

About

urxvt is a great terminal emulator, but spending time on a mac made me miss the ability (in iTerm!) to dynamically resize text using ⌘+Plus and ⌘+Minus. I was also thinking that it would be be nice if resizing the terminal font could be persisted to Xresources. Turns out this was pretty easy to accomplish.

urxvt.perl-lib:                     /path/to/urxvt-font
urxvt.keysym.Control-Shift-Up:      perl:font:increment
urxvt.keysym.Control-Shift-Down:    perl:font:decrement
urxvt.perl-ext-common:              font

Now, Ctrl+Shift+<Up> and Ctrl+Shift+<Down> will, respectively, enlarge and decrease the text size in a running urxvt window, and save the new font size to ~/.Xresources, so that it’s there for the next time you open a terminal window. With the Monaco font, it’s a poor man’s iTerm.

Modular font directives

I keep my fonts in a separate xresources file, which gets include by ~/.Xresources. This way I can version ~/.Xdefaults without dirtying the repository every time I change the terminal font size. For this to work, the path defined by X_RESOURCES in font must contain something like this:

 /* Fonts */
urxvt*boldColors: on
urxvt*font:     xft:Monaco:pixelsize=20:antialias=true:hinting=true:medium
urxvt*boldFont: xft:Monaco:pixelsize=20:antialias=true:hinting=true:bold
! vim:ft=xdefaults

urxvt-font's People

Contributors

noah avatar djpohly avatar noahtwri avatar

Stargazers

daniel baak avatar Le Baron de Charlus avatar  avatar  avatar  avatar  avatar Javi avatar  avatar Alexander I.Grafov avatar  avatar zackn9ne avatar Chinggis Tenger avatar ワサビ (Wasabi) avatar Aurélien Tamisier avatar Francisco Demartino avatar Ángel Velásquez avatar Angus H. avatar Benjamin Smith avatar Andrei Kulakov avatar Brandon Amos avatar  avatar Gao avatar  avatar Sliim avatar Emmanuel GALLOIS avatar Thedward Blevins avatar Nick Morrott avatar Noor avatar Matthew avatar Steven! Ragnarök avatar Jeffrey Fetzer avatar Bernhard Urban-Forster avatar lee aylward avatar  avatar

Watchers

 avatar James Cloos avatar g59091 avatar  avatar

urxvt-font's Issues

Enhanced version

Hi,

I couldn't find any email address so I'm putting this up as an issue here. I have written an enhanced version of a script to change the font size here: https://github.com/majutsushi/urxvt-font-size
It can also handle things like X11 fonts, multiple fonts and bold fonts. Since I'm using some of your code for that I wanted to ask whether you would be OK with me releasing it under the MIT/X11 license?

Thanks,
Jan

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.