Code Monkey home page Code Monkey logo

dotfiles's Introduction

Dot Files

Automated Installation

Run the following command and relax

curl -sL shubham.chaudhary.xyz/dotfiles | bash

See chaudhary.xyz/dotfiles for more info. For manual installation please read the instructions from wiki

Updating dotfiles

Easiest way to update dotfiles with lastest improvements and fixes is to use homesick to sync dotfiles from this repo. Once you've finished automated installation of these dotfiles, you can run:

hs pull

dotfiles's People

Contributors

aktech avatar ylogx avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

gnsp diaakasem

dotfiles's Issues

Errors in package installation

TASK [ubuntu : Install libraries using package manager] ************************
ok: [localhost] => (item=ack-grep)
failed: [localhost] (item=bash) => {"cache_update_time": 1511572167, "cache_updated": false, "changed": false, "failed": true, "item": "bash", "msg": "'/usr/bin/apt-get -y -o \"Dpkg::Options::=--force-confdef\" -o \"Dpkg::Options::=--force-confold\"     install 'bash'' failed: E: There are problems and -y was used without --force-yes\n", "rc": 100, "stderr": "E: There are problems and -y was used without --force-yes\n", "stderr_lines": ["E: There are problems and -y was used without --force-yes"], "stdout": "Reading package lists...\nBuilding dependency tree...\nReading state information...\nSuggested packages:\n  bash-doc\nThe following packages will be upgraded:\n  bash\n1 upgraded, 0 newly installed, 0 to remove and 134 not upgraded.\nNeed to get 575 kB of archives.\nAfter this operation, 0 B of additional disk space will be used.\nWARNING: The following packages cannot be authenticated!\n  bash\n", "stdout_lines": ["Reading package lists...", "Building dependency tree...", "Reading state information...", "Suggested packages:", "  bash-doc", "The following packages will be upgraded:", "  bash", "1 upgraded, 0 newly installed, 0 to remove and 134 not upgraded.", "Need to get 575 kB of archives.", "After this operation, 0 B of additional disk space will be used.", "WARNING: The following packages cannot be authenticated!", "  bash"]}
failed: [localhost] (item=curl) => {"cache_update_time": 1511572167, "cache_updated": false, "changed": false, "failed": true, "item": "curl", "msg": "'/usr/bin/apt-get -y -o \"Dpkg::Options::=--force-confdef\" -o \"Dpkg::Options::=--force-confold\"     install 'curl'' failed: E: There are problems and -y was used without --force-yes\n", "rc": 100, "stderr": "E: There are problems and -y was used without --force-yes\n", "stderr_lines": ["E: There are problems and -y was used without --force-yes"], "stdout": "Reading package lists...\nBuilding dependency tree...\nReading state information...\nThe following extra packages will be installed:\n  libcurl3\nThe following packages will be upgraded:\n  curl libcurl3\n2 upgraded, 0 newly installed, 0 to remove and 133 not upgraded.\nNeed to get 296 kB of archives.\nAfter this operation, 2048 B of additional disk space will be used.\nWARNING: The following packages cannot be authenticated!\n  curl libcurl3\n", "stdout_lines": ["Reading package lists...", "Building dependency tree...", "Reading state information...", "The following extra packages will be installed:", "  libcurl3", "The following packages will be upgraded:", "  curl libcurl3", "2 upgraded, 0 newly installed, 0 to remove and 133 not upgraded.", "Need to get 296 kB of archives.", "After this operation, 2048 B of additional disk space will be used.", "WARNING: The following packages cannot be authenticated!", "  curl libcurl3"]}
ok: [localhost] => (item=git)
ok: [localhost] => (item=htop)
ok: [localhost] => (item=nmap)
ok: [localhost] => (item=python3)
^C [ERROR]: User interrupted execution

On manual apt install

recsys% sudo apt-get install bash
Reading package lists... Done
Building dependency tree
Reading state information... Done
Suggested packages:
  bash-doc
The following packages will be upgraded:
  bash
1 upgraded, 0 newly installed, 0 to remove and 134 not upgraded.
Need to get 575 kB of archives.
After this operation, 0 B of additional disk space will be used.
WARNING: The following packages cannot be authenticated!
  bash
Install these packages without verification? [y/N]

Known Fix

Manually run sudo apt update, then rerun installation.

Tmux plugin installation error

TASK [common : Install Tmux Plugins] *******************************************
fatal: [localhost]: FAILED! => {
"changed": true, 
"cmd": "tmux source ~/.tmux.conf && ~/.tmux/plugins/tpm/bin/install_plugins", "delta": "0:00:00.108082", "end": "2017-11-25 14:35:35.310036", "failed": true, 
"msg": "non-zero return code", "rc": 1, "start": "2017-11-25 14:35:35.201954", 
"stderr": "unknown variable: TMUX_PLUGIN_MANAGER_PATH\nFATAL: Tmux Plugin Manager not configured in tmux.conf\nAborting.", "stderr_lines": ["unknown variable: TMUX_PLUGIN_MANAGER_PATH", "FATAL: Tmux Plugin Manager not configured in tmux.conf", "Aborting."], "stdout": "set option: prefix -> \\\nset option: mode-mouse -> on\nset option: mouse-resize-pane -> on\nset option: mouse-select-pane -> on\nset option: mouse-select-window -> on\nset option: allow-rename -> off\nset option: history-limit -> 8192\nset option: base-index -> 1\nset option: escape-time -> 0\nset option: status-bg -> black\nset option: status-fg -> white\nset option: status-left -> \"\"\nset option: status-right -> \"#[fg=green]#H\"\nset option: aggressive-resize -> off\nset option: window-status-current-bg -> red\nset option: status-right -> \"Battery: #{battery_icon} #{battery_percentage} #{battery_remain} | %a %h-%d %H:%M \"\nset option: mode-keys -> vi\nset option: @shell_mode -> vi\nset option: @plugin -> tmux-plugins/tpm\nset option: @plugin -> tmux-plugins/tmux-resurrect\nset option: @plugin -> tmux-plugins/tmux-continuum\nset option: @plugin -> tmux-plugins/tmux-copycat\nset option: @plugin -> tmux-plugins/tmux-yank\nset option: @plugin -> tmux-plugins/tmux-pain-control\nset option: @plugin -> tmux-plugins/tmux-cpu\nset option: @plugin -> tmux-plugins/tmux-battery\nset option: mode-keys -> vi", "stdout_lines": ["set option: prefix -> \\", "set option: mode-mouse -> on", "set option: mouse-resize-pane -> on", "set option: mouse-select-pane -> on", "set option: mouse-select-window -> on", "set option: allow-rename -> off", "set option: history-limit -> 8192", "set option: base-index -> 1", "set option: escape-time -> 0", "set option: status-bg -> black", "set option: status-fg -> white", "set option: status-left -> \"\"", "set option: status-right -> \"#[fg=green]#H\"", "set option: aggressive-resize -> off", "set option: window-status-current-bg -> red", "set option: status-right -> \"Battery: #{battery_icon} #{battery_percentage} #{battery_remain} | %a %h-%d %H:%M \"", "set option: mode-keys -> vi", "set option: @shell_mode -> vi", "set option: @plugin -> tmux-plugins/tpm", "set option: @plugin -> tmux-plugins/tmux-resurrect", "set option: @plugin -> tmux-plugins/tmux-continuum", "set option: @plugin -> tmux-plugins/tmux-copycat", "set option: @plugin -> tmux-plugins/tmux-yank", "set option: @plugin -> tmux-plugins/tmux-pain-control", "set option: @plugin -> tmux-plugins/tmux-cpu", "set option: @plugin -> tmux-plugins/tmux-battery", "set option: mode-keys -> vi"]}
        to retry, use: --limit @/home/chaudhary/.homesick/repos/dotfiles/playbooks/unix.retry

PLAY RECAP *********************************************************************
localhost                  : ok=18   changed=9    unreachable=0    failed=1

hs pull might fail because of permission issue

hs pull might fail because the initial ansible script was running as root user.

Screenshot of situation from 2020-04-29 19-20-27

What is happening?

Error:

$ hs pull
pull dotfiles
pull homeshick
error Unable to pull /home/chaudhary/.homesick/repos/homeshick. Git says:
error: cannot open .git/FETCH_HEAD: Permission denied

Screenshot of failure from 2020-04-29 19-25-56

Expected behavior

hs pull should work properly
Screenshot of success from 2020-04-29 19-26-28

Workaround

sudo chown -R ${USER}:${USER} ~/.homesick/repos/homeshick/.git/

Fonts cask moved

Error:

TASK [osx : Tap fonts] ********************************************************************************************
Monday 11 July 2022  20:54:49 -0400 (0:00:02.251)       0:00:04.963 ***********
fatal: [localhost]: FAILED! => {"changed": false, "msg": "added: 0, unchanged: 0, error: failed to tap: caskroom/fonts due to Error: caskroom/fonts was moved. Tap homebrew/cask-fonts instead.\n"}

chsh failed on some system

Current Behaviour

It is known that chsh fails when done by ohmyz.sh as pointed by #3, but chsh also fails when ansible is doing it.

Known Workaround

Run following command and re-login (ssh)/restart terminal(local)

sudo chsh username -s /bin/zsh

Brew installation on mac might require arch==i386

Installation of non-cask brew package on mac not working with M1 processor and an arm64 shell.

Error: Cannot install in Homebrew on ARM processor in Intel default prefix (/usr/local)!
Please create a new installation in /opt/homebrew using one of the
"Alternative Installs" from:
  https://docs.brew.sh/Installation
You can migrate your previously installed formula list with:
  brew bundle dump

[WARNING]: Could not match supplied host pattern, ignoring: fleet_osx

➜  dotfiles git:(include_tasks) ./install.sh
Running playbook for osx os.
[DEPRECATION WARNING]: The use of 'include' for tasks has been deprecated. Use 'import_tasks' for static inclusions or 'include_tasks' for dynamic inclusions. This feature will be removed in a future release. Deprecation warnings can be
disabled by setting deprecation_warnings=False in ansible.cfg.
[DEPRECATION WARNING]: include is kept for backwards compatibility but usage is discouraged. The module documentation details page may explain more about this rationale.. This feature will be removed in a future release. Deprecation
warnings can be disabled by setting deprecation_warnings=False in ansible.cfg.
 [WARNING]: Could not match supplied host pattern, ignoring: fleet_osx


PLAY [fleet_osx] *****************************************************************************************************************************************************************************************************************************
skipping: no hosts matched

PLAY RECAP ***********************************************************************************************************************************************************************************************************************************

Please update git credential to your email address now
Run

  git config --global user.email "[email protected]"
  git config --global user.name "Your Name"

FATAL: Tmux Plugin Manager not configured in tmux.conf

TASK [common : Installl Tmux Plugins] ********************************************************************************************************************************************************************************************************
task path: /Users/aktech/dotfiles/playbooks/roles/common/tasks/main.yml:14
Using module file /Users/aktech/anaconda3/lib/python3.6/site-packages/ansible/modules/commands/command.py
<localhost> ESTABLISH LOCAL CONNECTION FOR USER: aktech
<localhost> EXEC /bin/sh -c '/usr/bin/python && sleep 0'
fatal: [localhost]: FAILED! => {
    "changed": true,
    "cmd": [
        "~/.tmux/plugins/tpm/bin/install_plugins"
    ],
    "delta": "0:00:00.027179",
    "end": "2017-11-19 22:19:13.641447",
    "failed": true,
    "invocation": {
        "module_args": {
            "_raw_params": "~/.tmux/plugins/tpm/bin/install_plugins",
            "_uses_shell": false,
            "chdir": null,
            "creates": null,
            "executable": null,
            "removes": null,
            "stdin": null,
            "warn": true
        }
    },
    "msg": "non-zero return code",
    "rc": 1,
    "start": "2017-11-19 22:19:13.614268",
    "stderr": "unknown variable: TMUX_PLUGIN_MANAGER_PATH\nFATAL: Tmux Plugin Manager not configured in tmux.conf\nAborting.",
    "stderr_lines": [
        "unknown variable: TMUX_PLUGIN_MANAGER_PATH",
        "FATAL: Tmux Plugin Manager not configured in tmux.conf",
        "Aborting."
    ],
    "stdout": "",
    "stdout_lines": []
}
	to retry, use: --limit @/Users/aktech/dotfiles/playbooks/osx.retry

Handle situation when brew is not installed

Update homebrew should run after installing brew, if it doesn't exist.

TASK [osx : Update Homebrew] ********************************************************************************************************************************************************
fatal: [localhost]: FAILED! => {"changed": false, "msg": "Failed to find required executable brew in paths: /usr/local/bin:/Users/kumara/anaconda3/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"}
	to retry, use: --limit @/Users/kumara/.homesick/repos/dotfiles/playbooks/osx.retry

tmux.conf mouse mode not working

Expected Behaviour

Mouse Mode should work out of the box

Current Behaviour

Mouse Mode won't work until fixed by editing file as shown below

Known Work Around

Current work around is to edit the .tmux.conf file and un-string line 12.

i.e. Convert

https://github.com/shubhamchaudhary/dotfiles/blob/3016814c07da964b606eb34c9de39611a1915ba4/home/.tmux.conf#L10-L14

to

set -g mode-mouse on; set -g mouse-resize-pane on; set -g mouse-select-pane on; set -g mouse-select-window on

Reuse status utility that Ubuntu uses

Following message appears on logging into ubuntu in fresh tty:

Welcome to Ubuntu 14.04.5 LTS (GNU/Linux 3.13.0-74-generic x86_64)

 * Documentation:  https://help.ubuntu.com/

  System information as of Tue Oct 24 15:04:12 IST 2017

  System load:                    0.0
  Usage of /home:                 68.5% of 98.30GB
  Memory usage:                   11%
  Swap usage:                     0%
  Processes:                      164
  Users logged in:                2
  IP address for eth0:            10.0.240.143
  IP address for docker0:         172.17.0.1
  IP address for docker_gwbridge: 172.18.0.1
  IP address for ov-001000-u46vc: 10.255.0.1

  Graph this data and manage this system at:
    https://landscape.canonical.com/

  Get cloud support with Ubuntu Advantage Cloud Guest:
    http://www.ubuntu.com/business/services/cloud

136 packages can be updated.
101 updates are security updates.

New release '16.04.3 LTS' available.
Run 'do-release-upgrade' to upgrade to it.

We can use this in home/.bash_functions:welcome_message

Run with ansible fails in chsh when installing ohmyzsh

Expected

User's shell should change to zsh after install

Known Workaround

Rerun the ansible job once again. Error doesn't show up next time

Trace

TASK [common : Add ohmyzsh] ****************************************************************************************************************************************************************************************************************************************************

fatal: [localhost]: FAILED! => {
"changed": true, 
"cmd": [
"bash", "-c", "bash -c \"$(wget https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O -)\""], "delta": "0:00:05.503343", "end": "2017-07-14 04:24:41.391479", "failed": true, "rc": 1, 
"start": "2017-07-14 04:24:35.888136", "stderr": "--2017-07-14 04:24:35--  https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh\nResolving raw.githubusercontent.com (raw.githubusercontent.com)... 151.101.128.133, 151.101.0.133, 151.101.192.133, ...\nConnecting to raw.githubusercontent.com (raw.githubusercontent.com)|151.101.128.133|:443... connected.\nHTTP request sent, awaiting response... 200 OK\nLength: 4018 (3.9K) [text/plain]\nSaving to: ‘STDOUT’\n\n     0K ...                                                   100% 47.5M=0s\n\n2017-07-14 04:24:36 (47.5 MB/s) - written to stdout [4018/4018]\n\n
Cloning into '/home/sud/.oh-my-zsh'...\nPassword: chsh: PAM: Authentication failure", "stderr_lines": ["--2017-07-14 04:24:35--  https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh", "Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 151.101.128.133, 151.101.0.133, 151.101.192.133, ...", "Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|151.101.128.133|:443... connected.", "HTTP request sent, awaiting response... 200 OK", "Length: 4018 (3.9K) [text/plain]", "Saving to: ‘STDOUT’", "", "     0K ...                                                   100% 47.5M=0s", "", "2017-07-14 04:24:36 (47.5 MB/s) - written to stdout [4018/4018]", "", "Cloning into '/home/sud/.oh-my-zsh'...", 
"Password: chsh: PAM: Authentication failure"], "stdout": "Cloning Oh My Zsh...\nLooking for an existing zsh config...\nUsing the Oh My Zsh template file and adding it to ~/.zshrc\nTime to change your default shell to zsh!", 
"stdout_lines": ["Cloning Oh My Zsh...", "Looking for an existing zsh config...",
 "Using the Oh My Zsh template file and adding it to ~/.zshrc",
 "Time to change your default shell to zsh!"
]}
	to retry, use: --limit @/home/sud/dotfiles/playbooks/unix.retry

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.