commit a6c665c17faae2cecc7fcfe7cf7f20d3febbda24 Author: purhan Date: Fri Aug 28 22:50:04 2020 +0530 first commit diff --git a/.astylerc b/.astylerc new file mode 100644 index 0000000..f2c6c04 --- /dev/null +++ b/.astylerc @@ -0,0 +1,12 @@ +--style=kr +--indent=spaces=4 +--indent-preprocessor +--pad-oper +--pad-header +--max-instatement-indent=40 +--align-pointer=name +--align-reference=name +--keep-one-line-statements +--convert-tabs +--max-code-length=79 +--pad-method-colon=none diff --git a/.bashrc b/.bashrc new file mode 100644 index 0000000..8740c1e --- /dev/null +++ b/.bashrc @@ -0,0 +1,181 @@ +# +# ~/.bashrc +# + +[[ $- != *i* ]] && return + +colors() { + local fgc bgc vals seq0 + + printf "Color escapes are %s\n" '\e[${value};...;${value}m' + printf "Values 30..37 are \e[33mforeground colors\e[m\n" + printf "Values 40..47 are \e[43mbackground colors\e[m\n" + printf "Value 1 gives a \e[1mbold-faced look\e[m\n\n" + + # foreground colors + for fgc in {30..37}; do + # background colors + for bgc in {40..47}; do + fgc=${fgc#37} # white + bgc=${bgc#40} # black + + vals="${fgc:+$fgc;}${bgc}" + vals=${vals%%;} + + seq0="${vals:+\e[${vals}m}" + printf " %-9s" "${seq0:-(default)}" + printf " ${seq0}TEXT\e[m" + printf " \e[${vals:+${vals+$vals;}}1mBOLD\e[m" + done + echo; echo + done +} + +[ -r /usr/share/bash-completion/bash_completion ] && . /usr/share/bash-completion/bash_completion + +# Change the window title of X terminals +case ${TERM} in + xterm*|rxvt*|Eterm*|aterm|kterm|gnome*|interix|konsole*) + PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME%%.*}:${PWD/#$HOME/\~}\007"' + ;; + screen*) + PROMPT_COMMAND='echo -ne "\033_${USER}@${HOSTNAME%%.*}:${PWD/#$HOME/\~}\033\\"' + ;; +esac + +use_color=true + +# Set colorful PS1 only on colorful terminals. +# dircolors --print-database uses its own built-in database +# instead of using /etc/DIR_COLORS. Try to use the external file +# first to take advantage of user additions. Use internal bash +# globbing instead of external grep binary. +safe_term=${TERM//[^[:alnum:]]/?} # sanitize TERM +match_lhs="" +[[ -f ~/.dir_colors ]] && match_lhs="${match_lhs}$(<~/.dir_colors)" +[[ -f /etc/DIR_COLORS ]] && match_lhs="${match_lhs}$(/dev/null \ + && match_lhs=$(dircolors --print-database) +[[ $'\n'${match_lhs} == *$'\n'"TERM "${safe_term}* ]] && use_color=true + +if ${use_color} ; then + # Enable colors for ls, etc. Prefer ~/.dir_colors #64489 + if type -P dircolors >/dev/null ; then + if [[ -f ~/.dir_colors ]] ; then + eval $(dircolors -b ~/.dir_colors) + elif [[ -f /etc/DIR_COLORS ]] ; then + eval $(dircolors -b /etc/DIR_COLORS) + fi + fi + + if [[ ${EUID} == 0 ]] ; then + PS1='\[\033[01;31m\][\h\[\033[01;36m\] \W\[\033[01;31m\]]\$\[\033[00m\] ' + else + PS1='\[\033[01;32m\][\u@\h\[\033[01;37m\] \W\[\033[01;32m\]]\$\[\033[00m\] ' + fi + + alias ls='ls --color=auto' + alias grep='grep --colour=auto' + alias egrep='egrep --colour=auto' + alias fgrep='fgrep --colour=auto' +else + if [[ ${EUID} == 0 ]] ; then + # show root@ when we don't have colors + PS1='\u@\h \W \$ ' + else + PS1='\u@\h \w \$ ' + fi +fi + +unset use_color safe_term match_lhs sh + +alias cp="cp -i" # confirm before overwriting something +alias df='df -h' # human-readable sizes +alias free='free -m' # show sizes in MB +alias np='nano -w PKGBUILD' +alias more=less + +xhost +local:root > /dev/null 2>&1 + +complete -cf sudo + +# Bash won't get SIGWINCH if another process is in the foreground. +# Enable checkwinsize so that bash will check the terminal size when +# it regains control. #65623 +# http://cnswww.cns.cwru.edu/~chet/bash/FAQ (E11) +shopt -s checkwinsize + +shopt -s expand_aliases + +# export QT_SELECT=4 + +# Enable history appending instead of overwriting. #139609 +shopt -s histappend + +# +# # ex - archive extractor +# # usage: ex +ex () +{ + if [ -f $1 ] ; then + case $1 in + *.tar.bz2) tar xjf $1 ;; + *.tar.gz) tar xzf $1 ;; + *.bz2) bunzip2 $1 ;; + *.rar) unrar x $1 ;; + *.gz) gunzip $1 ;; + *.tar) tar xf $1 ;; + *.tbz2) tar xjf $1 ;; + *.tgz) tar xzf $1 ;; + *.zip) unzip $1 ;; + *.Z) uncompress $1;; + *.7z) 7z x $1 ;; + *) echo "'$1' cannot be extracted via ex()" ;; + esac + else + echo "'$1' is not a valid file" + fi +} + +# POWERLINE +#function _update_ps1() { +# PS1=$(powerline-shell $?) +#} +#if [[ $TERM != linux && ! $PROMPT_COMMAND =~ _update_ps1 ]]; then +# PROMPT_COMMAND="_update_ps1; $PROMPT_COMMAND" +#fi + +# SUSPEND CTRL + S +stty -ixon + +# DOTFILES ALIAS +alias config='/usr/bin/git --git-dir=$HOME/dotfiles/ --work-tree=$HOME' +config config --local status.showUntrackedFiles no + +# CONFIG ASSISTANT ALIAS +alias assistant='$HOME/assistant.sh' + +# BASH PROMPT (USELESS, JUST USE ZSH/POWERLINE) +function parse_git_dirty { + STATUS="$(git status 2> /dev/null)" + if [[ $? -ne 0 ]]; then printf "-"; return; else printf "("; fi + if echo ${STATUS} | grep -c "renamed:" &> /dev/null; then printf ">"; else printf ""; fi + if echo ${STATUS} | grep -c "branch is ahead" &> /dev/null; then printf "!"; else printf ""; fi + if echo ${STATUS} | grep -c "new file:" &> /dev/null; then printf "+"; else printf ""; fi + if echo ${STATUS} | grep -c "Untracked files:" &> /dev/null; then printf "?"; else printf ""; fi + if echo ${STATUS} | grep -c "modified:" &> /dev/null; then printf "*"; else printf ""; fi + if echo ${STATUS} | grep -c "deleted:" &> /dev/null; then printf "-"; else printf ""; fi + printf ")" +} +parse_git_branch() { + # Long form + git rev-parse --abbrev-ref HEAD 2> /dev/null + # Short form + # git rev-parse --abbrev-ref HEAD 2> /dev/null | sed -e 's/.*\/\(.*\)/\1/' +} +PS1="\n┌─[\`if [ \$? = 0 ]; then echo \[\e[32m\]OK\[\e[0m\]; else echo \[\e[31m\]X\[\e[0m\]; fi\`]───[\[\e[01;49;39m\]\u\[\e[00m\]\[\e[01;49;39m\]\[\e[00m\]]─[\[\e[1;49;34m\]\W\[\e[0m\]]───[\[\e[1;49;39m\]\$(ls | wc -l) files, \$(ls -lah | grep -m 1 total | sed 's/total //')\[\e[0m\]]─" +PS1+="[\033[33m\]\$(parse_git_branch)\[\033[31m\]\$(parse_git_dirty)\[\033[00m\]]" +PS1+="\n└───\[\e[31m\]▶\[\e[33m\]▶\[\e[32m\]▶\[\e[0m\] " +export PS1 +# \`if [ git ]; then echo ───[$(git branch 2>/dev/null | grep '^*' | colrm 1 2)]; fi\` diff --git a/.config/awesome/LICENSE b/.config/awesome/LICENSE new file mode 100644 index 0000000..8e17801 --- /dev/null +++ b/.config/awesome/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2019 PapyElGringo + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/.config/awesome/README.md b/.config/awesome/README.md new file mode 100644 index 0000000..fa08d5b --- /dev/null +++ b/.config/awesome/README.md @@ -0,0 +1,5 @@ +## Awesome WM Config + +![](https://raw.githubusercontent.com/Purhan/dotfiles/master/RICE/werewolf/Screenshot.png) + +### DO NOT CLONE FROM HERE, GO TO [THIS LINK](https://github.com/Purhan/dotfiles/tree/master/RICE/) TO INSTALL A STABLE CONFIGURATION diff --git a/.config/awesome/Screenshot.png b/.config/awesome/Screenshot.png new file mode 100644 index 0000000..28a20af Binary files /dev/null and b/.config/awesome/Screenshot.png differ diff --git a/.config/awesome/configuration/README.md b/.config/awesome/configuration/README.md new file mode 100644 index 0000000..abf1a44 --- /dev/null +++ b/.config/awesome/configuration/README.md @@ -0,0 +1,4 @@ +## Configuration + +Here you will find all the settings available. + diff --git a/.config/awesome/configuration/apps.lua b/.config/awesome/configuration/apps.lua new file mode 100644 index 0000000..cd8ddb0 --- /dev/null +++ b/.config/awesome/configuration/apps.lua @@ -0,0 +1,50 @@ +local filesystem = require('gears.filesystem') + +-- Thanks to jo148 on github for making rofi dpi aware! +local with_dpi = require('beautiful').xresources.apply_dpi +local get_dpi = require('beautiful').xresources.get_dpi +local rofi_command = 'env /usr/bin/rofi -dpi ' .. get_dpi() .. ' -width ' .. + with_dpi(400) .. ' -show drun -theme ' .. + filesystem.get_configuration_dir() .. + '/configuration/rofi.rasi -run-command "/bin/bash -c -i \'shopt -s expand_aliases; {cmd}\'"' + +return { + -- List of apps to start by default on some actions + default = { + terminal = 'env termite', + rofi = rofi_command, + lock = 'i3lock-fancy', + quake = 'termite', + screenshot = '~/.config/awesome/configuration/utils/screenshot -m', + region_screenshot = '~/.config/awesome/configuration/utils/screenshot -r', + delayed_screenshot = '~/.config/awesome/configuration/utils/screenshot --delayed -r', + + -- Editing these also edits the default program + -- associated with each tag/workspace + browser = 'env firefox', + editor = 'gvim', -- gui text editor + social = 'env discord', + game = rofi_command, + files = 'dolphin', + music = rofi_command + }, + -- List of apps to start once on start-up + run_on_start_up = { + -- Add applications that need to be killed between reloads + -- to avoid multipled instances, inside the awspawn script + '~/.config/awesome/configuration/awspawn', -- Spawn "dirty" apps that can linger between sessions + 'compton --config ' .. filesystem.get_configuration_dir() .. + '/configuration/compton.conf', 'nm-applet --indicator', -- wifi + -- 'blueberry-tray', -- Bluetooth tray icon + 'xfce4-power-manager', -- Power manager + 'ibus-daemon --xim --daemonize', -- Ibus daemon for keyboard + 'scream-start', -- scream audio sink + 'numlockx on', -- enable numlock + -- '/usr/lib/policykit-1-gnome/polkit-gnome-authentication-agent-1 & eval $(gnome-keyring-daemon -s --components=pkcs11,secrets,ssh,gpg)', -- credential manager + -- '/usr/lib/x86_64-linux-gnu/libexec/polkit-kde-authentication-agent-1 & eval $(gnome-keyring-daemon -s --components=pkcs11,secrets,ssh,gpg)', -- credential manager + '/usr/lib/xfce-polkit/xfce-polkit & eval $(gnome-keyring-daemon -s --components=pkcs11,secrets,ssh,gpg)', -- credential manager + 'blueman-tray' -- bluetooth tray + -- 'lxsession', + -- 'geary --hidden', -- Email client + } +} diff --git a/.config/awesome/configuration/awspawn b/.config/awesome/configuration/awspawn new file mode 100755 index 0000000..30fb586 --- /dev/null +++ b/.config/awesome/configuration/awspawn @@ -0,0 +1,43 @@ +#!/bin/bash +## This configuration file is meant for applications that +# still run in the background when a reload is triggered +# for awesome, this script just kills the running instance +# and starts a new one. +# Only add applications/scripts without parameters here +# (if you want to apply parameters then use a script file!) + +# List of applications to run +# the script $HOME/.config/awesomestart +# is intended to be a copy of this file +# to allow out of tree autostart programs +APPS=( + keepassxc + kdeconnect-indicator + radeon-profile + $HOME/.config/awesomestart + ) +# Some applications start child applications that need to be killed on reload +KILL=( + synergyc + nextcloud + ) + +#Kill the polkit +killall xfce-polkit + +# First kill lingering apps +for app in "${APPS[@]}" +do + kill -9 $(pidof $app) +done +for app in "${KILL[@]}" +do + kill -9 $(pidof $app) +done + +# Start new instances +for app in "${APPS[@]}" +do + env $app ${@:2} & +done + diff --git a/.config/awesome/configuration/client/buttons.lua b/.config/awesome/configuration/client/buttons.lua new file mode 100644 index 0000000..afb1b01 --- /dev/null +++ b/.config/awesome/configuration/client/buttons.lua @@ -0,0 +1,30 @@ +local awful = require('awful') + +local modkey = require('configuration.keys.mod').modKey + +return awful.util.table.join( + awful.button( + {}, + 1, + function(c) + _G.client.focus = c + c:raise() + end + ), + awful.button({modkey}, 1, awful.mouse.client.move), + awful.button({modkey}, 3, awful.mouse.client.resize), + awful.button( + {modkey}, + 4, + function() + awful.layout.inc(1) + end + ), + awful.button( + {modkey}, + 5, + function() + awful.layout.inc(-1) + end + ) +) diff --git a/.config/awesome/configuration/client/init.lua b/.config/awesome/configuration/client/init.lua new file mode 100644 index 0000000..bbd5480 --- /dev/null +++ b/.config/awesome/configuration/client/init.lua @@ -0,0 +1 @@ +require('configuration.client.rules') diff --git a/.config/awesome/configuration/client/keys.lua b/.config/awesome/configuration/client/keys.lua new file mode 100644 index 0000000..0a8502f --- /dev/null +++ b/.config/awesome/configuration/client/keys.lua @@ -0,0 +1,27 @@ +local awful = require('awful') +require('awful.autofocus') +local modkey = require('configuration.keys.mod').modKey +local altkey = require('configuration.keys.mod').altKey + +local 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'}, + 'q', + function(c) + c:kill() + end, + {description = 'close', group = 'client'} + ) +) + +return clientKeys diff --git a/.config/awesome/configuration/client/rules.lua b/.config/awesome/configuration/client/rules.lua new file mode 100644 index 0000000..76351e6 --- /dev/null +++ b/.config/awesome/configuration/client/rules.lua @@ -0,0 +1,47 @@ +local awful = require('awful') +local gears = require('gears') +local client_keys = require('configuration.client.keys') +local client_buttons = require('configuration.client.buttons') + +-- Rules +awful.rules.rules = { + {rule_any = {name = {'Termite'}}, properties = {skip_decoration = true}}, + -- All clients will match this rule. + { + rule = {}, + properties = { + focus = awful.client.focus.filter, + raise = true, + keys = client_keys, + buttons = client_buttons, + screen = awful.screen.preferred, + placement = awful.placement.no_offscreen, + floating = false, + maximized = false, + above = false, + below = false, + ontop = false, + sticky = false, + maximized_horizontal = false, + maximized_vertical = false + } + }, -- Titlebars + { + rule_any = { + type = {'dialog'}, + class = {'Wicd-client.py', 'calendar.google.com'} + }, + properties = { + placement = awful.placement.centered, + ontop = true, + floating = true, + drawBackdrop = true, + shape = function() + return function(cr, w, h) + gears.shape.rounded_rect(cr, w, h, 8) + end + end, + skip_decoration = true + } + } +} diff --git a/.config/awesome/configuration/compton.conf b/.config/awesome/configuration/compton.conf new file mode 100644 index 0000000..bfab300 --- /dev/null +++ b/.config/awesome/configuration/compton.conf @@ -0,0 +1,104 @@ +corner-radius = 8.0; +round-borders = 1; + +# Shadow +shadow = true; +no-dnd-shadow = false; +no-dock-shadow = false; +shadow-radius = 15.0; +shadow-offset-x = -11; +shadow-offset-y = -4.5; +shadow-opacity = 0.16; +# shadow-red = 0.0; +# shadow-green = 0.0; +# shadow-blue = 0.0; +shadow-exclude = [ + "name = 'Notification'", + "class_g = 'Conky'", + "class_g = 'slop'", + "class_g = 'Rofi'", + "class_g ?= 'Notify-osd'", + "class_g = 'Cairo-clock'", + "_GTK_FRAME_EXTENTS@:c" +]; +#"window_type = 'splash'" +# shadow-exclude = "n:e:Notification"; +# shadow-exclude-reg = "x10+0+0"; +# xinerama-shadow-crop = true; + +# Opacity +menu-opacity = 1.0; +inactive-opacity = 1.0; +active-opacity = 1.0; +frame-opacity = 1.0; +inactive-opacity-override = false; +alpha-step = 0.06; +# inactive-dim = 0.2; +# inactive-dim-fixed = true; +blur-background = true; +blur-background-frame = true; +blur-method = "kawase"; +blur-strength = 3; +blur-background-fixed = true; +blur-background-exclude = [ + "window_type = 'dock'", + "window_type = 'desktop'", + "class_g = 'slop'", + "_GTK_FRAME_EXTENTS@:c" +]; +# opacity-rule = [ "80:class_g = 'URxvt'" ]; + +# Fading +fading = true; +fade-delta = 4; +fade-in-step = 0.04; +fade-out-step = 0.04; +no-fading-openclose = false; +# no-fading-destroyed-argb = true; +fade-exclude = [ ]; + +# Other +backend = "glx"; +mark-wmwin-focused = true; +mark-ovredir-focused = true; +# use-ewmh-active-win = true; +detect-rounded-corners = true; +detect-client-opacity = true; +#refresh-rate = 0; +#vsync = "none"; +dbe = false; +# sw-opti = true; +#unredir-if-possible = true; +# unredir-if-possible-delay = 5000; +# unredir-if-possible-exclude = [ ]; +focus-exclude = [ "class_g = 'Cairo-clock'" ]; +detect-transient = true; +detect-client-leader = true; +invert-color-include = [ ]; +# resize-damage = 1; + +# GLX backend +vsync="opengl-swc"; +unredir-if-possible=true; +#paint-on-overlay=true; +#glx-no-stencil=true; +glx-copy-from-front=false; +# glx-no-stencil = true; +# glx-copy-from-front = false; +# glx-use-copysubbuffermesa = true; +glx-no-rebind-pixmap = true; +#glx-swap-method = "exchange"; +#glx-use-gpushader4 = true; +# xrender-sync = true; +# xrender-sync-fence = true; + +# Window type settings +wintypes: +{ + tooltip = { + fade = true; + shadow = true; + opacity = 0.9; + focus = true; + }; +}; diff --git a/.config/awesome/configuration/compton2.conf b/.config/awesome/configuration/compton2.conf new file mode 100644 index 0000000..8990362 --- /dev/null +++ b/.config/awesome/configuration/compton2.conf @@ -0,0 +1,172 @@ +# requires: https://github.com/ibhagwan/picom + +corner-radius = 15.0; +rounded-corners-exclude = [ + #"window_type = 'normal'", +# "class_g = 'awesome'", +# "class_g = 'URxvt'", +# "class_g = 'XTerm'", +# "class_g = 'kitty'", +# "class_g = 'Alacritty'", + "class_g = 'Polybar'", + "class_g = 'i3'", + "class_g = 'i3bar'", +# "class_g = 'code-oss'", +# "class_g = 'firefox'", +# "class_g = 'Thunderbird'" +# "window_type = 'unknown'", + "window_type = 'desktop'", + "window_type = 'dock'", + "window_type = 'toolbar'", + "window_type = 'menu'", +# "window_type = 'utility'", +# "window_type = 'splash'", +# "window_type = 'dialog'", +# "window_type = 'normal'", + "window_type = 'dropdown_menu'", + "window_type = 'popup_menu'", + "window_type = 'notification'", +# "window_type = 'combo'", + "window_type = 'dnd'", +# "class_g = 'dmenu'", +]; +round-borders = 1; +round-borders-exclude = [ + #"class_g = 'TelegramDesktop'", +]; +round-borders-rule = [ + "4:window_type = 'unknown'", + "4:window_type = 'toolbar'", + "4:window_type = 'utility'", + "4:window_type = 'splash'", + "4:window_type = 'dialog'", + "4:window_type = 'normal'", +]; + +shadow = false; +shadow-radius = 32; +shadow-opacity = 0.5; +shadow-offset-x = -32; +shadow-offset-y = -32; +shadow-red = 0 +shadow-green = 0 +shadow-blue = 0 +shadow-exclude = [ + "bounding_shaped", + "!rounded_corners", + "class_g = 'Conky'", + "class_g ?= 'Notify-osd'", + "class_g = 'Cairo-clock'", + "class_g = 'slop'", + "class_g = 'Polybar'", + "_GTK_FRAME_EXTENTS@:c", +# "window_type = 'unknown'", + "window_type = 'desktop'", + "window_type = 'dock'", + "window_type = 'toolbar'", +# "window_type = 'menu'", +# "window_type = 'utility'", +# "window_type = 'splash'", +# "window_type = 'dialog'", +# "window_type = 'normal'", +# "window_type = 'dropdown_menu'", +# "window_type = 'popup_menu'", + "window_type = 'notification'", +# "window_type = 'combo'", + "window_type = 'dnd'", +]; + +fading = true; +fade-in-step = 0.03; +fade-out-step = 0.03; +fade-delta = 2.5; +fade-exclude = [ +# "window_type = 'unknown'", + "window_type = 'desktop'", + "window_type = 'dock'", +# "window_type = 'toolbar'", +# "window_type = 'menu'", +# "window_type = 'utility'", +# "window_type = 'splash'", +# "window_type = 'dialog'", +# "window_type = 'normal'", +# "window_type = 'dropdown_menu'", +# "window_type = 'popup_menu'", + "window_type = 'notification'", + "window_type = 'combo'", + "window_type = 'dnd'", +] +no-fading-openclose = false +no-fading-destroyed-argb = false + +inactive-opacity = 1; +frame-opacity = 1; +menu-opacity = 1.0 +inactive-opacity-override = false; +active-opacity = 1.0; +inactive-dim = 0.0 +focus-exclude = [ + "class_g = 'Cairo-clock'", + "class_g = 'Bar'", # lemonbar + "class_g = 'slop'" # maim +]; +inactive-dim-fixed = 1.0 +#opacity-rule = [ +# "80:class_g = 'Bar'", # lemonbar +# "100:class_g = 'slop'", # maim +# "100:class_g = 'XTerm'", +# "100:class_g = 'URxvt'", +# "100:class_g = 'kitty'", +# "100:class_g = 'Alacritty'", +# "80:class_g = 'Polybar'", +# "100:class_g = 'code-oss'", +# "100:class_g = 'Meld'", +# "70:class_g = 'TelegramDesktop'", +# "90:class_g = 'Joplin'", +# "100:class_g = 'firefox'", +# "100:class_g = 'Thunderbird'" +#]; + +blur: { + method = "kawase"; + #method = "kernel"; + strength = 6; + # deviation = 1.0; + # kernel = "11x11gaussian"; + background = true; + background-frame = true; + background-fixed = true; + kern = "3x3box"; +} +blur-background-exclude = [ + "class_g = 'slop'", + "_GTK_FRAME_EXTENTS@:c", +# "window_type = 'unknown'", + "window_type = 'desktop'", + "window_type = 'dock'", +# "window_type = 'toolbar'", + "window_type = 'menu'", +# "window_type = 'utility'", + "window_type = 'splash'", +# "window_type = 'dialog'", +# "window_type = 'normal'", + "window_type = 'dropdown_menu'", + "window_type = 'popup_menu'", + "window_type = 'notification'", + "window_type = 'combo'", + "window_type = 'dnd'", + "class_g = 'dmenu'", +]; + +experimental-backends = true; +backend = "glx"; +vsync = true +mark-wmwin-focused = true; +mark-ovredir-focused = true; +detect-rounded-corners = true; +detect-client-opacity = true; +refresh-rate = 0 +detect-transient = true +detect-client-leader = true +use-damage = true +log-level = "info"; \ No newline at end of file diff --git a/.config/awesome/configuration/init.lua b/.config/awesome/configuration/init.lua new file mode 100644 index 0000000..8ea676f --- /dev/null +++ b/.config/awesome/configuration/init.lua @@ -0,0 +1,4 @@ +return { + keys = require('configuration.keys'), + apps = require('configuration.apps') +} diff --git a/.config/awesome/configuration/keys/global.lua b/.config/awesome/configuration/keys/global.lua new file mode 100644 index 0000000..d1fdae6 --- /dev/null +++ b/.config/awesome/configuration/keys/global.lua @@ -0,0 +1,248 @@ +local awful = require('awful') +require('awful.autofocus') +local beautiful = require('beautiful') +local hotkeys_popup = require('awful.hotkeys_popup').widget + +local modkey = require('configuration.keys.mod').modKey +local altkey = require('configuration.keys.mod').altKey +local apps = require('configuration.apps') + +function poweroff_command() + awful.spawn.with_shell('poweroff') + awful.keygrabber.stop(_G.exit_screen_grabber) +end + +-- Key bindings +local globalKeys = awful.util.table.join( -- Hotkeys +awful.key({modkey}, 'F1', hotkeys_popup.show_help, + {description = 'show help', group = 'awesome'}), -- Tag browsing +awful.key({modkey}, 'w', awful.tag.viewprev, + {description = 'view previous', group = 'tag'}), +awful.key({modkey}, 's', awful.tag.viewnext, + {description = 'view next', group = 'tag'}), +awful.key({altkey, 'Control'}, 'Left', awful.tag.viewprev, + {description = 'view previous', group = 'tag'}), +awful.key({altkey, 'Control'}, 'Right', awful.tag.viewnext, + {description = 'view next', group = 'tag'}), +awful.key({modkey}, 'Escape', awful.tag.history.restore, + {description = 'go back', group = 'tag'}), -- Default client focus +awful.key({modkey}, 'd', function() awful.client.focus.byidx(1) end, + {description = 'focus next by index', group = 'client'}), +awful.key({modkey}, 'a', function() awful.client.focus.byidx(-1) end, + {description = 'focus previous by index', group = 'client'}), +awful.key({modkey}, 'r', function() _G.awesome.spawn(apps.default.rofi) end, + {description = 'show rofi menu', group = 'awesome'}), +awful.key({modkey}, 'd', function() + local flag = false + for _, c in ipairs(mouse.screen.selected_tag:clients()) do + if c.minimized == true then flag = true end + c.minimized = true + end + for _, c in ipairs(mouse.screen.selected_tag:clients()) do + if flag == true then c.minimized = false end + end +end, {description = 'minimize all clients', group = 'awesome'}), +awful.key({altkey}, 'space', + function() _G.screen.primary.left_panel:toggle(true) end, + {description = 'show main menu', group = 'awesome'}), +awful.key({modkey}, 'u', awful.client.urgent.jumpto, + {description = 'jump to urgent client', group = 'client'}), +awful.key({altkey}, 'Tab', function() + -- awful.client.focus.history.previous() + awful.client.focus.byidx(1) + if _G.client.focus then _G.client.focus:raise() end +end, {description = 'Switch to next window', group = 'client'}), +awful.key({altkey, 'Shift'}, 'Tab', function() + -- awful.client.focus.history.previous() + awful.client.focus.byidx(-1) + if _G.client.focus then _G.client.focus:raise() end +end, {description = 'Switch to previous window', group = 'client'}), +-- Programms +awful.key({modkey}, 'l', function() awful.spawn(apps.default.lock) end, + {description = 'Lock the screen', group = 'awesome'}), +awful.key({'Control', 'Shift'}, 'Print', function() + awful.util.spawn_with_shell(apps.default.delayed_screenshot) +end, { + description = 'Mark an area and screenshot it 10 seconds later (clipboard)', + group = 'screenshots (clipboard)' +}), awful.key({altkey}, 'Print', function() + awful.util.spawn_with_shell(apps.default.screenshot) +end, { + description = 'Take a screenshot of your active monitor and copy it to clipboard', + group = 'screenshots (clipboard)' +}), awful.key({'Control'}, 'Print', function() + awful.util.spawn_with_shell(apps.default.region_screenshot) +end, { + description = 'Mark an area and screenshot it to your clipboard', + group = 'screenshots (clipboard)' +}), +awful.key({modkey}, 'c', function() awful.util.spawn(apps.default.editor) end, + {description = 'open a text/code editor', group = 'launcher'}), +awful.key({modkey}, 'b', function() awful.util.spawn(apps.default.browser) end, + {description = 'open a browser', group = 'launcher'}), +-- Open private browser/brave +awful.key({modkey}, 'p', + function() awful.util.spawn_with_shell('brave-browser') end, + {description = 'Open Brave', group = 'launcher'}), +-- Standard program +awful.key({modkey}, 't', + function() awful.util.spawn_with_shell(apps.default.terminal) end, + {description = 'open a terminal', group = 'launcher'}), +awful.key({modkey, 'Control'}, 'r', _G.awesome.restart, + {description = 'reload awesome', group = 'awesome'}), +awful.key({modkey, 'Control'}, 'q', _G.awesome.quit, + {description = 'quit awesome', group = 'awesome'}), +awful.key({modkey}, 'm', function() _G.dashboard_show() end, + {description = 'toggle main menu', group = 'awesome'}), +awful.key({modkey, 'Shift'}, 'p', function() _G.exit_screen_show() end, + {description = 'end session menu', group = 'awesome'}), +awful.key({altkey, 'Shift'}, 'Right', function() awful.tag.incmwfact(0.05) end, + {description = 'increase master width factor', group = 'layout'}), +awful.key({altkey, 'Shift'}, 'Left', function() awful.tag.incmwfact(-0.05) end, + {description = 'decrease master width factor', group = 'layout'}), +awful.key({altkey, 'Shift'}, 'Down', function() awful.client.incwfact(0.05) end, + {description = 'decrease master height factor', group = 'layout'}), +awful.key({altkey, 'Shift'}, 'Up', function() awful.client.incwfact(-0.05) end, + {description = 'increase master height factor', group = 'layout'}), +awful.key({modkey, 'Shift'}, 'Left', + function() awful.tag.incnmaster(1, nil, true) end, { + description = 'increase the number of master clients', + group = 'layout' +}), awful.key({modkey, 'Shift'}, 'Right', + function() awful.tag.incnmaster(-1, nil, true) end, { + description = 'decrease the number of master clients', + group = 'layout' +}), awful.key({modkey, 'Control'}, 'Left', + function() awful.tag.incncol(1, nil, true) end, { + description = 'increase the number of columns', + group = 'layout' +}), awful.key({modkey, 'Control'}, 'Right', + 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 + _G.client.focus = c + c:raise() + end +end, {description = 'restore minimized', group = 'client'}), +-- Dropdown application +awful.key({altkey, 'Control'}, 'k', function() _G.toggle_quake() end, + {description = 'dropdown application', group = 'launcher'}), +-- Widgets popups +--[[awful.key( + {altkey}, + 'h', + function() + if beautiful.fs then + beautiful.fs.show(7) + end + end, + {description = 'show filesystem', group = 'widgets'} + ), + awful.key( + {altkey}, + 'w', + function() + if beautiful.weather then + beautiful.weather.show(7) + end + end, + {description = 'show weather', group = 'widgets'} + ),--]] +-- Brightness +awful.key({}, 'XF86MonBrightnessUp', + function() awful.spawn('xbacklight -inc 10') end, + {description = '+10%', group = 'hotkeys'}), +awful.key({}, 'XF86MonBrightnessDown', + function() awful.spawn('xbacklight -dec 10') end, + {description = '-10%', group = 'hotkeys'}), -- ALSA volume control +awful.key({}, 'XF86AudioRaiseVolume', + function() awful.spawn('amixer -D pulse sset Master 5%+') end, + {description = 'volume up', group = 'hotkeys'}), +awful.key({}, 'XF86AudioLowerVolume', + function() awful.spawn('amixer -D pulse sset Master 5%-') end, + {description = 'volume down', group = 'hotkeys'}), +awful.key({}, 'XF86AudioMute', + function() awful.spawn('amixer -D pulse set Master 1+ toggle') end, + {description = 'toggle mute', group = 'hotkeys'}), +awful.key({}, 'XF86AudioNext', function() + -- +end, {description = 'toggle mute', group = 'hotkeys'}), +awful.key({}, 'XF86PowerDown', function() + -- +end, {description = 'toggle mute', group = 'hotkeys'}), +awful.key({}, 'XF86PowerOff', function() _G.exit_screen_show() end, + {description = 'toggle mute', group = 'hotkeys'}), +-- Screen management +awful.key({modkey}, 'o', awful.client.movetoscreen, + {description = 'move window to next screen', group = 'client'}), +-- Open default program for tag +awful.key({modkey}, 'n', function() + awful.spawn(awful.screen.focused().selected_tag.defaultApp, { + tag = _G.mouse.screen.selected_tag, + placement = awful.placement.bottom_right + }) +end, {description = 'open default program for tag/workspace', group = 'tag'}), +-- Custom hotkeys +-- vfio integration +awful.key({'Control', altkey}, 'space', + function() awful.util.spawn_with_shell('vm-attach attach') end), +-- Emoji typing +-- setup info at https://gist.github.com/HikariKnight/8562837d28dec3674dba027c7892e6a5 +awful.key({modkey}, 'e', + function() awful.util.spawn_with_shell('emoji-toggle') end, { + description = 'Toggle the ibus unimoji engine for writing emojis', + group = 'hotkeys' +})) + +-- 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 + -- Hack to only show tags 1 and 9 in the shortcut window (mod+s) + local descr_view, descr_toggle, descr_move, descr_toggle_focus + if i == 1 or i == 9 then + descr_view = {description = 'view tag #', group = 'tag'} + descr_toggle = {description = 'toggle tag #', group = 'tag'} + descr_move = { + description = 'move focused client to tag #', + group = 'tag' + } + descr_toggle_focus = { + description = 'toggle focused client on tag #', + group = 'tag' + } + end + 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, descr_view), -- 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, descr_toggle), -- Move client to tag. + awful.key({modkey, 'Shift'}, '#' .. i + 9, function() + if _G.client.focus then + local tag = _G.client.focus.screen.tags[i] + if tag then _G.client.focus:move_to_tag(tag) end + end + end, descr_move), -- Toggle tag on focused client. + awful.key({modkey, 'Control', 'Shift'}, '#' .. i + 9, function() + if _G.client.focus then + local tag = _G.client.focus.screen.tags[i] + if tag then _G.client.focus:toggle_tag(tag) end + end + end, descr_toggle_focus)) +end + +return globalKeys diff --git a/.config/awesome/configuration/keys/init.lua b/.config/awesome/configuration/keys/init.lua new file mode 100644 index 0000000..9591667 --- /dev/null +++ b/.config/awesome/configuration/keys/init.lua @@ -0,0 +1,4 @@ +return { + mod = require('configuration.keys.mod'), + global = require('configuration.keys.global') +} diff --git a/.config/awesome/configuration/keys/mod.lua b/.config/awesome/configuration/keys/mod.lua new file mode 100644 index 0000000..1d90897 --- /dev/null +++ b/.config/awesome/configuration/keys/mod.lua @@ -0,0 +1,4 @@ +return { + modKey = 'Mod4', + altKey = 'Mod1' +} \ No newline at end of file diff --git a/.config/awesome/configuration/rofi.rasi b/.config/awesome/configuration/rofi.rasi new file mode 100644 index 0000000..f85fb52 --- /dev/null +++ b/.config/awesome/configuration/rofi.rasi @@ -0,0 +1,148 @@ +/** + * User: deadguy + * Copyright: deadguy + */ + +configuration { + display-drun: "Activate"; + display-run: "Execute"; + show-icons: true; + sidebar-mode: false; +} + +* { + background-color: rgb(40, 42, 54, 0.65); + text-color: #f8f8f299; + selbg: rgb(80, 250, 123); + urgbg: rgb(98, 114, 164); + actbg: rgb(68, 71, 90, 0.2); + winbg: #f8f8f2; + + selected-normal-foreground: @winbg; + normal-foreground: @text-color; + selected-normal-background: @actbg; + normal-background: @background-color; + + selected-urgent-foreground: @background-color; + urgent-foreground: @text-color; + selected-urgent-background: @urgbg; + urgent-background: @background-color; + + selected-active-foreground: @winbg; + active-foreground: @text-color; + selected-active-background: @actbg; + active-background: @selbg; + + line-margin: 2; + line-padding: 2; + separator-style: "none"; + hide-scrollbar: "true"; + margin: 0px; + padding: 0px; + font: "Roboto medium 10"; +} + +window { + location: center; + anchor: center; + x-offset: 0px; + height: 100%; + width: 100%; + padding: 31%; + orientation: horizontal; + children: [mainbox]; + background-color: #282a3655; +} + +mainbox { + spacing: 0em; + padding: 0px; + width: 100%; + children: [ inputbar, listview ]; + expand: true; +} + +button { padding: 5px 2px; } + +button selected { + background-color: @active-background; + text-color: @background-color; +} + +inputbar { + children: [ entry ]; +} + +textbox-prompt-colon { + text-color: inherit; + expand: false; + margin: 0 0.3em 0em 0em; + } + +listview { + spacing: 0em; + dynamic: false; + cycle: false; +} + +element { + padding: 16px; + border: 0 0 0 0 solid; +} + +entry { + expand: true; + text-color: @normal-foreground; + background-color: rgb(40, 42, 54); + vertical-align: 1; + padding: 12px; + font: "Roboto medium 13"; +} + +element normal.normal { + background-color: @normal-background; + text-color: @normal-foreground; +} + +element normal.urgent { + background-color: @urgent-background; + text-color: @urgent-foreground; +} + +element normal.active { + background-color: @active-background; + text-color: @active-foreground; +} + +element selected.normal { + background-color: @selected-normal-background; + text-color: @selected-normal-foreground; + padding: 16px; + border: 0 0 0 5px solid; + border-color: @active-background; +} + +element selected.urgent { + background-color: @selected-urgent-background; + text-color: @selected-urgent-foreground; +} + +element selected.active { + background-color: @selected-active-background; + text-color: @selected-active-foreground; +} + +element alternate.normal { + background-color: @normal-background; + text-color: @normal-foreground; +} + +element alternate.urgent { + background-color: @urgent-background; + text-color: @urgent-foreground; +} + +element alternate.active { + background-color: @active-background; + text-color: @active-foreground; +} \ No newline at end of file diff --git a/.config/awesome/configuration/tags/init.lua b/.config/awesome/configuration/tags/init.lua new file mode 100644 index 0000000..dd62a18 --- /dev/null +++ b/.config/awesome/configuration/tags/init.lua @@ -0,0 +1,62 @@ +local awful = require('awful') +local gears = require('gears') +local icons = require('theme.icons') +local apps = require('configuration.apps') + +local tags = { + { + icon = icons.firefox, + type = 'firefox', + defaultApp = apps.default.browser, + screen = 1 + }, { + icon = icons.code, + type = 'code', + defaultApp = apps.default.editor, + screen = 1 + }, { + icon = icons.folder, + type = 'files', + defaultApp = apps.default.files, + screen = 1 + }, { + icon = icons.console, + type = 'console', + defaultApp = apps.default.terminal, + screen = 1 + }, { + icon = icons.social, + type = 'social', + defaultApp = apps.default.social, + screen = 1 + }, + {icon = icons.lab, type = 'any', defaultApp = apps.default.rofi, screen = 1} +} + +awful.layout.layouts = { + awful.layout.suit.tile, awful.layout.suit.max, awful.layout.suit.floating +} + +awful.screen.connect_for_each_screen(function(s) + for i, tag in pairs(tags) do + awful.tag.add(i, { + icon = tag.icon, + icon_only = true, + layout = awful.layout.suit.tile, + gap_single_client = true, + gap = 4, + screen = s, + defaultApp = tag.defaultApp, + selected = i == 1 + }) + end +end) + +_G.tag.connect_signal('property::layout', function(t) + local currentLayout = awful.tag.getproperty(t, 'layout') + if (currentLayout == awful.layout.suit.max) then + t.gap = 4 + else + t.gap = 4 + end +end) diff --git a/.config/awesome/configuration/tags/layouts/single-maximized.lua b/.config/awesome/configuration/tags/layouts/single-maximized.lua new file mode 100644 index 0000000..25ad73e --- /dev/null +++ b/.config/awesome/configuration/tags/layouts/single-maximized.lua @@ -0,0 +1,56 @@ +--------------------------------------------------------------------------- +--- Maximized and fullscreen layouts module for awful +-- +-- @author Julien Danjou <julien@danjou.info> +-- @copyright 2008 Julien Danjou +-- @module awful.layout +--------------------------------------------------------------------------- + +-- Grab environment we need +local pairs = pairs + +local max = {} + +--- The max layout layoutbox icon. +-- @beautiful beautiful.layout_max +-- @param surface +-- @see gears.surface + +--- The fullscreen layout layoutbox icon. +-- @beautiful beautiful.layout_fullscreen +-- @param surface +-- @see gears.surface + +local function fmax(p, fs) + -- Fullscreen? + local area + if fs then + area = p.geometry + else + area = p.workarea + end + local focused_client = client.focus + for _, c in pairs(p.clients) do + local g = { + x = area.x, + y = area.y, + width = area.width, + height = area.height + } + p.geometries[c] = g + end +end + +--- Maximized layout. +-- @clientlayout awful.layout.suit.max.name +max.name = 'max' +function max.arrange(p) + return fmax(p, false) +end +function max.skip_gap(nclients, t) -- luacheck: no unused args + return true +end + +return max + +-- vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80 diff --git a/.config/awesome/configuration/utils/screenshot b/.config/awesome/configuration/utils/screenshot new file mode 100755 index 0000000..b8c09e3 --- /dev/null +++ b/.config/awesome/configuration/utils/screenshot @@ -0,0 +1,8 @@ +#!/bin/bash +if [ $1 == "--delayed" ]; then + sleep 10 ; spectacle -b -n ${@:2} -o /tmp/screenshot.png ; xclip -selection clipboard -target image/png -i /tmp/screenshot.png ; paplay /usr/share/sounds/freedesktop/stereo/camera-shutter.oga +else + spectacle -b -n $@ -o /tmp/screenshot.png ; xclip -selection clipboard -target image/png -i /tmp/screenshot.png ; paplay /usr/share/sounds/freedesktop/stereo/camera-shutter.oga +fi + + diff --git a/.config/awesome/layout/README.md b/.config/awesome/layout/README.md new file mode 100644 index 0000000..b157692 --- /dev/null +++ b/.config/awesome/layout/README.md @@ -0,0 +1 @@ +## Layout diff --git a/.config/awesome/layout/clock-panel.lua b/.config/awesome/layout/clock-panel.lua new file mode 100644 index 0000000..c999f5f --- /dev/null +++ b/.config/awesome/layout/clock-panel.lua @@ -0,0 +1,34 @@ +local awful = require('awful') +local beautiful = require('beautiful') +local wibox = require('wibox') +local dpi = require('beautiful').xresources.apply_dpi + +-- Clock / Calendar 24h format +local textclock = wibox.widget.textclock( + '%H:%M') + +local clock_widget = wibox.container.margin(textclock, dpi(8), dpi(8), dpi(8), + dpi(8)) + +local ClockPanel = function(s, offset) + local offsetx = 0 + if offset == true then offsety = dpi(12) end + local panel = wibox({ + ontop = false, + screen = s, + height = dpi(32), + width = dpi(48), + x = s.geometry.width - dpi(184), + y = s.geometry.y + offsety, + stretch = false, + bg = beautiful.primary.hue_900, + fg = beautiful.fg_normal, + struts = {top = dpi(32)} + }) + + panel:setup{layout = wibox.layout.fixed.horizontal, clock_widget} + + return panel +end + +return ClockPanel diff --git a/.config/awesome/layout/date-panel.lua b/.config/awesome/layout/date-panel.lua new file mode 100644 index 0000000..d18431d --- /dev/null +++ b/.config/awesome/layout/date-panel.lua @@ -0,0 +1,38 @@ +local awful = require('awful') +local beautiful = require('beautiful') +local wibox = require('wibox') +local gears = require('gears') +local clickable_container = require('widget.material.clickable-container') + +local dpi = require('beautiful').xresources.apply_dpi + +local icons = require('theme.icons') + +local textclock = wibox.widget.textclock( + '%d.%m.%Y\n %H:%M') + +local date_widget = wibox.container.margin(textclock, dpi(8), dpi(8), dpi(8), + dpi(8)) + +local DatePanel = function(s, offset) + local offsetx = dpi(128) + local offsety = dpi(12) + local panel = wibox({ + ontop = false, + screen = s, + height = dpi(32), + width = dpi(80), + x = s.geometry.width - dpi(130), + y = s.geometry.y + offsety, + stretch = false, + bg = beautiful.primary.hue_200, + fg = beautiful.primary.hue_900, + struts = {top = dpi(32)} + }) + + panel:setup{layout = wibox.layout.fixed.horizontal, date_widget} + + return panel +end + +return DatePanel diff --git a/.config/awesome/layout/init.lua b/.config/awesome/layout/init.lua new file mode 100644 index 0000000..0ba0826 --- /dev/null +++ b/.config/awesome/layout/init.lua @@ -0,0 +1,66 @@ +local awful = require('awful') +local left_panel = require('layout.left-panel') +local workspace_panel = require('layout.workspace-panel') +local tasklist_panel = require('layout.tasklist-panel') +local mode_panel = require('layout.mode-panel') +local date_panel = require('layout.date-panel') +local clock_panel = require('layout.clock-panel') +local systemtray_panel = require('layout.systemtray-panel') +local volume_panel = require('layout.volume-panel') + +-- Create a wibox for each screen and add it +awful.screen.connect_for_each_screen(function(s) + if s.index == 1 then + s.left_panel = left_panel(s) + s.mode_panel = mode_panel(s, true) + s.tasklist_panel = tasklist_panel(s, true) + s.workspace_panel = workspace_panel(s, true) + s.date_panel = date_panel(s, true) + s.clock_panel = clock_panel(s, true) + s.systemtray_panel = systemtray_panel(s, true) + s.volume_panel = volume_panel(s, true) + else + s.mode_panel = mode_panel(s, false) + s.workspace_panel = workspace_panel(s, false) + s.tasklist_panel = tasklist_panel(s, false) + s.date_panel = date_panel(s, false) + s.clock_panel = clock_panel(s, false) + s.systemtray_panel = systemtray_panel(s, false) + s.volume_panel = volume_panel(s, false) + end +end) + +-- Hide bars when app go fullscreen +function updateBarsVisibility() + for s in screen do + if s.selected_tag then + local fullscreen = s.selected_tag.fullscreenMode + -- Order matter here for shadow + s.workspace_panel.visible = not fullscreen + s.mode_panel.visible = not fullscreen + s.tasklist_panel.visible = not fullscreen + s.date_panel.visible = not fullscreen + s.clock_panel.visible = not fullscreen + s.systemtray_panel.visible = not fullscreen + s.volume_panel.visible = not fullscreen + if s.left_panel then + s.left_panel.visible = not fullscreen + end + end + end +end + +_G.tag.connect_signal('property::selected', + function(t) updateBarsVisibility() end) + +_G.client.connect_signal('property::fullscreen', function(c) + c.screen.selected_tag.fullscreenMode = c.fullscreen + updateBarsVisibility() +end) + +_G.client.connect_signal('unmanage', function(c) + if c.fullscreen then + c.screen.selected_tag.fullscreenMode = false + updateBarsVisibility() + end +end) diff --git a/.config/awesome/layout/left-panel/action-bar.lua b/.config/awesome/layout/left-panel/action-bar.lua new file mode 100644 index 0000000..db2a612 --- /dev/null +++ b/.config/awesome/layout/left-panel/action-bar.lua @@ -0,0 +1,34 @@ +local awful = require('awful') +local beautiful = require('beautiful') +local wibox = require('wibox') +local gears = require('gears') +local mat_icon = require('widget.material.icon') +local dpi = require('beautiful').xresources.apply_dpi +local icons = require('theme.icons') +local clickable_container = require('widget.material.clickable-container') + +return function(screen, panel, action_bar_width) + local menu_icon = wibox.widget { + icon = icons.menu, + size = dpi(16), + widget = mat_icon + } + + local home_button = wibox.widget { + wibox.widget {menu_icon, widget = clickable_container}, + visible = true, + bg = beautiful.primary.hue_700, + widget = wibox.container.background + } + + home_button:buttons(gears.table.join( + awful.button({}, 1, nil, + function() _G.dashboard_show() end))) + + return wibox.widget { + id = 'action_bar', + layout = wibox.layout.align.horizontal, + forced_width = action_bar_width, + {layout = wibox.layout.fixed.horizontal, home_button} + } +end diff --git a/.config/awesome/layout/left-panel/dashboard/hardware-monitor.lua b/.config/awesome/layout/left-panel/dashboard/hardware-monitor.lua new file mode 100644 index 0000000..41f9930 --- /dev/null +++ b/.config/awesome/layout/left-panel/dashboard/hardware-monitor.lua @@ -0,0 +1,18 @@ +local wibox = require('wibox') +local mat_list_item = require('widget.material.list-item') + +return wibox.widget { + -- wibox.widget { + -- wibox.widget { + -- text = 'Hardware monitor', + -- font = 'Roboto medium 12', + -- widget = wibox.widget.textbox + -- }, + -- widget = mat_list_item + -- }, + require('widget.cpu.cpu-meter'), + require('widget.ram.ram-meter'), + require('widget.temperature.temperature-meter'), + require('widget.harddrive.harddrive-meter'), + layout = wibox.layout.fixed.vertical +} diff --git a/.config/awesome/layout/left-panel/dashboard/init.lua b/.config/awesome/layout/left-panel/dashboard/init.lua new file mode 100644 index 0000000..8ddf621 --- /dev/null +++ b/.config/awesome/layout/left-panel/dashboard/init.lua @@ -0,0 +1,67 @@ +local awful = require('awful') +local beautiful = require('beautiful') +local wibox = require('wibox') +local mat_list_item = require('widget.material.list-item') +local mat_icon = require('widget.material.icon') +local dpi = require('beautiful').xresources.apply_dpi +local icons = require('theme.icons') + +return function(_, panel) + local search_button = wibox.widget { + wibox.widget {icon = icons.search, size = dpi(24), widget = mat_icon}, + wibox.widget { + text = 'Search Applications', + font = 'Roboto medium 13', + widget = wibox.widget.textbox + }, + clickable = true, + widget = mat_list_item + } + + search_button:buttons(awful.util.table.join( + awful.button({}, 1, + function() panel:run_rofi() end))) + + local exit_button = wibox.widget { + wibox.widget {icon = icons.logout, size = dpi(24), widget = mat_icon}, + wibox.widget { + text = 'End work session', + font = 'Roboto medium 13', + widget = wibox.widget.textbox + }, + clickable = true, + divider = true, + widget = mat_list_item + } + + exit_button:buttons(awful.util.table.join( + awful.button({}, 1, function() + panel:toggle() + _G.exit_screen_show() + end))) + + return wibox.widget { + layout = wibox.layout.align.vertical, + { + layout = wibox.layout.fixed.vertical, + { + search_button, + bg = beautiful.primary.hue_800, + widget = wibox.container.background + }, + wibox.widget { + orientation = 'horizontal', + forced_height = 0.8, + opacity = 0.3, + widget = wibox.widget.separator + }, + require('layout.left-panel.dashboard.quick-settings'), + require('layout.left-panel.dashboard.hardware-monitor') + }, + nil, + { + layout = wibox.layout.fixed.vertical, + {exit_button, widget = wibox.container.background} + } + } +end diff --git a/.config/awesome/layout/left-panel/dashboard/quick-settings.lua b/.config/awesome/layout/left-panel/dashboard/quick-settings.lua new file mode 100644 index 0000000..4f7139f --- /dev/null +++ b/.config/awesome/layout/left-panel/dashboard/quick-settings.lua @@ -0,0 +1,16 @@ +local wibox = require('wibox') +local mat_list_item = require('widget.material.list-item') + +return wibox.widget { + -- wibox.widget { + -- wibox.widget { + -- text = 'Quick settings', + -- font = 'Roboto medium 12', + -- widget = wibox.widget.textbox + -- }, + -- widget = mat_list_item + -- }, + require('widget.volume.volume-slider'), + require('widget.brightness.brightness-slider'), + layout = wibox.layout.fixed.vertical +} diff --git a/.config/awesome/layout/left-panel/init.lua b/.config/awesome/layout/left-panel/init.lua new file mode 100644 index 0000000..5decf78 --- /dev/null +++ b/.config/awesome/layout/left-panel/init.lua @@ -0,0 +1,98 @@ +local awful = require('awful') +local beautiful = require('beautiful') +local wibox = require('wibox') +local apps = require('configuration.apps') +local dpi = require('beautiful').xresources.apply_dpi + +local left_panel = function(screen) + local action_bar_width = dpi(32) + local panel_content_width = dpi(400) + local offsety = dpi(12) + + local panel = wibox { + screen = screen, + width = dpi(32), + height = dpi(32), + x = screen.geometry.x + 12, + y = screen.geometry.y + offsety, + ontop = false, + bg = beautiful.primary.hue_900, + fg = beautiful.fg_normal + } + + panel.opened = false + + panel:struts({left = dpi(0), top = dpi(48)}) + + local backdrop = wibox { + ontop = true, + screen = screen, + bg = '#00000000', + type = 'dock', + x = screen.geometry.x, + y = screen.geometry.y + offsety, + width = screen.geometry.width, + height = screen.geometry.height + } + + function panel:run_rofi() + _G.awesome.spawn(apps.default.rofi, false, false, false, false, + function() panel:toggle() end) + end + + local openPanel = function(should_run_rofi) + panel.width = panel_content_width + panel.height = screen.geometry.height + backdrop.visible = true + panel.visible = false + panel.visible = true + panel.x = screen.geometry.x + panel.y = screen.geometry.y + panel.ontop = true + panel:get_children_by_id('panel_content')[1].visible = true + if should_run_rofi then panel:run_rofi() end + panel:emit_signal('opened') + end + + local closePanel = function() + panel.width = action_bar_width + panel.height = dpi(32) + panel:get_children_by_id('panel_content')[1].visible = false + backdrop.visible = false + panel.ontop = false + panel.x = screen.geometry.x + 12 + panel.y = screen.geometry.y + offsety + panel:emit_signal('closed') + end + + function panel:toggle(should_run_rofi) + self.opened = not self.opened + if self.opened then + openPanel(should_run_rofi) + else + closePanel() + end + end + + backdrop:buttons(awful.util.table.join( + awful.button({}, 1, function() panel:toggle() end))) + + panel:setup{ + require('layout.left-panel.action-bar')(screen, panel, action_bar_width), + layout = wibox.layout.align.vertical, + { + id = 'panel_content', + bg = beautiful.primary.hue_900, + widget = wibox.container.background, + visible = false, + forced_width = panel_content_width, + { + require('layout.left-panel.dashboard')(screen, panel), + layout = wibox.layout.stack + } + } + } + return panel +end + +return left_panel diff --git a/.config/awesome/layout/mode-panel.lua b/.config/awesome/layout/mode-panel.lua new file mode 100644 index 0000000..62db873 --- /dev/null +++ b/.config/awesome/layout/mode-panel.lua @@ -0,0 +1,54 @@ +local awful = require('awful') +local beautiful = require('beautiful') +local wibox = require('wibox') +local gears = require('gears') +local clickable_container = require('widget.material.clickable-container') +local mat_icon_button = require('widget.material.icon-button') +local mat_icon = require('widget.material.icon') + +local dpi = require('beautiful').xresources.apply_dpi + +local icons = require('theme.icons') + +local LayoutBox = function(s) + local layoutBox = clickable_container(awful.widget.layoutbox(s)) + layoutBox: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))) + return layoutBox +end + +local ModePanel = function(s, offset) + local offsetx = 0 + if offset == true then + offsetx = dpi(512) + offsety = dpi(12) + end + local panel = wibox({ + ontop = false, + screen = s, + height = dpi(32), + width = dpi(32), + x = s.geometry.width - dpi(44), + y = s.geometry.y + offsety, + stretch = false, + bg = beautiful.primary.hue_900, + fg = beautiful.fg_normal, + struts = {top = dpi(32)} + }) + + panel:setup{ + layout = wibox.layout.align.horizontal, + {layout = wibox.layout.fixed.horizontal, LayoutBox(s)}, + nil, + nil + } + + return panel +end + +return ModePanel diff --git a/.config/awesome/layout/systemtray-panel.lua b/.config/awesome/layout/systemtray-panel.lua new file mode 100644 index 0000000..323f7bc --- /dev/null +++ b/.config/awesome/layout/systemtray-panel.lua @@ -0,0 +1,48 @@ +local awful = require('awful') +local beautiful = require('beautiful') +local wibox = require('wibox') +local TaskList = require('widget.task-list') +local TagList = require('widget.tag-list') +local gears = require('gears') +local clickable_container = require('widget.material.clickable-container') +local mat_icon_button = require('widget.material.icon-button') +local mat_icon = require('widget.material.icon') + +local dpi = require('beautiful').xresources.apply_dpi + +local icons = require('theme.icons') + +local systray = wibox.widget.systray() +systray:set_horizontal(true) +systray:set_base_size(32) + +local TopPanel = function(s, offset) + local offsetx = 0 + if offset == true then + offsetx = dpi(128) + offsety = dpi(12) + end + local panel = wibox({ + ontop = false, + screen = s, + height = dpi(32), + width = dpi(128), + x = s.geometry.width - dpi(318), + y = s.geometry.y + offsety, + stretch = false, + bg = beautiful.primary.hue_900, + fg = beautiful.fg_normal, + struts = {top = dpi(32)} + }) + + panel:setup{ + layout = wibox.layout.align.horizontal, + wibox.container.margin(systray, dpi(4), dpi(4), dpi(4), dpi(4)), + nil, + require('widget.battery') + } + + return panel +end + +return TopPanel diff --git a/.config/awesome/layout/tasklist-panel.lua b/.config/awesome/layout/tasklist-panel.lua new file mode 100644 index 0000000..26a2ca3 --- /dev/null +++ b/.config/awesome/layout/tasklist-panel.lua @@ -0,0 +1,77 @@ +local awful = require('awful') +local beautiful = require('beautiful') +local wibox = require('wibox') +local TaskList = require('widget.task-list') +local TagList = require('widget.tag-list') +local gears = require('gears') +local clickable_container = require('widget.material.clickable-container') +local mat_icon_button = require('widget.material.icon-button') +local mat_icon = require('widget.material.icon') + +local dpi = require('beautiful').xresources.apply_dpi + +local icons = require('theme.icons') + +-- Clock / Calendar 24h format +local textclock = wibox.widget.textclock( + '%d.%m.%Y\n %H:%M') + +-- Clock / Calendar 12AM/PM fornat +-- local textclock = wibox.widget.textclock('%d.%m.%Y\n %I:%M %p\n%p') +-- textclock.forced_height = 56 + +-- Add a calendar (credits to kylekewley for the original code) +local month_calendar = awful.widget.calendar_popup.month( + { + screen = s, + start_sunday = false, + week_numbers = true + }) +month_calendar:attach(textclock) + +local clock_widget = wibox.container.margin(textclock, dpi(13), dpi(13), dpi(8), + dpi(8)) + +local add_button = mat_icon_button(mat_icon(icons.plus, dpi(24))) +add_button:buttons(gears.table.join(awful.button({}, 1, nil, function() + awful.spawn(awful.screen.focused().selected_tag.defaultApp, { + tag = _G.mouse.screen.selected_tag, + placement = awful.placement.bottom_right + }) +end))) + +local TasklistPanel = function(s, offset) + local offsetx = 0 + if offset == true then + offsetx = dpi(512) + offsety = dpi(12) + end + local panel = wibox({ + ontop = false, + screen = s, + height = dpi(32), + width = s.geometry.width - 2 * offsetx, + x = s.geometry.x + offsetx, + y = s.geometry.y + offsety, + stretch = false, + -- shape = gears.shape.rounded_rect, + bg = beautiful.primary.hue_900, + fg = beautiful.fg_normal, + struts = {top = dpi(32)} + }) + + panel:setup{ + layout = wibox.layout.align.horizontal, + nil, + { + TaskList(s), + layout = wibox.layout.fixed.horizontal + -- add_button + }, + nil + } + + return panel +end + +return TasklistPanel diff --git a/.config/awesome/layout/volume-panel.lua b/.config/awesome/layout/volume-panel.lua new file mode 100644 index 0000000..6ab3bc2 --- /dev/null +++ b/.config/awesome/layout/volume-panel.lua @@ -0,0 +1,44 @@ +local awful = require('awful') +local beautiful = require('beautiful') +local wibox = require('wibox') +local dpi = require('beautiful').xresources.apply_dpi +local icons = require('theme.icons') + +local icon = wibox.widget { + { + {image = icons.volume_dark, widget = wibox.widget.imagebox}, + margins = dpi(6), + layout = wibox.container.margin + }, + bg = beautiful.primary.hue_200, + widget = wibox.container.background +} + +local volume_percentage_widget = wibox.container.background( + require('widget.volume.volume-percentage')) + +local VolumePanel = function(s, offset) + local offsetx = dpi(236) + if offset == true then offsety = dpi(12) end + local panel = wibox({ + ontop = false, + screen = s, + height = dpi(32), + width = dpi(64), + x = s.geometry.x + offsetx, + y = s.geometry.y + offsety, + stretch = false, + bg = beautiful.primary.hue_900, + fg = beautiful.fg_normal + }) + + panel:setup{ + layout = wibox.layout.fixed.horizontal, + icon, + volume_percentage_widget + } + + return panel +end + +return VolumePanel diff --git a/.config/awesome/layout/workspace-panel.lua b/.config/awesome/layout/workspace-panel.lua new file mode 100644 index 0000000..fd82557 --- /dev/null +++ b/.config/awesome/layout/workspace-panel.lua @@ -0,0 +1,33 @@ +local awful = require('awful') +local beautiful = require('beautiful') +local wibox = require('wibox') +local TagList = require('widget.tag-list') +local gears = require('gears') + +local dpi = require('beautiful').xresources.apply_dpi + +local WorkspacePanel = function(s, offset) + local offsetx = 0 + if offset == true then + offsetx = dpi(50) + offsety = dpi(12) + end + local panel = wibox({ + ontop = false, + screen = s, + height = dpi(32), + width = dpi(180), + x = s.geometry.x + offsetx, + y = s.geometry.y + offsety, + stretch = false, + bg = beautiful.primary.hue_900, + fg = beautiful.fg_normal, + struts = {top = dpi(32)} + }) + + panel:setup{layout = wibox.layout.align.horizontal, TagList(s)} + + return panel +end + +return WorkspacePanel diff --git a/.config/awesome/makefile b/.config/awesome/makefile new file mode 100644 index 0000000..4b99190 --- /dev/null +++ b/.config/awesome/makefile @@ -0,0 +1,9 @@ +install: dependencies + +software = rofi i3lock-fancy termite kvantum-qt lxappearance xclip xfce-polkit +background = awesome i3-lock compton-tryone-git qt5ct +optional = ttf-roboto spectacle ant-dracula-kvantum-theme-git xorg-xbacklight papirus-icon-theme + + +dependencies: + yay -S $(software) $(background) $(optional) \ No newline at end of file diff --git a/.config/awesome/module/README.md b/.config/awesome/module/README.md new file mode 100644 index 0000000..097d4f9 --- /dev/null +++ b/.config/awesome/module/README.md @@ -0,0 +1 @@ +## Module \ No newline at end of file diff --git a/.config/awesome/module/auto-start.lua b/.config/awesome/module/auto-start.lua new file mode 100644 index 0000000..b6d0746 --- /dev/null +++ b/.config/awesome/module/auto-start.lua @@ -0,0 +1,19 @@ +-- MODULE AUTO-START +-- Run all the apps listed in configuration/apps.lua as run_on_start_up only once when awesome start + +local awful = require('awful') +local apps = require('configuration.apps') + +local function run_once(cmd) + local findme = cmd + local firstspace = cmd:find(' ') + if firstspace then + findme = cmd:sub(0, firstspace - 1) + end + awful.spawn.with_shell(string.format('pgrep -u $USER -x %s > /dev/null || (%s)', findme, cmd)) + --This broke compton ===> awful.spawn.single_instance(string.format('pgrep -u $USER -x %s > /dev/null || (%s)', findme, cmd)) +end + +for _, app in ipairs(apps.run_on_start_up) do + run_once(app) +end diff --git a/.config/awesome/module/backdrop.lua b/.config/awesome/module/backdrop.lua new file mode 100644 index 0000000..396c375 --- /dev/null +++ b/.config/awesome/module/backdrop.lua @@ -0,0 +1,83 @@ +local wibox = require('wibox') +local gears = require('gears') +local awful = require('awful') + +local function update_backdrop(w, c) + local cairo = require('lgi').cairo + local geo = c.screen.geometry + + w.x = geo.x + w.y = geo.y + w.width = geo.width + w.height = geo.height + + -- Create an image surface that is as large as the wibox + local shape = cairo.ImageSurface.create(cairo.Format.A1, geo.width, geo.height) + local cr = cairo.Context(shape) + + -- Fill with "completely opaque" + cr.operator = 'SOURCE' + cr:set_source_rgba(1, 1, 1, 1) + cr:paint() + + -- Remove the shape of the client + local c_geo = c:geometry() + local c_shape = gears.surface(c.shape_bounding) + cr:set_source_rgba(0, 0, 0, 0) + cr:mask_surface(c_shape, c_geo.x + c.border_width - geo.x, c_geo.y + c.border_width - geo.y) + c_shape:finish() + + w.shape_bounding = shape._native + shape:finish() + w:draw() +end + +local function backdrop(c) + local function update() + update_backdrop(c.backdrop, c) + end + if not c.backdrop then + c.backdrop = wibox {ontop = true, bg = '#00000054', type = 'splash'} + c.backdrop:buttons( + awful.util.table.join( + awful.button( + {}, + 1, + function() + c:kill() + end + ) + ) + ) + c:connect_signal('property::geometry', update) + c:connect_signal( + 'property::shape_client_bounding', + function() + gears.timer.delayed_call(update) + end + ) + c:connect_signal( + 'unmanage', + function() + c.backdrop.visible = false + end + ) + c:connect_signal( + 'property::shape_bounding', + function() + gears.timer.delayed_call(update) + end + ) + end + update() + c.backdrop.visible = true +end + +_G.client.connect_signal( + 'manage', + function(c) + if c.drawBackdrop == true then + backdrop(c) + end + end +) diff --git a/.config/awesome/module/dashboard.lua b/.config/awesome/module/dashboard.lua new file mode 100644 index 0000000..c9aec83 --- /dev/null +++ b/.config/awesome/module/dashboard.lua @@ -0,0 +1,547 @@ +local awful = require('awful') +local gears = require('gears') +local wibox = require('wibox') +local beautiful = require('beautiful') +local icons = require('theme.icons') +local mat_list_item = require('widget.material.list-item') +local mat_icon = require('widget.material.icon') +local clickable_container = require('widget.material.clickable-container') +local apps = require('configuration.apps') +local dpi = require('beautiful').xresources.apply_dpi + +local icon_size = beautiful.dashboard_icon_size or dpi(140) + +local username = os.getenv("USER") + +local panel_style = gears.shape.rounded_rect + +local buildButton = function(icon, name) + local button_text = wibox.widget { + text = name, + font = beautiful.font, + align = 'center', + valign = 'center', + bg = beautiful.primary.hue_900, + fg = beautiful.fg_normal, + widget = wibox.widget.textbox + } + + local a_button = wibox.widget { + { + { + { + {image = icon, widget = wibox.widget.imagebox}, + margins = dpi(16), + widget = wibox.container.margin + }, + bg = beautiful.groups_bg, + widget = wibox.container.background + }, + shape = panel_style, + forced_width = dpi(60), + forced_height = dpi(60), + visible = true, + -- bg = beautiful.bg_normal, + widget = clickable_container + + }, + visible = true, + -- bg = beautiful.bg_normal, + shape = panel_style, + widget = wibox.container.background + } + + local build_a_button = wibox.widget { + layout = wibox.layout.fixed.horizontal, + spacing = dpi(5), + a_button + -- button_text + } + + return build_a_button +end + +local buildLabel = function(name) + local label_text = wibox.widget { + { + text = name, + font = 'Roboto 11', + align = 'center', + valign = 'center', + bg = beautiful.primary.hue_900, + fg = beautiful.fg_normal, + widget = wibox.widget.textbox + }, + shape = panel_style, + forced_height = dpi(56), + visible = true, + -- bg = beautiful.bg_normal, + widget = clickable_container + } + + local build_a_label = wibox.widget { + layout = wibox.layout.flex.horizontal, + spacing = dpi(5), + label_text + } + + return build_a_label +end + +function suspend_command() + dashboard_hide() + awful.spawn.with_shell(apps.default.lock .. ' & systemctl suspend') +end +function exit_command() _G.awesome.quit() end +function lock_command() + dashboard_hide() + awful.spawn.with_shell('sleep 1 && ' .. apps.default.lock) +end +function poweroff_command() + awful.spawn.with_shell('poweroff') + awful.keygrabber.stop(_G.dashboard_grabber) +end +function reboot_command() + awful.spawn.with_shell('reboot') + awful.keygrabber.stop(_G.dashboard_grabber) +end + +local poweroff = buildButton(icons.power, 'Shutdown') +poweroff:connect_signal('button::release', function() poweroff_command() end) + +local reboot = buildButton(icons.restart, 'Restart') +reboot:connect_signal('button::release', function() reboot_command() end) + +local suspend = buildButton(icons.sleep, 'Sleep') +suspend:connect_signal('button::release', function() suspend_command() end) + +local exit = buildButton(icons.logout, 'Logout') +exit:connect_signal('button::release', function() exit_command() end) + +local lock = buildButton(icons.lock, 'Lock') +lock:connect_signal('button::release', function() lock_command() end) + +local search = buildButton(icons.search, 'Search') +search:connect_signal('button::release', function() + -- rofi_command() + dashboard_hide() + _G.awesome.spawn(apps.default.rofi) +end) + +local close = buildButton(icons.close_dark, 'Close') +close:connect_signal('button::release', function() dashboard_hide() end) + +-- Get screen geometry +local screen_geometry = awful.screen.focused().geometry + +-- Create the widget +dashboard = wibox({ + x = screen_geometry.x, + y = screen_geometry.y, + visible = false, + ontop = true, + type = 'splash', + bg = beautiful.primary.hue_800 .. '66', + height = screen_geometry.height, + width = screen_geometry.width +}) + +local dashboard_grabber + +function dashboard_hide() + awful.keygrabber.stop(dashboard_grabber) + dashboard.visible = false +end + +function dashboard_show() + dashboard_grabber = awful.keygrabber.run( + function(_, key, event) + if event == 'release' then return end + + if key == 'Escape' or key == 'q' or key == 'x' or key == 'm' then + dashboard_hide() + end + end) + dashboard.visible = true +end + +dashboard:buttons(gears.table.join( -- Middle click - Hide dashboard +awful.button({}, 2, function() dashboard_hide() end), +awful.button({}, 3, function() dashboard_hide() end))) + +local profile_picture = os.getenv("HOME") .. + "/.config/awesome/user_picture_curved.png" + +local profile = wibox.widget { + wibox.widget { + { + { + { + { + image = profile_picture, + resize = true, + widget = wibox.widget.imagebox + }, + resize = true, + top = dpi(12), + right = dpi(12), + left = dpi(12), + widget = wibox.container.margin + }, + bg = beautiful.groups_bg, + shape = panel_style, + widget = wibox.container.background + }, + forced_width = dpi(244), + forced_height = dpi(244), + visible = true, + bg = beautiful.bg_normal, + shape = panel_style, + widget = wibox.container.background + }, + wibox.widget { + { + wibox.widget { + text = '@' .. username, + font = "Roboto Regular 12", + align = 'center', + valign = 'center', + widget = wibox.widget.textbox + }, + bottom = dpi(8), + widget = wibox.container.margin + }, + fg = beautiful.primary.hue_500, + widget = wibox.container.background + }, + layout = wibox.layout.fixed.vertical + }, + visible = true, + bg = beautiful.bg_normal, + shape = panel_style, + widget = wibox.container.background +} + +local power_options = wibox.widget { + { + poweroff, + reboot, + suspend, + exit, + lock, + layout = wibox.layout.flex.horizontal + }, + visible = true, + bg = beautiful.primary.hue_900, + shape = panel_style, + widget = wibox.container.background +} + +local search_button = wibox.widget { + { + search, + bg = beautiful.primary.hue_600, + layout = wibox.layout.fixed.vertical + }, + visible = true, + bg = beautiful.primary.hue_200, + shape = panel_style, + widget = wibox.container.background +} + +local close_button = wibox.widget { + { + close, + bg = beautiful.primary.hue_600, + layout = wibox.layout.fixed.vertical + }, + visible = true, + bg = beautiful.primary.hue_350, + shape = panel_style, + widget = wibox.container.background +} + +local quick_settings = wibox.widget { + { + { + require('layout.left-panel.dashboard.quick-settings'), + right = dpi(16), + bottom = dpi(12), + top = dpi(12), + widget = wibox.container.margin + }, + visible = true, + bg = beautiful.bg_normal, + shape = panel_style, + widget = wibox.container.background + }, + bg = beautiful.bg_normal, + shape = panel_style, + widget = wibox.container.background +} + +local hardware_monitor = wibox.widget { + { + require('layout.left-panel.dashboard.hardware-monitor'), + right = dpi(16), + bottom = dpi(12), + top = dpi(12), + widget = wibox.container.margin + }, + visible = true, + bg = beautiful.bg_normal, + shape = panel_style, + widget = wibox.container.background +} + +local cal = require('widget.calendar') + +local calWidget = wibox.widget { + { + nil, + {cal, margins = dpi(16), widget = wibox.container.margin}, + nil, + layout = wibox.layout.flex.horizontal + }, + resize = true, + shape = panel_style, + bg = beautiful.bg_normal, + widget = wibox.container.background +} + +-- Fortune widget Credits: u/EmpressNoodle, github/elenapan +local fortune_command = "fortune -n 140 -s" +local fortune_update_interval = 3600 +-- local fortune_command = "fortune -n 140 -s computers" +local fortune = wibox.widget { + font = "Roboto 11", + text = "You so poor you don't even have a cookie yet...", + widget = wibox.widget.textbox +} + +local update_fortune = function() + awful.spawn.easy_async_with_shell(fortune_command, function(out) + -- Remove trailing whitespaces + out = out:gsub('^%s*(.-)%s*$', '%1') + fortune.markup = "" .. out .. "" + end) +end + +gears.timer { + autostart = true, + timeout = fortune_update_interval, + single_shot = false, + call_now = true, + callback = update_fortune +} + +local fortune_widget = wibox.widget { + { + {fortune, layout = wibox.layout.flex.horizontal}, + margins = dpi(16), + widget = wibox.container.margin + }, + bg = beautiful.primary.hue_700, + fg = beautiful.primary.hue_900, + shape = panel_style, + forced_height = dpi(112), + widget = wibox.container.background +} + +local uptime_text = wibox.widget.textbox() +uptime_text.font = "Roboto 10" +uptime_text.valign = "center" +awful.widget.watch("uptime -p | sed 's/^...//'", 60, function(_, stdout) + local out = stdout:gsub('^%s*(.-)%s*up', '%1') + uptime_text.text = out +end) + +local uptime_widget = wibox.widget { + { + { + { + image = icons.uptime, + resize = true, + forced_width = dpi(24), + widget = wibox.widget.imagebox + }, + uptime_text, + spacing = dpi(8), + layout = wibox.layout.fixed.horizontal + }, + margins = dpi(16), + widget = wibox.container.margin + }, + bg = beautiful.bg_normal, + shape = panel_style, + forced_height = dpi(48), + forced_width = dpi(182), + widget = wibox.container.background +} + +-- Bookmarks +function reddit_command() + dashboard_hide() + awful.spawn(apps.default.browser .. " " .. "reddit.com") +end + +function youtube_command() + dashboard_hide() + awful.spawn(apps.default.browser .. " " .. "youtube.com") +end + +function linkedin_command() + dashboard_hide() + awful.spawn(apps.default.browser .. " " .. "linkedin.com") +end + +function github_command() + dashboard_hide() + awful.spawn(apps.default.browser .. " " .. "github.com") +end + +function deviantart_command() + dashboard_hide() + awful.spawn(apps.default.browser .. " " .. "deviantart.com") +end + +function codeforces_command() + dashboard_hide() + awful.spawn(apps.default.browser .. " " .. "codeforces.com") +end + +function files_command(directory) + dashboard_hide() + awful.spawn(apps.default.files .. " " .. directory) +end + +local reddit = buildButton(icons.reddit, 'Reddit') +reddit:connect_signal('button::release', function() reddit_command() end) + +local youtube = buildButton(icons.youtube, 'Youtube') +youtube:connect_signal('button::release', function() youtube_command() end) + +local linkedin = buildButton(icons.linkedin, 'Linkedin') +linkedin:connect_signal('button::release', function() linkedin_command() end) + +local github = buildButton(icons.github, 'Github') +github:connect_signal('button::release', function() github_command() end) + +local deviantart = buildButton(icons.deviantart, 'Deviantart') +deviantart:connect_signal('button::release', function() deviantart_command() end) + +local codeforces = buildButton(icons.codeforces, 'Codeforces') +codeforces:connect_signal('button::release', function() codeforces_command() end) + +local home = buildLabel('Home') +home:connect_signal('button::release', function() files_command(".") end) + +local downloads = buildLabel('Downloads') +downloads:connect_signal('button::release', + function() files_command("Downloads") end) + +local desktop = buildLabel('Desktop') +desktop:connect_signal('button::release', + function() files_command("Desktop") end) + +local pictures = buildLabel('Pictures') +pictures:connect_signal('button::release', + function() files_command("Pictures") end) + +local videos = buildLabel('Videos') +videos:connect_signal('button::release', function() files_command("Videos") end) + +local documents = buildLabel('Documents') +documents:connect_signal('button::release', + function() files_command("Documents") end) + +local bookmarks = wibox.widget { + { + {reddit, youtube, linkedin, layout = wibox.layout.flex.horizontal}, + {github, deviantart, codeforces, layout = wibox.layout.ratio.horizontal}, + layout = wibox.layout.fixed.vertical + }, + visible = true, + bg = beautiful.bg_normal, + shape = panel_style, + forced_width = dpi(182), + widget = wibox.container.background +} + +local places = wibox.widget { + { + { + home, + desktop, + downloads, + pictures, + documents, + videos, + layout = wibox.layout.fixed.vertical + }, + layout = wibox.layout.fixed.vertical + }, + visible = true, + bg = beautiful.bg_normal, + shape = panel_style, + forced_width = dpi(182), + widget = wibox.container.background +} + +-- Item placement +dashboard:setup{ + nil, + { + nil, + { + { + search_button, + close_button, + spacing = dpi(10), + layout = wibox.layout.fixed.vertical + }, + { + { + { + quick_settings, + hardware_monitor, + fortune_widget, + forced_width = dpi(300), + spacing = dpi(10), + layout = wibox.layout.fixed.vertical + }, + { + bookmarks, + places, + spacing = dpi(10), + layout = wibox.layout.fixed.vertical + }, + spacing = dpi(10), + layout = wibox.layout.fixed.horizontal + }, + { + power_options, + uptime_widget, + spacing = dpi(10), + layout = wibox.layout.fixed.horizontal + }, + spacing = dpi(10), + layout = wibox.layout.fixed.vertical + }, + { + profile, + calWidget, + spacing = dpi(10), + layout = wibox.layout.fixed.vertical + }, + spacing = dpi(10), + layout = wibox.layout.fixed.horizontal + }, + nil, + expand = 'none', + layout = wibox.layout.align.horizontal + }, + {nil, expand = 'none', layout = wibox.layout.align.horizontal}, + expand = 'none', + layout = wibox.layout.align.vertical +} diff --git a/.config/awesome/module/decorate-client.lua b/.config/awesome/module/decorate-client.lua new file mode 100644 index 0000000..d55f6c7 --- /dev/null +++ b/.config/awesome/module/decorate-client.lua @@ -0,0 +1,97 @@ +local awful = require('awful') +local gears = require('gears') +local beautiful = require('beautiful') +local dpi = require('beautiful').xresources.apply_dpi + +local function renderClient(client, mode) + if client.skip_decoration or (client.rendering_mode == mode) then return end + + client.rendering_mode = mode + client.floating = false + client.maximized = false + client.above = false + client.below = false + client.ontop = false + client.sticky = false + client.maximized_horizontal = false + client.maximized_vertical = false + + if client.rendering_mode == 'maximized' then + client.border_width = dpi(2) + client.shape = function(cr, w, h) gears.shape.rectangle(cr, w, h) end + elseif client.rendering_mode == 'tiled' then + -- client.border_width = beautiful.border_width + client.border_width = dpi(2) + client.shape = function(cr, w, h) gears.shape.rectangle(cr, w, h) end + end +end + +local changesOnScreenCalled = false + +local function changesOnScreen(currentScreen) + local tagIsMax = currentScreen.selected_tag ~= nil and + currentScreen.selected_tag.layout == + awful.layout.suit.max + local clientsToManage = {} + + for _, client in pairs(currentScreen.clients) do + if not client.skip_decoration and not client.hidden then + table.insert(clientsToManage, client) + end + end + + if (tagIsMax or #clientsToManage == 1) then + currentScreen.client_mode = 'maximized' + else + currentScreen.client_mode = 'tiled' + end + + for _, client in pairs(clientsToManage) do + renderClient(client, currentScreen.client_mode) + end + changesOnScreenCalled = false +end + +function clientCallback(client) + if not changesOnScreenCalled then + if not client.skip_decoration and client.screen then + changesOnScreenCalled = true + local screen = client.screen + gears.timer.delayed_call(function() + changesOnScreen(screen) + end) + end + end +end + +function tagCallback(tag) + if not changesOnScreenCalled then + if tag.screen then + changesOnScreenCalled = true + local screen = tag.screen + gears.timer.delayed_call(function() + changesOnScreen(screen) + end) + end + end +end + +_G.client.connect_signal('manage', clientCallback) + +_G.client.connect_signal('unmanage', clientCallback) + +_G.client.connect_signal('property::hidden', clientCallback) + +_G.client.connect_signal('property::minimized', clientCallback) + +_G.client.connect_signal('property::fullscreen', function(c) + if c.fullscreen then + renderClient(c, 'maximized') + else + clientCallback(c) + end +end) + +_G.tag.connect_signal('property::selected', tagCallback) + +_G.tag.connect_signal('property::layout', tagCallback) diff --git a/.config/awesome/module/exit-screen.lua b/.config/awesome/module/exit-screen.lua new file mode 100644 index 0000000..861ef17 --- /dev/null +++ b/.config/awesome/module/exit-screen.lua @@ -0,0 +1,145 @@ +local awful = require('awful') +local gears = require('gears') +local wibox = require('wibox') +local beautiful = require('beautiful') +local icons = require('theme.icons') +local clickable_container = require('widget.material.clickable-container') +local apps = require('configuration.apps') +local dpi = require('beautiful').xresources.apply_dpi + +-- Appearance +local icon_size = beautiful.exit_screen_icon_size or dpi(140) + +local buildButton = function(icon) + local abutton = wibox.widget { + wibox.widget { + wibox.widget { + wibox.widget {image = icon, widget = wibox.widget.imagebox}, + top = dpi(16), + bottom = dpi(16), + left = dpi(16), + right = dpi(16), + widget = wibox.container.margin + }, + shape = gears.shape.circle, + forced_width = icon_size, + forced_height = icon_size, + widget = clickable_container + }, + left = dpi(24), + right = dpi(24), + widget = wibox.container.margin + } + + return abutton +end + +function suspend_command() + exit_screen_hide() + awful.spawn.with_shell(apps.default.lock .. ' & systemctl suspend') +end +function exit_command() _G.awesome.quit() end +function lock_command() + exit_screen_hide() + awful.spawn.with_shell('sleep 1 && ' .. apps.default.lock) +end +function poweroff_command() + awful.spawn.with_shell('poweroff') + awful.keygrabber.stop(_G.exit_screen_grabber) +end +function reboot_command() + awful.spawn.with_shell('reboot') + awful.keygrabber.stop(_G.exit_screen_grabber) +end + +local poweroff = buildButton(icons.power, 'Shutdown') +poweroff:connect_signal('button::release', function() poweroff_command() end) + +local reboot = buildButton(icons.restart, 'Restart') +reboot:connect_signal('button::release', function() reboot_command() end) + +local suspend = buildButton(icons.sleep, 'Sleep') +suspend:connect_signal('button::release', function() suspend_command() end) + +local exit = buildButton(icons.logout, 'Logout') +exit:connect_signal('button::release', function() exit_command() end) + +local lock = buildButton(icons.lock, 'Lock') +lock:connect_signal('button::release', function() lock_command() end) + +-- Get screen geometry +local screen_geometry = awful.screen.focused().geometry + +-- Create the widget +exit_screen = wibox({ + x = screen_geometry.x, + y = screen_geometry.y, + visible = false, + ontop = true, + type = 'splash', + height = screen_geometry.height, + width = screen_geometry.width +}) + +exit_screen.bg = beautiful.background.hue_900 .. '55' + +local exit_screen_grabber + +function exit_screen_hide() + awful.keygrabber.stop(exit_screen_grabber) + exit_screen.visible = false +end + +function exit_screen_show() + exit_screen_grabber = awful.keygrabber.run( + function(_, key, event) + if event == 'release' then return end + + if key == 's' then + suspend_command() + elseif key == 'e' then + exit_command() + elseif key == 'l' then + lock_command() + elseif key == 'p' then + poweroff_command() + elseif key == 'r' then + reboot_command() + elseif key == 'Escape' or key == 'q' or key == 'x' then + -- naughty.notify({text = "Cancel"}) + exit_screen_hide() + -- else awful.keygrabber.stop(exit_screen_grabber) + end + end) + exit_screen.visible = true +end + +exit_screen:buttons(gears.table.join( -- Middle click - Hide exit_screen +awful.button({}, 2, function() exit_screen_hide() end), +-- Right click - Hide exit_screen +awful.button({}, 3, function() exit_screen_hide() end))) + +-- Item placement +exit_screen:setup{ + nil, + { + nil, + { + -- { + poweroff, + reboot, + suspend, + exit, + lock, + layout = wibox.layout.fixed.horizontal + -- }, + -- widget = exit_screen_box + }, + nil, + expand = 'none', + layout = wibox.layout.align.horizontal + }, + nil, + expand = 'none', + layout = wibox.layout.align.vertical +} diff --git a/.config/awesome/module/notifications.lua b/.config/awesome/module/notifications.lua new file mode 100644 index 0000000..6d49f4d --- /dev/null +++ b/.config/awesome/module/notifications.lua @@ -0,0 +1,62 @@ +local naughty = require('naughty') +local beautiful = require('beautiful') +local gears = require('gears') +local dpi = require('beautiful').xresources.apply_dpi + +-- Naughty presets +naughty.config.padding = 8 +naughty.config.spacing = 8 + +naughty.config.defaults.timeout = 5 +naughty.config.defaults.screen = 1 +naughty.config.defaults.position = 'bottom_left' +naughty.config.defaults.margin = dpi(16) +naughty.config.defaults.ontop = true +naughty.config.defaults.font = 'Roboto Regular 10' +naughty.config.defaults.icon = nil +naughty.config.defaults.icon_size = dpi(32) +naughty.config.defaults.shape = gears.shape.rectangle +naughty.config.defaults.border_width = 0 +naughty.config.defaults.hover_timeout = nil + +-- Error handling +if _G.awesome.startup_errors then + naughty.notify( + { + preset = naughty.config.presets.critical, + title = 'Oops, there were errors during startup!', + text = _G.awesome.startup_errors + } + ) +end + +do + local in_error = false + _G.awesome.connect_signal( + 'debug::error', + function(err) + 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 + +function log_this(title, txt) + naughty.notify( + { + title = 'log: ' .. title, + text = txt + } + ) +end diff --git a/.config/awesome/module/quake-terminal.lua b/.config/awesome/module/quake-terminal.lua new file mode 100644 index 0000000..e388890 --- /dev/null +++ b/.config/awesome/module/quake-terminal.lua @@ -0,0 +1,58 @@ +local awful = require('awful') +local spawn = require('awful.spawn') +local app = require('configuration.apps').default.quake +local dpi = require('beautiful').xresources.apply_dpi +local beautiful = require('beautiful') + +-- Theme +beautiful.init(require('theme')) + +local quake_id = 'notnil' +local quake_client +local opened = false +function create_shell() quake_id = spawn(app, {skip_decoration = true}) end + +function open_quake() quake_client.hidden = false end + +function close_quake() quake_client.hidden = true end + +toggle_quake = function() + opened = not opened + if not quake_client then + create_shell() + else + if opened then + open_quake() + client.focus = quake_client + quake_client:raise() + -- awful.client.focus(quake_id) + else + close_quake() + end + end +end + +_G.client.connect_signal('manage', function(c) + if (c.pid == quake_id) then + quake_client = c + c.x = c.screen.geometry.x + c.y = c.screen.geometry.height - c.height + c.opacity = 0.9 + c.floating = true + c.skip_taskbar = true + c.ontop = true + c.above = true + c.sticky = true + c.type = 'dock' + c.hidden = not opened + c.maximized_horizontal = true + c.border_width = dpi(1) + end +end) + +_G.client.connect_signal('unmanage', function(c) + if (c.pid == quake_id) then + opened = false + quake_client = nil + end +end) diff --git a/.config/awesome/rc.lua b/.config/awesome/rc.lua new file mode 100644 index 0000000..0a2996f --- /dev/null +++ b/.config/awesome/rc.lua @@ -0,0 +1,67 @@ +local gears = require('gears') +local awful = require('awful') +require('awful.autofocus') +local beautiful = require('beautiful') + +-- Theme +beautiful.init(require('theme')) + +-- Layout +require('layout') + +-- Init all modules +require('module.notifications') +require('module.auto-start') +require('module.decorate-client') +require('module.quake-terminal') +-- Backdrop causes bugs on some gtk3 applications +-- require('module.backdrop') +require('module.exit-screen') +require('module.dashboard') + +-- Setup all configurations +require('configuration.client') +require('configuration.tags') +_G.root.keys(require('configuration.keys.global')) + +-- Create a wibox for each screen and add it +awful.screen.connect_for_each_screen(function(s) + -- If wallpaper is a function, call it with the screen + if beautiful.wallpaper then + if type(beautiful.wallpaper) == "string" then + if beautiful.wallpaper:sub(1, #"#") == "#" then + gears.wallpaper.set(beautiful.wallpaper) + elseif beautiful.wallpaper:sub(1, #"/") == "/" then + gears.wallpaper.maximized(beautiful.wallpaper, s) + end + else + beautiful.wallpaper(s) + end + end +end) + +-- Signal function to execute when a new client appears. +_G.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 _G.awesome.startup then awful.client.setslave(c) end + + if _G.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) + +-- Enable sloppy focus, so that focus follows mouse. +-- _G.client.connect_signal('mouse::enter', function(c) +-- c:emit_signal('request::activate', 'mouse_enter', {raise = true}) +-- end) + +-- Make the focused window have a glowing border +_G.client.connect_signal('focus', function(c) + c.border_color = beautiful.border_focus +end) +_G.client.connect_signal('unfocus', function(c) + c.border_color = beautiful.border_normal +end) diff --git a/.config/awesome/theme/README.md b/.config/awesome/theme/README.md new file mode 100644 index 0000000..6c558eb --- /dev/null +++ b/.config/awesome/theme/README.md @@ -0,0 +1 @@ +## Theme \ No newline at end of file diff --git a/.config/awesome/theme/default-theme.lua b/.config/awesome/theme/default-theme.lua new file mode 100644 index 0000000..090b657 --- /dev/null +++ b/.config/awesome/theme/default-theme.lua @@ -0,0 +1,102 @@ +local filesystem = require('gears.filesystem') +local mat_colors = require('theme.mat-colors') +local theme_dir = filesystem.get_configuration_dir() .. '/theme' +local gears = require('gears') +local dpi = require('beautiful').xresources.apply_dpi +local theme = {} +theme.icons = theme_dir .. '/icons/' +theme.font = 'Roboto medium 10' + +-- Colors Pallets + +-- Primary +theme.primary = mat_colors.deep_orange + +-- Accent +theme.accent = mat_colors.orange + +-- Background +theme.background = mat_colors.grey + +local awesome_overrides = function(theme) + theme.dir = os.getenv('HOME') .. '/.config/awesome/theme' + + theme.icons = theme.dir .. '/icons/' + theme.wallpaper = theme.dir .. '/wallpapers/6.png' + -- theme.wallpaper = '#e0e0e0' + theme.font = 'Roboto medium 10' + theme.title_font = 'Roboto medium 14' + + theme.fg_normal = '#ffffffde' + + theme.fg_focus = '#e4e4e4' + theme.fg_urgent = '#CC9393' + theme.bat_fg_critical = '#232323' + + theme.bg_normal = theme.primary.hue_900 + theme.bg_focus = '#5a5a5a' + theme.bg_urgent = '#3F3F3F' + theme.bg_systray = theme.primary.hue_900 + + -- Borders + + theme.border_width = dpi(1) + theme.border_normal = theme.primary.hue_900 + theme.border_focus = theme.primary.hue_500 + theme.border_marked = '#CC9393' + + -- Menu + + theme.menu_height = dpi(16) + theme.menu_width = dpi(160) + + -- Tooltips + theme.tooltip_bg = '#232323' + -- theme.tooltip_border_color = '#232323' + theme.tooltip_border_width = 0 + theme.tooltip_shape = function(cr, w, h) + gears.shape.rounded_rect(cr, w, h, dpi(6)) + end + + -- Layout + + theme.layout_max = theme.icons .. 'layouts/arrow-expand-all.png' + theme.layout_tile = theme.icons .. 'layouts/view-quilt.png' + theme.layout_floating = theme.icons .. 'layouts/floating.png' + + -- Taglist + + theme.taglist_bg_empty = theme.primary.hue_900 + theme.taglist_bg_occupied = theme.primary.hue_900 + theme.taglist_bg_urgent = 'linear:0,0:0,' .. dpi(48) .. ':0,' .. + theme.accent.hue_500 .. ':0.07,' .. + theme.accent.hue_500 .. ':0.07,' .. + theme.primary.hue_900 .. ':1,' .. + theme.primary.hue_900 + theme.taglist_bg_focus = 'linear:0,0:0,' .. dpi(32) .. ':0,' .. + theme.primary.hue_900 .. ':0.9,' .. + theme.primary.hue_900 .. ':0.9,' .. + theme.primary.hue_500 .. ':1,' .. + theme.primary.hue_500 + + -- Tasklist + + theme.tasklist_font = 'Roboto medium 11' + theme.tasklist_bg_normal = theme.primary.hue_900 + theme.tasklist_bg_focus = 'linear:0,0:0,' .. dpi(32) .. ':0,' .. + theme.primary.hue_900 .. ':0.9,' .. + theme.primary.hue_900 .. ':0.9,' .. + theme.fg_normal .. ':1,' .. theme.fg_normal + theme.tasklist_bg_urgent = theme.primary.hue_900 + theme.tasklist_fg_focus = '#DDDDDD' + theme.tasklist_fg_urgent = theme.fg_normal + theme.tasklist_fg_normal = '#AAAAAA' + + theme.icon_theme = 'Tela circle purple dark' + + -- Client + theme.border_width = dpi(1) + theme.border_focus = theme.primary.hue_100 + theme.border_normal = theme.primary.hue_900 +end +return {theme = theme, awesome_overrides = awesome_overrides} diff --git a/.config/awesome/theme/icons/brightness-7.svg b/.config/awesome/theme/icons/brightness-7.svg new file mode 100644 index 0000000..fe7aa9d --- /dev/null +++ b/.config/awesome/theme/icons/brightness-7.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/.config/awesome/theme/icons/chart-areaspline.svg b/.config/awesome/theme/icons/chart-areaspline.svg new file mode 100644 index 0000000..9941ba5 --- /dev/null +++ b/.config/awesome/theme/icons/chart-areaspline.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/.config/awesome/theme/icons/close.svg b/.config/awesome/theme/icons/close.svg new file mode 100644 index 0000000..3f1f88c --- /dev/null +++ b/.config/awesome/theme/icons/close.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/.config/awesome/theme/icons/close_dark.svg b/.config/awesome/theme/icons/close_dark.svg new file mode 100644 index 0000000..881ca51 --- /dev/null +++ b/.config/awesome/theme/icons/close_dark.svg @@ -0,0 +1,56 @@ + + + + + + image/svg+xml + + + + + + + + + diff --git a/.config/awesome/theme/icons/code-braces.svg b/.config/awesome/theme/icons/code-braces.svg new file mode 100644 index 0000000..6adb566 --- /dev/null +++ b/.config/awesome/theme/icons/code-braces.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/.config/awesome/theme/icons/code-solid.svg b/.config/awesome/theme/icons/code-solid.svg new file mode 100644 index 0000000..4b02076 --- /dev/null +++ b/.config/awesome/theme/icons/code-solid.svg @@ -0,0 +1,60 @@ + + diff --git a/.config/awesome/theme/icons/codeforces.svg b/.config/awesome/theme/icons/codeforces.svg new file mode 100644 index 0000000..408990a --- /dev/null +++ b/.config/awesome/theme/icons/codeforces.svg @@ -0,0 +1,95 @@ + +image/svg+xml + + + + + + + + + + + + diff --git a/.config/awesome/theme/icons/coffee.svg b/.config/awesome/theme/icons/coffee.svg new file mode 100644 index 0000000..9b7f297 --- /dev/null +++ b/.config/awesome/theme/icons/coffee.svg @@ -0,0 +1,67 @@ + + + + + + image/svg+xml + + + + + + + + + + + + diff --git a/.config/awesome/theme/icons/computer.svg b/.config/awesome/theme/icons/computer.svg new file mode 100644 index 0000000..51a6ced --- /dev/null +++ b/.config/awesome/theme/icons/computer.svg @@ -0,0 +1,88 @@ + + + + + + image/svg+xml + + + + + + + + + + + + +