diff --git a/.config/awesome/rc.lua b/.config/awesome/rc.lua index 6e0fec6..33013d7 100644 --- a/.config/awesome/rc.lua +++ b/.config/awesome/rc.lua @@ -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") diff --git a/.config/awesome/themes/lanxu/theme.lua b/.config/awesome/themes/lanxu/theme.lua index 797d0d0..4edb719 100644 --- a/.config/awesome/themes/lanxu/theme.lua +++ b/.config/awesome/themes/lanxu/theme.lua @@ -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. diff --git a/.config/awesome/themes/lanxu/titlebar/close_focus.png b/.config/awesome/themes/lanxu/titlebar/close_focus.png index b2051b0..e4763b6 100644 Binary files a/.config/awesome/themes/lanxu/titlebar/close_focus.png and b/.config/awesome/themes/lanxu/titlebar/close_focus.png differ diff --git a/.config/awesome/themes/lanxu/titlebar/close_normal.png b/.config/awesome/themes/lanxu/titlebar/close_normal.png index da6028c..7702839 100644 Binary files a/.config/awesome/themes/lanxu/titlebar/close_normal.png and b/.config/awesome/themes/lanxu/titlebar/close_normal.png differ diff --git a/.config/awesome/themes/lanxu/titlebar/floating_focus_active.png b/.config/awesome/themes/lanxu/titlebar/floating_focus_active.png index 5fe84c0..80c1b4a 100644 Binary files a/.config/awesome/themes/lanxu/titlebar/floating_focus_active.png and b/.config/awesome/themes/lanxu/titlebar/floating_focus_active.png differ diff --git a/.config/awesome/themes/lanxu/titlebar/floating_focus_inactive.png b/.config/awesome/themes/lanxu/titlebar/floating_focus_inactive.png index 47f19f6..a96f00c 100644 Binary files a/.config/awesome/themes/lanxu/titlebar/floating_focus_inactive.png and b/.config/awesome/themes/lanxu/titlebar/floating_focus_inactive.png differ diff --git a/.config/awesome/themes/lanxu/titlebar/floating_normal_active.png b/.config/awesome/themes/lanxu/titlebar/floating_normal_active.png index 576fa36..b9c70ca 100644 Binary files a/.config/awesome/themes/lanxu/titlebar/floating_normal_active.png and b/.config/awesome/themes/lanxu/titlebar/floating_normal_active.png differ diff --git a/.config/awesome/themes/lanxu/titlebar/floating_normal_inactive.png b/.config/awesome/themes/lanxu/titlebar/floating_normal_inactive.png index 4adc5e9..55cbc0c 100644 Binary files a/.config/awesome/themes/lanxu/titlebar/floating_normal_inactive.png and b/.config/awesome/themes/lanxu/titlebar/floating_normal_inactive.png differ diff --git a/.config/awesome/themes/lanxu/titlebar/maximized_focus_active.png b/.config/awesome/themes/lanxu/titlebar/maximized_focus_active.png index 7d9a11a..dad461d 100644 Binary files a/.config/awesome/themes/lanxu/titlebar/maximized_focus_active.png and b/.config/awesome/themes/lanxu/titlebar/maximized_focus_active.png differ diff --git a/.config/awesome/themes/lanxu/titlebar/maximized_focus_inactive.png b/.config/awesome/themes/lanxu/titlebar/maximized_focus_inactive.png index bce1d00..3cc46fe 100644 Binary files a/.config/awesome/themes/lanxu/titlebar/maximized_focus_inactive.png and b/.config/awesome/themes/lanxu/titlebar/maximized_focus_inactive.png differ diff --git a/.config/awesome/themes/lanxu/titlebar/maximized_normal_active.png b/.config/awesome/themes/lanxu/titlebar/maximized_normal_active.png index 9f24945..0bbbf6a 100644 Binary files a/.config/awesome/themes/lanxu/titlebar/maximized_normal_active.png and b/.config/awesome/themes/lanxu/titlebar/maximized_normal_active.png differ diff --git a/.config/awesome/themes/lanxu/titlebar/maximized_normal_inactive.png b/.config/awesome/themes/lanxu/titlebar/maximized_normal_inactive.png index 2e56d32..5f1e98f 100644 Binary files a/.config/awesome/themes/lanxu/titlebar/maximized_normal_inactive.png and b/.config/awesome/themes/lanxu/titlebar/maximized_normal_inactive.png differ diff --git a/.config/awesome/themes/lanxu/titlebar/ontop_focus_active.png b/.config/awesome/themes/lanxu/titlebar/ontop_focus_active.png index 41a69e2..d79c8e2 100644 Binary files a/.config/awesome/themes/lanxu/titlebar/ontop_focus_active.png and b/.config/awesome/themes/lanxu/titlebar/ontop_focus_active.png differ diff --git a/.config/awesome/themes/lanxu/titlebar/ontop_focus_inactive.png b/.config/awesome/themes/lanxu/titlebar/ontop_focus_inactive.png index 2f3a2be..03aef5a 100644 Binary files a/.config/awesome/themes/lanxu/titlebar/ontop_focus_inactive.png and b/.config/awesome/themes/lanxu/titlebar/ontop_focus_inactive.png differ diff --git a/.config/awesome/themes/lanxu/titlebar/ontop_normal_active.png b/.config/awesome/themes/lanxu/titlebar/ontop_normal_active.png index 0f937b7..e09f32d 100644 Binary files a/.config/awesome/themes/lanxu/titlebar/ontop_normal_active.png and b/.config/awesome/themes/lanxu/titlebar/ontop_normal_active.png differ diff --git a/.config/awesome/themes/lanxu/titlebar/ontop_normal_inactive.png b/.config/awesome/themes/lanxu/titlebar/ontop_normal_inactive.png index a9a3206..9917b9e 100644 Binary files a/.config/awesome/themes/lanxu/titlebar/ontop_normal_inactive.png and b/.config/awesome/themes/lanxu/titlebar/ontop_normal_inactive.png differ diff --git a/.config/awesome/themes/lanxu/titlebar/sticky_focus_active.png b/.config/awesome/themes/lanxu/titlebar/sticky_focus_active.png index a9bc8a2..8019463 100644 Binary files a/.config/awesome/themes/lanxu/titlebar/sticky_focus_active.png and b/.config/awesome/themes/lanxu/titlebar/sticky_focus_active.png differ diff --git a/.config/awesome/themes/lanxu/titlebar/sticky_focus_inactive.png b/.config/awesome/themes/lanxu/titlebar/sticky_focus_inactive.png index 5493d8e..6d7fe40 100644 Binary files a/.config/awesome/themes/lanxu/titlebar/sticky_focus_inactive.png and b/.config/awesome/themes/lanxu/titlebar/sticky_focus_inactive.png differ diff --git a/.config/awesome/themes/lanxu/titlebar/sticky_normal_active.png b/.config/awesome/themes/lanxu/titlebar/sticky_normal_active.png index 1e150f5..0d003ef 100644 Binary files a/.config/awesome/themes/lanxu/titlebar/sticky_normal_active.png and b/.config/awesome/themes/lanxu/titlebar/sticky_normal_active.png differ diff --git a/.config/awesome/themes/lanxu/titlebar/sticky_normal_inactive.png b/.config/awesome/themes/lanxu/titlebar/sticky_normal_inactive.png index 7e6c99b..f1e8789 100644 Binary files a/.config/awesome/themes/lanxu/titlebar/sticky_normal_inactive.png and b/.config/awesome/themes/lanxu/titlebar/sticky_normal_inactive.png differ diff --git a/.config/awesome/widgets.lua b/.config/awesome/widgets.lua index 65b7c01..6532dc4 100644 --- a/.config/awesome/widgets.lua +++ b/.config/awesome/widgets.lua @@ -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 +}) diff --git a/.config/mpv/mpv.conf b/.config/mpv/mpv.conf index a28642e..234be4d 100644 --- a/.config/mpv/mpv.conf +++ b/.config/mpv/mpv.conf @@ -1,3 +1,4 @@ profile=opengl-hq hwdec=auto osd-font-size=14 +ao=pulse diff --git a/.config/ranger/scope.sh b/.config/ranger/scope.sh index 383035f..5af4370 100755 --- a/.config/ranger/scope.sh +++ b/.config/ranger/scope.sh @@ -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 } diff --git a/.vimrc b/.vimrc index 5bd4e1d..2a952d5 100644 --- a/.vimrc +++ b/.vimrc @@ -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}"'] +\} diff --git a/.zshrc b/.zshrc index 41914c8..bfb6bde 100644 --- a/.zshrc +++ b/.zshrc @@ -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