<?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: Swastik Dwivedi</title>
    <description>The latest articles on DEV Community by Swastik Dwivedi (@drunckj).</description>
    <link>https://dev.to/drunckj</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%2F695076%2Fd12191d7-5fab-4a5a-9828-6f34c36af16b.jpeg</url>
      <title>DEV Community: Swastik Dwivedi</title>
      <link>https://dev.to/drunckj</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/drunckj"/>
    <language>en</language>
    <item>
      <title>Setting up Code Formatting with ESLint, TypeScript, and Prettier in Visual Studio Code</title>
      <dc:creator>Swastik Dwivedi</dc:creator>
      <pubDate>Wed, 25 Oct 2023 13:40:44 +0000</pubDate>
      <link>https://dev.to/drunckj/setting-up-code-formatting-with-eslint-typescript-and-prettier-in-visual-studio-code-44an</link>
      <guid>https://dev.to/drunckj/setting-up-code-formatting-with-eslint-typescript-and-prettier-in-visual-studio-code-44an</guid>
      <description>&lt;p&gt;Ensure your code is consistently formatted in Visual Studio Code by following these steps.&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Install VS Code Extensions
&lt;/h3&gt;

&lt;p&gt;To enhance your development experience, install the following extensions in Visual Studio Code:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode"&gt;Prettier - Code formatter&lt;/a&gt; : Prettier will help format your code automatically.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://marketplace.visualstudio.com/items?itemName=BdSoftware.format-on-auto-save"&gt;Format on auto save&lt;/a&gt; : This extension enables code formatting on auto-save.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  2. Configure VS Code for Auto Formatting
&lt;/h3&gt;

&lt;p&gt;You can configure Visual Studio Code for auto-formatting by following these steps:&lt;/p&gt;

&lt;p&gt;Open your command palette (Command + Shift + P) or Ctrl+Shift+P.&lt;/p&gt;

&lt;p&gt;Look for "Preferences: Open User Settings (JSON)" and paste the following key value pairs at the end:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;  &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;editor.codeActionsOnSave&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;source.fixAll&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;
  &lt;span class="p"&gt;},&lt;/span&gt;
  &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;editor.defaultFormatter&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;esbenp.prettier-vscode&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;editor.formatOnSave&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;files.autoSave&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;afterDelay&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  3. Install dependencies in the source folder
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm i &lt;span class="nt"&gt;-D&lt;/span&gt; @typescript-eslint/eslint-plugin @typescript-eslint/parser eslint eslint-config-prettier prettier typescript
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  4. Create new file &lt;code&gt;.eslintrc&lt;/code&gt; with the below config
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;parser&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;@typescript-eslint/parser&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;parserOptions&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;ecmaVersion&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;12&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;sourceType&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;module&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
  &lt;span class="p"&gt;},&lt;/span&gt;
  &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;plugins&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;@typescript-eslint&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
  &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;extends&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
    &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;eslint:recommended&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;plugin:@typescript-eslint/recommended&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;prettier&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
  &lt;span class="p"&gt;],&lt;/span&gt;

  &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;rules&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;@typescript-eslint/no-unused-vars&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;error&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;@typescript-eslint/consistent-type-definitions&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;error&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;type&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
  &lt;span class="p"&gt;},&lt;/span&gt;

  &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;env&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;browser&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;es2021&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  5. Create new file &lt;code&gt;.prettierrc&lt;/code&gt; with the below config
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;singleQuote&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;tabWidth&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;semi&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;trailingComma&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;all&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;useTabs&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  6. Restart vscode to load changes
&lt;/h3&gt;

</description>
      <category>typescript</category>
      <category>eslint</category>
      <category>prettier</category>
      <category>javascript</category>
    </item>
    <item>
      <title>Switching to Pipewire-Opensuse[GUIDE]</title>
      <dc:creator>Swastik Dwivedi</dc:creator>
      <pubDate>Fri, 24 Sep 2021 15:22:59 +0000</pubDate>
      <link>https://dev.to/drunckj/switching-to-pipewire-opensuse-guide-1cop</link>
      <guid>https://dev.to/drunckj/switching-to-pipewire-opensuse-guide-1cop</guid>
      <description>&lt;p&gt;I recently switched to &lt;strong&gt;pipewire&lt;/strong&gt; on my Opensuse build and I'm loving it so far. I switched over to &lt;strong&gt;pipewire&lt;/strong&gt; because it fixes a lot of pulseaudio issues which I've faced in the past. &lt;strong&gt;Pipewire&lt;/strong&gt; is really new and still in the works and its more upto date for recent hardwares and bluetooth peripherals.&lt;/p&gt;

&lt;h3&gt;
  
  
  Automatic way
&lt;/h3&gt;

&lt;p&gt;I've made a &lt;a href="https://github.com/drunckj/Asus-ESS"&gt;script&lt;/a&gt; which has does other stuff but has an option for switching to pipewire without much hassle. Clone it and run it and enter the correct option.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git clone https://github.com/drunckj/Asus-ESS
cd Asus-ESS/
./setupscript.sh
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Manual way
&lt;/h3&gt;

&lt;p&gt;First we need to install all the necessary files&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo zypper install pipewire pipewire-pulseaudio pipewire-alsa
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It will show and errors about conflicts you should select option 1 to fix the issue which reads de-installation.&lt;br&gt;
After doing so we successfully managed to install pipewire on our device. &lt;br&gt;
Now we need to start pipewire and its sockets on boot.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;systemctl --user enable --now pipewire.{service,socket}
systemctl --user enable --now pipewire-pulse.{service,socket}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After running the above commands, you should reboot.&lt;br&gt;
To check if pipewire is up and running, run the following command.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;pactl info
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Look for server name in output. If it shows &lt;br&gt;
&lt;strong&gt;Server Name: PulseAudio (on PipeWire)&lt;/strong&gt;&lt;br&gt;
congratulations your pipewire is working.&lt;br&gt;
If it still shows pulseaudio, look into troubleshooting.&lt;/p&gt;
&lt;h3&gt;
  
  
  Troubleshooting
&lt;/h3&gt;

&lt;p&gt;Sometimes pipewire doesn't generate config files so we have to move them to the right location. This can cause the bluetooth to not work too. Follow the below steps for fixing it.&lt;/p&gt;

&lt;p&gt;If your having errors check if the below directory exists&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/etc/pipewire
~/.config/pipewire
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If they don't exist, do the following and reboot and check again by running pactl info again.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo cp -r /usr/share/pipewire /etc/
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The above command will move the config files to their default locations.&lt;/p&gt;

</description>
      <category>opensuse</category>
      <category>pipewire</category>
      <category>linux</category>
    </item>
    <item>
      <title>Fix No Video and Sound Output Through HDMI In Linux</title>
      <dc:creator>Swastik Dwivedi</dc:creator>
      <pubDate>Tue, 31 Aug 2021 17:34:34 +0000</pubDate>
      <link>https://dev.to/drunckj/fix-no-video-and-sound-output-through-hdmi-in-linux-2e76</link>
      <guid>https://dev.to/drunckj/fix-no-video-and-sound-output-through-hdmi-in-linux-2e76</guid>
      <description>&lt;p&gt;The other day, I connected my Asus Rog G531-GT running Opensuse Tumbleweed with my TV to watch a movie. To my surprise, there was no output through HDMI in TV. The laptop couldn't detect any connected HDMI output device. After fixing the HDMI output device detection, my HDMI sound device showed as unplugged. So I decided to write a blog about it as I had to search a lot to find the fix for it.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.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%2F18hy14gcrninpejfte7o.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2F18hy14gcrninpejfte7o.png" alt="Unplugged"&gt;&lt;/a&gt; &lt;/p&gt;

&lt;h2&gt;
  
  
  Why this happens:
&lt;/h2&gt;

&lt;h3&gt;
  
  
  For Video
&lt;/h3&gt;

&lt;p&gt;This usually happens in optimus systems(Has two GPUs: Integrated intel gpu and dedicated Nvidia gpu) &lt;br&gt;
In such machines, the HDMI port is connected directly to the dedicated GPU. Therefore, when u turn off your D-GPU either from the BIOS or using gfx tools such as bb-switch, pop-graphics-switch, asusctl, optimus-manager etc, the HDMI port gets turned off. Therefore, no output device is detected. &lt;/p&gt;

&lt;h3&gt;
  
  
  For Sound
&lt;/h3&gt;

&lt;p&gt;This happens due to an old set of rules for Dynamic power management of Nvidia audio device. The latest kernel now manages those parts fine and doesn't need the explicit rule anymore.&lt;/p&gt;

&lt;h2&gt;
  
  
  Fix
&lt;/h2&gt;

&lt;h3&gt;
  
  
  For Video
&lt;/h3&gt;

&lt;p&gt;To fix no video output you need to turn on your D-GPU either from BIOS(if your motherboard supports it) or using any gfx tool that you use to switch to hybrid or dedicated GPU mode. &lt;/p&gt;

&lt;h3&gt;
  
  
  For Sound
&lt;/h3&gt;

&lt;p&gt;The rule file would exist either here :&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

/usr/lib/udev/rules.d/90-nvidia-udev-pm-G05.rules


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;or &lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

/etc/udev/rules.d/90-nvidia-udev-pm-G05.rules


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Open this file with your favourite editor and search for these entries: &lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

# Remove NVIDIA USB xHCI Host Controller devices, if present
ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x0c0330", ATTR{remove}="1"

# Remove NVIDIA USB Type-C UCSI devices, if present
ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x0c8000", ATTR{remove}="1"

# Remove NVIDIA Audio devices, if present
ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x040300", ATTR{remove}="1"



&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Comment these lines by adding a "#" infront of these lines like this :&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

# Remove NVIDIA USB xHCI Host Controller devices, if present
#ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x0c0330", ATTR{remove}="1"

# Remove NVIDIA USB Type-C UCSI devices, if present
#ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x0c8000", ATTR{remove}="1"

# Remove NVIDIA Audio devices, if present
#ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x040300", ATTR{remove}="1"


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Save the file and reboot. After reboot open settings and go into sound and select HDMI from output devices&lt;br&gt;
&lt;a href="https://media.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%2F53ikor48k5yn13wu9qkh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.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%2F53ikor48k5yn13wu9qkh.png" alt="HDMI SOUND"&gt;&lt;/a&gt;&lt;br&gt;
And you should have both video and sound output through your HDMI.&lt;/p&gt;

&lt;p&gt;Hope it helps someone.&lt;/p&gt;

&lt;h5&gt;
  
  
  Want to buy me a coffee : &lt;a href="https://www.paypal.com/paypalme/drunkcj" rel="noopener noreferrer"&gt;Paypal&lt;/a&gt; || &lt;a href="https://drunckj.github.io/drunkcj-crypto-donation/" rel="noopener noreferrer"&gt;Crypto(preferred)&lt;/a&gt;
&lt;/h5&gt;

</description>
      <category>linux</category>
      <category>ubuntu</category>
      <category>nvidia</category>
      <category>hdmi</category>
    </item>
    <item>
      <title>I created Pycowin: An app which alerts you when vaccine slots are available in your area</title>
      <dc:creator>Swastik Dwivedi</dc:creator>
      <pubDate>Tue, 31 Aug 2021 16:04:46 +0000</pubDate>
      <link>https://dev.to/drunckj/i-created-pycowin-an-app-which-alerts-you-when-vaccine-slots-are-available-in-your-area-3d6k</link>
      <guid>https://dev.to/drunckj/i-created-pycowin-an-app-which-alerts-you-when-vaccine-slots-are-available-in-your-area-3d6k</guid>
      <description>&lt;p&gt;Indian Government is providing free vaccines to all of its citizens. India is very densely populated and its very hard to vaccinate everyone at once. Therefore, Indian government created Cowin portal through which you can book a slot for your vaccination. But due to the high demand its very tough to book a slot because the slots are updated throughout the day and are booked within seconds. &lt;/p&gt;

&lt;p&gt;I too had to book a vaccination appointment for myself and had to check the website every now and then. I got tired of doing this, then I decided to create &lt;strong&gt;Pycowin&lt;/strong&gt;.&lt;/p&gt;




&lt;h1&gt;
  
  
  Pycowin
&lt;/h1&gt;

&lt;p&gt;&lt;strong&gt;Pycowin&lt;/strong&gt; searches for slots every ten minutes and alerts you whenever vaccination slots are available at the selected location. It sends a desktop notification as well as plays an audio track "Vaccines found" on successful searches.&lt;/p&gt;

&lt;p&gt;The app is written using &lt;strong&gt;Cowin&lt;/strong&gt; apis, &lt;strong&gt;Python&lt;/strong&gt; and &lt;strong&gt;Qt&lt;/strong&gt; libraries and is completely opensource. You can either download the binary executable or  just run it from source. The app is packaged for Linux and Windows with all of its dependencies included.&lt;/p&gt;

&lt;h3&gt;
  
  
  Github : &lt;a href="https://github.com/drunckj/Pycowin"&gt;Pycowin&lt;/a&gt;
&lt;/h3&gt;

&lt;h2&gt;
  
  
  Screenshots
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Windows
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--lZukzc1a--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://user-images.githubusercontent.com/50874358/131214892-7a4a0e49-dfd8-435a-8c7d-f0bd8044b728.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--lZukzc1a--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://user-images.githubusercontent.com/50874358/131214892-7a4a0e49-dfd8-435a-8c7d-f0bd8044b728.png" alt="Windows" width="730" height="859"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Linux
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Np25MehU--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://user-images.githubusercontent.com/50874358/131214934-8c88f087-cd19-4d8d-8523-02f0e0171825.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Np25MehU--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://user-images.githubusercontent.com/50874358/131214934-8c88f087-cd19-4d8d-8523-02f0e0171825.png" alt="Linux" width="800" height="929"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Notifications
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Windows
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--udai1O-C--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://user-images.githubusercontent.com/50874358/131215136-3fcd3ba7-3c19-4aa1-9377-895d6877b8bb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--udai1O-C--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://user-images.githubusercontent.com/50874358/131215136-3fcd3ba7-3c19-4aa1-9377-895d6877b8bb.png" alt="windows" width="800" height="447"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Linux
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--S6pCnAL1--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://user-images.githubusercontent.com/50874358/131215051-24888252-68ff-4ff8-9d29-2d7f13897363.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--S6pCnAL1--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://user-images.githubusercontent.com/50874358/131215051-24888252-68ff-4ff8-9d29-2d7f13897363.png" alt="Linux notification" width="800" height="449"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Installation
&lt;/h1&gt;

&lt;h3&gt;
  
  
  Windows and Linux
&lt;/h3&gt;

&lt;p&gt;Download the respective zip file from &lt;a href="https://github.com/drunckj/Pycowin/releases/tag/pycowin_0.1"&gt;releases&lt;/a&gt;.Extract and directly run from there.&lt;/p&gt;

&lt;h4&gt;
  
  
  Running from terminal
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;cd &amp;lt;extracted_folder_name&amp;gt;
./pycowin
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Running from source
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Requirements
&lt;/h3&gt;

&lt;h4&gt;
  
  
  Windows
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;pip install pyqt5 requests win10toast playsound
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Linux
&lt;/h4&gt;

&lt;h3&gt;
  
  
  Requirements
&lt;/h3&gt;

&lt;p&gt;spd-say : it is usually found in all distros by default. If not found install from your package manager&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;pip3 install requests PyQt5
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Running
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git clone https://github.com/drunckj/Pycowin.git
cd Pycowin/src/&amp;lt;windows or linux&amp;gt;
python3 pycowin.py
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Want to buy me a coffee : &lt;a href="https://www.paypal.com/paypalme/drunkcj"&gt;Paypal&lt;/a&gt; || &lt;a href="https://drunckj.github.io/drunkcj-crypto-donation/"&gt;Crypto(preferred)&lt;/a&gt;
&lt;/h2&gt;

</description>
      <category>python</category>
      <category>linux</category>
      <category>opensource</category>
      <category>api</category>
    </item>
    <item>
      <title>Asus-ESS : Easy setup script for setting up laptops after GNU/Linux installs</title>
      <dc:creator>Swastik Dwivedi</dc:creator>
      <pubDate>Sat, 28 Aug 2021 17:53:22 +0000</pubDate>
      <link>https://dev.to/drunckj/asus-ess-easy-setup-script-for-setting-up-laptops-after-gnu-linux-installs-3o67</link>
      <guid>https://dev.to/drunckj/asus-ess-easy-setup-script-for-setting-up-laptops-after-gnu-linux-installs-3o67</guid>
      <description>&lt;h1&gt;
  
  
  Github : &lt;a href="https://github.com/drunckj/Asus-ESS" rel="noopener noreferrer"&gt;Asus-ESS&lt;/a&gt;
&lt;/h1&gt;

&lt;p&gt;I Distrohop a lot and I found myself doing all this stuff manually which eventually got tiresome. So I created this script to help other Distrohoppers and new Linux users for easy setup and fixing of common issues.&lt;/p&gt;

&lt;h1&gt;
  
  
  Features of script
&lt;/h1&gt;

&lt;h4&gt;
  
  
  It takes backup before manipulating stuff for easy recovery
&lt;/h4&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fraw.githubusercontent.com%2Fdrunckj%2FAsus-ESS%2Fmaster%2Fscreenshots%2Fmainmenu.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fraw.githubusercontent.com%2Fdrunckj%2FAsus-ESS%2Fmaster%2Fscreenshots%2Fmainmenu.png" alt="Main menu"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Supported Package managers
&lt;/h1&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fraw.githubusercontent.com%2Fdrunckj%2FAsus-ESS%2Fmaster%2Fscreenshots%2Fpkgmgr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fraw.githubusercontent.com%2Fdrunckj%2FAsus-ESS%2Fmaster%2Fscreenshots%2Fpkgmgr.png" alt="Package Manager"&gt;&lt;/a&gt;&lt;br&gt;
On running the script for the first time, it will ask for your package manager.&lt;/p&gt;

&lt;h2&gt;
  
  
  Asusctl: only for Asus laptops
&lt;/h2&gt;

&lt;p&gt;It will install Asusctl which is a tool developed for Asus laptops as an alternative of Armourycrate which used in Windows. It manages CPU profiles, fans, RGBs and a lot more. So if you have never heard about Asusctl, here is a link for it : &lt;a href="https://asus-linux.org/asusctl/" rel="noopener noreferrer"&gt;Asusctl&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Mic not working option
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fuser-images.githubusercontent.com%2F50874358%2F131223833-020af799-253a-4a28-b40b-dc68db0cd09b.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fuser-images.githubusercontent.com%2F50874358%2F131223833-020af799-253a-4a28-b40b-dc68db0cd09b.png" alt="Mic not working"&gt;&lt;/a&gt;&lt;br&gt;
Many a times some Linux Distros have an issue of determining your codec. This option prints your codec and gives u a link to check what codec you would require for proper functioning of your microphone.&lt;/p&gt;

&lt;h2&gt;
  
  
  Mount Ntfs partitions at boot
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fuser-images.githubusercontent.com%2F50874358%2F131224011-8c02df9f-b80f-4fd6-9330-682e4734035d.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fuser-images.githubusercontent.com%2F50874358%2F131224011-8c02df9f-b80f-4fd6-9330-682e4734035d.png" alt="ntfs partition"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fuser-images.githubusercontent.com%2F50874358%2F131224010-8f26ae07-b3d3-4067-b220-08f355ab071a.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fuser-images.githubusercontent.com%2F50874358%2F131224010-8f26ae07-b3d3-4067-b220-08f355ab071a.png" alt="Ntfspartition"&gt;&lt;/a&gt;&lt;br&gt;
Dual booting a laptop has its own issues. Many a times Windows causes issues with mounting NTFS partitions under Linux. This option gives you an easy approach to mount your partitions at boot without going through the wiki. &lt;/p&gt;

&lt;h2&gt;
  
  
  Squeeze Maximum Battery life
&lt;/h2&gt;

&lt;p&gt;Most Linux distros ship with Tlp by defaullt as it helps save power and minimize heating up under loads. This options installs a Tlp configuration file which is customized for saving power on laptops with an igpu and dgpu. It also installs a systemctl service file which puts pci to powersaving mode.&lt;/p&gt;

&lt;h2&gt;
  
  
  Cache and unused dependencies
&lt;/h2&gt;

&lt;p&gt;I love Linux but sometimes I find myself in dependency hell when things don't uninstall along with their dependencies. This option helps take care of that. It uninstalls dependency packages left after removal of applications.&lt;/p&gt;

&lt;h2&gt;
  
  
  Pulseffects presets
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fraw.githubusercontent.com%2Fdrunckj%2FAsus-ESS%2Fmaster%2Fscreenshots%2Fpresets.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fraw.githubusercontent.com%2Fdrunckj%2FAsus-ESS%2Fmaster%2Fscreenshots%2Fpresets.png" alt="pulseffects"&gt;&lt;/a&gt;&lt;br&gt;
Audio under Linux can be a lot customizable which might overwhelm some people. This script installs the most useful and generic presets for getting good quality sound output from your machines.&lt;/p&gt;

&lt;h2&gt;
  
  
  Mic input key not working
&lt;/h2&gt;

&lt;p&gt;This option is only for Asus laptops. The issue is that the current keycode being emitted by the driver is only recognised by Wayland. X11 and desktops using X11 require F20 to be emitted. This option creates a new key and registers it in the hardware database.&lt;/p&gt;

&lt;h2&gt;
  
  
  Nvidia modules not loading in opensuse after update
&lt;/h2&gt;

&lt;p&gt;Due to opensuse's rolling nature the kernel gets updated regularly but the nvidia kernel modules are not loaded up with the new kernel. This option re-installs the kernel modules.&lt;/p&gt;

&lt;h3&gt;
  
  
  Want to buy me a coffee : &lt;a href="https://www.paypal.com/paypalme/drunkcj" rel="noopener noreferrer"&gt;Paypal&lt;/a&gt; || &lt;a href="https://drunckj.github.io/drunkcj-crypto-donation/" rel="noopener noreferrer"&gt;Crypto(preferred)&lt;/a&gt;
&lt;/h3&gt;

</description>
      <category>linux</category>
      <category>bash</category>
      <category>opensource</category>
    </item>
  </channel>
</rss>
