From 8c0b4faa98323aff23205c7d011f77c4c6dff8ad Mon Sep 17 00:00:00 2001 From: "flyingscorpio@arch-desktop" Date: Wed, 8 Apr 2020 18:12:46 +0200 Subject: [PATCH] Put dotfiles into folders --- dotfiles/{ => bash}/bash_aliases | 0 dotfiles/{ => bash}/bashrc | 0 dotfiles/i3/i3_config | 172 ++++++++++++++++++ .../{vim_colors => vim/colors}/apprentice.vim | 0 .../{vim_colors => vim/colors}/badwolf.vim | 0 .../{vim_colors => vim/colors}/monokai.vim | 0 .../{vim_colors => vim/colors}/wombat256.vim | 0 dotfiles/{ => vim}/global_extra_conf.py | 0 dotfiles/{ => vim}/vimrc | 0 dotfiles/{ => vim}/ycm_extra_conf.py | 0 installation_scripts/vim_update.sh | 10 +- main_install.sh | 4 +- 12 files changed, 179 insertions(+), 7 deletions(-) rename dotfiles/{ => bash}/bash_aliases (100%) rename dotfiles/{ => bash}/bashrc (100%) create mode 100644 dotfiles/i3/i3_config rename dotfiles/{vim_colors => vim/colors}/apprentice.vim (100%) rename dotfiles/{vim_colors => vim/colors}/badwolf.vim (100%) rename dotfiles/{vim_colors => vim/colors}/monokai.vim (100%) rename dotfiles/{vim_colors => vim/colors}/wombat256.vim (100%) rename dotfiles/{ => vim}/global_extra_conf.py (100%) rename dotfiles/{ => vim}/vimrc (100%) rename dotfiles/{ => vim}/ycm_extra_conf.py (100%) diff --git a/dotfiles/bash_aliases b/dotfiles/bash/bash_aliases similarity index 100% rename from dotfiles/bash_aliases rename to dotfiles/bash/bash_aliases diff --git a/dotfiles/bashrc b/dotfiles/bash/bashrc similarity index 100% rename from dotfiles/bashrc rename to dotfiles/bash/bashrc diff --git a/dotfiles/i3/i3_config b/dotfiles/i3/i3_config new file mode 100644 index 0000000..b5bdca3 --- /dev/null +++ b/dotfiles/i3/i3_config @@ -0,0 +1,172 @@ +# set modifier +set $super Mod4 +set $alt Mod1 + +# set font +font pango: Noto Sans 9 + +# Use Mouse+$super to drag floating windows to their wanted position +floating_modifier $super + +#autostart +exec --no-startup-id hsetroot -center ~/Pictures/double-kyrgyzstan-wallpapers.jpg -root +exec --no-startup-id xsettingsd & +exec --no-startup-id picom -b +exec --no-startup-id thunar --daemon + +# start a terminal +bindsym $super+Return exec i3-sensible-terminal + +# start dmenu (a program launcher) +bindsym $super+Shift+d exec i3-dmenu-desktop --dmenu="dmenu -i -fn 'Noto Sans:size=8'" +bindsym $super+d exec rofi -lines 12 -padding 18 -width 60 -location 0 -show drun -sidebar-mode -columns 3 -font 'Noto Sans 8' + +# common apps keybinds +bindsym Print exec scrot 'Cheese_%a-%d%b%y_%H.%M.png' -e 'viewnior ~/$f' +bindsym $alt+l exec i3lock -i ~/Pictures/wallhaven-ne791l.png +bindsym $super+Shift+w exec firefox +bindsym $super+Shift+f exec thunar;workspace 3;focus +bindsym $super+Shift+g exec geany + +#change volume +bindsym XF86AudioRaiseVolume exec amixer -q set Master 5%+ +bindsym XF86AudioLowerVolume exec amixer -q set Master 5%- +bindsym XF86AudioMute exec amixer set Master toggle + +# music control +bindsym XF86AudioNext exec mpc next +bindsym XF86AudioPrev exec mpc prev +bindsym XF86AudioPlay exec mpc toggle +bindsym XF86AudioStop exec mpc stop + +# kill focused window +bindsym $super+c kill +bindsym $alt+F4 kill + +# change focus +bindsym $super+h focus left +bindsym $super+j focus down +bindsym $super+k focus up +bindsym $super+l focus right +bindsym $super+Left focus left +bindsym $super+Down focus down +bindsym $super+Up focus up +bindsym $super+Right focus right +focus_follows_mouse no + +# move focused window +bindsym $super+Shift+h move left +bindsym $super+Shift+j move down +bindsym $super+Shift+k move up +bindsym $super+Shift+l move right +bindsym $super+Shift+Left move left +bindsym $super+Shift+Down move down +bindsym $super+Shift+Up move up +bindsym $super+Shift+Right move right + +# split in horizontal orientation +bindsym $alt+h split h + +# split in vertical orientation +bindsym $alt+v split v + +# enter fullscreen mode for the focused container +bindsym $super+f fullscreen toggle + +# change container layout split +bindsym $super+s layout toggle split + +# toggle tiling / floating +bindsym $super+space floating toggle + +# change focus between tiling / floating windows +bindsym $super+Shift+space focus mode_toggle + +# switch to workspace +bindsym $alt+Control+Right workspace next +bindsym $alt+Control+Left workspace prev +bindsym $super+1 workspace 1 +bindsym $super+2 workspace 2 +bindsym $super+3 workspace 3 +bindsym $super+4 workspace 4 +bindsym $super+5 workspace 5 +bindsym $super+6 workspace 6 + +# move focused container to workspace +bindsym $super+Shift+1 move container to workspace 1 +bindsym $super+Shift+2 move container to workspace 2 +bindsym $super+Shift+3 move container to workspace 3 +bindsym $super+Shift+4 move container to workspace 4 +bindsym $super+Shift+5 move container to workspace 5 +bindsym $super+Shift+6 move container to workspace 6 + +# restart i3 inplace (preserves your layout/session, can be used to upgrade i3) +bindsym $super+Shift+r restart + +# exit i3 +bindsym $super+q exec "i3-nagbar -t warning -m 'Really, exit?' -b 'Yes' 'i3-msg exit'" + +# resize window (you can also use the mouse for that) +mode "resize" { + bindsym Left resize shrink width 5 px or 5 ppt + bindsym Down resize grow height 5 px or 5 ppt + bindsym Up resize shrink height 5 px or 5 ppt + bindsym Right resize grow width 5 px or 5 ppt + bindsym Return mode "default" +} +bindsym $super+r mode "resize" + +# panel +bar { + output DVI-I-1 + colors { + background #2f343f + statusline #2f343f + separator #4b5262 + + # colour of border, background, and text + focused_workspace #2f343f #bf616a #d8dee8 + active_workspace #2f343f #2f343f #d8dee8 + inactive_workspace #2f343f #2f343f #d8dee8 + urgent_workspace #2f343f #ebcb8b #2f343f + } + status_command i3status +} +bar { + output DVI-D-1 + colors { + background #2f343f + statusline #ffffff + separator #4b5262 + + # colour of border, background, and text + focused_workspace #2f343f #bf616a #d8dee8 + active_workspace #2f343f #2f343f #d8dee8 + inactive_workspace #2f343f #2f343f #d8dee8 + urgent_workspace #2f343f #ebcb8b #2f343f + } + status_command i3blocks +} + +# window rules, you can find the window class using xprop +workspace 1 output DVI-I-1 +workspace 2 output DVI-I-1 +workspace 3 output DVI-D-1 +for_window [class=".*"] border pixel 3 +assign [class=URxvt] 1 +assign [class=Firefox|Transmission-gtk] 2 +assign [class=Thunar|File-roller] 1 +assign [class=Geany|Evince|Gucharmap|Soffice|libreoffice*] 4 +assign [class=Audacity|Vlc|mpv|Ghb|Xfburn|Gimp*|Inkscape] 5 +assign [class=Lxappearance|System-config-printer.py|Lxtask|GParted|Pavucontrol|Exo-helper*|Lxrandr|Arandr] 6 +for_window [class=Viewnior|feh|Audacious|File-roller|Lxappearance|Lxtask|Pavucontrol] floating enable +for_window [class=URxvt|Firefox|Geany|Evince|Soffice|libreoffice*|mpv|Ghb|Xfburn|Gimp*|Inkscape|Vlc|Lxappearance|Audacity] focus +for_window [class=Xfburn|GParted|System-config-printer.py|Lxtask|Pavucontrol|Exo-helper*|Lxrandr|Arandr] focus + +# colour of border, background, text, indicator, and child_border +client.focused #bf616a #2f343f #d8dee8 #bf616a #9fe89a +client.focused_inactive #2f343f #2f343f #d8dee8 #2f343f #2f343f +client.unfocused #2f343f #2f343f #d8dee8 #2f343f #2f343f +client.urgent #2f343f #2f343f #d8dee8 #2f343f #2f343f +client.placeholder #2f343f #2f343f #d8dee8 #2f343f #2f343f +client.background #2f343f diff --git a/dotfiles/vim_colors/apprentice.vim b/dotfiles/vim/colors/apprentice.vim similarity index 100% rename from dotfiles/vim_colors/apprentice.vim rename to dotfiles/vim/colors/apprentice.vim diff --git a/dotfiles/vim_colors/badwolf.vim b/dotfiles/vim/colors/badwolf.vim similarity index 100% rename from dotfiles/vim_colors/badwolf.vim rename to dotfiles/vim/colors/badwolf.vim diff --git a/dotfiles/vim_colors/monokai.vim b/dotfiles/vim/colors/monokai.vim similarity index 100% rename from dotfiles/vim_colors/monokai.vim rename to dotfiles/vim/colors/monokai.vim diff --git a/dotfiles/vim_colors/wombat256.vim b/dotfiles/vim/colors/wombat256.vim similarity index 100% rename from dotfiles/vim_colors/wombat256.vim rename to dotfiles/vim/colors/wombat256.vim diff --git a/dotfiles/global_extra_conf.py b/dotfiles/vim/global_extra_conf.py similarity index 100% rename from dotfiles/global_extra_conf.py rename to dotfiles/vim/global_extra_conf.py diff --git a/dotfiles/vimrc b/dotfiles/vim/vimrc similarity index 100% rename from dotfiles/vimrc rename to dotfiles/vim/vimrc diff --git a/dotfiles/ycm_extra_conf.py b/dotfiles/vim/ycm_extra_conf.py similarity index 100% rename from dotfiles/ycm_extra_conf.py rename to dotfiles/vim/ycm_extra_conf.py diff --git a/installation_scripts/vim_update.sh b/installation_scripts/vim_update.sh index 3ed68fc..a5e2b02 100644 --- a/installation_scripts/vim_update.sh +++ b/installation_scripts/vim_update.sh @@ -13,7 +13,7 @@ echo "Adding .vimrc..." if [ ! -L ~/.vimrc ]; then if [ "$OVERWRITE" = 'true' ]; then rm ~/.vimrc 2> /dev/null - ln -rs "$BASE_DIR"/dotfiles/vimrc ~/.vimrc + ln -rs "$BASE_DIR"/dotfiles/vim/vimrc ~/.vimrc echo "${ORANGE}.vimrc symlink created.${NC}" else echo "No .vimrc symlink found but the overwrite option was not set." @@ -31,9 +31,9 @@ fi echo "Adding colors..." mkdir -p ~/.vim/colors -color_files=$(ls "$BASE_DIR"/dotfiles/vim_colors) +color_files=$(ls "$BASE_DIR"/dotfiles/vim/colors) for color_file in $color_files; do - ln -rs "$BASE_DIR"/dotfiles/vim_colors/"$color_file" ~/.vim/colors/ 2> /dev/null + ln -rs "$BASE_DIR"/dotfiles/vim/colors/"$color_file" ~/.vim/colors/ 2> /dev/null done # }}} @@ -165,8 +165,8 @@ fi echo "Adding YouCompleteMe extra_conf files..." -ln -rs "$BASE_DIR"/dotfiles/ycm_extra_conf.py ~/.ycm_extra_conf.py 2> /dev/null -ln -rs "$BASE_DIR"/dotfiles/global_extra_conf.py ~/.global_extra_conf.py 2> /dev/null +ln -rs "$BASE_DIR"/dotfiles/vim/ycm_extra_conf.py ~/.ycm_extra_conf.py 2> /dev/null +ln -rs "$BASE_DIR"/dotfiles/vim/global_extra_conf.py ~/.global_extra_conf.py 2> /dev/null # }}} diff --git a/main_install.sh b/main_install.sh index 946fdc0..8a919ea 100755 --- a/main_install.sh +++ b/main_install.sh @@ -133,7 +133,7 @@ separator echo "Updating .bashrc..." if [ ! -L ~/.bashrc ]; then - ln -rs "$BASE_DIR"/dotfiles/bashrc ~/.bashrc 2> /dev/null + ln -rs "$BASE_DIR"/dotfiles/bash/bashrc ~/.bashrc 2> /dev/null fi separator @@ -145,7 +145,7 @@ separator echo "Updating .bash_aliases..." if [ ! -L ~/.bash_aliases ]; then - ln -rs "$BASE_DIR"/dotfiles/bash_aliases ~/.bash_aliases 2> /dev/null + ln -rs "$BASE_DIR"/dotfiles/bash/bash_aliases ~/.bash_aliases 2> /dev/null fi separator