Browse Source

Wrote README and various tweaks for laptop

- horizontal scrolling for touchpad
- disable touchscreen
- set/get backlight
- i3-gaps and updated Terminator config
red-hat-laptop
Kevin Mok 7 years ago
parent
commit
7ca9c5f27d
  1. 5
      .gitignore
  2. 44
      README.md
  3. 8
      aliases/.pc_aliases
  4. 1
      aliases/.school_aliases
  5. 43
      configs/X1-Carbon/i3.conf
  6. 2
      configs/X1-Carbon/i3blocks.conf
  7. 18
      configs/X1-Carbon/terminator.conf
  8. 5
      dotfiles/vimrc

5
.gitignore

@ -1,5 +1,6 @@
commit-msg.txt
cp-*
*.sw* *.sw*
*.html
temp.sh temp.sh
konsole.shortcuts konsole.shortcuts
cp-*
commit-msg.txt

44
README.md

@ -0,0 +1,44 @@
# Kevin's Linux Setup
![desktop-screenshot](https://i.imgur.com/hrSnXmV.png)
*Screenshot from my laptop config.*
This repository contains the dotfiles for my Linux ["rice"](https://www.reddit.com/r/unixporn/comments/3iy3wd/stupid_question_what_is_ricing/cukxwog/). It's always going to
be a work-in-progress, but it's satisfactory for the time being. My dotfiles are
primarily focused on workflow efficiency.
## Basic Info
* **OS**: Linux Mint 18.2
* **Terminal**: Terminator
* **Shell**: Bash
* **WM**: [i3-gaps](https://github.com/Airblader/i3)
* **Editor**: Vim
## Setup
I wrote a couple simple scripts
([`set-configs.sh`](https://github.com/Kevin-Mok/linux-config/blob/master/configs/set-configs.sh) &
[`set-dotfiles.sh`](https://github.com/Kevin-Mok/linux-config/blob/master/dotfiles/set-dotfiles.sh))
to symbolically link the files in the repository to the locations they should be
in the system. `set-configs.sh` sets different config files for my PC and laptop
as they have slightly different needs (multiple monitors, screen size, etc.).
## Programs Used
* [Bash-it](https://github.com/Bash-it/bash-it/)
* [i3blocks](https://github.com/vivien/i3blocks)
* [Various Vim plug-ins](https://github.com/Kevin-Mok/linux-config/blob/f922e56b50635c9344b26f9088e37acea5647359/dotfiles/vimrc#L38)
* [Neofetch](https://github.com/dylanaraps/neofetch)
* [pipes.sh](https://github.com/pipeseroni/pipes.sh)
### Switch From/Try Out:
* Arch Linux
* Bash ➔ [Zsh](http://zsh.sourceforge.net/)
* Terminator ➔ [rxvt](https://www.wikiwand.com/en/Rxvt)
* Vim(-based) apps:
* Vim ➔ [Neovim](https://github.com/neovim/neovim)
* Google Chrome ➔ [qutebrowser](https://github.com/qutebrowser/qutebrowser)
* Nemo/Thunar ➔ [ranger](https://ranger.github.io/)
<!-- below are more minor stylistic goals that don't feel the need to explicitly
include
* i3blocks ➔ Polybar
* Discord ➔ CLI IRC app -->

8
aliases/.pc_aliases

@ -13,6 +13,8 @@ if [ "$(whoami)" == "kevin" ]; then
alias v3="vi ~/.config/i3/config" alias v3="vi ~/.config/i3/config"
alias v3b="vi ~/.config/i3blocks/i3blocks.conf" alias v3b="vi ~/.config/i3blocks/i3blocks.conf"
alias i3b="d /usr/share/i3blocks" alias i3b="d /usr/share/i3blocks"
alias pipes="pipes.sh -t 2"
# }}} i3 # # }}} i3 #
# coding projs {{{ # # coding projs {{{ #
@ -25,7 +27,7 @@ if [ "$(whoami)" == "kevin" ]; then
alias rtb="$cd_coding_dir/trapbot && python scan_reddit.py" alias rtb="$cd_coding_dir/trapbot && python scan_reddit.py"
# }}} coding projs # # }}} coding projs #
bl() { xbacklight -set $1 ; }
chr() { google-chrome $1 ; }
cld() { colordiff -y --suppress-common-lines $1 $2 ; } cld() { colordiff -y --suppress-common-lines $1 $2 ; }
fi fi
# Both PC/Laptop }}} # Both PC/Laptop }}}
@ -65,7 +67,6 @@ if [ "$(hostname)" == "NZXT" ]; then
# }}} audio # # }}} audio #
# apps {{{ # # apps {{{ #
chr() { google-chrome $1 ; }
alias nem="nemo ." alias nem="nemo ."
alias spt="speedtest" alias spt="speedtest"
alias pg="ping -c 5 google.ca" alias pg="ping -c 5 google.ca"
@ -100,6 +101,9 @@ if [ "$(hostname)" == "X1-Carbon" ]; then
xmodmap -e "keycode 115 = BackSpace" xmodmap -e "keycode 115 = BackSpace"
# }}} key swaps # # }}} key swaps #
alias gbl="xbacklight -get"
sbl() { xbacklight -set $1 ; }
alias thn="thunar ." alias thn="thunar ."
alias plz="d ~/platterz2018/ocr-reader/app/src/main/java/com/google/android/gms/samples/vision/ocrreader" alias plz="d ~/platterz2018/ocr-reader/app/src/main/java/com/google/android/gms/samples/vision/ocrreader"

1
aliases/.school_aliases

@ -77,6 +77,7 @@ run() {
} }
# temp # temp
alias m3="make pfact && ./pfact 10" alias m3="make pfact && ./pfact 10"
alias 35w="c9 3-5_wait.c && ./3-5_wait.out abc a"
# }}} # }}}
# }}} # }}}

43
configs/X1-Carbon/i3.conf

@ -3,13 +3,17 @@
exec redshift -O 4000 exec redshift -O 4000
exec_always feh --bg-scale ~/Pictures/space-wallpaper.jpg exec_always feh --bg-scale ~/Pictures/space-wallpaper.jpg
exec imwheel exec imwheel
# enable horizontal scrolling
exec --no-startup-id synclient HorizTwoFingerScroll=1
# disable touchscreen
exec xinput disable 12
exec terminator exec terminator
# }}} startup # # }}} startup #
bindsym Mod4+e exec cd /usr/local/android-studio/bin/ && ./studio.sh bindsym Mod4+e exec cd /usr/local/android-studio/bin/ && ./studio.sh
bindsym $mod+control+Return exec i3-sensible-terminal
bindsym $mod+control+Return exec terminator
bindsym Mod4+c exec google-chrome-stable --force-device-scale-factor=1.5 bindsym Mod4+c exec google-chrome-stable --force-device-scale-factor=1.5
bindsym Mod4+d exec discord
bindsym Mod4+p exec ksnapshot
bindsym Mod4+t exec thunar bindsym Mod4+t exec thunar
# redshift {{{ # # redshift {{{ #
@ -90,16 +94,26 @@ bindsym $mod+a focus parent
# workspace {{{ # # workspace {{{ #
# ws names {{{ # # ws names {{{ #
set $ws1 "1 " set $ws1 "1 "
bindsym $mod+F1 workspace $ws1; exec terminator
set $ws2 "2 " set $ws2 "2 "
bindsym $mod+F2 workspace $ws2; exec terminator
set $ws3 "3 🌐" set $ws3 "3 🌐"
bindsym $mod+F3 workspace $ws3; exec google-chrome
set $ws4 "4 🖹" set $ws4 "4 🖹"
set $ws5 "5 " set $ws5 "5 "
set $ws6 "6 🗪" set $ws6 "6 🗪"
bindsym Mod4+d workspace $ws6; exec discord
set $ws7 "7 ↥" set $ws7 "7 ↥"
set $ws8 "8 📱" set $ws8 "8 📱"
set $ws9 "9 ✎" set $ws9 "9 ✎"
bindsym $mod+F9 workspace $ws9; exec terminator
set $ws10 "10 " set $ws10 "10 "
assign [class="discord"] $ws6
bindsym $mod+F10 workspace $ws10; exec terminator
# }}} ws names # # }}} ws names #
# ws bindings {{{ # # ws bindings {{{ #
@ -154,12 +168,21 @@ bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'You pressed the exit shortcu
# }}} reload config # # }}} reload config #
# resizing windows {{{ # # resizing windows {{{ #
bindsym $mod+control+h resize shrink width 10 px or 10 ppt
bindsym $mod+control+h resize grow width 10 px or 10 ppt
bindsym $mod+control+k resize grow height 10 px or 10 ppt bindsym $mod+control+k resize grow height 10 px or 10 ppt
bindsym $mod+control+j resize shrink height 10 px or 10 ppt bindsym $mod+control+j resize shrink height 10 px or 10 ppt
bindsym $mod+control+l resize grow width 10 px or 10 ppt
bindsym $mod+control+l resize shrink width 10 px or 10 ppt
# }}} resizing windows # # }}} resizing windows #
# gaps {{{ #
for_window [class="^.*"] border pixel 0
gaps inner 20
gaps outer 0
bindsym control+shift+plus gaps inner all plus 5;gaps outer all plus 5
bindsym control+shift+0 gaps inner all minus 5;gaps outer all minus 5
# }}} gaps #
# status bar {{{ # # status bar {{{ #
# Start i3bar to display a workspace bar (plus the system information i3status # Start i3bar to display a workspace bar (plus the system information i3status
# finds out, if available) # finds out, if available)
@ -176,7 +199,7 @@ set $mod Mod1
# Font for window titles. Will also be used by the bar unless a different font # Font for window titles. Will also be used by the bar unless a different font
# is used in the bar {} block below. # is used in the bar {} block below.
font pango:Hack 14
font pango:Hack 10
# This font is widely installed, provides lots of unicode glyphs, right-to-left # This font is widely installed, provides lots of unicode glyphs, right-to-left
# text rendering and scalability on retina/hidpi displays (thanks to pango). # text rendering and scalability on retina/hidpi displays (thanks to pango).
#font pango:DejaVu Sans Mono 8 #font pango:DejaVu Sans Mono 8
@ -191,13 +214,13 @@ font pango:Hack 14
# function keys {{{ # # function keys {{{ #
# backlight {{{ # # backlight {{{ #
bindsym $mod+Shift+plus exec xbacklight -inc 10
bindsym $mod+Shift+minus exec xbacklight -dec 10
bindsym $mod+Shift+plus exec xbacklight -inc 2
bindsym $mod+Shift+minus exec xbacklight -dec 2
# }}} backlight # # }}} backlight #
# connect/disconnect wifi {{{ # # connect/disconnect wifi {{{ #
bindsym $mod+Shift+w exec nmcli radio wifi on
bindsym $mod+Shift+q exec nmcli radio wifi off
bindsym $mod+control+w exec nmcli radio wifi on
bindsym $mod+control+q exec nmcli radio wifi off
# }}} connect/disconnect wifi # # }}} connect/disconnect wifi #
# volume keys {{{ # # volume keys {{{ #

2
configs/X1-Carbon/i3blocks.conf

@ -1,4 +1,4 @@
# properties {{{ #
#j properties {{{ #
# i3blocks config file # i3blocks config file
# #
# Please see man i3blocks for a complete reference! # Please see man i3blocks for a complete reference!

18
configs/X1-Carbon/terminator.conf

@ -1,9 +1,11 @@
[global_config] [global_config]
borderless = True
focus = mouse focus = mouse
hide_from_taskbar = True hide_from_taskbar = True
inactive_color_offset = 1.0 inactive_color_offset = 1.0
title_font = Noto Sans 10
title_font = Hack 10
title_transmit_bg_color = "#3d3d3d" title_transmit_bg_color = "#3d3d3d"
title_use_system_font = False
[keybindings] [keybindings]
[layouts] [layouts]
[[default]] [[default]]
@ -16,19 +18,29 @@
[plugins] [plugins]
[profiles] [profiles]
[[default]] [[default]]
background_darkness = 0.88
background_darkness = 0.79
background_image = None background_image = None
background_type = transparent background_type = transparent
copy_on_selection = True copy_on_selection = True
cursor_color = "#b9b9b9" cursor_color = "#b9b9b9"
custom_command = env TERM=xterm-256color bash custom_command = env TERM=xterm-256color bash
font = Hack 17
font = Hack 10
foreground_color = "#0077ff" foreground_color = "#0077ff"
palette = "#000000:#aa0000:#00aa00:#aa5500:#0000aa:#aa00aa:#00aaaa:#aaaaaa:#555555:#ff5555:#55ff55:#ffff55:#5555ff:#ff55ff:#55ffff:#ffffff" palette = "#000000:#aa0000:#00aa00:#aa5500:#0000aa:#aa00aa:#00aaaa:#aaaaaa:#555555:#ff5555:#55ff55:#ffff55:#5555ff:#ff55ff:#55ffff:#ffffff"
scrollback_infinite = True
scrollbar_position = hidden
show_titlebar = False
use_custom_command = True use_custom_command = True
use_system_font = False use_system_font = False
[[light]] [[light]]
background_color = "#fdf6e3" background_color = "#fdf6e3"
background_darkness = 0.89
background_image = None background_image = None
background_type = transparent
font = Hack 10
foreground_color = "#657b83" foreground_color = "#657b83"
palette = "#073642:#dc322f:#859900:#b58900:#268bd2:#d33682:#2aa198:#eee8d5:#002b36:#cb4b16:#586e75:#657b83:#839496:#6c71c4:#93a1a1:#fdf6e3" palette = "#073642:#dc322f:#859900:#b58900:#268bd2:#d33682:#2aa198:#eee8d5:#002b36:#cb4b16:#586e75:#657b83:#839496:#6c71c4:#93a1a1:#fdf6e3"
scrollback_infinite = True
scrollbar_position = hidden
show_titlebar = False
use_system_font = False

5
dotfiles/vimrc

@ -1,7 +1,7 @@
" set x=y {{{ " " set x=y {{{ "
set relativenumber set relativenumber
set background=dark
" set background=light
" set background=dark
set background=light
" set t_Co=256 " set t_Co=256
filetype plugin on filetype plugin on
syntax on syntax on
@ -117,6 +117,7 @@ nnoremap <leader>z za
let maplocalleader="-" let maplocalleader="-"
autocmd Filetype c inoremap <localleader>s struct pixel autocmd Filetype c inoremap <localleader>s struct pixel
autocmd Filetype tex inoremap <localleader>D \Delta
autocmd Filetype tex inoremap <localleader>e \exists autocmd Filetype tex inoremap <localleader>e \exists
autocmd Filetype tex inoremap <localleader>fa \forall autocmd Filetype tex inoremap <localleader>fa \forall
autocmd Filetype tex inoremap <localleader>g \geq autocmd Filetype tex inoremap <localleader>g \geq

Loading…
Cancel
Save