From 6299d62ad58c0e2e95dd86e4311073f43281bba2 Mon Sep 17 00:00:00 2001 From: Marco Thomas Date: Thu, 17 Sep 2020 13:24:10 +0200 Subject: [PATCH] Some updates --- README.md | 7 ++- laptop/.config/i3/config | 37 +++++------- laptop/.config/nvim/.netrwhist | 3 +- laptop/.config/polybar/config | 68 +++++++++++++++++----- laptop/.config/polybar/launch.sh | 6 +- laptop/.vimrc | 30 +++++----- laptop/.zshrc | 4 +- laptop/scripts/{lock-laptop.sh => lock.sh} | 0 laptop/scripts/startup-laptop.sh | 4 -- 9 files changed, 96 insertions(+), 63 deletions(-) rename laptop/scripts/{lock-laptop.sh => lock.sh} (100%) delete mode 100755 laptop/scripts/startup-laptop.sh diff --git a/README.md b/README.md index e49e6d7..a11c774 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ ## Programs + Editor: nvim -+ Launcher: dmenu + rofi ++ Launcher: dmenu + Bar: polybar + Notifications: dunst + Compositor: [picom](https://github.com/ibhagwan/picom) @@ -16,11 +16,14 @@ ## Dependencies -+ Vundle: `git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim` ++ vim-plug: `curl -fLo ~/.vim/autoload/plug.vim --create-dirs \ + https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim` ## Fonts + Fira Code Regular Nerd Font Complete Mono.ttf: General + IPAGothic.ttf: Japanese Characters + [Siji](https://github.com/stark/siji): Icon Font for Polybar +To get a siji icon: `clone, ./install.sh, ./view.sh, echo "\ue002"` + ![Home](screenshots/home_new.png) diff --git a/laptop/.config/i3/config b/laptop/.config/i3/config index afefb5c..0150db1 100644 --- a/laptop/.config/i3/config +++ b/laptop/.config/i3/config @@ -19,7 +19,7 @@ bindsym $mod+Return exec --no-startup-id alacritty bindsym $mod+Ctrl+Return exec --no-startup-id xterm # Leaving -bindsym $mod+Shift+BackSpace exec "~/scripts/lock-laptop.sh" +bindsym $mod+Shift+BackSpace exec "~/scripts/lock.sh" bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'Logout?' -B 'Yes!' 'i3-msg exit'" # Config refresh @@ -57,7 +57,7 @@ bindsym $mod+n workspace next bindsym $mod+p workspace prev # Rofi and dmenu -bindsym $mod+space exec rofi -show run +# bindsym $mod+space exec rofi -show run set $fg '#ffffff' set $bg '#000000' @@ -138,30 +138,23 @@ bindsym $mod+Shift+0 move container to workspace number $ws10 new_window 1pixel # Set Border -for_window [class="^.*"] border pixel 0 +for_window [class="^.*"] border pixel 1 -set $frost2 "#eceff4" -set $red "#A3BE8C" +set $red "#dc322f" +set $termbg "#002b36" -set $c0 "#2E3440" -set $c8 "#434C5E" +# class border backgr. text indic. child_border +client.focused #ffffff #ffffff #000000 #ffffff #ffffff +client.focused_inactive $termbg $termbg #ffffff $termbg $termbg +client.unfocused $termbg $termbg #ffffff $termbg $termbg +client.urgent $red $red #ffffff $red $red +client.background #ffffff -# class border backgr.text indic. child_border -client.focused $c8 $c8 $frost2 $c8 $c8 -client.focused_inactive $c0 $c0 $frost2 $c0 $c0 -client.unfocused $c0 $c0 $frost0 $c0 $c0 -client.urgent $red $red $frost2 $red $red -client.background $frost2 - -# i3-gaps -gaps inner 8 - -# ============================== Autostart +# ============================== Start # Keyboard layout exec setxkbmap -layout za -# Programs exec feh --bg-scale $HOME/data/wallpaper/wallpaper.png -exec dunst & -exec picom & -exec --no-startup-id ~/.config/polybar/launch.sh laptop & +exec dunst +exec picom +exec --no-startup-id ~/.config/polybar/launch.sh diff --git a/laptop/.config/nvim/.netrwhist b/laptop/.config/nvim/.netrwhist index 2fb1f39..44d1163 100644 --- a/laptop/.config/nvim/.netrwhist +++ b/laptop/.config/nvim/.netrwhist @@ -1,5 +1,6 @@ let g:netrw_dirhistmax =10 -let g:netrw_dirhistcnt =5 +let g:netrw_dirhistcnt =6 +let g:netrw_dirhist_6='/home/marc/.config/dunst' let g:netrw_dirhist_5='/home/marc/.mutt/user' let g:netrw_dirhist_4='/home/marc/dots/laptop/.config/rofi' let g:netrw_dirhist_3='/home/marc/.config/rofi' diff --git a/laptop/.config/polybar/config b/laptop/.config/polybar/config index 6bad01b..aecb278 100644 --- a/laptop/.config/polybar/config +++ b/laptop/.config/polybar/config @@ -2,17 +2,16 @@ [colors] background = #000000 -#foreground = ${xrdb:color7} foreground = #ffffff -#foreground-alt = ${xrdb:color8} -foreground-alt = #555555 urgent = ${xrdb:color1} +#urgent = #ff0000 -[bar/main] +[bar/laptop] monitor = ${env:MONITOR} font-0 = "FiraCode Nerd Font Mono:pixelsize=9;2" font-1 = "IPAGothic:fontformat=truetype:antialias=false:pixelsize=9;2" +font-2 = "Siji:size=7;1" height = 27px width = 100% @@ -26,7 +25,7 @@ padding-right = 1 separator = / modules-left = i3 xwindow -modules-right = spotify network volume backlight battery date +modules-right = spotify network networkupdown volume backlight battery date foreground = ${colors.foreground} background = ${colors.background} @@ -53,14 +52,15 @@ ws-icon-9 = 10;十 ws-icon-default =  label-focused = "%icon%" +label-focused-foreground = ${colors.background} +label-focused-background = ${colors.foreground} label-focused-padding = 1 label-unfocused = "%icon%" -label-unfocused-foreground = ${colors.foreground-alt} label-unfocused-padding = 1 label-urgent = "%icon%" -label-urgent-foreground = ${colors.urgent} +label-urgent-background = ${colors.urgent} label-urgent-padding = 1 [module/xwindow] @@ -76,20 +76,54 @@ date = %H:%M - %a %d.%m.%Y% type = internal/backlight #ls -1 /sys/class/backlight card = amdgpu_bl0 -label = lgt %percentage%% +format-prefix = " " +label = %percentage%% [module/battery] type = internal/battery battery = BAT0 apdapter = ADP1 -label-charging = bat %percentage%% -label-discharging = bat %percentage%% -label-full= bat %percentage%% +format-charging = +format-discharging = +format-full = + +label-charging = %percentage%% +label-discharging = %percentage%% +label-full = %percentage%% + +ramp-capacity-0 =  +ramp-capacity-1 =  +ramp-capacity-2 =  +ramp-capacity-3 =  +ramp-capacity-4 =  +ramp-capacity-5 =  +ramp-capacity-6 =  +ramp-capacity-7 =  +ramp-capacity-8 =  +ramp-capacity-9 =  + +animation-charging-0 =  +animation-charging-1 =  +animation-charging-2 =  +animation-charging-3 =  + +animation-charging-framerate = 750 [module/volume] type = internal/pulseaudio -label-volume = vol %percentage%% +format-volume = + +ramp-volume-0 =  +ramp-volume-1 =  +ramp-volume-2 =  +ramp-volume-3 =  +ramp-volume-4 =  +ramp-headphones-0 =  +ramp-headphones-1 =  + +label-volume = %percentage%% +format-muted-prefix = " " label-muted = muted [module/network] @@ -98,5 +132,13 @@ interface = wlo1 interval = 3.0 accumulate-stats = true unknown-as-up = true -label-connected = %essid% +label-connected =  %essid%: %signal%% label-disconnected = no wifi + +[module/networkupdown] +type = internal/network +interface = wlo1 +interval = 3.0 +accumulate-stats = true +unknown-as-up = true +label-connected =  %upspeed%  %downspeed% diff --git a/laptop/.config/polybar/launch.sh b/laptop/.config/polybar/launch.sh index 4c2a29e..74eab4e 100755 --- a/laptop/.config/polybar/launch.sh +++ b/laptop/.config/polybar/launch.sh @@ -3,8 +3,10 @@ while pgrep -u $UID -x polybar >/dev/null; do sleep 1; done if type "xrandr"; then for mon in $(xrandr --query | grep " connected" | cut -d" " -f1); do - if [ "$1" = "laptop" ]; then - MONITOR=$mon polybar --reload main & + if [ $mon = "eDP-1" ]; then + MONITOR=$mon polybar --reload laptop & + else + MONITOR=$mon polybar --reload desktop & fi done else diff --git a/laptop/.vimrc b/laptop/.vimrc index accc2f0..173bb2c 100644 --- a/laptop/.vimrc +++ b/laptop/.vimrc @@ -10,29 +10,23 @@ let mapleader = "\" " ============================== Plugins -set nocompatible -set rtp+=~/.vim/bundle/Vundle.vim -call vundle#begin() +call plug#begin() -Plugin 'VundleVim/Vundle.vim' +Plug 'altercation/vim-colors-solarized' " Colorscheme -" Automatic intendations -Plugin 'tpope/vim-sleuth' +Plug 'tpope/vim-sleuth' " Automatic intendations -" Pairs -Plugin 'jiangmiao/auto-pairs' +Plug 'jiangmiao/auto-pairs' " Pair Completion -" fzf if executable("fzf") - Plugin 'junegunn/fzf' - Plugin 'junegunn/fzf.vim' + Plug 'junegunn/fzf' + Plug 'junegunn/fzf.vim' endif -" Colors -Plugin 'altercation/vim-colors-solarized' +if has ("nvim") +endif -call vundle#end() -filetype plugin indent on +call plug#end() " ============================== Colors syntax on @@ -55,8 +49,8 @@ set confirm " can't quit without saving set noshowmode " don't show mode in status set noshowcmd " don't show command in status set encoding=utf-8 -set mouse=c -set undolevels=1337 " memegods can make mistakes +set mouse=c " a=on, c=off +set undolevels=1337 set backspace=indent,eol,start set wildmenu " autocomplete :e set scrolloff=7 " min lines aboive or below the cursor @@ -65,6 +59,8 @@ set scrolloff=7 " min lines aboive or below the cursor set list set listchars=tab:»\ ,extends:›,precedes:‹,nbsp:·,trail:· +autocmd FileType perl set tabstop=8 shiftwidth=4 softtabstop=4 + highlight ExtraWhitespace ctermbg=red guibg=red match ExtraWhitespace /\s\+\%#\@