No more trailing spaces. Minor fixes. Start X automatically on tty1
This commit is contained in:
parent
304cee8e85
commit
3553bc147f
|
@ -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 },
|
||||
|
@ -280,7 +285,7 @@ awful.screen.connect_for_each_screen(function(s)
|
|||
s.mylayoutbox,
|
||||
}
|
||||
end
|
||||
|
||||
|
||||
-- Add widgets to the wibox
|
||||
s.mywibox:setup {
|
||||
layout = wibox.layout.align.horizontal,
|
||||
|
@ -406,8 +411,8 @@ client.focus:raise()
|
|||
awful.key({ modkey }, "p", function() menubar.show() end,
|
||||
{description = "show the menubar", group = "launcher"}),
|
||||
-- Menubar (dmenu)
|
||||
awful.key({ modkey }, "d",
|
||||
function()
|
||||
awful.key({ modkey }, "d",
|
||||
function()
|
||||
--awful.spawn(string.format("dmenu_run -i -b -l 20 -fn 'Fura Code Nerd Font:size=10:style=Regular'"))
|
||||
awful.spawn(string.format("rofi -show combi -combi-modi 'window,run,ssh' -modi combi"))
|
||||
end,
|
||||
|
@ -512,25 +517,25 @@ for i = 1, 9 do
|
|||
volume.update()
|
||||
end,
|
||||
{description = "Lower audio volume", group = "audio"}),
|
||||
awful.key({ any }, "XF86AudioMute",
|
||||
awful.key({ any }, "XF86AudioMute",
|
||||
function()
|
||||
awful.spawn(string.format("pactl set-sink-mute %s 1", volume.device))
|
||||
volume.update()
|
||||
end,
|
||||
{description = "mute audio", group = "audio"}),
|
||||
awful.key({ 'Shift' }, "XF86AudioMute",
|
||||
awful.key({ 'Shift' }, "XF86AudioMute",
|
||||
function()
|
||||
awful.spawn(string.format("pactl set-sink-mute %s 0", volume.device))
|
||||
volume.update()
|
||||
end,
|
||||
{description = "unmute audio", group = "audio"}),
|
||||
awful.key({ }, "Print",
|
||||
function ()
|
||||
function ()
|
||||
--local command = [[bash -c 'escrotum "$(xdg-user-dir PICTURES)/%Y-%m-%d_%T_screenshot.png"']]
|
||||
for i=1,screen:count() do
|
||||
local command = "bash -c 'flameshot screen -n ".. i-1 .." -p \"$(xdg-user-dir PICTURES)/\"'"
|
||||
awful.spawn.easy_async(command, function(stdout, stderr)
|
||||
--naughty.notify {
|
||||
--naughty.notify {
|
||||
-- title = "Screenshot saved!",
|
||||
-- text = stdout,
|
||||
--}
|
||||
|
@ -539,12 +544,12 @@ for i = 1, 9 do
|
|||
end,
|
||||
{description = "Take screenshot", group = "video"}),
|
||||
awful.key({ 'Shift' }, "Print",
|
||||
function ()
|
||||
function ()
|
||||
--local command = [[bash -c 'escrotum "$(xdg-user-dir PICTURES)/%Y-%m-%d_%T_screenshot.png"']]
|
||||
for i=1,screen:count() do
|
||||
local command = "bash -c 'flameshot gui -p \"$(xdg-user-dir PICTURES)/\"'"
|
||||
awful.spawn.easy_async(command, function(stdout, stderr)
|
||||
--naughty.notify {
|
||||
--naughty.notify {
|
||||
-- title = "Screenshot saved!",
|
||||
-- text = stdout,
|
||||
--}
|
||||
|
@ -616,7 +621,7 @@ awful.rules.rules = {
|
|||
role = {
|
||||
"pop-up", -- e.g. Google Chrome's (detached) Developer Tools.
|
||||
}
|
||||
}, properties = {
|
||||
}, properties = {
|
||||
floating = true
|
||||
}
|
||||
},
|
||||
|
@ -720,12 +725,13 @@ 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,
|
||||
title = "DPMS information",
|
||||
text = "Display power management is now back ON"})
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -733,9 +739,10 @@ 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({
|
||||
naughty.notify({
|
||||
preset = naughty.config.presets.low,
|
||||
title = "DPMS information",
|
||||
text = "Display power management is now OFF"
|
||||
|
@ -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")
|
||||
|
||||
|
|
34
.vimrc
34
.vimrc
|
@ -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
|
||||
|
@ -76,7 +78,7 @@ set autochdir " Change directory automatically
|
|||
set colorcolumn=80
|
||||
" Set GUI parameters
|
||||
if has("gui_running")
|
||||
" GUI options.
|
||||
" GUI options.
|
||||
set guioptions-=m " remove menu bar
|
||||
set guioptions-=T " remove toolbar
|
||||
set guioptions-=r " remove right-hand scroll bar
|
||||
|
@ -86,7 +88,7 @@ if has("gui_running")
|
|||
endif
|
||||
|
||||
" Keybindings
|
||||
" Long list following
|
||||
" Long list following
|
||||
" Indentation
|
||||
map <F7> mzgg=G`z
|
||||
map <F3> %s<cr>
|
||||
|
@ -142,15 +144,23 @@ let g:UltiSnipsJumpForwardTrigger="<c-b>"
|
|||
let g:UltiSnipsJumpBackwardTrigger="<c-z>"
|
||||
|
||||
augroup lexical
|
||||
autocmd!
|
||||
autocmd FileType markdown,mkd call lexical#init()
|
||||
autocmd FileType textile call lexical#init()
|
||||
autocmd FileType text call lexical#init({ 'spell': 0 })
|
||||
autocmd!
|
||||
autocmd FileType markdown,mkd call lexical#init()
|
||||
autocmd FileType textile call lexical#init()
|
||||
autocmd FileType text call lexical#init({ 'spell': 0 })
|
||||
augroup END
|
||||
|
||||
let g:ale_linters = {
|
||||
\ 'javascript': ['standard'],
|
||||
\ 'vue': ['standard --plugin html "**/*.{js,vue}"']
|
||||
\}
|
||||
let g:racer_experimental_completer = 1
|
||||
\'javascript': ['standard'],
|
||||
\'vue': ['standard --plugin html "**/*.{js,vue}"'],
|
||||
\'jsx': ['standard --plugin html "**/*.{js,jsx}"'],
|
||||
\'rust': ['cargo']
|
||||
\}
|
||||
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
|
||||
|
|
|
@ -8,7 +8,7 @@ export PATH=$ANDROID_SDK_ROOT:$PATH
|
|||
export PATH=$ANDROID_SDK_ROOT/tools:$PATH
|
||||
export PATH=$ANDROID_SDK_ROOT/platform-tools:$PATH
|
||||
|
||||
# Cocos and Ionic
|
||||
# Cocos and Ionic
|
||||
export COCOS_CONSOLE_ROOT=${HOME}/Sovellukset/cocos2d-js-v3.6.1/tools/cocos2d-console/bin
|
||||
export IONIC_INSTALL=${HOME}/Asiakirjat/Work/Android/ionic/node_modules/.bin
|
||||
export PATH=$IONIC_INSTALL:$COCOS_CONSOLE_ROOT:$PATH
|
||||
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user