From f7029fd3d97e01495ed388ef4c1e1394957f0da7 Mon Sep 17 00:00:00 2001 From: Marco Thomas Date: Sat, 5 Dec 2020 02:11:28 +0100 Subject: [PATCH] Cleanup --- README.md | 5 +++-- files/.Xresources | 2 +- files/.config/i3/config | 36 ++++++++++++++++-------------------- files/.config/ranger/rc.conf | 1 - files/.zshrc | 1 + files/scripts/polybar.sh | 17 +++++++++++++++++ 6 files changed, 38 insertions(+), 24 deletions(-) create mode 100755 files/scripts/polybar.sh diff --git a/README.md b/README.md index f266116..3943e39 100644 --- a/README.md +++ b/README.md @@ -13,10 +13,11 @@ ## Programs + Editor: nvim ++ File-Browser: ranger + Image-Viewer: sxiv -+ Info: [fet.sh](https://github.com/6gk/fet.sh) and neofetch ++ Info: neofetch + Launcher: dmenu -+ Music: spotify with [Onepunch-Theme](https://github.com/morpheusthewhite/spicetify-themes/tree/master/Onepunch) ++ Music: spotify + Pdf-Viewer: zathura with mupdf + Screenshots: Flameshot + Video-Player: vlc or mpv diff --git a/files/.Xresources b/files/.Xresources index 772353a..9ab2931 100644 --- a/files/.Xresources +++ b/files/.Xresources @@ -46,7 +46,7 @@ !! Some extra xterm settings ! Font -XTerm.vt100.faceName: xft:InconsolataLGC Nerd Font Mono:antialias=true +XTerm.vt100.faceName: xft:FiraCode Nerd Font Mono:antialias=true XTerm.vt100.faceSize: 11 ! Remove Scrollbar diff --git a/files/.config/i3/config b/files/.config/i3/config index df94380..12d3185 100644 --- a/files/.config/i3/config +++ b/files/.config/i3/config @@ -13,8 +13,6 @@ floating_modifier $mod # Font for Window Titles font pango:Product Sans 10 -set $accent '#98c379' - # ============================== Keybinds (except workspaces) #Terminal bindsym $mod+Return exec --no-startup-id alacritty @@ -52,7 +50,8 @@ bindsym $mod+p workspace prev # dmenu set $fg '#ffffff' set $bg '#000000' -set $font 'Product Sans' +set $accent '#98c379' +set $font 'Product Sans:pixelsize=22' bindsym $mod+d exec "dmenu_run -fn $font -nb $bg -sb $accent -nf $fg -sf $bg" bindsym $mod+space exec "dmenu_run -fn $font -nb $bg -sb $accent -nf $fg -sf $bg" @@ -75,8 +74,16 @@ bindsym XF86AudioPause exec playerctl pause bindsym XF86AudioNext exec playerctl next bindsym XF86AudioPrev exec playerctl previous +# ============================== Monitor +bindsym $mod+Ctrl+Left move workspace to output left +bindsym $mod+Ctrl+Right move workspace to output right + +bindsym $mod+Ctrl+h move workspace to output left +bindsym $mod+Ctrl+l move workspace to output right + # ======================================== Open Applications -bindsym $mod+e exec thunar +#bindsym $mod+e exec thunar +bindsym $mod+e exec alacritty -e ranger bindsym $mod+Ctrl+c exec google-calendar-dark bindsym $mod+Ctrl+d exec discord @@ -128,19 +135,6 @@ bindsym $mod+Shift+8 move container to workspace number $ws8 bindsym $mod+Shift+9 move container to workspace number $ws9 bindsym $mod+Shift+0 move container to workspace number $ws10 -# ============================== Monitor -workspace $ws1 output right -workspace $ws10 output left - -bindsym $mod+Ctrl+1 move workspace to output left -bindsym $mod+Ctrl+2 move workspace to output right - -bindsym $mod+Ctrl+Left move workspace to output left -bindsym $mod+Ctrl+Right move workspace to output right - -bindsym $mod+Ctrl+h move workspace to output left -bindsym $mod+Ctrl+l move workspace to output right - # ============================== Design # Remove title new_window 1pixel @@ -171,12 +165,14 @@ 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 +# Launch Programs at start exec fcitx exec nextcloud -exec feh --bg-scale $HOME/data/wallpaper/wallpaper.png exec dunst exec picom --experimental-backends exec nm-applet + +exec feh --bg-scale $HOME/data/wallpaper/wallpaper.png + exec ~/scripts/fix_screens.sh -exec ~/.config/polybar/launch.sh +exec ~/scripts/polybar.sh diff --git a/files/.config/ranger/rc.conf b/files/.config/ranger/rc.conf index 51552bd..2998c85 100644 --- a/files/.config/ranger/rc.conf +++ b/files/.config/ranger/rc.conf @@ -1,6 +1,5 @@ set preview_images true set preview_images_method ueberzug -#set preview_images_method w3m #icons default_linemode devicons diff --git a/files/.zshrc b/files/.zshrc index c71e331..fbbeaae 100644 --- a/files/.zshrc +++ b/files/.zshrc @@ -31,6 +31,7 @@ zstyle ':vcs_info:git:*' formats '  %b' # ============================== Exports export EDITOR="nvim" +export VISUAL="nvim" export LANG="en_US.UTF-8" export PATH=$PATH:$HOME/.local/bin:$HOME/scripts:$HOME/.cargo/bin diff --git a/files/scripts/polybar.sh b/files/scripts/polybar.sh new file mode 100755 index 0000000..79ba386 --- /dev/null +++ b/files/scripts/polybar.sh @@ -0,0 +1,17 @@ +#!/bin/sh + +killall -q polybar +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 [ $mon = "eDP" ]; then + MONITOR=$mon polybar --reload laptop & + elif [ $mon = "DP-3" ]; then + MONITOR="DP-3" polybar --reload desktop & + MONITOR="DP-1" polybar --reload desktop_second & + fi + done +else + echo "No Bars loaded." +fi