Skip to main content

i3wm essentials - II

Welcome back! Let's continue this guide with other setup essentials for i3.

Enabling Mousetap

Chances are that if you're using a laptop, then tapping on the mousepad does not equal a click for you. You need to enable tapping in your config.

Fortunately, there is one documentation available that works for majority of the setups. I don't need to explain this one in detail. Here you go: Enable tap to click in i3.

Volume Control

This one is simple again. Do you remember the i3 config file I talked about in the previous blog? All you need to do is go to that file and find the line:

bindsym XF86AudioRaiseVolume

Just below that line you will find lines with XF86AudioLowerVolume and XF86AudioMute too.
Anyway, the truth is, there are 2 sets of lines with these keywords.
Chances are that the line:

bindsym XF86AudioRaiseVolume exec --no-startup-id pactl -- set-sink-volume 0 +5%

Will be uncommented and the line:

bindsym XF86AudioRaiseVolume exec --no-startup-id pactl -- set-sink volume @DEFAULT_SINK@ +5%

will be commented. 
Comment out one line and uncomment the other one, and see what works for you.

In case neither works, the fallback to this is running alsamixer in terminal every time you need to modify the volume.

sudo apt install alsamixer 

Or

pacman -S alsamixer 

Yeah, it's not a great solution, tbh, but I suppose beyond this point, you need to go to the forums to get your answers.

Wifi

I apologize in advance if I piss off any i3 user for this. I'm not going to recommend any GUI here.
I have always preferred using nmcli, and I feel that with custom aliases, it's much easier to connect to different network connections.

nmcli is a command line tool for network management. Make sure you have it installed by running nmcli. Here's a short overview of the commands that you need for Wifi.
To list all available Wifi networks:

nmcli dev wifi list

After a specific interval, the available networks are scanned again. If you want to rescan now:

nmcli dev wifi rescan

And run nmcli dev wifi list again to check if your network is visible now.
To connect to a specific network, run:

nmcli dev wifi connect <network-name> password <password>

The network name is the same as the SSID (name, basically) of your Wifi in the wifi list. You don't need any quotes unless your password or network-name have any spaces.

Now you see, the password of your wifi network doesn't change very often, does it? So instead of typing all of this, you can save an alias in your bashrc file that does all of this work.

vim ~/.bashrc (or whatever location you have that file stored in)

Paste this line at the end:

alias conn="nmcli dev wifi connect <network-name> password <password>"

Now all you need to do is type conn in your terminal, and bam, you're connected. 
But sometimes, that bam doesn't work out. Maybe you need to use the rescan command.
So you can also add another alias:

alias rescan="nmcli dev wifi rescan"

I hope you're not using any package that uses conn or rescan commands. You can check that by running conn or rescan before making these changes in your .bashrc file. If that's the case, you have a zillion other words to go for. 

That's it. These are the only 2 commands I use to connect to the internet, optionally since most of the time it connects automatically.

Hope you found this blog useful. I will be back with the next blog in this series that talks about bluetooth and wallpapers in i3.

Comments

Popular posts from this blog

Namaste JavaScript Quick Notes

Note:  Akshay Saini's Namaste JavaScript is probably the best course for JavaScript developers out there. These are my personal notes that I made while watching the course; they serve more of as an online quick reference for my understanding and revision, and I hope it benefits anyone reading it too! Everything in JS happens inside an Execution Context. Before a JS code is run, memory is allocated and variables are set as undefined   , and functions are set as their exact code in the scope within the Execution Context. The global execution context hosts all the global variables and function definitions. An Execution Context has 2 components: Memory, that stores variables and functions; and Code, that reads and executes the code. Call Stack maintains the order of execution contexts. Since JS is single threaded and asynchronous, at one point of time, only one function is executed which is at the top of the call stack. For each function, an execution context is created before executi

i3wm essentials - I (Brightness)

So you have started using i3 and somehow managed to open your browser and almost resumed your normal work.  But wait, the brightness is too much isn't it? Or is it too low? The mousepad used to work fine, but now all of a sudden tapping does not equal click?!  Don't worry.  This blog series will tell you all about the essential setup commands and common shortcuts that I use to navigate my work in i3, and how you can too. Changing the brightness So you just started i3 and you just can't take this brightness setting. You go for your function keys, and damn! They aren't working. Quick fix: Run the following command if you need to change the brightness ASAP. xrandr -q | grep ' connected' | head -n 1 | cut -d ' ' -f1 This will give an ouput that's the name of your monitor.  Use that monitor name here and change the values of brightness to suit your needs. xrandr --output <monitor-name> --brightness 0.7 Now that your eyes are comfortable, let me show