Giter VIP home page Giter VIP logo

dotfiles's Introduction

Danial's Dotfiles

╱╱╭━━━┳━━┳╮╱╱╭━━━┳━━━╮
╱╱┃╭━━┻┫┣┫┃╱╱┃╭━━┫╭━╮┃
╱╱┃╰━━╮┃┃┃┃╱╱┃╰━━┫╰━━╮
╱╱┃╭━━╯┃┃┃┃╱╭┫╭━━┻━━╮┃
╭╮┃┃╱╱╭┫┣┫╰━╯┃╰━━┫╰━╯┃
╰╯╰╯╱╱╰━━┻━━━┻━━━┻━━━╯

I use Ansible for it's flexibility. The primary Ansible tasks can be found in roles/dotfiles/tasks.

Requirements

Install ansible and required collections:

sudo pacman -S python-pip python-packaging ansible
ansible-galaxy install -r requirements.yml

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

The list of available tags is in roles/dotfiles/tasks/main.yml.

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

Manual Configurations

Below are some manual configurations that are either hard to automate or were not automated by choice.

Wayland

Screen Capture on Wayland

To fix the black screen issue during screen sharing/recording in Wayland, read this guide.

HiDPI + Full HD Monitor in Gnome

For a multi-monitor setup with different DPIs:

  1. Use Wayland.
  2. Enable Wayland's experimental fractional scaling feature:
gsettings set org.gnome.mutter experimental-features "['scale-monitor-framebuffer']"
  1. Navigate to Settings -> Displays and adjust the Scale for each monitor as needed.

HP Printer Setup

Execute the following commands:

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

Mapping the Xiao AI Button (redmikey)

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. 88: F12):

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

One-Time Mapping

sudo setkeycodes 72 88

Permanent Mapping

Create a systemd service and run the same command at startup.

Fixing Default App for Dirs After Installing VSCode

If you experience an issue where directories open in VSCode instead of the default file manager after installing VSCode, this will reassigns the default application for handling directories back to the GNOME Nautilus file manager, effectively resolving the problem.

xdg-mime default org.gnome.Nautilus.desktop inode/directory

References

Acknowledgments

This repository is a fork of mjnaderi/dotfiles. My initial setup was inspired by his work.

dotfiles's People

Contributors

danialkeimasi avatar

Stargazers

 avatar  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.