No more trailing spaces. Minor fixes. Start X automatically on tty1

This commit is contained in:
lanxu 2019-09-22 13:52:40 +03:00
parent 304cee8e85
commit 3553bc147f
4 changed files with 51 additions and 28 deletions

View File

@ -116,8 +116,13 @@ myawesomemenu = {
{ "quit", function() awesome.quit() end}
}
lock = function()
-- Sync disks before lock (just in case)
awful.util.spawn("sync")
awful.util.spawn("xautolock -locknow")
-- Lock screen
awful.util.spawn("xdg-screensaver lock")
--awful.util.spawn("xautolock -locknow")
--awful.util.spawn("xlock")
end
mymainmenu = awful.menu({ items = { { "awesome", myawesomemenu, beautiful.awesome_icon },
{ "open terminal", terminal },
@ -720,6 +725,7 @@ local function remove_client(tabl, c)
if index then
table.remove(tabl, index)
if #tabl == 0 then
awful.util.spawn("xset s blank")
awful.util.spawn("xset s on")
awful.util.spawn("xset +dpms")
naughty.notify({ preset = naughty.config.presets.low,
@ -733,6 +739,7 @@ client.connect_signal("property::fullscreen", function(c)
if c.fullscreen then
table.insert(fullscreened_clients, c)
if #fullscreened_clients == 1 then
awful.util.spawn("xset s noblank")
awful.util.spawn("xset s off")
awful.util.spawn("xset -dpms")
naughty.notify({
@ -758,10 +765,9 @@ awful.util.spawn_with_shell("run-once nm-applet")
awful.util.spawn_with_shell("run-once 'nextcloud --background'")
awful.util.spawn_with_shell("run-once 'udiskie --tray --notify --automount'")
awful.util.spawn_with_shell("run-once 'mpd /home/lanxu/.config/mpd/mpd.conf'")
awful.util.spawn_with_shell("run-once 'xscreensaver -no-splash'")
--awful.util.spawn_with_shell("run-once conky")
--awful.util.spawn_with_shell("run-once dropboxd")
--awful.util.spawn_with_shell("run-once light-locker")
--awful.util.spawn_with_shell("run-once xscreensaver -no-splash")
--awful.util.spawn_with_shell("run-once firefox-developer-edition")
--awful.util.spawn_with_shell("run-once firefox")

View File

@ -9,3 +9,5 @@ lain/
ranger/bookmarks
ranger/history
ranger/tagged
i3blocks

18
.vimrc
View File

@ -15,8 +15,8 @@ Plug 'rust-lang/rust.vim', {'for': 'rust'}
"Plug 'racer-rust/vim-racer', {'for': 'rust'}
" Syntax checking
Plug 'Valloric/YouCompleteMe' " alternative #1, full-blown
"Plug 'w0rp/ale',
"Plug 'Valloric/YouCompleteMe' " alternative #1, full-blown
Plug 'w0rp/ale',
" Useful plugins
Plug 'Raimondi/delimitMate'
@ -64,6 +64,8 @@ set autoindent " Automatically indent
set cindent " Indentation for c
set number " Add line numbers
set hlsearch " Highlight search
set modeline
set modelines=5
"set sessionoptions=blank,buffers,curdir,folds,globals,help,localoptions,options,resize,tabpages,winsize,winpos
set autochdir " Change directory automatically
"set backupdir=~/.vim/temp/ " Save temporary backups to temp dir
@ -150,7 +152,15 @@ augroup END
let g:ale_linters = {
\'javascript': ['standard'],
\ 'vue': ['standard --plugin html "**/*.{js,vue}"']
\'vue': ['standard --plugin html "**/*.{js,vue}"'],
\'jsx': ['standard --plugin html "**/*.{js,jsx}"'],
\'rust': ['cargo']
\}
let g:racer_experimental_completer = 1
let b:ale_fixers = {
\'*': ['remove_trailing_lines', 'trim_whitespace'],
\'rust': ['rustfmt']
\}
let g:ale_fix_on_save = 1
let g:ale_completion_enabled = 1
set completeopt+=preview

View File

@ -56,3 +56,8 @@ export PATH="${HOME}/.cargo/bin:$PATH"
# Caffe
export CAFFE_DIR="${HOME}/Koodit/github/caffe/build/install"
# Start X on tty1 automatically
if systemctl -q is-active graphical.target && [[ ! $DISPLAY && $XDG_VTNR -eq 1 ]]; then
exec startx
fi