From 749193ba48fdf59711e734bdf9b06a2972d4b54a Mon Sep 17 00:00:00 2001 From: natemaia Date: Mon, 29 Oct 2018 01:36:27 -0700 Subject: [PATCH] Move most init stuff into ~/.xprofile rather than each WM config and ~/.xinitrc --- home/.config/bspwm/bspwmrc | 10 ------ home/.config/i3/config | 64 ++++++++++++++++------------------ home/.config/openbox/autostart | 10 ------ home/.config/openbox/rc.xml | 5 +++ home/.config/sxhkd/sxhkdrc | 4 ++- home/.vimrc | 26 +++++++------- home/.xinitrc | 1 + home/.xprofile | 10 ++++-- 8 files changed, 59 insertions(+), 71 deletions(-) diff --git a/home/.config/bspwm/bspwmrc b/home/.config/bspwm/bspwmrc index 793b9d12..1da5d596 100755 --- a/home/.config/bspwm/bspwmrc +++ b/home/.config/bspwm/bspwmrc @@ -15,16 +15,6 @@ al-compositor --start & # xfce settings xfsettingsd & -# polkit, required for authentication -/usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 & - -# keyring for storing saved passwords -gnome-keyring-daemon --start --components=pkcs11 & - -# pressing super key alone simulates pressing Alt-F1 -ksuperkey -e 'Super_L=Alt_L|F1' & -ksuperkey -e 'Super_R=Alt_L|F1' & - # panel al-polybar-session & diff --git a/home/.config/i3/config b/home/.config/i3/config index 2636ef34..014ef691 100644 --- a/home/.config/i3/config +++ b/home/.config/i3/config @@ -69,16 +69,7 @@ exec_always --no-startup-id xrdb -load ~/.Xresources exec --no-startup-id xfsettingsd exec --no-startup-id al-compositor --start -# polkit, required for authentication -exec --no-startup-id /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 - -# keyring for storing saved passwords -exec --no-startup-id gnome-keyring-daemon --start --components=pkcs11 - -# pressing super key alone simulates pressing Alt-F1 -# this is needed for super key to launch rofi -exec --no-startup-id ksuperkey -e 'Super_L=Alt_L|F1' -exec --no-startup-id ksuperkey -e 'Super_R=Alt_L|F1' +# needed for super to launch rofi through ksuperkey, see ~/.xprofile bindsym Mod1+F1 exec --no-startup-id rofi_run -r ########################################################### @@ -93,10 +84,11 @@ bindsym Mod1+q kill bindsym Control+space exec --no-startup-id rofi_run -r # core -bindsym $Mod+t exec --no-startup-id exo-open --launch TerminalEmulator -bindsym $Mod+Return --no-startup-id exec exo-open --launch TerminalEmulator -bindsym $Mod+w exec --no-startup-id exo-open --launch WebBrowser -bindsym $Mod+f exec --no-startup-id exo-open --launch FileManager +bindsym $Mod+w exec --no-startup-id exo-open --launch WebBrowser +bindsym $Mod+f exec --no-startup-id exo-open --launch FileManager +bindsym $Mod+t exec --no-startup-id exo-open --launch TerminalEmulator +bindsym $Mod+Return exec --no-startup-id exo-open --launch TerminalEmulator +bindsym Control+Shift+t exec --no-startup-id exo-open --launch TerminalEmulator # logout script bindsym $Mod+x exec --no-startup-id rofi_run -l @@ -105,16 +97,16 @@ bindsym $Mod+x exec --no-startup-id rofi_run -l bindsym Print exec --no-startup-id "scrot '%S.png' -e 'mv $f $$(xdg-user-dir PICTURES)/ArchLabs-%S-$wx$h.png ; feh $$(xdg-user-dir PICTURES)/ArchLabs-%S-$wx$h.png'" # audio -bindsym XF86AudioPlay exec --no-startup-id playerctl play-pause -bindsym XF86AudioNext exec --no-startup-id playerctl next -bindsym XF86AudioPrev exec --no-startup-id playerctl previous -bindsym XF86AudioStop exec --no-startup-id playerctl stop +bindsym XF86AudioPlay exec --no-startup-id playerctl play-pause +bindsym XF86AudioNext exec --no-startup-id playerctl next +bindsym XF86AudioPrev exec --no-startup-id playerctl previous +bindsym XF86AudioStop exec --no-startup-id playerctl stop +bindsym XF86AudioMute exec --no-startup-id pamixer -t bindsym XF86AudioRaiseVolume exec --no-startup-id pamixer -i 2 bindsym XF86AudioLowerVolume exec --no-startup-id pamixer -d 2 -bindsym XF86AudioMute exec --no-startup-id pamixer -t # backlight -bindsym XF86MonBrightnessUp exec --no-startup-id xbacklight -inc 10 +bindsym XF86MonBrightnessUp exec --no-startup-id xbacklight -inc 10 bindsym XF86MonBrightnessDown exec --no-startup-id xbacklight -dec 10 ################################################################ @@ -219,6 +211,7 @@ bindsym $Mod+v split v bindsym $Mod+Shift+t layout tabbed bindsym $Mod+Shift+s layout stacking bindsym $Mod+Shift+h layout toggle split + default_orientation horizontal ###################################################### @@ -226,9 +219,10 @@ default_orientation horizontal ###################################################### new_window normal -new_float normal +new_float normal + hide_edge_borders both -popup_during_fullscreen smart + bindsym $Mod+shift+b border toggle # changing border style @@ -237,14 +231,14 @@ bindsym $Mod+y border 1pixel bindsym $Mod+u border none # change gaps -bindsym $Mod+plus gaps inner current plus 5 -bindsym $Mod+minus gaps inner current minus 5 -bindsym $Mod+Shift+plus gaps outer current plus 5 -bindsym $Mod+Shift+minus gaps outer current minus 5 -bindsym $Mod+Control+plus gaps inner all plus 5 -bindsym $Mod+Control+minus gaps inner all minus 5 -bindsym $Mod+Control+Shift+plus gaps outer all plus 5 -bindsym $Mod+Control+Shift+minus gaps outer all minus 5 +bindsym $Mod+plus gaps inner current plus 5 +bindsym $Mod+minus gaps inner current minus 5 +bindsym $Mod+Shift+plus gaps outer current plus 5 +bindsym $Mod+Shift+minus gaps outer current minus 5 +bindsym $Mod+Control+plus gaps inner all plus 5 +bindsym $Mod+Control+minus gaps inner all minus 5 +bindsym $Mod+Control+Shift+plus gaps outer all plus 5 +bindsym $Mod+Control+Shift+minus gaps outer all minus 5 ################################################### ############ application settings ############ @@ -252,16 +246,18 @@ bindsym $Mod+Control+Shift+minus gaps outer all minus 5 for_window [class="(?i)(?:qt5ct|pinentry)"] floating enable, focus for_window [class="(?i)(?:termite|thunar)"] focus -for_window [class="(?i)(?:geany|firefox)"] focus +for_window [class="(?i)(?:geany|firefox)"] focus # Assign Applications to specific workspace # get class with xprop assign [class="(?i)(?:firefox)"] → $WS1 -assign [class="(?i)(?:geany)"] → $WS2 -assign [class="(?i)(?:thunar)"] → $WS3 +assign [class="(?i)(?:geany)"] → $WS2 +assign [class="(?i)(?:thunar)"] → $WS3 # focus, floating, & sticky for_window [title="(?i)(?:copying|deleting|moving)"] floating enable -for_window [window_role="(?i)(?:pop-up|setup)"] floating enable +for_window [window_role="(?i)(?:pop-up|setup)"] floating enable + +popup_during_fullscreen smart exec --no-startup-id i3-msg workspace $WS1 diff --git a/home/.config/openbox/autostart b/home/.config/openbox/autostart index 32489556..24dfe1bf 100644 --- a/home/.config/openbox/autostart +++ b/home/.config/openbox/autostart @@ -4,16 +4,6 @@ al-compositor --start & # enable numlock, commented out for laptop users # numlockx & -# polkit, required for authentication -/usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 & - -# keyring for storing saved passwords -gnome-keyring-daemon --start --components=pkcs11 & - -# pressing super key alone simulates pressing Alt-F1 -ksuperkey -e 'Super_L=Alt_L|F1' & -ksuperkey -e 'Super_R=Alt_L|F1' & - # restore wallpaper nitrogen --restore & diff --git a/home/.config/openbox/rc.xml b/home/.config/openbox/rc.xml index 3c8d0b45..eae4674b 100644 --- a/home/.config/openbox/rc.xml +++ b/home/.config/openbox/rc.xml @@ -257,6 +257,11 @@ exo-open --launch TerminalEmulator + + + exo-open --launch TerminalEmulator + + exo-open --launch TerminalEmulator diff --git a/home/.config/sxhkd/sxhkdrc b/home/.config/sxhkd/sxhkdrc index e4407c3f..3fc9ce20 100644 --- a/home/.config/sxhkd/sxhkdrc +++ b/home/.config/sxhkd/sxhkdrc @@ -6,10 +6,12 @@ super + w super + t exo-open --launch TerminalEmulator -# terminal emulator super + Return exo-open --launch TerminalEmulator +ctrl + shift + t + exo-open --launch TerminalEmulator + # file manager super + f exo-open --launch FileManager diff --git a/home/.vimrc b/home/.vimrc index efe3bc0f..b4ede430 100644 --- a/home/.vimrc +++ b/home/.vimrc @@ -4,17 +4,17 @@ runtime! archlinux.vim " additional settings -set modeline " enable vim modelines -set hlsearch " highlight search items -set incsearch " searches are performed as you type -set clipboard^=unnamedplus " system clipboard (requires +clipboard) -set number " enable line numbers -set confirm " ask confirmation for some things, like save before quit, etc. -set wildmenu " Tab completion menu when using command mode -set expandtab " Tab key inserts spaces not tabs -set softtabstop=4 " spaces to enter for each tab -set shiftwidth=4 " amount of spaces for indentation -set shortmess+=aAcIws " Hide or shorten certain messages +set modeline " enable vim modelines +set hlsearch " highlight search items +set incsearch " searches are performed as you type +set clipboard^=unnamed,unnamedplus " system clipboard (requires +clipboard) +set number " enable line numbers +set confirm " ask confirmation like save before quit. +set wildmenu " Tab completion menu when using command mode +set expandtab " Tab key inserts spaces not tabs +set softtabstop=4 " spaces to enter for each tab +set shiftwidth=4 " amount of spaces for indentation +set shortmess+=aAcIws " Hide or shorten certain messages let g:netrw_altv = 1 let g:netrw_liststyle = 3 @@ -38,8 +38,8 @@ endif syntax enable if has('termguicolors') && $DISPLAY !=? '' && &t_Co == 256 - set termguicolors " true colors in the terminal - let g:jinx_colors = 'night' " night or day, 'T' to change on the fly + set termguicolors " true colors in the terminal + let g:jinx_colors = 'night' " night or day try colorscheme jinx catch diff --git a/home/.xinitrc b/home/.xinitrc index 7ce8faf6..f4a6c515 100755 --- a/home/.xinitrc +++ b/home/.xinitrc @@ -15,6 +15,7 @@ fi [ -f ~/.Xresources ] && xrdb -merge ~/.Xresources [ -f ~/.xprofile ] && . ~/.xprofile + # don't put commands below the exec line # launch the session diff --git a/home/.xprofile b/home/.xprofile index 830e984f..9076bbe3 100644 --- a/home/.xprofile +++ b/home/.xprofile @@ -2,7 +2,9 @@ # vim:ft=sh -# sourced at boot by xinit and lightdm +# sourced at boot by both xinit and most display managers like lightdm + +export XDG_CONFIG_HOME="$HOME/.config" [ -d /sbin ] && PATH="$PATH:/sbin" [ -d /usr/sbin ] && PATH="$PATH:/usr/sbin" @@ -11,6 +13,10 @@ # restore the background nitrogen --restore & +# keyring and polkit daemons +/usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 & +gnome-keyring-daemon --start --components=pkcs11 & + # pressing super alone simulates Alt-F1 ksuperkey -e 'Super_L=Alt_L|F1' & ksuperkey -e 'Super_R=Alt_L|F1' & @@ -22,5 +28,3 @@ xset dpms 1200 1300 1400 # keyboard repeat rate kbdrate -d 400 -r 50 xset r rate 350 60 - -export XDG_CONFIG_HOME="$HOME/.config"