<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Vipul Dessai</title>
    <description>The latest articles on DEV Community by Vipul Dessai (@badgamerbad).</description>
    <link>https://dev.to/badgamerbad</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F81531%2F2a46a623-470f-4343-9407-8def3d148de6.jpeg</url>
      <title>DEV Community: Vipul Dessai</title>
      <link>https://dev.to/badgamerbad</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/badgamerbad"/>
    <language>en</language>
    <item>
      <title>Oh my posh on all windows terminals (vs code integrated terminal too!!)</title>
      <dc:creator>Vipul Dessai</dc:creator>
      <pubDate>Thu, 07 Jul 2022 05:00:34 +0000</pubDate>
      <link>https://dev.to/badgamerbad/oh-my-posh-on-all-windows-terminals-vs-code-integrated-terminal-too-3jg8</link>
      <guid>https://dev.to/badgamerbad/oh-my-posh-on-all-windows-terminals-vs-code-integrated-terminal-too-3jg8</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fim0wkykzvia9eqzooiwl.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fim0wkykzvia9eqzooiwl.png" alt="vs code integrated terminal with oh my posh" width="800" height="268"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Set Permission in Windows Powershell
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;also open the VS code and open the terminal and use the same command to set policy in the VS code terminal&lt;/p&gt;

&lt;h2&gt;
  
  
  Install the 'oh my posh'
&lt;/h2&gt;

&lt;p&gt;by either visiting &lt;a href="https://ohmyposh.dev/docs/installation/windows" rel="noopener noreferrer"&gt;this&lt;/a&gt; or use the below command.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;winget install JanDeDobbeleer.OhMyPosh -s winget
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Install fonts
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;oh-my-posh font install meslo
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;'meslo' worked well for all themes i tested, if the theme text is breaking try using other font&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Edit the terminal configs
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Modify the settings.json of the terminal
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;open the terminal as an admin user&lt;/li&gt;
&lt;li&gt;press CTRL + SHIFT + ,&lt;/li&gt;
&lt;li&gt;this will open or prompt to select your favorite editor for the 'settings.json'
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;"profiles": 
    {
        "defaults": {
            "font":
            {
                "face": "MesloLGM Nerd Font"
            }
        }
    ...
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;save it&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Modify the settings of VS code integrated terminal
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;go to File -&amp;gt; Preferences -&amp;gt; Settings &lt;/li&gt;
&lt;li&gt;search for &lt;a class="mentioned-user" href="https://dev.to/feature"&gt;@feature&lt;/a&gt;:terminal font&lt;/li&gt;
&lt;li&gt;add the font 'MesloLGM Nerd Font'&lt;/li&gt;
&lt;li&gt;save it (CTRL + S)&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Install the theme - [&lt;a href="https://ohmyposh.dev/docs/installation/customize" rel="noopener noreferrer"&gt;official documentation&lt;/a&gt;]
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Create a profile file
&lt;/h3&gt;

&lt;h4&gt;
  
  
  Create a new profile file manually
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;create a file&lt;/li&gt;
&lt;li&gt;rename it to &lt;code&gt;Microsoft.PowerShell_profile.ps1&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;move it to &lt;code&gt;C:\Users\&amp;lt;user-name&amp;gt;\OneDrive\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Automatically create a profile file
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;open the terminal&lt;/li&gt;
&lt;li&gt;create a new profile by running the following command
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;New-Item -Path $PROFILE -Type File -Force
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;this will create a file at
&lt;code&gt;C:\Users\&amp;lt;user-name&amp;gt;\OneDrive\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Add the content to the profile file
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;for example I'll use '1_shell' theme&lt;/li&gt;
&lt;li&gt;add the below line to the newly created profile file
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;oh-my-posh init pwsh --config 'https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/1_shell.omp.json' | Invoke-Expression
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;replace &lt;code&gt;1_shell.omp.json&lt;/code&gt; with the omp.json of the desired theme name

&lt;ul&gt;
&lt;li&gt;theme name can be found &lt;a href="https://github.com/JanDeDobbeleer/oh-my-posh/tree/main/themes" rel="noopener noreferrer"&gt;here&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;restart the terminal&lt;/li&gt;

&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; if no &lt;code&gt;--config&lt;/code&gt; flag is provided then the default theme will be used&lt;/p&gt;

&lt;p&gt;That's it, now you are a 10X developer 😝&lt;/p&gt;

</description>
      <category>windows</category>
      <category>powershell</category>
      <category>vscode</category>
    </item>
  </channel>
</rss>
