commit 97578115b2feefd46e137e8a2de146708bc008e7 Author: lanxu Date: Sat Apr 22 16:53:37 2017 +0300 Initial commit diff --git a/.Xresources b/.Xresources new file mode 100644 index 0000000..8c1f00a --- /dev/null +++ b/.Xresources @@ -0,0 +1,30 @@ +Xft.autohint: 0 +Xft.lcdfilter: lcddefault +Xft.hintstyle: hintslight +Xft.hinting: 1 +Xft.antialias: 1 +Xft.rgba: rgb + +!#include ".Xresources.d/theme_solarized" +#include ".Xresources.d/theme_base16" +!#include ".Xresources.d/theme_gruvbox-dark" + +URxvt.perl-ext-common: default,matcher,clipboard +URxvt.font: xft:Fira Code:size=10:style=Regular +URxvt.boldFont: xft:Fira Code:size=10:style=Bold +URxvt.url-launcher: firefox +URxvt.matcher.button: 1 +URxvt*scrollBar: false +URxvt*scrollBar_right: true +URxvt*scrollColor: #000000 +URxvt*letterSpace: -1 +URxvt.keysym.M-c: perl:clipboard:copy +URxvt.keysym.M-v: perl:clipboard:paste +URxvt.keysym.M-C-v: perl:clipboard:paste_escaped +URxvt.iso14755: false +URxvt.iso14755_52: false +URxvt*termName: rxvt-unicode + +XTerm*faceName: Fira Code +XTerm*faceSize: 10 +XTerm*termName: xterm-256color diff --git a/.Xresources.d/theme_base16 b/.Xresources.d/theme_base16 new file mode 100644 index 0000000..413a1e8 --- /dev/null +++ b/.Xresources.d/theme_base16 @@ -0,0 +1,54 @@ +! Base16 Default Dark +! Scheme: Chris Kempson (http://chriskempson.com) + +#define base00 #181818 +#define base01 #282828 +#define base02 #383838 +#define base03 #585858 +#define base04 #b8b8b8 +#define base05 #d8d8d8 +#define base06 #e8e8e8 +#define base07 #f8f8f8 +#define base08 #ab4642 +#define base09 #dc9656 +#define base0A #f7ca88 +#define base0B #a1b56c +#define base0C #86c1b9 +#define base0D #7cafc2 +#define base0E #ba8baf +#define base0F #a16946 + +*.foreground: base05 +#ifdef background_opacity +*.background: [background_opacity]base00 +#else +*.background: base00 +#endif +*.cursorColor: base05 + +*.color0: base00 +*.color1: base08 +*.color2: base0B +*.color3: base0A +*.color4: base0D +*.color5: base0E +*.color6: base0C +*.color7: base05 + +*.color8: base03 +*.color9: base08 +*.color10: base0B +*.color11: base0A +*.color12: base0D +*.color13: base0E +*.color14: base0C +*.color15: base07 + +! Note: colors beyond 15 might not be loaded (e.g., xterm, urxvt), +! use 'shell' template to set these if necessary +*.color16: base09 +*.color17: base0F +*.color18: base01 +*.color19: base02 +*.color20: base04 +*.color21: base06 diff --git a/.Xresources.d/theme_gruvbox-dark b/.Xresources.d/theme_gruvbox-dark new file mode 100644 index 0000000..5beeba2 --- /dev/null +++ b/.Xresources.d/theme_gruvbox-dark @@ -0,0 +1,36 @@ +! ----------------------------------------------------------------------------- +! File: gruvbox-dark.xresources +! Description: Retro groove colorscheme generalized +! Author: morhetz +! Source: https://github.com/morhetz/gruvbox-generalized +! Last Modified: 6 Sep 2014 +! ----------------------------------------------------------------------------- + +! hard contrast: *background: #1d2021 +*background: #282828 +! soft contrast: *background: #32302f +*foreground: #ebdbb2 +! Black + DarkGrey +*color0: #282828 +*color8: #928374 +! DarkRed + Red +*color1: #cc241d +*color9: #fb4934 +! DarkGreen + Green +*color2: #98971a +*color10: #b8bb26 +! DarkYellow + Yellow +*color3: #d79921 +*color11: #fabd2f +! DarkBlue + Blue +*color4: #458588 +*color12: #83a598 +! DarkMagenta + Magenta +*color5: #b16286 +*color13: #d3869b +! DarkCyan + Cyan +*color6: #689d6a +*color14: #8ec07c +! LightGrey + White +*color7: #a89984 +*color15: #ebdbb2 diff --git a/.Xresources.d/theme_solarized b/.Xresources.d/theme_solarized new file mode 100644 index 0000000..cae1f8a --- /dev/null +++ b/.Xresources.d/theme_solarized @@ -0,0 +1,57 @@ +#define S_base03 #002b36 +#define S_base02 #073642 +#define S_base01 #586e75 +#define S_base00 #657b83 +#define S_base0 #839496 +#define S_base1 #93a1a1 +#define S_base2 #eee8d5 +#define S_base3 #fdf6e3 + +*background: S_base03 +*foreground: S_base0 +*fadeColor: S_base03 +*cursorColor: S_base1 +*pointerColorBackground:S_base01 +*pointerColorForeground:S_base1 + +#define S_yellow #b58900 +#define S_orange #cb4b16 +#define S_red #dc322f +#define S_magenta #d33682 +#define S_violet #6c71c4 +#define S_blue #268bd2 +#define S_cyan #2aa198 +#define S_green #859900 + +!! black dark/light +*color0: S_base02 +*color8: S_base03 + +!! red dark/light +*color1: S_red +*color9: S_orange + +!! green dark/light +*color2: S_green +*color10: S_base01 + +!! yellow dark/light +*color3: S_yellow +*color11: S_base00 + +!! blue dark/light +*color4: S_blue +*color12: S_base0 + +!! magenta dark/light +*color5: S_magenta +*color13: S_violet + +!! cyan dark/light +*color6: S_cyan +*color14: S_base1 + +!! white dark/light +*color7: S_base2 +*color15: S_base3 + diff --git a/.bashrc b/.bashrc new file mode 100644 index 0000000..7631d3b --- /dev/null +++ b/.bashrc @@ -0,0 +1,159 @@ +# .bashrc +# Author: jukkalankinengmailcom +# Last Edited: 6.03.2012 +# +# Description: +# Changes the prompt, adds aliases, colorizes all output and includes shell +# completion. Additionally it does many other useful things. +# + +# Check for an interactive session +[ -z "$PS1" ] && return +shopt -s checkwinsize +# disable control echo ^C +stty -ctlecho + +# I want to see some fortune +# command fortune + +# Prompt +#PS1='[\[\e[0;32m\]\u\[\e[m\]@\[\e[0;32m\]\h\[\e[m\]:\[\e[1;34m\]\w\[\e[m\]\[\e[m\]\[\e[1;32m\]\[\e[m\]] \[\e[m\]\[\e[1;37m\]' # Local +PS1='\[\e[m\]\[\e[1;32m\][\[\e[1;34m\]\w\[\e[m\]\[\e[1;32m\]] \[\e[m\]\[\e[1;37m\]' # Local +#PS1='[\[\e[1;31m\]\u\[\e[m\]@\[\e[1;31m\]\h\[\e[m\]:\[\e[1;34m\]\w\[\e[m\]\[\e[1;32m\]\[\e[m\]] \[\e[m\]\[\e[1;37m\]' # Others + +# Aliases +if [ -n "$DISPLAY" ] +then + export EDITOR='gvim --nofork' +else + export EDITOR=vim +fi + +export SHELL=/bin/bash +export VISUAL=$EDITOR +if [ "$TERM" != "dumb" ]; then + + # Colorize and humanize + alias ls='ls --color=auto --time-style=long-iso -h' + eval `dircolors -b` + #alias diff='colordiff' + #alias diff='vimdiff' + alias grep='grep --color=auto' + export GREP_COLOR="1;33" + + # Colorize svn diff + svndiff() + { + svn diff "${@}" | colordiff + } + +fi + +alias top='htop' +#alias nano='nano -wcxO' # use -i for auto-indenting +alias ll="ls -lh" +alias la="ls -a" +alias exit="clear; exit" + +# Source global definitions +if [ -f /etc/bashrc ]; then + . /etc/bashrc +fi +# Shell auto completion +# See .inputrc +if [ -f /etc/bash_completion ]; then + . /etc/bash_completion +fi + +# History search +set show-all-if-ambiguous on # make it fast +HISTCONTROL=ignoredups:ignorespace +HISTCONTROL=ignoreboth +HISTSIZE=1000 +HISTFILESIZE=2000 + +# Append to hist +shopt -s histappend +# fix directories +fixperm () +{ + find * -type d -print0 | xargs -0 chmod 0755 # for directories + find . -type f -print0 | xargs -0 chmod 0644 # for files +} + +# extract with correct tool automagically +extract () +{ + if [ -f $1 ] ; then + case $1 in + *.tar.bz2) tar xvjf $1 ;; + *.tar.xz) tar xvJf $1 ;; + *.tar.gz) tar xvzf $1 ;; + *.bz2) bunzip2 $1 ;; + *.rar) unrar x $1 ;; + *.gz) gunzip $1 ;; + *.tar) tar xvf $1 ;; + *.tbz2) tar xvjf $1 ;; + *.tgz) tar xvzf $1 ;; + *.zip) unzip $1 ;; + *.Z) uncompress $1 ;; + *.7z) 7z x $1 ;; + *) echo "don't know how to extract '$1'..." ;; + esac + else + echo "'$1' is not a valid file!" + fi +} + +# END + +### +# Optional but cool +# +# HTTP PROXY +# export http_proxy="http://www-cache.lut.fi:8080" +# ITLABCPP +# export LD_LIBRARY_PATH=/home/julankin/Work/Research/svn/itlabcpp/trunk/base/lib +# CVS +# export CVSROOT=":pserver:julankin@regulus.it.lut.fi:/net/regulus/project/cvsroot" +# export CVSROOT=":pserver:julankin@www2.it.lut.fi:/srv/cvsroot" + +pacs() { + local CL='\\e[' + local RS='\\e[0;0m' + + echo -e "$(pacman -Ss "$@" | sed " + /^core/ s,.*,${CL}1;31m&${RS}, + /^extra/ s,.*,${CL}0;32m&${RS}, + /^community/ s,.*,${CL}1;35m&${RS}, + /^[^[:space:]]/ s,.*,${CL}0;36m&${RS}, + ")" +} +aursearch() { + #OUTPUT=$(cower --format "%n %o" -s "$1" | grep "$1" | grep -v extension | sort -nrk 2 | column -t | head -n 10) + OUTPUT=$(cower --format "%n %o" -s "$1" | grep "$1" | grep -v extension | sort -nrk 2) + echo -e "Package Votes\n$OUTPUT" | column -t +} + +alias win='rdesktop -g 1280x960 -k fi -d LUT rdesktop.win.lut.fi' +alias pwi='WINEDEBUG=-all WINEPREFIX="/home/lanxu/Pelit/Wine/PWI" wine "C:\\Perfect World Entertainment\\Perfect World International\\launcher\\launcher.exe"' +alias cdmine='cd ~/Asiakirjat/Work/github/minetest' +alias pena2sshmysqltunnel='ssh -N -p 26 lanxu@pena2.dy.fi -L 3306:localhost:3306' +alias fixsteam='find ~/.steam/root/ \( -name "libgcc_s.so*" -o -name "libstdc++.so*" -o -name "libxcb.so*" \) -print -delete' +alias steamgamesdir='cd ~/.local/share/Steam/SteamApps/common' +export WINEARCH=win32 + +# Add environment variable COCOS_CONSOLE_ROOT for cocos2d-x +export COCOS_CONSOLE_ROOT=/home/lanxu/Sovellukset/cocos2d-js-v3.6.1/tools/cocos2d-console/bin +export IONIC_INSTALL=/home/lanxu/Asiakirjat/Work/Android/ionic/node_modules/.bin +export PATH=$IONIC_INSTALL:$COCOS_CONSOLE_ROOT:$PATH + +# NPM no sudo +# https://github.com/sindresorhus/guides/blob/master/npm-global-without-sudo.md +NPM_PACKAGES="${HOME}/.npm-packages" +NODE_PATH="$NPM_PACKAGES/lib/node_modules:$NODE_PATH" +PATH="$NPM_PACKAGES/bin:$PATH" +# Unset manpath so we can inherit from /etc/manpath via the `manpath` +# command +unset MANPATH # delete if you already modified MANPATH elsewhere in your config +MANPATH="$NPM_PACKAGES/share/man:$(manpath)" diff --git a/.config/awesome/gputemp.lua b/.config/awesome/gputemp.lua new file mode 100644 index 0000000..450e49f --- /dev/null +++ b/.config/awesome/gputemp.lua @@ -0,0 +1,24 @@ +-- {{{ Grab environment +local setmetatable = setmetatable +-- }}} + + +local temp = {}; + +-- {{{ Date widget type +local function worker(format, warg) + + local f = io.popen("getGPUTemp.py") + + temp[0] = ""; + for line in f:lines() do + temp[0] = temp[0] .. line + end + + io.close(f) + + return temp +end +-- }}} + +return setmetatable(temp, { __call = function(_, ...) return worker(...) end }) diff --git a/.config/awesome/rc.lua b/.config/awesome/rc.lua new file mode 100644 index 0000000..8fa4f21 --- /dev/null +++ b/.config/awesome/rc.lua @@ -0,0 +1,675 @@ +-- Standard awesome library +local gears = require("gears") +local awful = require("awful") +require("awful.autofocus") +-- Widget and layout library +local wibox = require("wibox") +-- Theme handling library +local beautiful = require("beautiful") +-- Notification library +local naughty = require("naughty") +local menubar = require("menubar") +local hotkeys_popup = require("awful.hotkeys_popup").widget +local lain = require("lain") + +naughty.config.defaults.timeout = 5 +naughty.config.defaults.screen = 1 +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.icon = "/usr/share/icons/Adwaita/48x48/status/dialog-information.png" +naughty.config.defaults.icon_size = 48 +naughty.config.defaults.fg = beautiful.fg_tooltip +naughty.config.defaults.bg = beautiful.bg_tooltip +naughty.config.defaults.border_color = beautiful.border_tooltip +naughty.config.defaults.border_width = 1 +naughty.config.defaults.hover_timeout = nil + +-- {{{ Error handling +-- Check if awesome encountered an error during startup and fell back to +-- another config (This code will only ever execute for the fallback config) +if awesome.startup_errors then + naughty.notify({ preset = naughty.config.presets.critical, + title = "Oops, there were errors during startup!", + text = awesome.startup_errors }) +end + +-- Handle runtime errors after startup +do + local in_error = false + awesome.connect_signal("debug::error", function (err) + -- Make sure we don't go into an endless error loop + if in_error then return end + in_error = true + + naughty.notify({ preset = naughty.config.presets.critical, + title = "Oops, an error happened!", + text = tostring(err) }) + in_error = false + end) +end +-- }}} + +-- {{{ Variable definitions +-- Themes define colours, icons, font and wallpapers. +beautiful.init(awful.util.getdir("config") .. "/themes/lanxu/theme.lua") + +local widgets = require("widgets"); + +-- This is used later as the default terminal and editor to run. +terminal = "urxvt" +editor = os.getenv("EDITOR") or "vim" +editor_cmd = terminal .. " -e " .. editor + +-- Default modkey. +-- Usually, Mod4 is the key with a logo between Control and Alt. +-- If you do not like this or do not have such a key, +-- I suggest you to remap Mod4 to another key using xmodmap or other tools. +-- However, you can use another modifier like Mod1, but it may interact with others. +modkey = "Mod4" + +-- Table of layouts to cover with awful.layout.inc, order matters. +awful.layout.layouts = { + awful.layout.suit.floating, + awful.layout.suit.tile, + awful.layout.suit.tile.left, + awful.layout.suit.tile.bottom, + awful.layout.suit.tile.top, + awful.layout.suit.fair, + awful.layout.suit.fair.horizontal, + awful.layout.suit.spiral, + awful.layout.suit.spiral.dwindle, + awful.layout.suit.max, + awful.layout.suit.max.fullscreen, + awful.layout.suit.magnifier, + awful.layout.suit.corner.nw, + -- awful.layout.suit.corner.ne, + -- awful.layout.suit.corner.sw, + -- awful.layout.suit.corner.se, +} +-- }}} + +-- {{{ Helper functions +local function client_menu_toggle_fn() + local instance = nil + + return function () + if instance and instance.wibox.visible then + instance:hide() + instance = nil + else + instance = awful.menu.clients({ theme = { width = 250 } }) + end + end +end +-- }}} + +-- {{{ Menu +-- Create a launcher widget and a main menu +myawesomemenu = { + { "hotkeys", function() return false, hotkeys_popup.show_help end}, + { "manual", terminal .. " -e man awesome" }, + { "edit config", editor_cmd .. " " .. awesome.conffile }, + { "restart", awesome.restart }, + { "quit", function() awesome.quit() end} +} + +mymainmenu = awful.menu({ items = { { "awesome", myawesomemenu, beautiful.awesome_icon }, + { "open terminal", terminal }, + { "lock", "xlock"}, + { "suspend", "systemctl suspend"} + } + }) + +mylauncher = awful.widget.launcher({ image = beautiful.awesome_icon, + menu = mymainmenu }) + +-- Menubar configuration +menubar.utils.terminal = terminal -- Set the terminal for applications that require it +-- }}} + +-- Keyboard map indicator and switcher +mykeyboardlayout = awful.widget.keyboardlayout() + +-- {{{ Wibar +-- Create a textclock widget +--mytextclock = wibox.widget.textclock() + +-- Create a wibox for each screen and add it +local taglist_buttons = awful.util.table.join( + awful.button({ }, 1, function(t) t:view_only() end), + awful.button({ modkey }, 1, function(t) + if client.focus then + client.focus:move_to_tag(t) + end + end), + awful.button({ }, 3, awful.tag.viewtoggle), + awful.button({ modkey }, 3, function(t) + if client.focus then + client.focus:toggle_tag(t) + end + end), + awful.button({ }, 4, function(t) awful.tag.viewnext(t.screen) end), + awful.button({ }, 5, function(t) awful.tag.viewprev(t.screen) end) + ) + +local tasklist_buttons = awful.util.table.join( + awful.button({ }, 1, function (c) + if c == client.focus then + c.minimized = true + else + -- Without this, the following + -- :isvisible() makes no sense + c.minimized = false + if not c:isvisible() and c.first_tag then + c.first_tag:view_only() + end + -- This will also un-minimize + -- the client, if needed + client.focus = c + c:raise() + end + end), + awful.button({ }, 3, client_menu_toggle_fn()), + awful.button({ }, 4, function () + awful.client.focus.byidx(1) + end), + awful.button({ }, 5, function () + awful.client.focus.byidx(-1) + end)) + +local function set_wallpaper(s) + -- Wallpaper + if beautiful.wallpaper then + local wallpaper = beautiful.wallpaper + -- If wallpaper is a function, call it with the screen + if type(wallpaper) == "function" then + wallpaper = wallpaper(s) + end + gears.wallpaper.maximized(wallpaper, s, true) + end +end + + +-- Re-set wallpaper when a screen's geometry changes (e.g. different resolution) +screen.connect_signal("property::geometry", set_wallpaper) + +-- Tags +-- Define a tag table which hold all screen tags. +tags = { + names = { + 'IRC', + 'Code', + 'Net', + 'GFX', + 'Other', + }, + layout = { + awful.layout.layouts[3], -- 1:IRC + awful.layout.layouts[4], -- 2:Code + awful.layout.layouts[10], -- 3:Net + awful.layout.layouts[10], -- 4:GFX + awful.layout.layouts[1], + } +} + +awful.screen.connect_for_each_screen(function(s) + -- Wallpaper + set_wallpaper(s) + + -- Each screen has its own tag table. + --awful.tag({ "1", "2", "3", "4", "5", "6", "7", "8", "9" }, s, awful.layout.layouts[1]) + tags[s] = awful.tag(tags.names, s, tags.layout) + + -- Create a promptbox for each screen + s.mypromptbox = awful.widget.prompt() + -- Create an imagebox widget which will contains an icon indicating which layout we're using. + -- We need one layoutbox per screen. + s.mylayoutbox = awful.widget.layoutbox(s) + s.mylayoutbox:buttons(awful.util.table.join( + awful.button({ }, 1, function () awful.layout.inc( 1) end), + awful.button({ }, 3, function () awful.layout.inc(-1) end), + awful.button({ }, 4, function () awful.layout.inc( 1) end), + awful.button({ }, 5, function () awful.layout.inc(-1) end))) + -- Create a taglist widget + s.mytaglist = awful.widget.taglist(s, awful.widget.taglist.filter.all, taglist_buttons) + + -- Create a tasklist widget + s.mytasklist = awful.widget.tasklist(s, awful.widget.tasklist.filter.currenttags, tasklist_buttons) + + -- Create the wibox + s.mywibox = awful.wibar({ position = "top", screen = s }) + + -- Add widgets to the wibox + s.mywibox:setup { + layout = wibox.layout.align.horizontal, + { -- Left widgets + layout = wibox.layout.fixed.horizontal, + mylauncher, + s.mytaglist, + s.mypromptbox, + }, + s.mytasklist, -- Middle widget + { -- Right widgets + layout = wibox.layout.fixed.horizontal, + mykeyboardlayout, + wibox.widget.systray(), + spacer, + volume, + spacer, + mycpu, + spacer, + mymem, + spacer, + myweather, + spacer, + mycputemp, + spacer, + mygputemp, + spacer, + mytextclock, + spacer, + s.mylayoutbox, + }, + } +end) +-- }}} + +-- {{{ Mouse bindings +root.buttons(awful.util.table.join( + awful.button({ }, 3, function () mymainmenu:toggle() end), + awful.button({ }, 4, awful.tag.viewnext), + awful.button({ }, 5, awful.tag.viewprev) +)) +-- }}} + +-- {{{ Key bindings +globalkeys = awful.util.table.join( + awful.key({ modkey, }, "s", hotkeys_popup.show_help, + {description="show help", group="awesome"}), + awful.key({ modkey, }, "Left", awful.tag.viewprev, + {description = "view previous", group = "tag"}), + awful.key({ modkey, }, "Right", awful.tag.viewnext, + {description = "view next", group = "tag"}), + awful.key({ modkey, }, "Escape", awful.tag.history.restore, + {description = "go back", group = "tag"}), + + awful.key({ modkey, }, "j", + function () + awful.client.focus.byidx( 1) + end, + {description = "focus next by index", group = "client"} + ), + awful.key({ modkey, }, "k", + function () + awful.client.focus.byidx(-1) + end, + {description = "focus previous by index", group = "client"} + ), + awful.key({ modkey, }, "w", function () mymainmenu:show() end, + {description = "show main menu", group = "awesome"}), + + -- Layout manipulation + awful.key({ modkey, "Shift" }, "j", function () awful.client.swap.byidx( 1) end, + {description = "swap with next client by index", group = "client"}), + awful.key({ modkey, "Shift" }, "k", function () awful.client.swap.byidx( -1) end, + {description = "swap with previous client by index", group = "client"}), + awful.key({ modkey, "Control" }, "j", function () awful.screen.focus_relative( 1) end, + {description = "focus the next screen", group = "screen"}), + awful.key({ modkey, "Control" }, "k", function () awful.screen.focus_relative(-1) end, + {description = "focus the previous screen", group = "screen"}), + awful.key({ modkey, }, "u", awful.client.urgent.jumpto, + {description = "jump to urgent client", group = "client"}), + awful.key({ modkey, }, "Tab", + function () + awful.client.focus.history.previous() + if client.focus then + client.focus:raise() + end + end, + {description = "go back", group = "client"}), + + -- Standard program + awful.key({ modkey, }, "Return", function () awful.spawn(terminal) end, + {description = "open a terminal", group = "launcher"}), + awful.key({ modkey, "Control" }, "r", awesome.restart, + {description = "reload awesome", group = "awesome"}), + awful.key({ modkey, "Shift" }, "q", awesome.quit, + {description = "quit awesome", group = "awesome"}), + + awful.key({ modkey, }, "l", function () awful.tag.incmwfact( 0.05) end, + {description = "increase master width factor", group = "layout"}), + awful.key({ modkey, }, "h", function () awful.tag.incmwfact(-0.05) end, + {description = "decrease master width factor", group = "layout"}), + awful.key({ modkey, "Shift" }, "h", function () awful.tag.incnmaster( 1, nil, true) end, + {description = "increase the number of master clients", group = "layout"}), + awful.key({ modkey, "Shift" }, "l", function () awful.tag.incnmaster(-1, nil, true) end, + {description = "decrease the number of master clients", group = "layout"}), + awful.key({ modkey, "Control" }, "h", function () awful.tag.incncol( 1, nil, true) end, + {description = "increase the number of columns", group = "layout"}), + awful.key({ modkey, "Control" }, "l", function () awful.tag.incncol(-1, nil, true) end, + {description = "decrease the number of columns", group = "layout"}), + awful.key({ modkey, }, "space", function () awful.layout.inc( 1) end, + {description = "select next", group = "layout"}), + awful.key({ modkey, "Shift" }, "space", function () awful.layout.inc(-1) end, + {description = "select previous", group = "layout"}), + + awful.key({ modkey, "Control" }, "n", + function () + local c = awful.client.restore() + -- Focus restored client + if c then + client.focus = c + c:raise() + end + end, + {description = "restore minimized", group = "client"}), + + -- Prompt + awful.key({ modkey }, "r", function () awful.screen.focused().mypromptbox:run() end, + {description = "run prompt", group = "launcher"}), + + awful.key({ modkey }, "x", + function () + awful.prompt.run { + prompt = "Run Lua code: ", + textbox = awful.screen.focused().mypromptbox.widget, + exe_callback = awful.util.eval, + history_path = awful.util.get_cache_dir() .. "/history_eval" + } + end, + {description = "lua execute prompt", group = "awesome"}), + -- Menubar + awful.key({ modkey }, "p", function() menubar.show() end, + {description = "show the menubar", group = "launcher"}) +) + +clientkeys = awful.util.table.join( + awful.key({ modkey, }, "f", + function (c) + c.fullscreen = not c.fullscreen + c:raise() + end, + {description = "toggle fullscreen", group = "client"}), + awful.key({ modkey, "Shift" }, "c", function (c) c:kill() end, + {description = "close", group = "client"}), + awful.key({ modkey, "Control" }, "space", awful.client.floating.toggle , + {description = "toggle floating", group = "client"}), + awful.key({ modkey, "Control" }, "Return", function (c) c:swap(awful.client.getmaster()) end, + {description = "move to master", group = "client"}), + awful.key({ modkey, }, "o", function (c) c:move_to_screen() end, + {description = "move to screen", group = "client"}), + awful.key({ modkey, }, "t", function (c) c.ontop = not c.ontop end, + {description = "toggle keep on top", group = "client"}), + awful.key({ modkey, }, "n", + function (c) + -- The client currently has the input focus, so it cannot be + -- minimized, since minimized clients can't have the focus. + c.minimized = true + end , + {description = "minimize", group = "client"}), + awful.key({ modkey, }, "m", + function (c) + c.maximized = not c.maximized + c:raise() + end , + {description = "maximize", group = "client"}) +) + +-- Bind all key numbers to tags. +-- Be careful: we use keycodes to make it works on any keyboard layout. +-- This should map on the top row of your keyboard, usually 1 to 9. +for i = 1, 9 do + globalkeys = awful.util.table.join(globalkeys, + -- View tag only. + awful.key({ modkey }, "#" .. i + 9, + function () + local screen = awful.screen.focused() + local tag = screen.tags[i] + if tag then + tag:view_only() + end + end, + {description = "view tag #"..i, group = "tag"}), + -- Toggle tag display. + awful.key({ modkey, "Control" }, "#" .. i + 9, + function () + local screen = awful.screen.focused() + local tag = screen.tags[i] + if tag then + awful.tag.viewtoggle(tag) + end + end, + {description = "toggle tag #" .. i, group = "tag"}), + -- Move client to tag. + awful.key({ modkey, "Shift" }, "#" .. i + 9, + function () + if client.focus then + local tag = client.focus.screen.tags[i] + if tag then + client.focus:move_to_tag(tag) + end + end + end, + {description = "move focused client to tag #"..i, group = "tag"}), + -- Toggle tag on focused client. + awful.key({ modkey, "Control", "Shift" }, "#" .. i + 9, + function () + if client.focus then + local tag = client.focus.screen.tags[i] + if tag then + client.focus:toggle_tag(tag) + end + end + end, + {description = "toggle focused client on tag #" .. i, group = "tag"}), + -- Pulseaudio + awful.key({ any }, "XF86AudioRaiseVolume", + function() + awful.spawn(string.format("pactl set-sink-volume %s +1%%", volume.device)) + volume.update() + end, + {description = "Raise audio volume", group = "audio"}), + awful.key({ any }, "XF86AudioLowerVolume", + function() + awful.spawn(string.format("pactl set-sink-volume %s -1%%", volume.device)) + volume.update() + end, + {description = "Lower audio volume", group = "audio"}), + awful.key({ any }, "XF86AudioMute", + function() + awful.spawn(string.format("pactl set-sink-mute %s toggle", volume.device)) + volume.update() + end, + {description = "mute audio", group = "audio"}), + awful.key({ any }, "Print", + function () + awful.util.spawn_with_shell("FILE=$(escrotum); mv $FILE $(xdg-user-dir PICTURES)/", True) + end, + {description = "Take screenshot", group = "audio"}) + ) +end + +clientbuttons = awful.util.table.join( + awful.button({ }, 1, function (c) client.focus = c; c:raise() end), + awful.button({ modkey }, 1, awful.mouse.client.move), + awful.button({ modkey }, 3, awful.mouse.client.resize)) + +-- Set keys +root.keys(globalkeys) +-- }}} + +-- {{{ Rules +-- Rules to apply to new clients (through the "manage" signal). +awful.rules.rules = { + -- All clients will match this rule. + { rule = { }, + properties = { border_width = beautiful.border_width, + border_color = beautiful.border_normal, + focus = awful.client.focus.filter, + raise = true, + keys = clientkeys, + buttons = clientbuttons, + screen = awful.screen.preferred, + placement = awful.placement.no_overlap+awful.placement.no_offscreen + } + }, + + -- Floating clients. + { rule_any = { + instance = { + }, + class = { + "Arandr", + "Steam", + "itch", + "mpv", + "Vlc", + "Sxiv", + "Plugin-container" + }, + name = { + }, + role = { + "pop-up", -- e.g. Google Chrome's (detached) Developer Tools. + } + }, properties = { floating = true }}, + + -- Add titlebars to normal clients and dialogs + { rule_any = {type = { "normal", "dialog" } + }, properties = { titlebars_enabled = false } + }, + + -- Window positioning + { rule = { class = "Firefox" }, + properties = { screen = 1, tag = "Net" } }, + { rule = { class = "Chromium" }, + properties = { screen = 1, tag = "Net" } }, + { rule = { class = "Gimp" }, + properties = { screen = 1, tag = "GFX" } }, + { rule = { class = "Blender" }, + properties = { screen = 1, tag = "GFX" } }, + { rule = { class = "Steam" }, + properties = { screen = 1, tag = "Other" } }, + { rule = { class = "Steam", name = "Kaverit" }, + properties = { screen = 1, tag = "Other", width = 200 } }, +} +-- }}} + +-- {{{ Signals +-- Signal function to execute when a new client appears. +client.connect_signal("manage", function (c) + -- Set the windows at the slave, + -- i.e. put it at the end of others instead of setting it master. + -- if not awesome.startup then awful.client.setslave(c) end + + if awesome.startup and + not c.size_hints.user_position + and not c.size_hints.program_position then + -- Prevent clients from being unreachable after screen count changes. + awful.placement.no_offscreen(c) + end +end) + +-- Add a titlebar if titlebars_enabled is set to true in the rules. +client.connect_signal("request::titlebars", function(c) + -- buttons for the titlebar + local buttons = awful.util.table.join( + awful.button({ }, 1, function() + client.focus = c + c:raise() + awful.mouse.client.move(c) + end), + awful.button({ }, 3, function() + client.focus = c + c:raise() + awful.mouse.client.resize(c) + end) + ) + + awful.titlebar(c) : setup { + { -- Left + awful.titlebar.widget.iconwidget(c), + buttons = buttons, + layout = wibox.layout.fixed.horizontal + }, + { -- Middle + { -- Title + align = "center", + widget = awful.titlebar.widget.titlewidget(c) + }, + buttons = buttons, + layout = wibox.layout.flex.horizontal + }, + { -- Right + awful.titlebar.widget.floatingbutton (c), + awful.titlebar.widget.maximizedbutton(c), + awful.titlebar.widget.stickybutton (c), + awful.titlebar.widget.ontopbutton (c), + awful.titlebar.widget.closebutton (c), + layout = wibox.layout.fixed.horizontal() + }, + layout = wibox.layout.align.horizontal + } +end) + +-- Enable sloppy focus, so that focus follows mouse. +client.connect_signal("mouse::enter", function(c) + if awful.layout.get(c.screen) ~= awful.layout.suit.magnifier + and awful.client.focus.filter(c) then + client.focus = c + end +end) + +client.connect_signal("focus", function(c) c.border_color = beautiful.border_focus end) +client.connect_signal("unfocus", function(c) c.border_color = beautiful.border_normal end) +-- }}} + +local fullscreened_clients = {} + +local function remove_client(tabl, c) + local index = awful.util.table.hasitem(tabl, c) + if index then + table.remove(tabl, index) + if #tabl == 0 then + 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 + +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 off") + awful.util.spawn("xset -dpms") + naughty.notify({ preset = naughty.config.presets.low, + title = "DPMS information", + text = "Display power management is now OFF"}) + end + else + remove_client(fullscreened_clients, c) + end +end) + +client.connect_signal("unmanage", function(c) + if c.fullscreen then + remove_client(fullscreened_clients, c) + end +end) + +awful.util.spawn_with_shell("run-once pasystray") +--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") + +--awful.util.spawn_with_shell("run-once syncthing-gtk") diff --git a/.config/awesome/themes/lanxu/background.png b/.config/awesome/themes/lanxu/background.png new file mode 100644 index 0000000..28d5059 Binary files /dev/null and b/.config/awesome/themes/lanxu/background.png differ diff --git a/.config/awesome/themes/lanxu/icons/ac.png b/.config/awesome/themes/lanxu/icons/ac.png new file mode 100644 index 0000000..96efcb4 Binary files /dev/null and b/.config/awesome/themes/lanxu/icons/ac.png differ diff --git a/.config/awesome/themes/lanxu/icons/battery.png b/.config/awesome/themes/lanxu/icons/battery.png new file mode 100644 index 0000000..8c85596 Binary files /dev/null and b/.config/awesome/themes/lanxu/icons/battery.png differ diff --git a/.config/awesome/themes/lanxu/icons/battery_empty.png b/.config/awesome/themes/lanxu/icons/battery_empty.png new file mode 100644 index 0000000..00821c9 Binary files /dev/null and b/.config/awesome/themes/lanxu/icons/battery_empty.png differ diff --git a/.config/awesome/themes/lanxu/icons/battery_low.png b/.config/awesome/themes/lanxu/icons/battery_low.png new file mode 100644 index 0000000..29f3fc5 Binary files /dev/null and b/.config/awesome/themes/lanxu/icons/battery_low.png differ diff --git a/.config/awesome/themes/lanxu/icons/centerfair.png b/.config/awesome/themes/lanxu/icons/centerfair.png new file mode 100644 index 0000000..c4f64b0 Binary files /dev/null and b/.config/awesome/themes/lanxu/icons/centerfair.png differ diff --git a/.config/awesome/themes/lanxu/icons/centerwork.png b/.config/awesome/themes/lanxu/icons/centerwork.png new file mode 100644 index 0000000..9071516 Binary files /dev/null and b/.config/awesome/themes/lanxu/icons/centerwork.png differ diff --git a/.config/awesome/themes/lanxu/icons/centerworkh.png b/.config/awesome/themes/lanxu/icons/centerworkh.png new file mode 100644 index 0000000..b1d1379 Binary files /dev/null and b/.config/awesome/themes/lanxu/icons/centerworkh.png differ diff --git a/.config/awesome/themes/lanxu/icons/cpu.png b/.config/awesome/themes/lanxu/icons/cpu.png new file mode 100644 index 0000000..35af1c3 Binary files /dev/null and b/.config/awesome/themes/lanxu/icons/cpu.png differ diff --git a/.config/awesome/themes/lanxu/icons/dwindle.png b/.config/awesome/themes/lanxu/icons/dwindle.png new file mode 100644 index 0000000..649ea99 Binary files /dev/null and b/.config/awesome/themes/lanxu/icons/dwindle.png differ diff --git a/.config/awesome/themes/lanxu/icons/fairh.png b/.config/awesome/themes/lanxu/icons/fairh.png new file mode 100644 index 0000000..62d3d99 Binary files /dev/null and b/.config/awesome/themes/lanxu/icons/fairh.png differ diff --git a/.config/awesome/themes/lanxu/icons/fairv.png b/.config/awesome/themes/lanxu/icons/fairv.png new file mode 100644 index 0000000..131dd0f Binary files /dev/null and b/.config/awesome/themes/lanxu/icons/fairv.png differ diff --git a/.config/awesome/themes/lanxu/icons/floating.png b/.config/awesome/themes/lanxu/icons/floating.png new file mode 100644 index 0000000..d25c47b Binary files /dev/null and b/.config/awesome/themes/lanxu/icons/floating.png differ diff --git a/.config/awesome/themes/lanxu/icons/hdd.png b/.config/awesome/themes/lanxu/icons/hdd.png new file mode 100644 index 0000000..0fb6833 Binary files /dev/null and b/.config/awesome/themes/lanxu/icons/hdd.png differ diff --git a/.config/awesome/themes/lanxu/icons/magnifier.png b/.config/awesome/themes/lanxu/icons/magnifier.png new file mode 100644 index 0000000..60d3e0d Binary files /dev/null and b/.config/awesome/themes/lanxu/icons/magnifier.png differ diff --git a/.config/awesome/themes/lanxu/icons/mail.png b/.config/awesome/themes/lanxu/icons/mail.png new file mode 100644 index 0000000..474e602 Binary files /dev/null and b/.config/awesome/themes/lanxu/icons/mail.png differ diff --git a/.config/awesome/themes/lanxu/icons/mail_on.png b/.config/awesome/themes/lanxu/icons/mail_on.png new file mode 100644 index 0000000..19106d7 Binary files /dev/null and b/.config/awesome/themes/lanxu/icons/mail_on.png differ diff --git a/.config/awesome/themes/lanxu/icons/max.png b/.config/awesome/themes/lanxu/icons/max.png new file mode 100644 index 0000000..5b0a5b7 Binary files /dev/null and b/.config/awesome/themes/lanxu/icons/max.png differ diff --git a/.config/awesome/themes/lanxu/icons/mem.png b/.config/awesome/themes/lanxu/icons/mem.png new file mode 100644 index 0000000..7860a1a Binary files /dev/null and b/.config/awesome/themes/lanxu/icons/mem.png differ diff --git a/.config/awesome/themes/lanxu/icons/net.png b/.config/awesome/themes/lanxu/icons/net.png new file mode 100644 index 0000000..bc42fdc Binary files /dev/null and b/.config/awesome/themes/lanxu/icons/net.png differ diff --git a/.config/awesome/themes/lanxu/icons/net_wired.png b/.config/awesome/themes/lanxu/icons/net_wired.png new file mode 100644 index 0000000..e8cc2bd Binary files /dev/null and b/.config/awesome/themes/lanxu/icons/net_wired.png differ diff --git a/.config/awesome/themes/lanxu/icons/note.png b/.config/awesome/themes/lanxu/icons/note.png new file mode 100644 index 0000000..baa29c3 Binary files /dev/null and b/.config/awesome/themes/lanxu/icons/note.png differ diff --git a/.config/awesome/themes/lanxu/icons/note_on.png b/.config/awesome/themes/lanxu/icons/note_on.png new file mode 100644 index 0000000..1a7ab94 Binary files /dev/null and b/.config/awesome/themes/lanxu/icons/note_on.png differ diff --git a/.config/awesome/themes/lanxu/icons/scissors.png b/.config/awesome/themes/lanxu/icons/scissors.png new file mode 100644 index 0000000..f8c700d Binary files /dev/null and b/.config/awesome/themes/lanxu/icons/scissors.png differ diff --git a/.config/awesome/themes/lanxu/icons/spiral.png b/.config/awesome/themes/lanxu/icons/spiral.png new file mode 100644 index 0000000..d9ee0f6 Binary files /dev/null and b/.config/awesome/themes/lanxu/icons/spiral.png differ diff --git a/.config/awesome/themes/lanxu/icons/square_sel.png b/.config/awesome/themes/lanxu/icons/square_sel.png new file mode 100644 index 0000000..1102a9f Binary files /dev/null and b/.config/awesome/themes/lanxu/icons/square_sel.png differ diff --git a/.config/awesome/themes/lanxu/icons/square_unsel.png b/.config/awesome/themes/lanxu/icons/square_unsel.png new file mode 100644 index 0000000..7386b85 Binary files /dev/null and b/.config/awesome/themes/lanxu/icons/square_unsel.png differ diff --git a/.config/awesome/themes/lanxu/icons/submenu.png b/.config/awesome/themes/lanxu/icons/submenu.png new file mode 100644 index 0000000..b55ebce Binary files /dev/null and b/.config/awesome/themes/lanxu/icons/submenu.png differ diff --git a/.config/awesome/themes/lanxu/icons/task.png b/.config/awesome/themes/lanxu/icons/task.png new file mode 100644 index 0000000..9701b68 Binary files /dev/null and b/.config/awesome/themes/lanxu/icons/task.png differ diff --git a/.config/awesome/themes/lanxu/icons/temp.png b/.config/awesome/themes/lanxu/icons/temp.png new file mode 100644 index 0000000..6793a9f Binary files /dev/null and b/.config/awesome/themes/lanxu/icons/temp.png differ diff --git a/.config/awesome/themes/lanxu/icons/termfair.png b/.config/awesome/themes/lanxu/icons/termfair.png new file mode 100644 index 0000000..3e06023 Binary files /dev/null and b/.config/awesome/themes/lanxu/icons/termfair.png differ diff --git a/.config/awesome/themes/lanxu/icons/tile.png b/.config/awesome/themes/lanxu/icons/tile.png new file mode 100644 index 0000000..922c05c Binary files /dev/null and b/.config/awesome/themes/lanxu/icons/tile.png differ diff --git a/.config/awesome/themes/lanxu/icons/tilebottom.png b/.config/awesome/themes/lanxu/icons/tilebottom.png new file mode 100644 index 0000000..6ec9cb8 Binary files /dev/null and b/.config/awesome/themes/lanxu/icons/tilebottom.png differ diff --git a/.config/awesome/themes/lanxu/icons/tileleft.png b/.config/awesome/themes/lanxu/icons/tileleft.png new file mode 100644 index 0000000..8e3d2d6 Binary files /dev/null and b/.config/awesome/themes/lanxu/icons/tileleft.png differ diff --git a/.config/awesome/themes/lanxu/icons/tiletop.png b/.config/awesome/themes/lanxu/icons/tiletop.png new file mode 100644 index 0000000..3da75a1 Binary files /dev/null and b/.config/awesome/themes/lanxu/icons/tiletop.png differ diff --git a/.config/awesome/themes/lanxu/icons/vol.png b/.config/awesome/themes/lanxu/icons/vol.png new file mode 100644 index 0000000..bbf33d4 Binary files /dev/null and b/.config/awesome/themes/lanxu/icons/vol.png differ diff --git a/.config/awesome/themes/lanxu/icons/vol_low.png b/.config/awesome/themes/lanxu/icons/vol_low.png new file mode 100644 index 0000000..aa3ce4d Binary files /dev/null and b/.config/awesome/themes/lanxu/icons/vol_low.png differ diff --git a/.config/awesome/themes/lanxu/icons/vol_mute.png b/.config/awesome/themes/lanxu/icons/vol_mute.png new file mode 100644 index 0000000..e855fd2 Binary files /dev/null and b/.config/awesome/themes/lanxu/icons/vol_mute.png differ diff --git a/.config/awesome/themes/lanxu/icons/vol_no.png b/.config/awesome/themes/lanxu/icons/vol_no.png new file mode 100644 index 0000000..bbe917b Binary files /dev/null and b/.config/awesome/themes/lanxu/icons/vol_no.png differ diff --git a/.config/awesome/themes/lanxu/layouts/cornerne.png b/.config/awesome/themes/lanxu/layouts/cornerne.png new file mode 100644 index 0000000..e7fb61b Binary files /dev/null and b/.config/awesome/themes/lanxu/layouts/cornerne.png differ diff --git a/.config/awesome/themes/lanxu/layouts/cornernew.png b/.config/awesome/themes/lanxu/layouts/cornernew.png new file mode 100644 index 0000000..aeaf331 Binary files /dev/null and b/.config/awesome/themes/lanxu/layouts/cornernew.png differ diff --git a/.config/awesome/themes/lanxu/layouts/cornernw.png b/.config/awesome/themes/lanxu/layouts/cornernw.png new file mode 100644 index 0000000..bac5672 Binary files /dev/null and b/.config/awesome/themes/lanxu/layouts/cornernw.png differ diff --git a/.config/awesome/themes/lanxu/layouts/cornernww.png b/.config/awesome/themes/lanxu/layouts/cornernww.png new file mode 100644 index 0000000..93b6706 Binary files /dev/null and b/.config/awesome/themes/lanxu/layouts/cornernww.png differ diff --git a/.config/awesome/themes/lanxu/layouts/cornerse.png b/.config/awesome/themes/lanxu/layouts/cornerse.png new file mode 100644 index 0000000..092a905 Binary files /dev/null and b/.config/awesome/themes/lanxu/layouts/cornerse.png differ diff --git a/.config/awesome/themes/lanxu/layouts/cornersew.png b/.config/awesome/themes/lanxu/layouts/cornersew.png new file mode 100644 index 0000000..35e900b Binary files /dev/null and b/.config/awesome/themes/lanxu/layouts/cornersew.png differ diff --git a/.config/awesome/themes/lanxu/layouts/cornersw.png b/.config/awesome/themes/lanxu/layouts/cornersw.png new file mode 100644 index 0000000..0d519b5 Binary files /dev/null and b/.config/awesome/themes/lanxu/layouts/cornersw.png differ diff --git a/.config/awesome/themes/lanxu/layouts/cornersww.png b/.config/awesome/themes/lanxu/layouts/cornersww.png new file mode 100644 index 0000000..2d744fd Binary files /dev/null and b/.config/awesome/themes/lanxu/layouts/cornersww.png differ diff --git a/.config/awesome/themes/lanxu/layouts/dwindle.png b/.config/awesome/themes/lanxu/layouts/dwindle.png new file mode 100644 index 0000000..0ec7a35 Binary files /dev/null and b/.config/awesome/themes/lanxu/layouts/dwindle.png differ diff --git a/.config/awesome/themes/lanxu/layouts/dwindlew.png b/.config/awesome/themes/lanxu/layouts/dwindlew.png new file mode 100644 index 0000000..8457892 Binary files /dev/null and b/.config/awesome/themes/lanxu/layouts/dwindlew.png differ diff --git a/.config/awesome/themes/lanxu/layouts/fairh.png b/.config/awesome/themes/lanxu/layouts/fairh.png new file mode 100644 index 0000000..3c2d36b Binary files /dev/null and b/.config/awesome/themes/lanxu/layouts/fairh.png differ diff --git a/.config/awesome/themes/lanxu/layouts/fairhw.png b/.config/awesome/themes/lanxu/layouts/fairhw.png new file mode 100644 index 0000000..410e292 Binary files /dev/null and b/.config/awesome/themes/lanxu/layouts/fairhw.png differ diff --git a/.config/awesome/themes/lanxu/layouts/fairv.png b/.config/awesome/themes/lanxu/layouts/fairv.png new file mode 100644 index 0000000..ad99f4b Binary files /dev/null and b/.config/awesome/themes/lanxu/layouts/fairv.png differ diff --git a/.config/awesome/themes/lanxu/layouts/fairvw.png b/.config/awesome/themes/lanxu/layouts/fairvw.png new file mode 100644 index 0000000..1a4ee27 Binary files /dev/null and b/.config/awesome/themes/lanxu/layouts/fairvw.png differ diff --git a/.config/awesome/themes/lanxu/layouts/floating.png b/.config/awesome/themes/lanxu/layouts/floating.png new file mode 100644 index 0000000..bf74990 Binary files /dev/null and b/.config/awesome/themes/lanxu/layouts/floating.png differ diff --git a/.config/awesome/themes/lanxu/layouts/floatingw.png b/.config/awesome/themes/lanxu/layouts/floatingw.png new file mode 100644 index 0000000..7aecb06 Binary files /dev/null and b/.config/awesome/themes/lanxu/layouts/floatingw.png differ diff --git a/.config/awesome/themes/lanxu/layouts/fullscreen.png b/.config/awesome/themes/lanxu/layouts/fullscreen.png new file mode 100644 index 0000000..d02f6fc Binary files /dev/null and b/.config/awesome/themes/lanxu/layouts/fullscreen.png differ diff --git a/.config/awesome/themes/lanxu/layouts/fullscreenw.png b/.config/awesome/themes/lanxu/layouts/fullscreenw.png new file mode 100644 index 0000000..5c35bfa Binary files /dev/null and b/.config/awesome/themes/lanxu/layouts/fullscreenw.png differ diff --git a/.config/awesome/themes/lanxu/layouts/magnifier.png b/.config/awesome/themes/lanxu/layouts/magnifier.png new file mode 100644 index 0000000..2ea2792 Binary files /dev/null and b/.config/awesome/themes/lanxu/layouts/magnifier.png differ diff --git a/.config/awesome/themes/lanxu/layouts/magnifierw.png b/.config/awesome/themes/lanxu/layouts/magnifierw.png new file mode 100644 index 0000000..5cd5e16 Binary files /dev/null and b/.config/awesome/themes/lanxu/layouts/magnifierw.png differ diff --git a/.config/awesome/themes/lanxu/layouts/max.png b/.config/awesome/themes/lanxu/layouts/max.png new file mode 100644 index 0000000..8d20844 Binary files /dev/null and b/.config/awesome/themes/lanxu/layouts/max.png differ diff --git a/.config/awesome/themes/lanxu/layouts/maxw.png b/.config/awesome/themes/lanxu/layouts/maxw.png new file mode 100644 index 0000000..85f5ce3 Binary files /dev/null and b/.config/awesome/themes/lanxu/layouts/maxw.png differ diff --git a/.config/awesome/themes/lanxu/layouts/spiral.png b/.config/awesome/themes/lanxu/layouts/spiral.png new file mode 100644 index 0000000..ca41814 Binary files /dev/null and b/.config/awesome/themes/lanxu/layouts/spiral.png differ diff --git a/.config/awesome/themes/lanxu/layouts/spiralw.png b/.config/awesome/themes/lanxu/layouts/spiralw.png new file mode 100644 index 0000000..d128461 Binary files /dev/null and b/.config/awesome/themes/lanxu/layouts/spiralw.png differ diff --git a/.config/awesome/themes/lanxu/layouts/tile.png b/.config/awesome/themes/lanxu/layouts/tile.png new file mode 100644 index 0000000..db1ce15 Binary files /dev/null and b/.config/awesome/themes/lanxu/layouts/tile.png differ diff --git a/.config/awesome/themes/lanxu/layouts/tilebottom.png b/.config/awesome/themes/lanxu/layouts/tilebottom.png new file mode 100644 index 0000000..73a72fe Binary files /dev/null and b/.config/awesome/themes/lanxu/layouts/tilebottom.png differ diff --git a/.config/awesome/themes/lanxu/layouts/tilebottomw.png b/.config/awesome/themes/lanxu/layouts/tilebottomw.png new file mode 100644 index 0000000..64aa289 Binary files /dev/null and b/.config/awesome/themes/lanxu/layouts/tilebottomw.png differ diff --git a/.config/awesome/themes/lanxu/layouts/tileleft.png b/.config/awesome/themes/lanxu/layouts/tileleft.png new file mode 100644 index 0000000..829475a Binary files /dev/null and b/.config/awesome/themes/lanxu/layouts/tileleft.png differ diff --git a/.config/awesome/themes/lanxu/layouts/tileleftw.png b/.config/awesome/themes/lanxu/layouts/tileleftw.png new file mode 100644 index 0000000..24c3941 Binary files /dev/null and b/.config/awesome/themes/lanxu/layouts/tileleftw.png differ diff --git a/.config/awesome/themes/lanxu/layouts/tiletop.png b/.config/awesome/themes/lanxu/layouts/tiletop.png new file mode 100644 index 0000000..1964d4d Binary files /dev/null and b/.config/awesome/themes/lanxu/layouts/tiletop.png differ diff --git a/.config/awesome/themes/lanxu/layouts/tiletopw.png b/.config/awesome/themes/lanxu/layouts/tiletopw.png new file mode 100644 index 0000000..d2eee79 Binary files /dev/null and b/.config/awesome/themes/lanxu/layouts/tiletopw.png differ diff --git a/.config/awesome/themes/lanxu/layouts/tilew.png b/.config/awesome/themes/lanxu/layouts/tilew.png new file mode 100644 index 0000000..4451a66 Binary files /dev/null and b/.config/awesome/themes/lanxu/layouts/tilew.png differ diff --git a/.config/awesome/themes/lanxu/logo.png b/.config/awesome/themes/lanxu/logo.png new file mode 100644 index 0000000..83e8156 Binary files /dev/null and b/.config/awesome/themes/lanxu/logo.png differ diff --git a/.config/awesome/themes/lanxu/logo16.png b/.config/awesome/themes/lanxu/logo16.png new file mode 100644 index 0000000..f2cfbd5 Binary files /dev/null and b/.config/awesome/themes/lanxu/logo16.png differ diff --git a/.config/awesome/themes/lanxu/submenu.png b/.config/awesome/themes/lanxu/submenu.png new file mode 100644 index 0000000..b2778e2 Binary files /dev/null and b/.config/awesome/themes/lanxu/submenu.png differ diff --git a/.config/awesome/themes/lanxu/taglist/squarefw.png b/.config/awesome/themes/lanxu/taglist/squarefw.png new file mode 100644 index 0000000..2a86430 Binary files /dev/null and b/.config/awesome/themes/lanxu/taglist/squarefw.png differ diff --git a/.config/awesome/themes/lanxu/taglist/squarew.png b/.config/awesome/themes/lanxu/taglist/squarew.png new file mode 100644 index 0000000..913f2ca Binary files /dev/null and b/.config/awesome/themes/lanxu/taglist/squarew.png differ diff --git a/.config/awesome/themes/lanxu/theme.lua b/.config/awesome/themes/lanxu/theme.lua new file mode 100644 index 0000000..797d0d0 --- /dev/null +++ b/.config/awesome/themes/lanxu/theme.lua @@ -0,0 +1,108 @@ +--------------------------- +-- Default awesome theme -- +--------------------------- +local theme = {} + +theme.dir = os.getenv("HOME") .. "/.config/awesome/themes/lanxu" +theme.wallpaper = theme.dir .. "/background.png" +theme.font = "Roboto 9" + +theme.bg_normal = "#222222" +theme.bg_focus = "#8A2BE2" +theme.bg_urgent = "#ff0000" +theme.bg_minimize = "#444444" +theme.bg_systray = theme.bg_normal + +theme.fg_normal = "#d0bce2" +theme.fg_focus = "#ffffff" +theme.fg_urgent = "#ffffff" +theme.fg_minimize = "#ffffff" + +theme.useless_gap = 0 +theme.border_width = 1 +theme.border_normal = "#000000" +theme.border_focus = "#535d6c" +theme.border_marked = "#91231c" + +-- There are other variable sets +-- overriding the default one when +-- defined, the sets are: +-- taglist_[bg|fg]_[focus|urgent|occupied|empty] +-- tasklist_[bg|fg]_[focus|urgent] +-- titlebar_[bg|fg]_[normal|focus] +-- tooltip_[font|opacity|fg_color|bg_color|border_width|border_color] +-- mouse_finder_[color|timeout|animate_timeout|radius|factor] +-- Example: +--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" +-- 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 + +-- You can add as many variables as +-- you wish and access them by using +-- beautiful.variable in your rc.lua +--theme.bg_widget = "#cc0000" + +-- Define the image to load +theme.titlebar_close_button_normal = theme.dir .. "/titlebar/close_normal.png" +theme.titlebar_close_button_focus = theme.dir .. "/titlebar/close_focus.png" + +theme.titlebar_minimize_button_normal = theme.dir .. "/titlebar/minimize_normal.png" +theme.titlebar_minimize_button_focus = theme.dir .. "/titlebar/minimize_focus.png" + +theme.titlebar_ontop_button_normal_inactive = theme.dir .. "/titlebar/ontop_normal_inactive.png" +theme.titlebar_ontop_button_focus_inactive = theme.dir .. "/titlebar/ontop_focus_inactive.png" +theme.titlebar_ontop_button_normal_active = theme.dir .. "/titlebar/ontop_normal_active.png" +theme.titlebar_ontop_button_focus_active = theme.dir .. "/titlebar/ontop_focus_active.png" + +theme.titlebar_sticky_button_normal_inactive = theme.dir .. "/titlebar/sticky_normal_inactive.png" +theme.titlebar_sticky_button_focus_inactive = theme.dir .. "/titlebar/sticky_focus_inactive.png" +theme.titlebar_sticky_button_normal_active = theme.dir .. "/titlebar/sticky_normal_active.png" +theme.titlebar_sticky_button_focus_active = theme.dir .. "/titlebar/sticky_focus_active.png" + +theme.titlebar_floating_button_normal_inactive = theme.dir .. "/titlebar/floating_normal_inactive.png" +theme.titlebar_floating_button_focus_inactive = theme.dir .. "/titlebar/floating_focus_inactive.png" +theme.titlebar_floating_button_normal_active = theme.dir .. "/titlebar/floating_normal_active.png" +theme.titlebar_floating_button_focus_active = theme.dir .. "/titlebar/floating_focus_active.png" + +theme.titlebar_maximized_button_normal_inactive = theme.dir .. "/titlebar/maximized_normal_inactive.png" +theme.titlebar_maximized_button_focus_inactive = theme.dir .. "/titlebar/maximized_focus_inactive.png" +theme.titlebar_maximized_button_normal_active = theme.dir .. "/titlebar/maximized_normal_active.png" +theme.titlebar_maximized_button_focus_active = theme.dir .. "/titlebar/maximized_focus_active.png" + +theme.wallpaper = theme.dir .. "/background.png" + +-- You can use your own layout icons like this: +theme.layout_fairh = theme.dir .. "/layouts/fairhw.png" +theme.layout_fairv = theme.dir .. "/layouts/fairvw.png" +theme.layout_floating = theme.dir .. "/layouts/floatingw.png" +theme.layout_magnifier = theme.dir .. "/layouts/magnifierw.png" +theme.layout_max = theme.dir .. "/layouts/maxw.png" +theme.layout_fullscreen = theme.dir .. "/layouts/fullscreenw.png" +theme.layout_tilebottom = theme.dir .. "/layouts/tilebottomw.png" +theme.layout_tileleft = theme.dir .. "/layouts/tileleftw.png" +theme.layout_tile = theme.dir .. "/layouts/tilew.png" +theme.layout_tiletop = theme.dir .. "/layouts/tiletopw.png" +theme.layout_spiral = theme.dir .. "/layouts/spiralw.png" +theme.layout_dwindle = theme.dir .. "/layouts/dwindlew.png" +theme.layout_cornernw = theme.dir .. "/layouts/cornernww.png" +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" + +-- 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. +theme.icon_theme = nil + +return theme + +-- vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80 diff --git a/.config/awesome/themes/lanxu/titlebar/close_focus.png b/.config/awesome/themes/lanxu/titlebar/close_focus.png new file mode 100644 index 0000000..b2051b0 Binary files /dev/null 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 new file mode 100644 index 0000000..da6028c Binary files /dev/null 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 new file mode 100644 index 0000000..5fe84c0 Binary files /dev/null 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 new file mode 100644 index 0000000..47f19f6 Binary files /dev/null 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 new file mode 100644 index 0000000..576fa36 Binary files /dev/null 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 new file mode 100644 index 0000000..4adc5e9 Binary files /dev/null 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 new file mode 100644 index 0000000..7d9a11a Binary files /dev/null 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 new file mode 100644 index 0000000..bce1d00 Binary files /dev/null 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 new file mode 100644 index 0000000..9f24945 Binary files /dev/null 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 new file mode 100644 index 0000000..2e56d32 Binary files /dev/null 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 new file mode 100644 index 0000000..41a69e2 Binary files /dev/null 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 new file mode 100644 index 0000000..2f3a2be Binary files /dev/null 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 new file mode 100644 index 0000000..0f937b7 Binary files /dev/null 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 new file mode 100644 index 0000000..a9a3206 Binary files /dev/null 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 new file mode 100644 index 0000000..a9bc8a2 Binary files /dev/null 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 new file mode 100644 index 0000000..5493d8e Binary files /dev/null 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 new file mode 100644 index 0000000..1e150f5 Binary files /dev/null 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 new file mode 100644 index 0000000..7e6c99b Binary files /dev/null and b/.config/awesome/themes/lanxu/titlebar/sticky_normal_inactive.png differ diff --git a/.config/awesome/widgets.lua b/.config/awesome/widgets.lua new file mode 100644 index 0000000..608b0ca --- /dev/null +++ b/.config/awesome/widgets.lua @@ -0,0 +1,76 @@ +local gputemp = require("gputemp") +local lain = require("lain") +local vicious = require("vicious") -- Custom +local beautiful = require("beautiful") -- CPU temp +local wibox = require("wibox") + +-- Variables +local valuecolor = "white" + +function create_markup(key, value, postfix, color) + return key .. " " .. value .. postfix .."" +end + +-- Spacer +spacer = wibox.widget.textbox() +--spacer.text = "-" +spacer.forced_width = 8; + +-- CPU +mycpu = lain.widget.cpu({ + settings = function() + widget.markup = create_markup("CPU", cpu_now.usage, " %", valuecolor) + end +}) + +-- MEM +mymem = lain.widget.mem({ + settings = function() + widget.markup = create_markup("MEM", mem_now.used, " MB", valuecolor) + end +}) + +-- GPU +mygputemp = wibox.widget.textbox() +vicious.register(mygputemp, gputemp, create_markup("GPU", "$0", "℃", valuecolor), 15, "AMD") + +-- Volume +volume = lain.widget.pulseaudio({ + scallback = function() + return "pacmd list-sinks | grep -Paoz \"(?s)(\\* index.*$(pactl info | grep -e 'ink' | cut -d' ' -f3).*(index)?)\" | tr -d '\\000' | grep -e 'index' -e 'device.string' -e 'name:' -e 'volume: front' -e 'muted'" + end, + settings = function() + volstr = volume_now.left .. " " + volcolor = valuecolor + if volume_now.muted == "yes" then + volcolor = "red" + end + widget.markup = create_markup("VOL", volstr, "%", volcolor) + end +}) + +-- Text clock +mytextclock = wibox.widget.textclock(create_markup("Date","%Y-%m-%d %H:%M","", valuecolor)) + +lain.widget.calendar({ + attach_to = {mytextclock} +}) + +-- CPU temperature +mycputemp = lain.widget.temp({ + tempfile = "/sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A03:00/device:14/ATK0110:00/hwmon/hwmon1/temp1_input", + settings = function() + widget.markup = create_markup("CPU", coretemp_now, "℃", valuecolor) + end +}) + +-- Weather Widget +myweather = lain.widget.weather({ + city_id = 634963, + lang = "fi", + settings = function() + widget.markup = create_markup("Tampere", weather_now.main.temp, "℃", valuecolor) + end +}); + + diff --git a/.hgignore b/.hgignore new file mode 100644 index 0000000..e3a9713 --- /dev/null +++ b/.hgignore @@ -0,0 +1,3 @@ +lain/ +.tmp + diff --git a/.vimrc b/.vimrc new file mode 100644 index 0000000..5a8233d --- /dev/null +++ b/.vimrc @@ -0,0 +1,225 @@ +" Vundle setup +set nocompatible " be iMproved +filetype off " required! + +" set the runtime path to include Vundle and initialize +"call has('python3') +set rtp+=~/.vim/bundle/Vundle.vim +call vundle#begin() + +" let Vundle manage Vundle, required +Plugin 'VundleVim/Vundle.vim' + +" Vundle bundles +" Javascript +Plugin 'pangloss/vim-javascript' + +" Plugin 'jelera/vim-javascript-syntax' " Replaced by yajs.vim +Plugin 'nathanaelkane/vim-indent-guides' +Plugin 'othree/yajs.vim' +Plugin 'gavocanov/vim-js-indent' +Plugin 'digitaltoad/vim-jade' +Plugin 'othree/es.next.syntax.vim' +Plugin 'othree/jsdoc-syntax.vim' +Plugin 'othree/html5.vim' +Plugin 'heavenshell/vim-jsdoc' +Plugin 'othree/javascript-libraries-syntax.vim' +Plugin 'moll/vim-node' +"Plugin 'ternjs/tern_for_vim' + +" Syntax checking +Plugin 'Valloric/YouCompleteMe' +Plugin 'scrooloose/syntastic' + +" Useful plugins +Plugin 'Raimondi/delimitMate' +Plugin 'scrooloose/nerdcommenter' +Plugin 'scrooloose/nerdtree' +Plugin 'jlanzarotta/bufexplorer' +Plugin 'ctrlpvim/ctrlp.vim' + +" Themes +"Plugin 'Lokaltog/vim-distinguished' +Plugin 'altercation/vim-colors-solarized' +"Plugin 'tomasr/molokai' +"Plugin 'flazz/vim-colorschemes' +Plugin 'morhetz/gruvbox' +Plugin 'chriskempson/base16-vim' + +" Airline +Plugin 'vim-airline/vim-airline' +Plugin 'vim-airline/vim-airline-themes' +let g:airline_theme='base16_default' +let g:airline_powerline_fonts = 1 + +" All of your Plugins must be added before the following line +call vundle#end() " required +filetype plugin indent on " required + +" Other +set t_Co=256 +set background=dark +syntax on +let base16colorspace=256 +colorscheme base16-default-dark +"colorscheme solarized +"colorscheme gruvbox +"colorscheme molokai +"let g:molokai_original = 1 +"let g:rehash256 = 1 +"colorscheme distinguished +"colorscheme ir_black +"colorscheme summerfruit256 +set autoindent " Automatically indent +syntax on +set cindent " Indentation for c +set number " Add line numbers +set hlsearch " Highlight search +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 +"set directory=~/.vim/temp/ " Save temporary files to temp dir +set hidden " Allow changing buffers eventhough they're not saved +"set autowrite " Automatically save the buffer when changing to another buffers +"set autowriteall " Automatically save ALL buffers when changing to another buffers +set wildchar= wildmenu wildmode=full " Show possible commands by pressing TAB +set wildcharm= " This will allow you to access bufferlist with wildcard by pressing F10 +nnoremap :b + +" Indentation +map mzgg=G`z +map %s +" NerdTree +map :NERDTreeToggle +imap :NERDTreeTogglei +" NerdCommenter +map ci +au BufRead,BufNewFile jquery.*.js set ft=javascript syntax=jquery + +"augroup vimrc +" au BufReadPre * setlocal foldmethod=indent +" au BufWinEnter * if &fdm == 'indent' | setlocal foldmethod=manual | endif +"augroup END + +inoremap za +nnoremap za +onoremap za +vnoremap zf +set nocp +filetype plugin on +filetype plugin indent on + +" configure tags - add additional tags here or comment out not-used ones +"set tags+=~/.vim/tags/cpp +"set tags+=~/.vim/tags/gl +"set tags+=~/.vim/tags/sdl +"set tags+=~/.vim/tags/boost +"set tags+=~/.vim/tags/opencv2 + +" build tags of your own project with Ctrl-F12 +"map :!ctags -R --sort=yes --c++-kinds=+p --fields=+iaS --extra=+q ../src/ +" OmniCppComplete +"let OmniCpp_NamespaceSearch = 1 +"let OmniCpp_GlobalScopeSearch = 1 +"let OmniCpp_ShowAccess = 1 +"let OmniCpp_ShowPrototypeInAbbr = 1 " show function parameters +"let OmniCpp_MayCompleteDot = 1 " autocomplete after . +"let OmniCpp_MayCompleteArrow = 1 " autocomplete after -> +"let OmniCpp_MayCompleteScope = 1 " autocomplete after :: +"let OmniCpp_DefaultNamespaces = ["std", "_GLIBCXX_STD", "cv", "boost"] +"au BufNewFile,BufRead,BufEnter *.cpp,*.hpp,*.cc,*.hh set omnifunc=omni#cpp#complete#Main +" automatically open and close the popup menu / preview window +"au CursorMovedI,InsertLeave * if pumvisible() == 0|silent! pclose|endif +"set completeopt=menuone,menu,longest,preview +"map :e %:p:s,.h$,.X123X,:s,.cpp$,.h,:s,.X123X$,.cpp, +"map :e %:p:s,.hh$,.X123X,:s,.cc$,.hh,:s,.X123X$,.cc, +" Uncomment the following to have Vim jump to the last position when +" reopening a file +if has("autocmd") + au BufReadPost * if line("'\"") > 0 && line("'\"") <= line("$") | exe "normal! g'\"" | endif + +endif + +" Indentation +set shiftwidth=8 +set softtabstop=8 + +if has("gui_running") + " GUI is running or is about to start. + " Maximize gvim window. + " set lines=999 columns=999 + "set lines=50 columns=100 + "set guifont=Source\ Code\ Pro\ 11\ -1\ 5\ 50\ 0\ 0\ 0\ 1\ 0 + "set guifont=Source\ Code\ Pro\ Medium\ 11 + " GUI options. + set guioptions-=m "remove menu bar + set guioptions-=T "remove toolbar + set guioptions-=r "remove right-hand scroll bar + set guioptions-=L "remove left-hand scroll bar + + set guifont=Fira\ Code\ 10 + "set guifont=Fira\ Mono\ 10 + "set guifont=Source\ Code\ Pro\ 10 + "set guifont=Terminus\ 11 + set guiheadroom=0 +endif + +" thesaurus and dictionary stuff +"set dictionary+=/usr/share/dict/words +"set thesaurus+=/home/julankin/.vim/mthes10/mthesaur.txt + +" tab navigation like firefox +nnoremap :tabprevious +nnoremap :tabnext +nnoremap :tabnew +inoremap :tabpreviousi +inoremap :tabnexti +inoremap :tabnew + +"set colorcolumn=80 + +" YouCompleteMe +let g:ycm_add_preview_to_completeopt=0 +let g:ycm_confirm_extra_conf=0 +"let g:ycm_global_ycm_extra_conf = '~/.ycm_extra_conf.py' +set completeopt-=preview +set ssop-=options " do not store global and local values in a session +set ssop-=folds " do not store folds + +" Fix backspace +"set backspace=indent,eol,start + +" Syntastic +set statusline+=%#warningmsg# +set statusline+=%{SyntasticStatuslineFlag()} +set statusline+=%* +set laststatus=2 + +let g:syntastic_always_populate_loc_list = 1 +let g:syntastic_auto_loc_list = 0 +let g:syntastic_check_on_open = 1 +let g:syntastic_check_on_wq = 0 +let g:syntastic_javascript_checkers = ['eslint'] + +" Toggle number +:nmap :set invnumber + +" Toggle hlsearch +:nnoremap :nohlsearch:echo +autocmd BufRead,BufNewFile *.es6 setfiletype javascript +map :%!tidy -q --tidy-mark 0 2>/dev/null + +" Configure for jsdoc +let g:jsdoc_enable_es6 = 1 + +" Remove trailing whitespace automatically +autocmd BufWritePre *.js %s/\s\+$//e +autocmd BufWritePre *.cpp %s/\s\+$//e + +set tabstop=4 +set softtabstop=0 +set expandtab +set shiftwidth=2 +set smarttab + +autocmd Filetype cpp setlocal ts=4 sw=4 sts=0 expandtab diff --git a/.zprofile b/.zprofile new file mode 100644 index 0000000..f068bd4 --- /dev/null +++ b/.zprofile @@ -0,0 +1,45 @@ +# Android +export NDK_ROOT=${HOME}/Sovellukset/AndroidDev/android-ndk-r9d +export ANT_ROOT=/usr/bin/ +export ANDROID_SDK_ROOT=${HOME}/Sovellukset/AndroidDev/sdk +export ANDROID_HOME=${HOME}/Sovellukset/AndroidDev/sdk +export PATH=$NDK_ROOT:$PATH +export PATH=$ANDROID_SDK_ROOT:$PATH +export PATH=$ANDROID_SDK_ROOT/tools:$PATH +export PATH=$ANDROID_SDK_ROOT/platform-tools:$PATH + +# 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 + +# npm without sudo +# https://github.com/sindresorhus/guides/blob/master/npm-global-without-sudo.md +export NPM_PACKAGES=${HOME}/.npm-packages +export NODE_PATH=$NPM_PACKAGES/lib/node_modules:$NODE_PATH +export PATH=$NPM_PACKAGES/bin:$PATH + +# Local +export PATH=/usr/local/bin:$PATH + +# Own scripts +export LANXU_SCRIPTS_ROOT=${HOME}/Scripts +export PATH=$LANXU_SCRIPTS_ROOT:$PATH + +# Other +export XDG_CURRENT_DESKTOP=gnome +#export QT_STYLE_OVERRIDE='gtk2' +export QT_QPA_PLATFORMTHEME=gtk2 +export WINEARCH=win64 # Set default winearch to win64 + +# Npm with no sudo +# https://github.com/sindresorhus/guides/blob/master/npm-global-without-sudo.md +export NPM_PACKAGES="${HOME}/.npm-packages" +export NODE_PATH="$NPM_PACKAGES/lib/node_modules:$NODE_PATH" +export PATH="$NPM_PACKAGES/bin:$PATH" + +# Emscripten +export EMSDK="${HOME}/Koodit/github/emsdk" +export EM_CONFIG="${HOME}/.emscripten" +export EMSCRIPTEN="${HOME}/Koodit/github/emsdk/emscripten/incoming" +export BINARYEN_ROOT="${HOME}/Koodit/github/emsdk/binaryen/master_64bit_binaryen" diff --git a/.zshrc b/.zshrc new file mode 100644 index 0000000..c5ce636 --- /dev/null +++ b/.zshrc @@ -0,0 +1,60 @@ +# The following lines were added by compinstall +zstyle :compinstall filename '/home/lanxu/.zshrc' + +autoload -U compinit promptinit colors +compinit +promptinit +colors +# End of lines added by compinstall +# Lines configured by zsh-newuser-install +HISTFILE=~/.histfile +HISTSIZE=1000 +SAVEHIST=1000 +setopt notify + +# Ignore lines prefixed with '#'. +setopt interactivecomments + +# Ignore duplicate in history. +setopt hist_ignore_dups + +# Prevent record in history entry if preceding them with at least one space +setopt hist_ignore_space + +# This will set the default prompt to the walters theme +#prompt grml + +# You may need to manually set your language environment +export LANG=fi_FI.UTF-8 + +# Preferred editor for local and remote sessions +if [[ -n $SSH_CONNECTION ]]; then + export EDITOR='vim' +else + export EDITOR='vim' +fi + +# Syntax highlighting +source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh + +alias top=htop +alias ll="ls -lh" +alias la="ls -a" +#alias ls="ls -N --time-style=long-iso --color=auto" +alias ls="ls --time-style=long-iso --color=auto" +alias rhc='RUBYOPT="-W0" rhc' +# Other +alias fixsteam='find ~/.steam/root/ \( -name "libgcc_s.so*" -o -name "libstdc++.so*" -o -name "libxcb.so*" \) -print -delete' +alias runsteam="LD_PRELOAD='/usr/$LIB/libstdc++.so.6 /usr/$LIB/libgcc_s.so.1 /usr/$LIB/libxcb.so.1 /usr/$LIB/libgpg-error.so' /usr/bin/steam" +alias steamgamesdir='cd ~/.local/share/Steam/SteamApps/common' + +# https://github.com/chriskempson/base16-shell +# git clone https://github.com/chriskempson/base16-shell.git ~/.config/base16-shell +source $HOME/.config/base16-shell/scripts/base16-default-dark.sh + +# Emscripten +#source /home/lanxu/Koodit/github/emsdk/emsdk_env.sh + +#TERM=xterm-256color +bindkey "${terminfo[khome]}" beginning-of-line +bindkey "${terminfo[kend]}" end-of-line diff --git a/.zshrc.local b/.zshrc.local new file mode 100644 index 0000000..f44fc6b --- /dev/null +++ b/.zshrc.local @@ -0,0 +1,2 @@ +zstyle ':prompt:grml:left:setup' items rc change-root path percent +zstyle ':prompt:grml:right:setup' items vcs user at host diff --git a/link.sh b/link.sh new file mode 100644 index 0000000..577c4b9 --- /dev/null +++ b/link.sh @@ -0,0 +1,11 @@ +#!/biń/sh + +# Create symlinks +ln -s $(pwd)/.vimrc ~ +ln -s $(pwd)/.vim ~ +ln -s $(pwd)/.zshrc ~ +ln -s $(pwd)/.zprofile ~ +ln -s $(pwd)/.zshrc.local ~ +ln -s $(pwd)/.Xresources ~ +ln -s $(pwd)/.Xresources.d ~ +ln -s $(pwd)/.config/awesome ~/.config/ diff --git a/setup.sh b/setup.sh new file mode 100644 index 0000000..5d57864 --- /dev/null +++ b/setup.sh @@ -0,0 +1,3 @@ +mkdir vim + +git clone https://github.com/copycat-killer/lain.git $(pwd)/.config/awesome/lain