Change Shell Font via Command

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP












1















I play a lot of Nethack and I suspect that I'm not alone in preferring a larger font for it than I normally use for my terminal. I tend to use 12 for normal terminal stuff (vim or whatever) and 16+ for Nethack. Normally I just change the font in my preferences but I'm getting the urge to automate this process. I want to create a script or an alias or something that will change the font size and launch nethack with a single command. Can it be done?



Edit:



OS: Debian
DE: Xfce
Shell: Bash










share|improve this question



















  • 1





    We cannot know if it can be done if we do not know details about what is being used.

    – Rui F Ribeiro
    Feb 27 at 10:42











  • Updated it with my distro, shell, and desktop environment.

    – some_guy632
    Feb 27 at 19:48















1















I play a lot of Nethack and I suspect that I'm not alone in preferring a larger font for it than I normally use for my terminal. I tend to use 12 for normal terminal stuff (vim or whatever) and 16+ for Nethack. Normally I just change the font in my preferences but I'm getting the urge to automate this process. I want to create a script or an alias or something that will change the font size and launch nethack with a single command. Can it be done?



Edit:



OS: Debian
DE: Xfce
Shell: Bash










share|improve this question



















  • 1





    We cannot know if it can be done if we do not know details about what is being used.

    – Rui F Ribeiro
    Feb 27 at 10:42











  • Updated it with my distro, shell, and desktop environment.

    – some_guy632
    Feb 27 at 19:48













1












1








1








I play a lot of Nethack and I suspect that I'm not alone in preferring a larger font for it than I normally use for my terminal. I tend to use 12 for normal terminal stuff (vim or whatever) and 16+ for Nethack. Normally I just change the font in my preferences but I'm getting the urge to automate this process. I want to create a script or an alias or something that will change the font size and launch nethack with a single command. Can it be done?



Edit:



OS: Debian
DE: Xfce
Shell: Bash










share|improve this question
















I play a lot of Nethack and I suspect that I'm not alone in preferring a larger font for it than I normally use for my terminal. I tend to use 12 for normal terminal stuff (vim or whatever) and 16+ for Nethack. Normally I just change the font in my preferences but I'm getting the urge to automate this process. I want to create a script or an alias or something that will change the font size and launch nethack with a single command. Can it be done?



Edit:



OS: Debian
DE: Xfce
Shell: Bash







command-line fonts






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Feb 27 at 19:47







some_guy632

















asked Feb 27 at 10:27









some_guy632some_guy632

1084




1084







  • 1





    We cannot know if it can be done if we do not know details about what is being used.

    – Rui F Ribeiro
    Feb 27 at 10:42











  • Updated it with my distro, shell, and desktop environment.

    – some_guy632
    Feb 27 at 19:48












  • 1





    We cannot know if it can be done if we do not know details about what is being used.

    – Rui F Ribeiro
    Feb 27 at 10:42











  • Updated it with my distro, shell, and desktop environment.

    – some_guy632
    Feb 27 at 19:48







1




1





We cannot know if it can be done if we do not know details about what is being used.

– Rui F Ribeiro
Feb 27 at 10:42





We cannot know if it can be done if we do not know details about what is being used.

– Rui F Ribeiro
Feb 27 at 10:42













Updated it with my distro, shell, and desktop environment.

– some_guy632
Feb 27 at 19:48





Updated it with my distro, shell, and desktop environment.

– some_guy632
Feb 27 at 19:48










1 Answer
1






active

oldest

votes


















3














It depends on the terminal emulator you are using.



For instance, xfce4-terminal stores its configuration in $XDG_CONFIG_DIRS/xfce4/terminal/terminalrc and $XDG_CONFIG_DIRS/xfce4/terminal/accels.scm. When starting a new instance, it also let you execute a given command with the -x/--execute and -e/--command options. With features like these it's easy to create a function/script to automatize what you want.



Example:



run-nano() 
sed -Ei 's/^(FontName=Noto Mono )9$/112/g' <config-file>
nano
sed -Ei 's/^(FontName=Noto Mono )12$/19/g' <config-file>



Example






share|improve this answer


















  • 1





    Works like a charm. I used an alias instead of a function but now I'm lauching nethack and increasing the font in one command. And I learned about sed! Thanks kind stranger.

    – some_guy632
    Feb 28 at 1:43










Your Answer








StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f503296%2fchange-shell-font-via-command%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









3














It depends on the terminal emulator you are using.



For instance, xfce4-terminal stores its configuration in $XDG_CONFIG_DIRS/xfce4/terminal/terminalrc and $XDG_CONFIG_DIRS/xfce4/terminal/accels.scm. When starting a new instance, it also let you execute a given command with the -x/--execute and -e/--command options. With features like these it's easy to create a function/script to automatize what you want.



Example:



run-nano() 
sed -Ei 's/^(FontName=Noto Mono )9$/112/g' <config-file>
nano
sed -Ei 's/^(FontName=Noto Mono )12$/19/g' <config-file>



Example






share|improve this answer


















  • 1





    Works like a charm. I used an alias instead of a function but now I'm lauching nethack and increasing the font in one command. And I learned about sed! Thanks kind stranger.

    – some_guy632
    Feb 28 at 1:43















3














It depends on the terminal emulator you are using.



For instance, xfce4-terminal stores its configuration in $XDG_CONFIG_DIRS/xfce4/terminal/terminalrc and $XDG_CONFIG_DIRS/xfce4/terminal/accels.scm. When starting a new instance, it also let you execute a given command with the -x/--execute and -e/--command options. With features like these it's easy to create a function/script to automatize what you want.



Example:



run-nano() 
sed -Ei 's/^(FontName=Noto Mono )9$/112/g' <config-file>
nano
sed -Ei 's/^(FontName=Noto Mono )12$/19/g' <config-file>



Example






share|improve this answer


















  • 1





    Works like a charm. I used an alias instead of a function but now I'm lauching nethack and increasing the font in one command. And I learned about sed! Thanks kind stranger.

    – some_guy632
    Feb 28 at 1:43













3












3








3







It depends on the terminal emulator you are using.



For instance, xfce4-terminal stores its configuration in $XDG_CONFIG_DIRS/xfce4/terminal/terminalrc and $XDG_CONFIG_DIRS/xfce4/terminal/accels.scm. When starting a new instance, it also let you execute a given command with the -x/--execute and -e/--command options. With features like these it's easy to create a function/script to automatize what you want.



Example:



run-nano() 
sed -Ei 's/^(FontName=Noto Mono )9$/112/g' <config-file>
nano
sed -Ei 's/^(FontName=Noto Mono )12$/19/g' <config-file>



Example






share|improve this answer













It depends on the terminal emulator you are using.



For instance, xfce4-terminal stores its configuration in $XDG_CONFIG_DIRS/xfce4/terminal/terminalrc and $XDG_CONFIG_DIRS/xfce4/terminal/accels.scm. When starting a new instance, it also let you execute a given command with the -x/--execute and -e/--command options. With features like these it's easy to create a function/script to automatize what you want.



Example:



run-nano() 
sed -Ei 's/^(FontName=Noto Mono )9$/112/g' <config-file>
nano
sed -Ei 's/^(FontName=Noto Mono )12$/19/g' <config-file>



Example







share|improve this answer












share|improve this answer



share|improve this answer










answered Feb 27 at 11:32









nxnevnxnev

2,9162524




2,9162524







  • 1





    Works like a charm. I used an alias instead of a function but now I'm lauching nethack and increasing the font in one command. And I learned about sed! Thanks kind stranger.

    – some_guy632
    Feb 28 at 1:43












  • 1





    Works like a charm. I used an alias instead of a function but now I'm lauching nethack and increasing the font in one command. And I learned about sed! Thanks kind stranger.

    – some_guy632
    Feb 28 at 1:43







1




1





Works like a charm. I used an alias instead of a function but now I'm lauching nethack and increasing the font in one command. And I learned about sed! Thanks kind stranger.

– some_guy632
Feb 28 at 1:43





Works like a charm. I used an alias instead of a function but now I'm lauching nethack and increasing the font in one command. And I learned about sed! Thanks kind stranger.

– some_guy632
Feb 28 at 1:43

















draft saved

draft discarded
















































Thanks for contributing an answer to Unix & Linux Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f503296%2fchange-shell-font-via-command%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown






Popular posts from this blog

How to check contact read email or not when send email to Individual?

Displaying single band from multi-band raster using QGIS

How many registers does an x86_64 CPU actually have?