Skip to content

An easy-to-install and easy-to-use of my dotfiles. It has config for the tools I use for my dev work such as terminal, window manager, IDE and fonts, as well as all of the useful shortcut keys and bindings I use on my system. I hope you enjoy using it. :)

Notifications You must be signed in to change notification settings

CharaD7/chara-dotfiles

Repository files navigation

sparkling star Beautiful Rice and More Configs sparkling star

🌟 🌟 Built with and inspired by great designs 🌟 🌟

Credit & Acknowledgement

I want to acknowledge these wonderful people for inspiring me to make this config. Some helped by providing the bootstrap of some components, some by suggesting better scripting styles and others by recommending fixes and the logic structure to how things work. Without them, this might not have been possible.

Name Support Socials
Sidhanth Rathod His riced dwm bootstrap called chadwm was my inspiration Sidhanth Rathod Sidhanth Rathod Sidhanth Rathod siduck
Gyen Abubakar Sadick Reviewed rices and made countless great suggestions Gyen Abubakar gyen abubakar gyenabubakar gyen abubakar
Alkis Georgopoulos Contributed greatly to the wal script for setting random wallpapers Alkis Georgopoulos alkisg

Install Guide

This script is made for Linux platform-based machines that utilize the aptitude package manager. Maybe some time later, I will consider releasing support for other package managers for Linux.

To install, simply run the folowing command:

curl https://raw.githubusercontent.com/CharaD7/chara-dotfiles/main/install.sh | sh

The document and config follows the structure below:

  • Git installation verification and setup
    • Git configuration on user confirmation
  • Installing NerdFonts
  • Installing and setting up the fish terminal
  • Installing and setting up the tmux terminal
  • Installing Sidhanth Rathod's bubbly widget on user confirmation
  • Installing and setting up neovim and neovide
  • Installing and setting up dwm

👮 Git 👮

git.mp4
After user permits the setup of git aliases, user will be able to execute several Git commands using abbreviated form or shortcuts
  • git init is aliased g i
  • git fetch is aliased g f
  • git clone is aliased g cl
  • git fetch origin +refs/pull/*/head:refs/remotes/origin/pr/* is aliased g pr
  • git remote add origin is aliased g rao
  • git remote set-url origin is aliased g rso
  • git commit -m {message} is aliased g acm {message}
  • git commit --amend -m {message} is aliased g aca {message}
  • git checkout is aliased g c
  • git config --get user.name is aliased g cn
  • git config --get user.email is aliased g ce
  • git checkout main is aliased g con
  • git checkout -b is aliased g cob
  • git checkout --orphan is aliased g co
  • git branch is aliased g b
  • git branch -r is aliased g br
  • git branch -m is aliased g brn
  • git branch -a is aliased g ba
  • git branch --merged is aliased g bm
  • git branch --no-merged is aliased g bn
  • git diff is aliased g df Note that this is an advance git diff that uses peco, hist and awk
  • git log --pretty=format:\"%Cgreen%h %Creset%cd %Cblue[%cn] %Creset%s%C(yellow)%d%C(reset)\" --graph --date=relative --decorate --al is aliased g hist
  • git log --graph --name-status --pretty=format:\"%C(red)%h %C(reset)(%cd) %C(green)%an %Creset%s %C(yellow)%d%Creset\" --date=relative is aliased g llog
  • git !hub browse is aliased g open
  • git remote -v is aliased g r
  • git remote rm origin is aliased g rmo
  • git branch -d is aliased g bd
  • git branch -D is aliased g bD
  • git push is aliased g p
  • git pull origin is aliased g pl
  • git pull --all is aliased g pa
  • git push origin main is aliased g pon
  • git pull origin main is aliased g plon
  • git push origin is aliased g po
  • git status is aliased g s
  • git push -f origin HEAD^:main is aliased g undopush
  • git merge main is aliased g mn
  • git merge is aliased g m
  • git reset --hard HEAD@{1} is aliased g undomerge
  • git reset --hard is aliased g undo
  • git reset HEAD {file} is aliased g unstage {file}

🍯 NerdFonts - [Nice ligature fonts] 🍯

NerdFonts is a home of great and beautiful wide range of fonts.

To give you the best of ligature feel and look, the following fonts have been used in this setup:
  • Caskaydia Cove NerdFont
  • Fira Code NerdFont
  • FiraCode iScript
  • Hurmit NerdFont Bonus Font that has not been used in this setup
  • Iosevka NerdFont
  • Jetbrains Mono NerdFont
  • MaterialDesignIconsDesktop Font
  • Roboto Mono NerdFont

These fonts can be located in the NerdFonts directory


🐟 Fish 🐟

fish.mp4

Fish shell is one of the best shells to use as a developer if VIM is your preferred IDE. It has been made such that there is a mode you can switch to in order to emulate VIM commands, making you the developer super-productive. To learn more about scripting with fish, kindly visit the docs.

After system reboots, you will need to run the following commands to install the packages listed below for the fish terminal.

    curl -sL https://raw.githubusercontent.com/jorgebucaran/fisher/main/functions/fisher.fish
    omf install z peco
    omf theme bobthefish
    fisher install jorgebucaran/fisher
    fisher install x-motemen/ghq
The fish config script installs a couple of packages to make your experience with fish seemless:
  • oh-my-fish My fish is not lost 😏
  • fisher - A package manager for fish
  • z - A directory jumper that can be installed using fisher
  • powerline-config - A python-based font patcher for terminals
  • bobthefish - A theme for the fish terminal
  • ghq - A repository organizer, very handy when you work with a lot of them and can't structure it easily.
  • exa - A mordern replacement for ls with rich features
  • peco - A fuzzy finder plugin for fish terminal

NB: Go to the fish config's aliases to see which aliases are registered for the fish shell. To emulate vim movement and Visual key bindings, hit the <Escape> key. Hit i to get back into edit mode


📟 TMUX 📟

fish-tmux Tmux preview

tmux is a terminal multiplexer, allowing you to switch between several programs, detach and reattach them in different programs, it proves to be one of the best terminals out there. to know more about it and how to easily navigate your way while using it, see the docs. This repo's tmuxConfig script comes with powerline fonts and a script to run and configure tmux to have the status bar as you see it in the above picture. To know more about the key combinations, I recommend using the section on key moodifiers. However, the setup comes with predefined key bindings you may want to take a look at the tmux conf file.


🌕 Neovide - [No nonsense IDE] 🌕

neovide Neovide preview

neovide.mp4

Neovide is a no-nonsense, cross-platform graphical user interface for Neovim (an awesome IDE that is open source and seeks to aggresively refactor VIM). Supporting a lot of very cool features, it promises a wonderful future of an extensible, yet, very stable IDE for vimmers like myself. The Neovide graphical user interface though intuitive, does not work on its own, it needs a Neovim init.lua or init.vim file to work and so you may want to consider having that before using this beauty 😎 That said, this nvimConfig comes with some features of Neovide configured to make your experience using the IDE awesome ✨

Below is a list of the features enabled and how they are used:
  • Ligature Support (enabled by default)
  • Animated Cursor - vim.g.neovide_cursor_animation_length = 0.13 (set to 0.13seconds)
  • Animated Cursor Particles - vim.g.neovide_curosr_vfx_mode = "railgun" (Leave animated particles anytime cursor jumps around)
  • Smooth Scrolling - (enabled by default)
  • Animated Windows - (enabled by default)
  • Transparency - vim.g.neovide_transparency = 0.8 *(you can increase the opacity as you like it)
  • Blurred Floating Windows - vim.g.neovide_floating_blur_amount_x = 4.0 and vim.g.neovide_floating_blur_amount_y = 4.0
  • Emoji Support - (enabled by default)
  • IDE Paddings - vim.g.neovide_padding_[direction] = 10 (substitute [direction] for top, bottom, left and right)

You can take a peek at the features enabled using the permalink

NB: I have enabled autosave on every edit and on focus lost by default in this config. If it is bothersome to you, come to this block and comment it out.


💎 DWM - [Tiling Window Manager] 💎

DWM (Dynamic Window Manager) is a window manager for X. It displays windows in several layouts such as tiled, monocle and floating. It is more convenient to use though requires some work if you need it to look beautiful and want to use your custom keybindings to invoke certain calls or programs. There are several patches available on the suckless site that can be added to the config to suit user's taste.

Configuration files for dwm can be found in your ~/.config/dwm/ directory. In there you should see a scripts folder which contains bar, bubbly, fetch, run.sh and wal scripts. In addition to these, there is the bar_themes directory.

  • The wall script changes the desktop wallpaper after every 20 minutes. You can change the duration here
  • The bubbly script houses methods for calling the chat and keystroke widgets
  • The bar script contains methods for the tasks on the status bar. You can add to it if you wish.
  • The run.sh script is what gets executed anytime dwm starts

There is provision for extended display in the run.sh script and in the config.def.h. Configuration files for dwm can be found in your ~/.config/dwm/ directory. You may want to take a look at it to know where to set your display in case you have an extended display on. By default, the run.sh script launches dwm with the screen extended to the monitor on the right.

DWM key combinations

Let us look at how we can move around and call up applications we need in this dwm config.

There are certain things you need to be aware of in the config.def.h folder which you can locate at ~/.config/dwm/dwm/config.def.h

  • You can set border of your windows to 0 on this line so they are not visible.
  • You can set a different theme for your topbar on this line.
  • If you have more launchers you want to add to the topbar, you can add them on this line.
  • Layouts for your window manager can be found here
  • MODKEY is basically your logo or windows key.
  • ControlMask is your Ctrl key.
  • ShiftMask is your Shift key.
  • Mod1Mask is your Alt key.

NB: You can set extra keys like the Right Ctrl and Right Shift Keys to be distinct from their left counterparts.

Keyboard keys

  • Logo+c invokes rofi -show drun. You can change it here
  • The audio and brightness keys are set here. You can change them as you wish.
  • Logo+r invokes rofi -show run. You can change it here
  • Logo+Return or Logo+Enter invokes the suckless terminal. In this case, I prefer to use tmux so I set it to st tmux. You can change it here.
  • Logo+Shift+Space toggles a window to float in the screen. You can change it here
  • Logo+b toggles on and off the topbar visibility. You can change it here
  • Logo+f toggles window fullscreen mode. You can change it here
  • Logo+Left and Logo+Right switches views to the left and right workspace respectively. You can change it here
  • Logo+Shift+j and Logo+Shift+k moves window stacks left and right respectively. You can change that here
  • Logo+Ctrl+i and Logo+Ctrl+d increases and decreases the overall gaps between the windows respectively. You can change it here
  • Logo+Shift+i and Logo+Ctrl+Shift+i increases and decreases the inner gaps between windows respectively. You can change it here
  • Logo+Ctrl+o and Logo+Ctrl+Shift+o increases and decreases the outer gaps between windows. You can change it here
  • Logo+Shift+, moves current window to the next display on the left. You can change that here
  • Logo+Shift+. moves current window to the next display on the right. You can change that here
  • Logo+Ctrl+q kills dwm completely. You can change it here
  • Logo+q kills the current window client. You can change it here
  • Logo+e hides current window. You can change it here
  • *Logo+Shift+e unhides hidden window. You can change it here
  • Logo+number (in this case, 1 to 9) switches the view to that workspace number. You can change that here
  • Logo+Ctrl+p changes current wallpaper. You can change it here
  • Logo+Ctrl+l puts the machine in suspended state. You can change it here
  • Logo+Ctrl+r reboots the machine. You can change it here
  • Logo+Ctrl+s shuts down the machine. You can change it here
  • Logo+Alt+Left spans left monitor display. You can change it here
  • Logo+Alt+Right spans right monitor display. You can change it here
  • Logo+comma focuses left monitor display. You can change it here
  • Logo+period focuses right monitor display. You can change it here
  • Logo+Shift+comma moves current focus window to left display. You can change it here
  • Logo+Shift+period moves current focus window to right display. You can change it here
  • Logo+Ctrl+c invokes the chat bubble widget. You can change it here
  • Logo+Ctrl+k invokes the keystroke bubble widget. You can change it here
  • Logo+Ctrl+Shift+c kills the chat bubble widget. You can change it here
  • Logo+Ctrl+Shift+k kills the keystroke bubble widget. You can change it here

Mouse keys

  • Logo+Leftclick moves a floating window. You can change it here
  • Logo+Rightclick resizes a floating window. You can change it here

NB:

  1. You need to hold the mouse buttons down together with the Logo button while performing mouse actions.
  2. If you make a change to the config.def.h file, you will need to recompile it by running sudo make clean install and run Logo+Shift+r to reload your dwm.
Included in this config are the following plugins:
  • picom - for managing rounded corners and opacity of windows
  • rofi - a window switcher, application launcher and replacement for dmenu
  • eww - Elkowar's Wacky Widgets for dwm
  • bubbly - (concept made from siduck's bubbly widget)
  • dashboard - (concept made from siduck's chadwm riced dwm)

NB: You may have to reconfigure your bubbly and dashboard to work perfectly based on your display. I had to reconfigure bubbly and dashboard before I got them to work as my inspiration's but thankfully enough, I have highlighted where the changes can be made and how to change the values as you would like.

(I really thank Sidhanth Rathod for inspiring me to make with this compilation. You are such a beautiful gem.)

Picom

picom Picom windows preview

The picom plugin will automatically be saved to your ~/.config/picom directory, as such, any changes you wish to make to the window transparency, blur or corners should be done in the ~/.config/picom/picom.conf file. You can also make changes to the animation of windows in the same file. Here is a highlight of what you can change in picom

Rofi

rofi-run rofi -show run

rofi-drun rofi -show drun

Rofi is a window switcher application that works on basically any X11 display manager. It is included in this config to allow users launch applications and run scripts from a mini-window. There is a config.rasi for every rofi application that specifies the looks and behaviour of rofi modes. After running the install.sh, you will locate the config file in ~/.config/rofi/config.rasi. In addition to this, you will find a directory in the rofi directory called themes which has a couple of themes from which you can choose to set for your rofi application. Here are the options available to use and modify in this rofi config.

Themes

Rofi config

Go to the rofi config to have a quick look at how things are structured in there to be well-informed of your decision to make changes to the rofi application. Feel free to skip taking a peek if you are already familiar with configuring rofi.

EWW

EWW (Elkowar's Wacky Widgets for dwm) is a stress-free way to create your own widgets in dwm. It uses eww.yuck as its configuration file and eww.scss as its stylesheet configuration. Two plugins were used in this config (bubbly, and dashboard).

Bubbly config

chat.mp4
keystroke.mp4

Bubbly is a chat-like widget that displays keystrokes as chat bubbles. There are two modes, the chat mode, and the keystroke mode. The above videos demonstrate the use of each mode. The script saves bubbly desktop to your /usr/share/applications/ directory.

The keystrokes file is where keystroke limit and theme is set. It is stored in your ~/.config/bubbly/ directory. The keycodes is where your keycodes are set. The keycodes in here may be different from yours aside the basic alphabet and number keys. To know and set the keycodes for your audio control keys, run xmodmap -pK | grep -i audio. This will show you what keycodes are used for your audio keys so you can map them in the keycodes file. This file will be located in your ~/.local/share/bubbly/ directory.

For example, if I want to know the keycode to my audio mute key, this is what it is going to look like.

  • I first run the command
     xmodmap -pk | grep -i audio
  • I get this output
 121         0x1008ff12 (XF86AudioMute)      0x0000 (NoSymbol)       0x1008ff12 (XF86AudioMute)
 122         0x1008ff11 (XF86AudioLowerVolume)       0x0000 (NoSymbol)       0x1008ff11 (XF86AudioLowerVolume)
 123         0x1008ff13 (XF86AudioRaiseVolume)       0x0000 (NoSymbol)       0x1008ff13 (XF86AudioRaiseVolume)
 171         0x1008ff17 (XF86AudioNext)      0x0000 (NoSymbol)       0x1008ff17 (XF86AudioNext)
 172         0x1008ff14 (XF86AudioPlay)      0x1008ff31 (XF86AudioPause)     0x1008ff14 (XF86AudioPlay)      0x1008ff31 (XF86AudioPause)
 173         0x1008ff16 (XF86AudioPrev)      0x0000 (NoSymbol)       0x1008ff16 (XF86AudioPrev)
 174         0x1008ff15 (XF86AudioStop)      0x1008ff2c (XF86Eject)  0x1008ff15 (XF86AudioStop)      0x1008ff2c (XF86Eject)
 175         0x1008ff1c (XF86AudioRecord)    0x0000 (NoSymbol)       0x1008ff1c (XF86AudioRecord)
 176         0x1008ff3e (XF86AudioRewind)    0x0000 (NoSymbol)       0x1008ff3e (XF86AudioRewind)
 198         0x1008ffb2 (XF86AudioMicMute)   0x0000 (NoSymbol)       0x1008ffb2 (XF86AudioMicMute)
 208         0x1008ff14 (XF86AudioPlay)      0x0000 (NoSymbol)       0x1008ff14 (XF86AudioPlay)
 209         0x1008ff31 (XF86AudioPause)     0x0000 (NoSymbol)       0x1008ff31 (XF86AudioPause)
 215         0x1008ff14 (XF86AudioPlay)      0x0000 (NoSymbol)       0x1008ff14 (XF86AudioPlay)
 216         0x1008ff97 (XF86AudioForward)   0x0000 (NoSymbol)       0x1008ff97 (XF86AudioForward)
 221         0x1008ffb6 (XF86AudioPreset)    0x0000 (NoSymbol)       0x1008ffb6 (XF86AudioPreset)
 234         0x1008ff32 (XF86AudioMedia)     0x0000 (NoSymbol)       0x1008ff32 (XF86AudioMedia)

As you can see, the AudioMute button's keycode is the very first on the list, now, we need to make sure it is the same keycode for the readable part like XF86AudioMute in the keycodes file. On this line, you can see that the keycode matches with what was printed in my terminal. If you what you see in your terminal does not match what is in the keycode file, please modify it to match that of the terminal. You can grep match any other key to get its exact keycodes to use.

Dashboard config

dashboard.mp4

The dashboard widget serves as a control panel for dwm. You can control your audio and brightness levels, know a summary of your hard disk size, your OS, the window manager and the current date and time. It is called in the config.def.h file which can be located in your ~/.config/dwm/dwm/config.def.h directory. It is hooked to the launcher defined on line 97. Configuration files for the dashboard can be found here. The var.yuck file defines the various objects in the eww widget and how long it takes for their values to be updated when triggered. Below are styles and script hotlinks for the dashboard:

The Styles

The theme for the dashboard is set in the eww.scss file

The Scripts

  • The system script contains scripts for executing package update, battery, cpu, ram, backlight, wifi, power and disk.
  • The fetch sccript contains methods for displaying OS, window manager and shell information.
  • The audio script contains methods for executing audio level control

By default, you should have amixer installed so it is not included in the install script. If you use a different audio mixer, you may want to consider editing the audio script and setting your mixer in place of amixer


Hello, I am Chara. If you find this helpful, please do share. If you need to get in touch with me by all means, you can connect with me on Telegram, Twitter, LinkedIn and on Discord


About

An easy-to-install and easy-to-use of my dotfiles. It has config for the tools I use for my dev work such as terminal, window manager, IDE and fonts, as well as all of the useful shortcut keys and bindings I use on my system. I hope you enjoy using it. :)

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published