Updated configurations

nixos
lanxu 2018-11-02 01:05:38 +02:00
parent 582b43c278
commit f6b140f417
25 changed files with 102 additions and 38 deletions

View File

@ -18,7 +18,7 @@ naughty.config.defaults.position = "top_right"
naughty.config.defaults.margin = 8
naughty.config.defaults.gap = 1
naughty.config.defaults.ontop = true
naughty.config.defaults.font = "Roboto 10"
naughty.config.defaults.font = "sans 8"
naughty.config.defaults.icon = "/usr/share/icons/Adwaita/48x48/status/dialog-information.png"
naughty.config.defaults.icon_size = 48
naughty.config.defaults.fg = beautiful.fg_tooltip
@ -115,10 +115,13 @@ myawesomemenu = {
{ "restart", awesome.restart },
{ "quit", function() awesome.quit() end}
}
lock = function()
awful.util.spawn("sync")
awful.util.spawn("xautolock -locknow")
end
mymainmenu = awful.menu({ items = { { "awesome", myawesomemenu, beautiful.awesome_icon },
{ "open terminal", terminal },
{ "lock", "xlock"},
{ "lock", lock},
{ "suspend", "systemctl suspend"}
}
})
@ -250,7 +253,8 @@ awful.screen.connect_for_each_screen(function(s)
--mykeyboardlayout,
wibox.widget.systray(),
spacer,
myserverstatus,
--myserverstatus,
ipaddress,
spacer,
volume,
spacer,
@ -329,6 +333,8 @@ globalkeys = awful.util.table.join(
awful.key({ modkey, }, "w", function () mymainmenu:show() end,
{description = "show main menu", group = "awesome"}),
awful.key({ modkey, "Shift" }, "l", lock,
{description = "lock screen", group = "screen"}),
-- Layout manipulation
awful.key({ modkey, "Shift" }, "j", function () awful.client.swap.byidx( 1) end,
{description = "swap with next client by index", group = "client"}),
@ -551,6 +557,23 @@ awful.rules.rules = {
placement = awful.placement.no_overlap+awful.placement.no_offscreen
}
},
-- Maximized clients.
{ rule_any = {
instance = {
},
class = {
"Zathura",
"MComix"
},
name = {
},
role = {
}
}, properties = {
floating = true,
maximized = true
}
},
-- Floating clients.
{ rule_any = {
@ -565,8 +588,7 @@ awful.rules.rules = {
"mpv",
"Vlc",
"Sxiv",
"Plugin-container",
"Mcomix"
"Plugin-container"
},
name = {
},
@ -584,10 +606,10 @@ awful.rules.rules = {
},
-- Window positioning
{ rule = { class = "Firefox" },
properties = { screen = primary_screen, tag = "Net" } },
{ rule = { class = "Chromium" },
properties = { screen = primary_screen, tag = "Net" } },
{ rule = { class = "Firefox" },
properties = { screen = primary_screen, tag = "Net" } },
{ rule = { class = "Inkscape" },
properties = { screen = primary_screen, tag = "GFX" } },
{ rule = { class = "Gimp" },
@ -595,7 +617,7 @@ awful.rules.rules = {
{ rule = { class = "Blender" },
properties = { screen = primary_screen, tag = "GFX" } },
{ rule = { class = "Steam", name = "Friends List" },
properties = { screen = secondary_screen, tag = "Other", width = 300 } },
properties = { screen = secondary_screen, tag = "Other", width = 300, height = 800, x = 3530, y = 30 } },
{ rule = { class = "Steam", name = "Steam" },
properties = { screen = secondary_screen, tag = "Other" } },
}
@ -692,9 +714,11 @@ client.connect_signal("property::fullscreen", function(c)
if #fullscreened_clients == 1 then
awful.util.spawn("xset s off")
awful.util.spawn("xset -dpms")
naughty.notify({ preset = naughty.config.presets.low,
title = "DPMS information",
text = "Display power management is now OFF"})
naughty.notify({
preset = naughty.config.presets.low,
title = "DPMS information",
text = "Display power management is now OFF"
})
end
else
remove_client(fullscreened_clients, c)
@ -708,6 +732,7 @@ client.connect_signal("unmanage", function(c)
end)
awful.util.spawn_with_shell("run-once pasystray")
awful.util.spawn_with_shell("run-once blueman-applet")
--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")

View File

@ -1,11 +1,15 @@
---------------------------
-- Default awesome theme --
---------------------------
local theme_assets = require("beautiful.theme_assets")
local xresources = require("beautiful.xresources")
local dpi = xresources.apply_dpi
local theme = {}
theme.dir = os.getenv("HOME") .. "/.config/awesome/themes/lanxu"
theme.wallpaper = theme.dir .. "/background.png"
theme.font = "Roboto 9"
theme.font = "Fira Sans 10"
theme.bg_normal = "#222222"
theme.bg_focus = "#8A2BE2"
@ -18,12 +22,15 @@ theme.fg_focus = "#ffffff"
theme.fg_urgent = "#ffffff"
theme.fg_minimize = "#ffffff"
theme.useless_gap = 0
theme.border_width = 1
theme.useless_gap = dpi(0)
theme.border_width = dpi(1)
theme.border_normal = "#000000"
theme.border_focus = "#535d6c"
theme.border_marked = "#91231c"
theme.wibar_height = 20
-- theme.wibar_border_width = 2
-- theme.wibar_border_color = "#222222"
-- There are other variable sets
-- overriding the default one when
-- defined, the sets are:
@ -36,14 +43,22 @@ theme.border_marked = "#91231c"
--theme.taglist_bg_focus = "#ff0000"
-- Display the taglist squares
theme.taglist_squares_sel = theme.dir .. "/icons/square_sel.png"
theme.taglist_squares_unsel = theme.dir .. "/icons/square_unsel.png"
--theme.taglist_squares_sel = theme.dir .. "/icons/square_sel.png"
--theme.taglist_squares_unsel = theme.dir .. "/icons/square_unsel.png"
local taglist_square_size = dpi(4)
theme.taglist_squares_sel = theme_assets.taglist_squares_sel(
taglist_square_size, theme.fg_normal
)
theme.taglist_squares_unsel = theme_assets.taglist_squares_unsel(
taglist_square_size, theme.fg_normal
)
-- Variables set for theming the menu:
-- menu_[bg|fg]_[normal|focus]
-- menu_[border_color|border_width]
theme.menu_submenu_icon = theme.dir .. "/submenu.png"
theme.menu_height = 15
theme.menu_width = 100
theme.menu_height = dpi(15)
theme.menu_width = dpi(100)
-- You can add as many variables as
-- you wish and access them by using
@ -97,7 +112,11 @@ theme.layout_cornerne = theme.dir .. "/layouts/cornernew.png"
theme.layout_cornersw = theme.dir .. "/layouts/cornersww.png"
theme.layout_cornerse = theme.dir .. "/layouts/cornersew.png"
theme.awesome_icon = theme.dir .. "/logo16.png"
theme.awesome_icon = theme_assets.awesome_icon(
theme.menu_height, theme.bg_focus, theme.fg_focus
)
--theme.awesome_icon = theme.dir .. "/logo16.png"
-- Define the icon theme for application icons. If not set then the icons
-- from /usr/share/icons and /usr/share/icons/hicolor will be used.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 187 B

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 254 B

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 186 B

After

Width:  |  Height:  |  Size: 491 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 154 B

After

Width:  |  Height:  |  Size: 350 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 217 B

After

Width:  |  Height:  |  Size: 492 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 176 B

After

Width:  |  Height:  |  Size: 350 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 264 B

After

Width:  |  Height:  |  Size: 696 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 176 B

After

Width:  |  Height:  |  Size: 719 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 244 B

After

Width:  |  Height:  |  Size: 693 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 174 B

After

Width:  |  Height:  |  Size: 695 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 184 B

After

Width:  |  Height:  |  Size: 609 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 161 B

After

Width:  |  Height:  |  Size: 756 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 224 B

After

Width:  |  Height:  |  Size: 619 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 171 B

After

Width:  |  Height:  |  Size: 769 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 184 B

After

Width:  |  Height:  |  Size: 717 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 155 B

After

Width:  |  Height:  |  Size: 937 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 235 B

After

Width:  |  Height:  |  Size: 726 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 165 B

After

Width:  |  Height:  |  Size: 981 B

View File

@ -105,9 +105,13 @@ vicious.register(mydpmsstatus, dpmsstatus, function(widget, args)
end
end)
local notification = {
font = "Monospace 10"
}
-- Servers
local mcstatus = require("lanxu/mcstatus")
myserverstatus = mcstatus({
notification_preset = notification,
settings = function()
widget.markup = create_markup("PLAYERS", totalplayers, "", valuecolor)
end
@ -115,8 +119,16 @@ myserverstatus = mcstatus({
local cloudstatus = require("lanxu/cloudstatus")
mycloudstatus = cloudstatus({
notification_preset = notification,
settings = function()
widget.markup = create_markup("CLOUD", currentstatus, "", valuecolor)
end
})
local ip = require("lanxu/ip")
ipaddress = ip({
homeaddress = "91.157.104.247",
settings = function()
widget.markup = create_markup("IP", address, "", valuecolor)
end
})

View File

@ -1,3 +1,4 @@
profile=opengl-hq
hwdec=auto
osd-font-size=14
ao=pulse

View File

@ -58,11 +58,11 @@ handle_extension() {
exit 1;;
# PDF
pdf)
# Preview as text conversion
pdftotext -l 10 -nopgbrk -q -- "${FILE_PATH}" - && exit 5
exiftool "${FILE_PATH}" && exit 5
exit 1;;
#pdf)
# # Preview as text conversion
# pdftotext -l 10 -nopgbrk -q -- "${FILE_PATH}" - && exit 5
# exiftool "${FILE_PATH}" && exit 5
# exit 1;;
# BitTorrent
torrent)
@ -91,7 +91,7 @@ handle_image() {
case "${FILE_EXTENSION_LOWER}" in
# Comic book previews
cbz|cbr|epub)
comicthumb "${FILE_PATH}" "${IMAGE_CACHE_PATH}" 512 > /dev/null 2>&1 && exit 6
comicthumb.py "${FILE_PATH}" "${IMAGE_CACHE_PATH}" 512 > /dev/null 2>&1 && exit 6
exit 1;;
esac
@ -123,14 +123,14 @@ handle_image() {
exit 1;;
# PDF
# application/pdf)
# pdftoppm -f 1 -l 1 \
# -scale-to-x 1920 \
# -scale-to-y -1 \
# -singlefile \
# -jpeg -tiffcompression jpeg \
# -- "${FILE_PATH}" "${IMAGE_CACHE_PATH%.*}" \
# && exit 6 || exit 1;;
application/pdf)
pdftoppm -f 1 -l 1 \
-scale-to-x 1920 \
-scale-to-y -1 \
-singlefile \
-jpeg -tiffcompression jpeg \
-- "${FILE_PATH}" "${IMAGE_CACHE_PATH%.*}" \
&& exit 6 || exit 1;;
esac
}

14
.vimrc
View File

@ -1,6 +1,5 @@
" set the runtime path to include Vundle and initialize
"call has('python3')
" Start plugins
call plug#begin('~/.vim/plugged')
" Sensible defaults
@ -11,6 +10,9 @@ Plug 'heavenshell/vim-jsdoc', {'for': 'javascript'}
Plug 'sheerun/vim-polyglot'
" C/C++
Plug 'vim-scripts/DoxygenToolkit.vim', {'for': 'cpp'}
" Rust
Plug 'rust-lang/rust.vim', {'for': 'rust'}
Plug 'racer-rust/vim-racer', {'for': 'rust'}
" Syntax checking
"Plug 'Valloric/YouCompleteMe' " alternative #1, full-blown
@ -24,6 +26,7 @@ Plug 'jlanzarotta/bufexplorer'
Plug 'ctrlpvim/ctrlp.vim'
Plug 'ervandew/supertab'
Plug 'reedes/vim-lexical'
Plug 'majutsushi/tagbar'
" Snippets
Plug 'sirver/ultisnips'
@ -56,6 +59,7 @@ let base16colorspace=256
colorscheme base16-default-dark
" Other
set encoding=utf-8
set autoindent " Automatically indent
set cindent " Indentation for c
set number " Add line numbers
@ -129,6 +133,7 @@ autocmd Filetype cpp setlocal ts=4 sw=4 sts=0 expandtab
autocmd Filetype javascript setlocal ts=2 sw=2 sts=0 expandtab
autocmd Filetype vue setlocal ts=2 sw=2 sts=0 expandtab
autocmd Filetype json setlocal ts=2 sw=2 sts=0 expandtab
autocmd Filetype lua setlocal ts=2 sw=2 sts=0 expandtab
autocmd Filetype html setlocal ts=4 sw=4 sts=0 expandtab
" ultisnips
@ -143,6 +148,7 @@ augroup lexical
autocmd FileType text call lexical#init({ 'spell': 0 })
augroup END
"let g:ale_linters = {
""\ 'cpp': ['cppcheck'],
""\}
let g:ale_linters = {
\ 'javascript': ['standard'],
\ 'vue': ['standard --plugin html "**/*.{js,vue}"']
\}

1
.zshrc
View File

@ -63,3 +63,4 @@ source $HOME/.config/base16-shell/scripts/base16-default-dark.sh
# TERM=xterm-256color
#bindkey "${terminfo[khome]}" beginning-of-line
#bindkey "${terminfo[kend]}" end-of-line
export TERMCMD=termite