dotfiles

Cross platform dotfiles for linux, mac and windows
git clone git@getsh.org:dotfiles.git
Log | Files | Refs

commit dc1bc85c93a92f86c15938258242df26ac3f38e6
parent d4f3ad7591b507cd8e484dc4ddcb6cf0030bddf5
Author: Bharatvaj <bharatvaj@yahoo.com>
Date:   Mon,  7 Mar 2022 00:22:36 +0530

Merge pull request #30 from bharatvaj/linux

Linux
Diffstat:
M.config/X11/xinitrc | 18+++++++++++++++---
M.config/git/config | 2++
M.config/i3/config | 36+++++++++++++++---------------------
M.profile | 7+++----
4 files changed, 35 insertions(+), 28 deletions(-)

diff --git a/.config/X11/xinitrc b/.config/X11/xinitrc @@ -1,3 +1,15 @@ -exec i3 & -exec hsetroot -solid "#000000" & -exec compton +#!/bin/sh + +__type() { + type "$@" >/dev/null 2>/dev/null +} + +__type i3 || (echo "i3 not found" && exit 1) + +__type setxkbmap && setxkbmap -option caps:escape +__type xbmap && xbmap +__type xrdb && xrdb merge ~/.config/X11/Xresources +__type hsetroot && exec hsetroot -solid "#000000" & +__type compton && exec compton & + +exec i3 diff --git a/.config/git/config b/.config/git/config @@ -10,7 +10,9 @@ ld = log --pretty=format:"%h %ad %s" --date=short --all lg = log --graph --oneline --decorate --all p = pull + r = reset st = status + suir = submodule update --init --recursive wt = worktree [difftool] diff --git a/.config/i3/config b/.config/i3/config @@ -30,8 +30,7 @@ font pango:monospace 8 floating_modifier $mod # start a terminal -bindsym $mod+Return exec --no-startup-id urxvt -name floating -for_window [class="URxvt" instance="floating"] floating enable +bindsym $mod+Return exec --no-startup-id alacritty # kill focused window bindsym $mod+Shift+q kill @@ -45,10 +44,10 @@ bindsym $mod+n exec sh ~/.config/i3/dmenu_search.sh # bindsym $mod+d exec --no-startup-id i3-dmenu-desktop # change focus -bindsym $mod+j focus left -bindsym $mod+k focus down -bindsym $mod+l focus up -bindsym $mod+semicolon focus right +bindsym $mod+h focus left +bindsym $mod+j focus down +bindsym $mod+k focus up +bindsym $mod+l focus right # alternatively, you can use the cursor keys: bindsym $mod+Left focus left @@ -57,10 +56,10 @@ bindsym $mod+Up focus up bindsym $mod+Right focus right # move focused window -bindsym $mod+Shift+j move left -bindsym $mod+Shift+k move down -bindsym $mod+Shift+l move up -bindsym $mod+Shift+semicolon move right +bindsym $mod+Shift+h move left +bindsym $mod+Shift+j move down +bindsym $mod+Shift+k move up +bindsym $mod+Shift+l move right # alternatively, you can use the cursor keys: bindsym $mod+Shift+Left move left @@ -69,7 +68,7 @@ bindsym $mod+Shift+Up move up bindsym $mod+Shift+Right move right # split in horizontal orientation -bindsym $mod+h split h +bindsym $mod+s split h # split in vertical orientation bindsym $mod+v split v @@ -78,7 +77,7 @@ bindsym $mod+v split v bindsym $mod+f fullscreen toggle # change container layout (stacked, tabbed, toggle split) -bindsym $mod+s layout stacking +bindsym $mod+semicolon layout stacking bindsym $mod+w layout tabbed bindsym $mod+e layout toggle split @@ -133,10 +132,10 @@ mode "resize" { # Pressing right will grow the window’s width. # Pressing up will shrink the window’s height. # Pressing down will grow the window’s height. - bindsym j resize shrink width 10 px or 10 ppt - bindsym k resize grow height 10 px or 10 ppt - bindsym l resize shrink height 10 px or 10 ppt - bindsym semicolon resize grow width 10 px or 10 ppt + bindsym h resize shrink width 10 px or 10 ppt + bindsym j resize grow height 10 px or 10 ppt + bindsym k resize shrink height 10 px or 10 ppt + bindsym l resize grow width 10 px or 10 ppt # same bindings, but for the arrow keys bindsym Left resize shrink width 10 px or 10 ppt @@ -156,9 +155,4 @@ client.focused #f5f5f5 #f5f5f5 #000000 #f5f5f5 new_window 1pixel bar { - status_command i3status } - -#force floating for all windows -for_window [class="[.]*"] floating enable -for_window [window_role="pop-up"] floating enable diff --git a/.profile b/.profile @@ -64,15 +64,14 @@ chance() { [ -f "${1}" ] && . "${1}" } +# TODO refactor function name mich() { - # Muted which - which "$@" >/dev/null 2>/dev/null + type "$@" >/dev/null 2>/dev/null } # Setup editor -# export VISUAL=$(mich nvim && echo nvim || echo vim ) -export VISUAL=nvi +export VISUAL=$(mich nvim && echo nvim || echo vim ) export EDITOR="$VISUAL" export BROWSER="$(mich lynx && echo lynx)"