From 3c4e3caabac9d9322943579b6faf524f5eadb2ba Mon Sep 17 00:00:00 2001 From: Marco Thomas Date: Thu, 5 Nov 2020 14:15:57 +0100 Subject: [PATCH] Update --- README.md | 3 +- files/.config/i3/config | 22 +++++----- files/.config/polybar/config | 18 ++------ .../.config/polybar/scripts/popup-calendar.sh | 41 ------------------- files/.config/polybar/scripts/yay_updates.sh | 2 +- files/.vimrc | 10 ++--- 6 files changed, 19 insertions(+), 77 deletions(-) delete mode 100755 files/.config/polybar/scripts/popup-calendar.sh diff --git a/README.md b/README.md index d389c77..28516ec 100644 --- a/README.md +++ b/README.md @@ -21,9 +21,8 @@ ## Dependencies + [vim-plug](https://github.com/junegunn/vim-plug) -+ fzf -+ xdotool + yad: Calendar-Widget + fcitx + mozc: Japanese Keyboard ++ fzf ### Nvim LSP diff --git a/files/.config/i3/config b/files/.config/i3/config index 73f11c0..e50c086 100644 --- a/files/.config/i3/config +++ b/files/.config/i3/config @@ -11,17 +11,13 @@ set $mod Mod4 floating_modifier $mod # Font for Window Titles -font pango:FiraCode Nerd Font Mono 8 +font pango:Heebo Normal 8 # ============================== Keybinds (except workspaces) #Terminal 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.sh" -bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'Logout?' -B 'Yes!' 'i3-msg exit'" - # Config refresh bindsym $mod+Shift+c reload bindsym $mod+Shift+r restart @@ -57,14 +53,11 @@ bindsym $mod+p workspace prev set $fg '#ffffff' set $bg '#000000' set $acc '#98c379' -bindsym $mod+d exec "dmenu_run -fn 'Heebo Normal' -p 'run ' -nb $bg -sb $acc -nf $fg -sf $bg" +bindsym $mod+d exec "dmenu_run -fn 'FiraCode Nerd Font Mono' -nb $bg -sb $acc -nf $fg -sf $bg" # Screenhot bindsym $mod+Shift+p exec "flameshot gui" -# Filemanager -bindsym $mod+e exec thunar - # Screen brightness with light bindsym XF86MonBrightnessUp exec light -A 5 # increase bindsym XF86MonBrightnessDown exec light -U 5 # decrease @@ -83,9 +76,12 @@ bindsym XF86AudioPrev exec playerctl previous # ======================================== Open Applications mode "Open" { + bindsym c exec google-calendar-dark bindsym d exec discord; exec Discord + bindsym e exec thunar bindsym f exec firefox bindsym m exec thunderbird + bindsym n exec notion-app bindsym p exec pavucontrol bindsym s exec spotify bindsym t exec telegram-desktop @@ -100,6 +96,7 @@ bindsym $mod+o mode "Open" mode "Shutdown" { bindsym s exec shutdown now bindsym l exec "~/scripts/lock.sh" + bindsym e exec "i3-nagbar -t warning -m 'Logout?' -B 'Yes!' 'i3-msg exit'" bindsym Escape mode "default" bindsym Return mode "default" @@ -171,23 +168,24 @@ set $red "#e06c75" set $termbg "#1e2127" set $border "#98c379" -# class border backgr. text indic. child_border +# Class Border Backgr. Text Indic. Child_border client.focused $border $border #000000 $border $border client.focused_inactive $termbg $termbg $border $termbg $termbg client.unfocused $termbg $termbg $border $termbg $termbg client.urgent $red $red $border $red $red client.background $border -gaps inner 8 +# i3-gaps +gaps inner 4 # ============================== Start -# Keyboard layout exec setxkbmap -layout za exec export GTK_IM_MODULE=fcitx exec export QT_IM_MODULE=fcitx exec export XMODIFIERS=@im=fcitx +# Launch Programs at start - I don't like ~/.Xsession exec fcitx exec nextcloud exec feh --bg-scale $HOME/data/wallpaper/wallpaper.png diff --git a/files/.config/polybar/config b/files/.config/polybar/config index c1ed573..9e44474 100644 --- a/files/.config/polybar/config +++ b/files/.config/polybar/config @@ -30,13 +30,13 @@ separator = modules-left = i3 xwindow modules-center = spotify -modules-right = network volume backlight battery calendar +modules-right = network volume backlight battery date tray-position = right tray-padding = 1 foreground = ${colors.foreground} -background = ${colors.background} +background-0 = ${colors.background} line-size = 2 @@ -46,13 +46,13 @@ wm-restack = i3 [bar/desktop] inherit = bar/laptop -modules-right = update_yay volume calendar +modules-right = update_yay volume date [bar/desktop_second] inherit = bar/desktop tray-position = none -modules-right = volume calendar +modules-right = volume date ############################## MODULES [module/i3] @@ -105,16 +105,6 @@ format-prefix = " " format-prefix-foreground = ${colors.accent-alt} format-underline = ${colors.accent} -[module/calendar] -type = custom/script -exec = ~/.config/polybar/scripts/popup-calendar.sh -interval = 5 -click-left = ~/.config/polybar/scripts/popup-calendar.sh --popup & - -format-prefix = " " -format-prefix-foreground = ${colors.accent-alt} -format-underline = ${colors.accent} - [module/backlight] type = internal/backlight #ls -1 /sys/class/backlight diff --git a/files/.config/polybar/scripts/popup-calendar.sh b/files/.config/polybar/scripts/popup-calendar.sh deleted file mode 100755 index ab18e38..0000000 --- a/files/.config/polybar/scripts/popup-calendar.sh +++ /dev/null @@ -1,41 +0,0 @@ -#!/bin/sh - -BAR_HEIGHT=27 # polybar height -BORDER_SIZE=10 # border size from your wm settings -YAD_WIDTH=222 # 222 is minimum possible value -YAD_HEIGHT=193 # 193 is minimum possible value -DATE="$(date +"%a, %d.%b %Y %H:%M")" - -case "$1" in ---popup) - if [ "$(xdotool getwindowfocus getwindowname)" = "yad-calendar" ]; then - exit 0 - fi - - eval "$(xdotool getmouselocation --shell)" - eval "$(xdotool getdisplaygeometry --shell)" - - # X - if [ "$((X + YAD_WIDTH / 2 + BORDER_SIZE))" -gt "$WIDTH" ]; then #Right side - : $((pos_x = WIDTH - YAD_WIDTH - BORDER_SIZE)) - elif [ "$((X - YAD_WIDTH / 2 - BORDER_SIZE))" -lt 0 ]; then #Left side - : $((pos_x = BORDER_SIZE)) - else #Center - : $((pos_x = X - YAD_WIDTH / 2)) - fi - - # Y - if [ "$Y" -gt "$((HEIGHT / 2))" ]; then #Bottom - : $((pos_y = HEIGHT - YAD_HEIGHT - BAR_HEIGHT - BORDER_SIZE)) - else #Top - : $((pos_y = BAR_HEIGHT + BORDER_SIZE)) - fi - - yad --calendar --undecorated --fixed --close-on-unfocus --no-buttons \ - --width="$YAD_WIDTH" --height="$YAD_HEIGHT" --posx="$pos_x" --posy="$pos_y" \ - --title="yad-calendar" --borders=0 >/dev/null & - ;; -*) - echo "$DATE" - ;; -esac diff --git a/files/.config/polybar/scripts/yay_updates.sh b/files/.config/polybar/scripts/yay_updates.sh index 1019f88..7933b68 100755 --- a/files/.config/polybar/scripts/yay_updates.sh +++ b/files/.config/polybar/scripts/yay_updates.sh @@ -1,6 +1,6 @@ #!/bin/sh -if ! updates=$(yay -Qum 2> /dev/null | wc -l); then +if ! updates=$(yay -Qu 2> /dev/null | wc -l); then updates=0 fi diff --git a/files/.vimrc b/files/.vimrc index 5ff9532..312ab39 100644 --- a/files/.vimrc +++ b/files/.vimrc @@ -23,10 +23,6 @@ Plug 'airblade/vim-gitgutter' " Show git changes Plug 'vim-airline/vim-airline' " Fancy Bar Plug 'vim-airline/vim-airline-themes' " Themes for fancy Bar -if executable("cargo") - Plug 'wfxr/minimap.vim', {'do': ':!cargo install --locked code-minimap'} " Fancy Side Minimap -endif - if executable("fzf") Plug 'junegunn/fzf' Plug 'junegunn/fzf.vim' @@ -70,7 +66,7 @@ set scrolloff=7 " min lines aboive or below the cursor " ============================== Statusline let g:airline_theme='onedark' -let g:airline#extensions#tabline#enabled = 1 +"let g:airline#extensions#tabline#enabled = 1 let g:airline#extensions#tabline#formatter = 'unique_tail' set laststatus=0 @@ -89,8 +85,8 @@ set statusline +=%1*%5l " current line set statusline +=%1*/%L " total lines " ============================== Minimap Settings -let g:minimap_auto_start=1 -let g:minimap_width=6 +"let g:minimap_auto_start=1 +"let g:minimap_width=6 " ============================== Indents and Whitespaces set list