Code Monkey home page Code Monkey logo

dotfiles's Introduction

My Dotfiles

This is my dotfiles repository. You can learn more about dotfiles here.

I use Ansible for better flexibility. The main Ansible tasks are located in roles/dotfiles/tasks.

Requirements

# install latest version of pip in `~/.local`
$ python -m ensurepip --upgrade
$ python -m pip install --upgrade pip

# install packaging module (required by ansible-galaxy)
$ python -m pip install --upgrade packaging

# install ansible and required collections
$ sudo pacman -S ansible
$ ansible-galaxy collection install git+https://github.com/kewlfft/ansible-aur.git
$ ansible-galaxy collection install git+https://github.com/QueraTeam/ansible-github.git

Installation

Copy .env.sample to .env and configure environment variables. Then run the playbook:

$ ./install.sh

You can pass ansible-playbook arguments to install.sh:

$ ./install.sh --tags gnome
$ ./install.sh --skip-tags fonts,proxy

You can find the list of tags in roles/dotfiles/tasks/main.yml.

After installing, do not move dotfiles repository. If you did that, install once again.

Manual Configurations

Here I explain some manual configurations that are hard to automate, or I was too lazy to automate!

Wayland

Screen Capture on Wayland

To fix the black screen problem when sharing/recording screen in wayland, read this.

Enable Native Wayland Support for Chromium/Chrome

Add these lines to ~/.config/chromium-flags.conf (or chrome-flags.conf for Chrome):

--enable-features=UseOzonePlatform
--ozone-platform=wayland

Reference

Enable Native Wayland Support for Electron Apps

Add these flags to the command running the app:

--enable-features=UseOzonePlatform --ozone-platform=wayland

To persist, you can add them to related .desktop file.

Reference

Status of Wayland Support in Other Apps

HiDPI + Full HD Monitor Combination in Gnome

If you have multiple monitors (one HiDPI, and one with lower dpi):

  1. Use Wayland

  2. Enable the experimental fractional scaling feature of Wayland:

    $ gsettings set org.gnome.mutter experimental-features "['scale-monitor-framebuffer']"

  3. Open Settings -> Displays, and set Scale to your desired value for each monitor.

HP Printer Setup

$ sudo pacman -S cups
$ sudo systemctl enable --now cups
$ sudo pacman -S hplip
$ sudo hp-setup -i

Map Xiao AI Button

References:

My Xiaomi laptop's keyboard has a button for using Xiao AI in Windows, but it was unusable in Linux. To use this button, I found its scancode (0x72) and mapped it to a linux keycode.

To find the scancode, press the key and look for logs like this in dmesg output:

[ 8474.796476] atkbd serio0: Unknown key pressed (translated set 2, code 0x72 on isa0060/serio0).
[ 8474.796481] atkbd serio0: Use 'setkeycodes 72 <keycode>' to make it known.

Open list of linux keycodes and pick a keycode (e.g. 172: HomePage):

$ cat /usr/include/linux/input-event-codes.h | grep KEY_

One-time mapping

$ sudo setkeycodes 72 172

Permanent mapping

Find your keyboard information with evemu-describe command (evemu package).

Create /usr/lib/udev/hwdb.d/90-redmi.hwdb and set mapping for your keyboard:

evdev:atkbd:dmi:bvn*:bvr*:bd*:svnTIMI:pnRedmiBookPro15:*
  KEYBOARD_KEY_72=172

Update hwdb.bin:

$ sudo systemd-hwdb update

After any change to 90-redmi.hwdb, run sudo touch /usr.

Fix "Dummy Output" Audio Issue

If audio is not working, try installing sof-firmware package, as recommended by Arch Wiki.

$ sudo pacman -S sof-firmware

Monospace Fonts

My favorite monospace fonts:

Use a nerd font for better compatibility with shell prompts like Powerlevel10k or Starship. This dotfiles repo installs some nerd fonts.

References

dotfiles's People

Contributors

mjnaderi avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.