Absolute update made right here

This commit is contained in:
Clay Manuel Gomera Arias 2022-03-02 00:51:50 -04:00
parent 29ac76434f
commit d57b631831
47 changed files with 1607 additions and 1959 deletions

50
.bashrc
View file

@ -86,6 +86,8 @@ ex ()
fi fi
} }
### ALIASES
# navigation # navigation
up () { up () {
local d="" local d=""
@ -105,9 +107,6 @@ up () {
echo "Couldn't go up $limit dirs."; echo "Couldn't go up $limit dirs.";
fi fi
} }
### ALIASES
# navigation
alias ..='cd ..' alias ..='cd ..'
alias .2='cd ../..' alias .2='cd ../..'
alias .3='cd ../../..' alias .3='cd ../../..'
@ -119,13 +118,13 @@ alias cat='bat'
# editors # editors
alias vim='nvim' alias vim='nvim'
alias em="/usr/bin/emacs -nw" alias em='/usr/bin/emacs -nw'
alias emacs="emacsclient -c -a 'emacs'" alias emacs='emacsclient -c -a emacs'
alias doomsync="~/.emacs.d/bin/doom sync" alias doomsync='~/.emacs.d/bin/doom sync'
alias doomdoctor="~/.emacs.d/bin/doom doctor" alias doomdoctor='~/.emacs.d/bin/doom doctor'
alias doomupgrade="~/.emacs.d/bin/doom upgrade" alias doomupgrade='~/.emacs.d/bin/doom upgrade'
alias doompurge="~/.emacs.d/bin/doom purge" alias doompurge='~/.emacs.d/bin/doom purge'
alias doominstall="~/.emacs.d/bin/doom install" alias doominstall='~/.emacs.d/bin/doom install'
# Changing "ls" to "exa" # Changing "ls" to "exa"
alias ls='exa -al --color=always --group-directories-first' # my preferred listing alias ls='exa -al --color=always --group-directories-first' # my preferred listing
@ -153,7 +152,22 @@ alias mv='mv -i'
alias cp='cp -i' alias cp='cp -i'
# git # git
alias git-clone='git clone' alias addup='git add -u'
alias addall='git add .'
alias branch='git branch'
alias checkout='git checkout'
alias clone='git clone'
alias commit='git commit -m'
alias fetch='git fetch'
alias pull='git pull origin'
alias push='git push origin'
alias stat='git status' # 'status' is protected name so using 'stat' instead
alias tag='git tag'
alias newtag='git tag -a'
# adding flags
alias df='df -h' # human-readable sizes
alias free='free -m' # show sizes in MB
# ani-cli # ani-cli
alias ani='ani-cli' alias ani='ani-cli'
@ -174,7 +188,7 @@ alias mx='pulsemixer'
alias amx='alsamixer' alias amx='alsamixer'
# music player # music player
alias mk='musikcube' alias mk='mocp'
# power management # power management
alias po='loginctl poweroff' alias po='loginctl poweroff'
@ -182,13 +196,20 @@ alias sp='loginctl suspend'
alias rb='loginctl reboot' alias rb='loginctl reboot'
# file manager # file manager
alias fm='/home/drk/.config/vifm/scripts/./vifmrun' alias fm='./.config/vifm/scripts/vifmrun'
alias vifm='./.config/vifm/scripts/vifmrun'
# system monitor # system monitor
alias tp='btop' alias tp='btop'
alias top='btop' alias top='btop'
alias htop='btop' alias htop='btop'
# ps
alias psa="ps auxf"
alias psgrep="ps aux | grep -v grep | grep -i -e VSZ -e"
alias psmem='ps auxf | sort -nr -k 4'
alias pscpu='ps auxf | sort -nr -k 3'
# get error messages from journalctl # get error messages from journalctl
alias jctl="journalctl -p 3 -xb" alias jctl="journalctl -p 3 -xb"
@ -215,5 +236,8 @@ alias blt='bluetoothctl'
# the terminal rickroll # the terminal rickroll
alias rr='curl -s -L https://raw.githubusercontent.com/keroserene/rickrollrc/master/roll.sh | bash' alias rr='curl -s -L https://raw.githubusercontent.com/keroserene/rickrollrc/master/roll.sh | bash'
# Deploy script
alias deploynow='sh $HOME/.config/scripts/deploy.sh'
### SETTING THE STARSHIP PROMPT ### ### SETTING THE STARSHIP PROMPT ###
eval "$(starship init bash)" eval "$(starship init bash)"

View file

@ -616,8 +616,7 @@ colors: *gruvbox-dark
# Window opacity as a floating point number from `0.0` to `1.0`. # Window opacity as a floating point number from `0.0` to `1.0`.
# The value `0.0` is completely transparent and `1.0` is opaque. # The value `0.0` is completely transparent and `1.0` is opaque.
window: window:
opacity: 0.95 opacity: 0.93
#selection: #selection:
#semantic_escape_chars: ",│`|:\"' ()[]{}<>\t" #semantic_escape_chars: ",│`|:\"' ()[]{}<>\t"
@ -653,7 +652,7 @@ window:
# - (Linux/BSD) user login shell # - (Linux/BSD) user login shell
# - (Windows) powershell # - (Windows) powershell
shell: shell:
program: /bin/fish program: /bin/zsh
# args: # args:
# - --login # - --login

View file

@ -1,24 +0,0 @@
self = false
globals = {
"screen",
"mouse",
"root",
"client"
}
read_globals = {
"awesome",
"button",
"dbus",
"drawable",
"drawin",
"key",
"keygrabber",
"mousegrabber",
"selection",
"tag",
"window",
"table.unpack",
"math.atan2",
}

View file

@ -1,200 +0,0 @@
-------------------------------------------------
-- Battery Widget for Awesome Window Manager
-- Shows the battery status using the ACPI tool
-- More details could be found here:
-- https://github.com/streetturtle/awesome-wm-widgets/tree/master/battery-widget
-- @author Pavel Makhov
-- @copyright 2017 Pavel Makhov
-------------------------------------------------
local awful = require("awful")
local naughty = require("naughty")
local watch = require("awful.widget.watch")
local wibox = require("wibox")
local gfs = require("gears.filesystem")
local dpi = require('beautiful').xresources.apply_dpi
-- acpi sample outputs
-- Battery 0: Discharging, 75%, 01:51:38 remaining
-- Battery 0: Charging, 53%, 00:57:43 until charged
local HOME = os.getenv("HOME")
local WIDGET_DIR = HOME .. '/.config/awesome/awesome-wm-widgets/battery-widget'
local battery_widget = {}
local function worker(user_args)
local args = user_args or {}
local font = args.font or 'Play 8'
local path_to_icons = args.path_to_icons or "/usr/share/icons/Arc/status/symbolic/"
local show_current_level = args.show_current_level or false
local margin_left = args.margin_left or 0
local margin_right = args.margin_right or 0
local display_notification = args.display_notification or false
local display_notification_onClick = args.display_notification_onClick or true
local position = args.notification_position or "top_right"
local timeout = args.timeout or 10
local warning_msg_title = args.warning_msg_title or 'Huston, we have a problem'
local warning_msg_text = args.warning_msg_text or 'Battery is dying'
local warning_msg_position = args.warning_msg_position or 'bottom_right'
local warning_msg_icon = args.warning_msg_icon or WIDGET_DIR .. '/spaceman.jpg'
local enable_battery_warning = args.enable_battery_warning
if enable_battery_warning == nil then
enable_battery_warning = true
end
if not gfs.dir_readable(path_to_icons) then
naughty.notify{
title = "Battery Widget",
text = "Folder with icons doesn't exist: " .. path_to_icons,
preset = naughty.config.presets.critical
}
end
local icon_widget = wibox.widget {
{
id = "icon",
widget = wibox.widget.imagebox,
resize = false
},
valign = 'center',
layout = wibox.container.place,
}
local level_widget = wibox.widget {
font = font,
widget = wibox.widget.textbox
}
battery_widget = wibox.widget {
icon_widget,
level_widget,
layout = wibox.layout.fixed.horizontal,
}
-- Popup with battery info
-- One way of creating a pop-up notification - naughty.notify
local notification
local function show_battery_status(batteryType)
awful.spawn.easy_async([[bash -c 'acpi']],
function(stdout, _, _, _)
naughty.destroy(notification)
notification = naughty.notify{
text = stdout,
title = "Battery status",
icon = path_to_icons .. batteryType .. ".svg",
icon_size = dpi(16),
position = position,
timeout = 5, hover_timeout = 0.5,
width = 200,
screen = mouse.screen
}
end
)
end
-- Alternative to naughty.notify - tooltip. You can compare both and choose the preferred one
--battery_popup = awful.tooltip({objects = {battery_widget}})
-- To use colors from beautiful theme put
-- following lines in rc.lua before require("battery"):
-- beautiful.tooltip_fg = beautiful.fg_normal
-- beautiful.tooltip_bg = beautiful.bg_normal
local function show_battery_warning()
naughty.notify {
icon = warning_msg_icon,
icon_size = 100,
text = warning_msg_text,
title = warning_msg_title,
timeout = 25, -- show the warning for a longer time
hover_timeout = 0.5,
position = warning_msg_position,
bg = "#F06060",
fg = "#EEE9EF",
width = 300,
screen = mouse.screen
}
end
local last_battery_check = os.time()
local batteryType = "battery-good-symbolic"
watch("acpi -i", timeout,
function(widget, stdout)
local battery_info = {}
local capacities = {}
for s in stdout:gmatch("[^\r\n]+") do
local status, charge_str, _ = string.match(s, '.+: (%a+), (%d?%d?%d)%%,?(.*)')
if status ~= nil then
table.insert(battery_info, {status = status, charge = tonumber(charge_str)})
else
local cap_str = string.match(s, '.+:.+last full capacity (%d+)')
table.insert(capacities, tonumber(cap_str))
end
end
local capacity = 0
for _, cap in ipairs(capacities) do
capacity = capacity + cap
end
local charge = 0
local status
for i, batt in ipairs(battery_info) do
if capacities[i] ~= nil then
if batt.charge >= charge then
status = batt.status -- use most charged battery status
-- this is arbitrary, and maybe another metric should be used
end
charge = charge + batt.charge * capacities[i]
end
end
charge = charge / capacity
if show_current_level then
level_widget.text = string.format('%d%%', charge)
end
if (charge >= 0 and charge < 15) then
batteryType = "battery-empty%s-symbolic"
if enable_battery_warning and status ~= 'Charging' and os.difftime(os.time(), last_battery_check) > 300 then
-- if 5 minutes have elapsed since the last warning
last_battery_check = os.time()
show_battery_warning()
end
elseif (charge >= 15 and charge < 40) then batteryType = "battery-caution%s-symbolic"
elseif (charge >= 40 and charge < 60) then batteryType = "battery-low%s-symbolic"
elseif (charge >= 60 and charge < 80) then batteryType = "battery-good%s-symbolic"
elseif (charge >= 80 and charge <= 100) then batteryType = "battery-full%s-symbolic"
end
if status == 'Charging' then
batteryType = string.format(batteryType, '-charging')
else
batteryType = string.format(batteryType, '')
end
widget.icon:set_image(path_to_icons .. batteryType .. ".svg")
-- Update popup text
-- battery_popup.text = string.gsub(stdout, "\n$", "")
end,
icon_widget)
if display_notification then
battery_widget:connect_signal("mouse::enter", function() show_battery_status(batteryType) end)
battery_widget:connect_signal("mouse::leave", function() naughty.destroy(notification) end)
elseif display_notification_onClick then
battery_widget:connect_signal("button::press", function(_,_,_,button)
if (button == 3) then show_battery_status(batteryType) end
end)
battery_widget:connect_signal("mouse::leave", function() naughty.destroy(notification) end)
end
return wibox.container.margin(battery_widget, margin_left, margin_right)
end
return setmetatable(battery_widget, { __call = function(_, ...) return worker(...) end })

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

View file

@ -1,186 +0,0 @@
-------------------------------------------------
-- Brightness Widget for Awesome Window Manager
-- Shows the brightness level of the laptop display
-- More details could be found here:
-- https://github.com/streetturtle/awesome-wm-widgets/tree/master/brightness-widget
-- @author Pavel Makhov
-- @copyright 2021 Pavel Makhov
-------------------------------------------------
local awful = require("awful")
local wibox = require("wibox")
local watch = require("awful.widget.watch")
local spawn = require("awful.spawn")
local naughty = require("naughty")
local ICON_DIR = os.getenv("HOME") .. '/.config/awesome/awesome-wm-widgets/brightness-widget/'
local get_brightness_cmd
local set_brightness_cmd
local inc_brightness_cmd
local dec_brightness_cmd
local brightness_widget = {}
local function show_warning(message)
naughty.notify{
preset = naughty.config.presets.critical,
title = 'Brightness Widget',
text = message}
end
local function worker(user_args)
local args = user_args or {}
local type = args.type or 'icon_and_text' -- arc or icon_and_text
local path_to_icon = args.path_to_icon or ICON_DIR .. 'brightness.svg'
local font = args.font or 'mononoki Nerd Font 9'
local timeout = args.timeout or 100
local program = args.program or 'light'
local step = args.step or 5
local base = args.base or 20
local current_level = 0 -- current brightness value
local tooltip = args.tooltip or false
if program == 'light' then
get_brightness_cmd = 'light -G'
set_brightness_cmd = 'light -S %d' -- <level>
inc_brightness_cmd = 'light -A ' .. step
dec_brightness_cmd = 'light -U ' .. step
elseif program == 'xbacklight' then
get_brightness_cmd = 'xbacklight -get'
set_brightness_cmd = 'xbacklight -set %d' -- <level>
inc_brightness_cmd = 'xbacklight -inc ' .. step
dec_brightness_cmd = 'xbacklight -dec ' .. step
elseif program == 'brightnessctl' then
get_brightness_cmd = 'bash -c "brightnessctl -m | cut -d, -f4 | tr -d %"'
set_brightness_cmd = 'brightnessctl set %d%%' -- <level>
inc_brightness_cmd = 'brightnessctl set +' .. step .. '%'
dec_brightness_cmd = 'brightnessctl set ' .. step .. '-%'
else
show_warning(program .. " command is not supported by the widget")
return
end
if type == 'icon_and_text' then
brightness_widget.widget = wibox.widget {
{
{
image = path_to_icon,
resize = false,
widget = wibox.widget.imagebox,
},
valign = 'center',
layout = wibox.container.place
},
{
id = 'txt',
font = font,
widget = wibox.widget.textbox
},
spacing = 2,
layout = wibox.layout.fixed.horizontal,
set_value = function(self, level)
self:get_children_by_id('txt')[1]:set_text(level .. '')
end
}
elseif type == 'arc' then
brightness_widget.widget = wibox.widget {
{
{
image = path_to_icon,
resize = true,
widget = wibox.widget.imagebox,
},
valign = 'center',
layout = wibox.container.place
},
max_value = 100,
thickness = 2,
start_angle = 4.71238898, -- 2pi*3/4
forced_height = 18,
forced_width = 18,
paddings = 2,
widget = wibox.container.arcchart,
set_value = function(self, level)
self:set_value(level)
end
}
else
show_warning(type .. " type is not supported by the widget")
return
end
local update_widget = function(widget, stdout, _, _, _)
local brightness_level = tonumber(string.format("%.0f", stdout))
current_level = brightness_level
widget:set_value(brightness_level)
end
function brightness_widget:set(value)
current_level = value
spawn.easy_async(string.format(set_brightness_cmd, value), function()
spawn.easy_async(get_brightness_cmd, function(out)
update_widget(brightness_widget.widget, out)
end)
end)
end
local old_level = 0
function brightness_widget:toggle()
if old_level < 0.1 then
-- avoid toggling between '0' and 'almost 0'
old_level = 1
end
if current_level < 0.1 then
-- restore previous level
current_level = old_level
else
-- save current brightness for later
old_level = current_level
current_level = 0
end
brightness_widget:set(current_level)
end
function brightness_widget:inc()
spawn.easy_async(inc_brightness_cmd, function()
spawn.easy_async(get_brightness_cmd, function(out)
update_widget(brightness_widget.widget, out)
end)
end)
end
function brightness_widget:dec()
spawn.easy_async(dec_brightness_cmd, function()
spawn.easy_async(get_brightness_cmd, function(out)
update_widget(brightness_widget.widget, out)
end)
end)
end
brightness_widget.widget:buttons(
awful.util.table.join(
awful.button({}, 1, function() brightness_widget:set(base) end),
awful.button({}, 3, function() brightness_widget:toggle() end),
awful.button({}, 4, function() brightness_widget:inc() end),
awful.button({}, 5, function() brightness_widget:dec() end)
)
)
watch(get_brightness_cmd, timeout, update_widget, brightness_widget.widget)
if tooltip then
awful.tooltip {
objects = { brightness_widget.widget },
timer_function = function()
return current_level .. " %"
end,
}
end
return brightness_widget.widget
end
return setmetatable(brightness_widget, { __call = function(_, ...)
return worker(...)
end })

View file

@ -1,153 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="16"
height="16"
id="svg2"
sodipodi:version="0.32"
inkscape:version="0.91 r13725"
version="1.0"
sodipodi:docname="display-brightness-symbolic.svg"
inkscape:output_extension="org.inkscape.output.svg.inkscape"
style="display:inline">
<defs
id="defs4" />
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#e7e7e7"
borderopacity="1"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="44.218752"
inkscape:cx="12.155025"
inkscape:cy="7.6228779"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="true"
inkscape:showpageshadow="false"
showguides="false"
inkscape:guide-bbox="true"
inkscape:window-width="1920"
inkscape:window-height="1029"
inkscape:window-x="0"
inkscape:window-y="24"
inkscape:window-maximized="1"
inkscape:snap-global="true">
<sodipodi:guide
orientation="1,0"
position="0,112"
id="guide2383" />
<sodipodi:guide
orientation="0,1"
position="26.278146,128"
id="guide2385" />
<sodipodi:guide
orientation="1,0"
position="128,54.082119"
id="guide2387" />
<sodipodi:guide
orientation="0,1"
position="78.156291,0"
id="guide2389" />
<sodipodi:guide
orientation="0,1"
position="60.863576,64.084768"
id="guide2391" />
<inkscape:grid
type="xygrid"
id="grid3672"
visible="true"
enabled="true"
empspacing="8"
snapvisiblegridlinesonly="true" />
</sodipodi:namedview>
<metadata
id="metadata7">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title />
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Icon"
inkscape:groupmode="layer"
id="layer1"
style="display:inline"
transform="translate(0,-6)">
<path
style="color:#000000;fill:#bebebe;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1.5;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
d="m -12,6 -1,3 2,0 -1,-3 z m -5.65625,2.34375 1.40625,2.8125 1.40625,-1.40625 -2.8125,-1.40625 z m 11.3125,0 L -9.15625,9.75 -7.75,11.15625 -6.34375,8.34375 z M -12,10 c -2.209139,0 -4,1.790861 -4,4 0,2.209139 1.790861,4 4,4 2.209139,0 4,-1.790861 4,-4 0,-2.209139 -1.790861,-4 -4,-4 z m 0,1.5 c 1.380712,0 2.5,1.119288 2.5,2.5 0,1.380712 -1.119288,2.5 -2.5,2.5 -1.380712,0 -2.5,-1.119288 -2.5,-2.5 0,-1.380712 1.119288,-2.5 2.5,-2.5 z m -5,1.5 -3,1 3,1 0,-2 z m 10,0 0,2 3,-1 -3,-1 z m -9.25,3.84375 -1.40625,2.8125 2.8125,-1.40625 -1.40625,-1.40625 z m 8.5,0 -1.40625,1.40625 2.8125,1.40625 L -7.75,16.84375 z M -13,19 l 1,3 1,-3 -2,0 z"
id="path3085"
inkscape:connector-curvature="0" />
<path
id="path3102"
d="m 8,30 c -2.209139,0 -4,1.790861 -4,4 0,2.209139 1.790861,4 4,4 2.209139,0 4,-1.790861 4,-4 0,-2.209139 -1.790861,-4 -4,-4 z m 0,2 c 1.1045695,0 2,0.89543 2,2 0,1.104569 -0.8954305,2 -2,2 -1.1045695,0 -2,-0.895431 -2,-2 0,-1.10457 0.8954305,-2 2,-2 z"
style="opacity:0.35;color:#000000;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1.5;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
inkscape:connector-curvature="0" />
<path
inkscape:transform-center-y="-6.5"
sodipodi:nodetypes="cccc"
inkscape:connector-curvature="0"
id="path3104"
d="m 6,29 4,0 -2,-3 z"
style="fill:#808080;stroke:none" />
<path
inkscape:transform-center-y="-2.4999999"
inkscape:transform-center-x="-5.1291655"
style="fill:#808080;stroke:none"
d="m 11.330127,29.767949 2,3.464102 L 14.928204,30 z"
id="path3106"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cccc" />
<path
sodipodi:nodetypes="cccc"
inkscape:connector-curvature="0"
id="path3108"
d="m 13.330127,34.767949 -2,3.464102 L 14.928203,38 z"
style="fill:#808080;stroke:none"
inkscape:transform-center-x="-5.129165"
inkscape:transform-center-y="2.5" />
<path
inkscape:transform-center-y="6.5"
style="fill:#808080;stroke:none"
d="m 10,39 -4.0000002,0 2.0000001,3 z"
id="path3110"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cccc" />
<path
inkscape:transform-center-x="5.1291651"
sodipodi:nodetypes="cccc"
inkscape:connector-curvature="0"
id="path3112"
d="M 4.6698729,38.232051 2.6698728,34.767949 1.0717967,38 z"
style="fill:#808080;stroke:none"
inkscape:transform-center-y="2.5" />
<path
inkscape:transform-center-y="-2.5"
style="fill:#808080;stroke:none"
d="M 2.6698727,33.232051 4.669873,29.767949 1.0717967,30 z"
id="path3114"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cccc"
inkscape:transform-center-x="5.129165" />
<path
style="color:#000000;fill:#bebebe;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1.5;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
d="M 5.84375 0 L 5.09375 2.96875 L 2.15625 2.15625 L 2.96875 5.09375 L 0 5.84375 L 2.1875 8 L 0 10.15625 L 2.96875 10.90625 L 2.15625 13.84375 L 5.09375 13.03125 L 5.84375 16 L 8 13.8125 L 10.15625 16 L 10.90625 13.03125 L 13.84375 13.84375 L 13.03125 10.90625 L 16 10.15625 L 13.8125 8 L 16 5.84375 L 13.03125 5.09375 L 13.84375 2.15625 L 10.90625 2.96875 L 10.15625 0 L 8 2.1875 L 5.84375 0 z M 8 3 C 10.761424 3 13 5.2385763 13 8 C 13 10.761424 10.761424 13 8 13 L 8 3 z "
transform="translate(0,6)"
id="path3075" />
</g>
</svg>

Before

Width:  |  Height:  |  Size: 6.3 KiB

View file

@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="#ECEFF4" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-lock"><rect x="3" y="11" width="18" height="11" rx="2" ry="2"></rect><path d="M7 11V7a5 5 0 0 1 10 0v4"></path></svg>

Before

Width:  |  Height:  |  Size: 316 B

View file

@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="#ECEFF4" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-log-out"><path d="M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4"></path><polyline points="16 17 21 12 16 7"></polyline><line x1="21" y1="12" x2="9" y2="12"></line></svg>

Before

Width:  |  Height:  |  Size: 362 B

View file

@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="#ECEFF4" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-moon"><path d="M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"></path></svg>

Before

Width:  |  Height:  |  Size: 276 B

View file

@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="#BF616A" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-power"><path d="M18.36 6.64a9 9 0 1 1-12.73 0"></path><line x1="12" y1="2" x2="12" y2="12"></line></svg>

Before

Width:  |  Height:  |  Size: 303 B

View file

@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="#ECEFF4" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-power"><path d="M18.36 6.64a9 9 0 1 1-12.73 0"></path><line x1="12" y1="2" x2="12" y2="12"></line></svg>

Before

Width:  |  Height:  |  Size: 303 B

View file

@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="#ECEFF4" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-refresh-cw"><polyline points="23 4 23 10 17 10"></polyline><polyline points="1 20 1 14 7 14"></polyline><path d="M3.51 9a9 9 0 0 1 14.85-3.36L23 10M1 14l4.64 4.36A9 9 0 0 0 20.49 15"></path></svg>

Before

Width:  |  Height:  |  Size: 395 B

View file

@ -1,136 +0,0 @@
-------------------------------------------------
-- Logout Menu Widget for Awesome Window Manager
-- More details could be found here:
-- https://github.com/streetturtle/awesome-wm-widgets/tree/master/logout-menu-widget
-- @author Pavel Makhov
-- @copyright 2020 Pavel Makhov
-------------------------------------------------
local awful = require("awful")
local wibox = require("wibox")
local gears = require("gears")
local beautiful = require("beautiful")
local HOME = os.getenv('HOME')
local ICON_DIR = HOME .. '/.config/awesome/awesome-wm-widgets/logout-menu-widget/icons/'
local logout_menu_widget = wibox.widget {
{
{
image = ICON_DIR .. 'power_w.svg',
resize = true,
widget = wibox.widget.imagebox,
},
margins = 4,
layout = wibox.container.margin
},
shape = function(cr, width, height)
gears.shape.rounded_rect(cr, width, height, 4)
end,
widget = wibox.container.background,
}
local popup = awful.popup {
ontop = true,
visible = false,
shape = function(cr, width, height)
gears.shape.rounded_rect(cr, width, height, 4)
end,
border_width = 1,
border_color = beautiful.bg_focus,
maximum_width = 400,
offset = { y = 5 },
widget = {}
}
local function worker(user_args)
local rows = { layout = wibox.layout.fixed.vertical }
local args = user_args or {}
local font = args.font or beautiful.font
local onlogout = args.onlogout or function () awesome.quit() end
local onlock = args.onlock or function() awful.spawn.with_shell("betterlockscreen -l") end
local onreboot = args.onreboot or function() awful.spawn.with_shell("loginctl reboot") end
local onsuspend = args.onsuspend or function() awful.spawn.with_shell("loginctl suspend && betterlockscreen -l") end
local onpoweroff = args.onpoweroff or function() awful.spawn.with_shell("loginctl poweroff") end
local menu_items = {
{ name = 'Log out', icon_name = 'log-out.svg', command = onlogout },
{ name = 'Lock', icon_name = 'lock.svg', command = onlock },
{ name = 'Reboot', icon_name = 'refresh-cw.svg', command = onreboot },
{ name = 'Suspend', icon_name = 'moon.svg', command = onsuspend },
{ name = 'Power off', icon_name = 'power.svg', command = onpoweroff },
}
for _, item in ipairs(menu_items) do
local row = wibox.widget {
{
{
{
image = ICON_DIR .. item.icon_name,
resize = false,
widget = wibox.widget.imagebox
},
{
text = item.name,
font = font,
widget = wibox.widget.textbox
},
spacing = 12,
layout = wibox.layout.fixed.horizontal
},
margins = 8,
layout = wibox.container.margin
},
bg = beautiful.bg_normal,
widget = wibox.container.background
}
row:connect_signal("mouse::enter", function(c) c:set_bg(beautiful.bg_focus) end)
row:connect_signal("mouse::leave", function(c) c:set_bg(beautiful.bg_normal) end)
local old_cursor, old_wibox
row:connect_signal("mouse::enter", function()
local wb = mouse.current_wibox
old_cursor, old_wibox = wb.cursor, wb
wb.cursor = "hand1"
end)
row:connect_signal("mouse::leave", function()
if old_wibox then
old_wibox.cursor = old_cursor
old_wibox = nil
end
end)
row:buttons(awful.util.table.join(awful.button({}, 1, function()
popup.visible = not popup.visible
item.command()
end)))
table.insert(rows, row)
end
popup:setup(rows)
logout_menu_widget:buttons(
awful.util.table.join(
awful.button({}, 1, function()
if popup.visible then
popup.visible = not popup.visible
logout_menu_widget:set_bg('#00000000')
else
popup:move_next_to(mouse.current_widget_geometry)
logout_menu_widget:set_bg(beautiful.bg_focus)
end
end)
)
)
return logout_menu_widget
end
return setmetatable(logout_menu_widget, { __call = function(_, ...) return worker(...) end })

View file

@ -1,88 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="16"
viewBox="0 0 16 16"
height="16"
id="svg2"
version="1.1"
inkscape:version="0.91 r"
sodipodi:docname="audio-volume-high-symbolic.svg">
<metadata
id="metadata30">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1215"
inkscape:window-height="776"
id="namedview28"
showgrid="true"
inkscape:zoom="38.125"
inkscape:cx="8"
inkscape:cy="8"
inkscape:window-x="65"
inkscape:window-y="24"
inkscape:window-maximized="1"
inkscape:current-layer="svg2"
showguides="true"
inkscape:snap-intersection-paths="false"
inkscape:object-paths="false">
<inkscape:grid
type="xygrid"
id="grid4158" />
</sodipodi:namedview>
<defs
id="defs4" />
<path
d="M 6,2 2,6 2,10 6,14 6,9 7,8 6,7 Z"
id="path18"
inkscape:connector-curvature="0"
style="fill:#bebebe"
sodipodi:nodetypes="cccccccc" />
<path
d="M 1.300003,5 C 0.216589,5 0,6.163269 0,7.4 L 0,8.6 C 0,9.836747 0.24312,11 1.300003,11 L 3,11 3,5 Z"
id="path20"
inkscape:connector-curvature="0"
style="fill:#bebebe"
sodipodi:nodetypes="ssssccs" />
<path
style="opacity:1;fill:#bebebe;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="M 13.140638,1 11.726417,2.413582 C 12.808349,3.4955144 13.990412,5.4467621 14,8 c 0,2.551493 -1.192916,4.505751 -2.273583,5.586418 L 13.140638,15 C 14.595711,13.544927 16.019176,11 16,8 16.035061,5 14.595117,2.4544787 13.140638,1 Z"
id="path4508"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccccccc" />
<path
style="opacity:1;fill:#bebebe;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="M 11,3.1156678 9.5897193,4.5261118 C 10.372347,5.3087395 11,6.5690611 11,8 11,9.4309388 10.372767,10.690952 9.5897193,11.474 L 11,12.884 C 12.275645,11.608355 13,9.854095 13,8 13,6.1543677 12.273068,4.3887355 11,3.1156678 Z"
id="path4529"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccccccc" />
<path
style="opacity:1;fill:#bebebe;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="M 8.629,5 7.2094668,6.4096296 C 8,7.05621 8,7.805653 8,8 8,8.1932576 7.982199,8.9408674 7.209,9.59 L 8.6289063,11 C 9.8466375,9.952694 10,8.5984701 10,8 10,7.400497 9.854476,6.062891 8.629,5 Z"
id="path4569"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccscccc" />
</svg>

Before

Width:  |  Height:  |  Size: 3.4 KiB

View file

@ -1,88 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="16"
viewBox="0 0 16 16"
height="16"
id="svg2"
version="1.1"
inkscape:version="0.91 r"
sodipodi:docname="audio-volume-low-symbolic.svg">
<metadata
id="metadata30">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1215"
inkscape:window-height="776"
id="namedview28"
showgrid="true"
inkscape:zoom="38.125"
inkscape:cx="8"
inkscape:cy="8"
inkscape:window-x="65"
inkscape:window-y="24"
inkscape:window-maximized="1"
inkscape:current-layer="svg2"
showguides="true"
inkscape:snap-intersection-paths="false"
inkscape:object-paths="false">
<inkscape:grid
type="xygrid"
id="grid4158" />
</sodipodi:namedview>
<defs
id="defs4" />
<path
d="M 6,2 2,6 2,10 6,14 6,9 7,8 6,7 Z"
id="path18"
inkscape:connector-curvature="0"
style="fill:#bebebe"
sodipodi:nodetypes="cccccccc" />
<path
d="M 1.300003,5 C 0.216589,5 0,6.163269 0,7.4 L 0,8.6 C 0,9.836747 0.24312,11 1.300003,11 L 3,11 3,5 Z"
id="path20"
inkscape:connector-curvature="0"
style="fill:#bebebe"
sodipodi:nodetypes="ssssccs" />
<path
style="opacity:0.3;fill:#bebebe;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="M 13.140638,1 11.726417,2.413582 C 12.808349,3.4955144 13.990412,5.4467621 14,8 c 0,2.551493 -1.192916,4.505751 -2.273583,5.586418 L 13.140638,15 C 14.595711,13.544927 16.019176,11 16,8 16.035061,5 14.595117,2.4544787 13.140638,1 Z"
id="path4508"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccccccc" />
<path
style="opacity:0.3;fill:#bebebe;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="M 11,3.1156678 9.5897193,4.5261118 C 10.372347,5.3087395 11,6.5690611 11,8 11,9.4309388 10.372767,10.690952 9.5897193,11.474 L 11,12.884 C 12.275645,11.608355 13,9.854095 13,8 13,6.1543677 12.273068,4.3887355 11,3.1156678 Z"
id="path4529"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccccccc" />
<path
style="opacity:1;fill:#bebebe;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="M 8.629,5 7.2094668,6.4096296 C 8,7.05621 8,7.805653 8,8 8,8.1932576 7.982199,8.9408674 7.209,9.59 L 8.6289063,11 C 9.8466375,9.952694 10,8.5984701 10,8 10,7.400497 9.854476,6.062891 8.629,5 Z"
id="path4569"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccscccc" />
</svg>

Before

Width:  |  Height:  |  Size: 3.4 KiB

View file

@ -1,88 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="16"
viewBox="0 0 16 16"
height="16"
id="svg2"
version="1.1"
inkscape:version="0.91 r"
sodipodi:docname="audio-volume-medium-symbolic.svg">
<metadata
id="metadata30">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1215"
inkscape:window-height="776"
id="namedview28"
showgrid="true"
inkscape:zoom="38.125"
inkscape:cx="8"
inkscape:cy="8"
inkscape:window-x="65"
inkscape:window-y="24"
inkscape:window-maximized="1"
inkscape:current-layer="svg2"
showguides="true"
inkscape:snap-intersection-paths="false"
inkscape:object-paths="false">
<inkscape:grid
type="xygrid"
id="grid4158" />
</sodipodi:namedview>
<defs
id="defs4" />
<path
d="M 6,2 2,6 2,10 6,14 6,9 7,8 6,7 Z"
id="path18"
inkscape:connector-curvature="0"
style="fill:#bebebe"
sodipodi:nodetypes="cccccccc" />
<path
d="M 1.300003,5 C 0.216589,5 0,6.163269 0,7.4 L 0,8.6 C 0,9.836747 0.24312,11 1.300003,11 L 3,11 3,5 Z"
id="path20"
inkscape:connector-curvature="0"
style="fill:#bebebe"
sodipodi:nodetypes="ssssccs" />
<path
style="opacity:0.3;fill:#bebebe;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="M 13.140638,1 11.726417,2.413582 C 12.808349,3.4955144 13.990412,5.4467621 14,8 c 0,2.551493 -1.192916,4.505751 -2.273583,5.586418 L 13.140638,15 C 14.595711,13.544927 16.019176,11 16,8 16.035061,5 14.595117,2.4544787 13.140638,1 Z"
id="path4508"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccccccc" />
<path
style="opacity:1;fill:#bebebe;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="M 11,3.1156678 9.5897193,4.5261118 C 10.372347,5.3087395 11,6.5690611 11,8 11,9.4309388 10.372767,10.690952 9.5897193,11.474 L 11,12.884 C 12.275645,11.608355 13,9.854095 13,8 13,6.1543677 12.273068,4.3887355 11,3.1156678 Z"
id="path4529"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccccccc" />
<path
style="opacity:1;fill:#bebebe;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="M 8.629,5 7.2094668,6.4096296 C 8,7.05621 8,7.805653 8,8 8,8.1932576 7.982199,8.9408674 7.209,9.59 L 8.6289063,11 C 9.8466375,9.952694 10,8.5984701 10,8 10,7.400497 9.854476,6.062891 8.629,5 Z"
id="path4569"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccscccc" />
</svg>

Before

Width:  |  Height:  |  Size: 3.4 KiB

View file

@ -1,88 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="16"
viewBox="0 0 16 16"
height="16"
id="svg2"
version="1.1"
inkscape:version="0.91 r13725"
sodipodi:docname="audio-volume-muted-symbolic.svg">
<metadata
id="metadata30">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1215"
inkscape:window-height="776"
id="namedview28"
showgrid="true"
inkscape:zoom="38.125"
inkscape:cx="3.4229508"
inkscape:cy="7.947541"
inkscape:window-x="65"
inkscape:window-y="24"
inkscape:window-maximized="1"
inkscape:current-layer="svg2"
showguides="true"
inkscape:snap-intersection-paths="false"
inkscape:object-paths="false">
<inkscape:grid
type="xygrid"
id="grid4158" />
</sodipodi:namedview>
<defs
id="defs4" />
<path
d="M 6,2 2,6 2,10 6,14 6,9 7,8 6,7 Z"
id="path18"
inkscape:connector-curvature="0"
style="fill:#bebebe"
sodipodi:nodetypes="cccccccc" />
<path
d="M 1.300003,5 C 0.216589,5 0,6.163269 0,7.4 L 0,8.6 C 0,9.836747 0.24312,11 1.300003,11 L 3,11 3,5 Z"
id="path20"
inkscape:connector-curvature="0"
style="fill:#bebebe"
sodipodi:nodetypes="ssssccs" />
<path
style="opacity:0.3;fill:#bebebe;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="M 13.140638,1 11.726417,2.413582 C 12.808349,3.4955144 13.990412,5.4467621 14,8 c 0,2.551493 -1.192916,4.505751 -2.273583,5.586418 L 13.140638,15 C 14.595711,13.544927 16.019176,11 16,8 16.035061,5 14.595117,2.4544787 13.140638,1 Z"
id="path4508"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccccccc" />
<path
style="opacity:0.3;fill:#bebebe;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="M 11,3.1156678 9.5897193,4.5261118 C 10.372347,5.3087395 11,6.5690611 11,8 11,9.4309388 10.372767,10.690952 9.5897193,11.474 L 11,12.884 C 12.275645,11.608355 13,9.854095 13,8 13,6.1543677 12.273068,4.3887355 11,3.1156678 Z"
id="path4529"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccccccc" />
<path
style="opacity:0.3;fill:#bebebe;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="M 8.629,5 7.2094668,6.4096296 C 8,7.05621 8,7.805653 8,8 8,8.1932576 7.982199,8.9408674 7.209,9.59 L 8.6289063,11 C 9.8466375,9.952694 10,8.5984701 10,8 10,7.400497 9.854476,6.062891 8.629,5 Z"
id="path4569"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccscccc" />
</svg>

Before

Width:  |  Height:  |  Size: 3.5 KiB

View file

@ -1,105 +0,0 @@
local utils = {}
local function split(string_to_split, separator)
if separator == nil then separator = "%s" end
local t = {}
for str in string.gmatch(string_to_split, "([^".. separator .."]+)") do
table.insert(t, str)
end
return t
end
function utils.extract_sinks_and_sources(pacmd_output)
local sinks = {}
local sources = {}
local device
local properties
local ports
local in_sink = false
local in_source = false
local in_device = false
local in_properties = false
local in_ports = false
for line in pacmd_output:gmatch("[^\r\n]+") do
if string.match(line, 'source%(s%) available.') then
in_sink = false
in_source = true
end
if string.match(line, 'sink%(s%) available.') then
in_sink = true
in_source = false
end
if string.match(line, 'index:') then
in_device = true
in_properties = false
device = {
id = line:match(': (%d+)'),
is_default = string.match(line, '*') ~= nil
}
if in_sink then
table.insert(sinks, device)
elseif in_source then
table.insert(sources, device)
end
end
if string.match(line, '^\tproperties:') then
in_device = false
in_properties = true
properties = {}
device['properties'] = properties
end
if string.match(line, 'ports:') then
in_device = false
in_properties = false
in_ports = true
ports = {}
device['ports'] = ports
end
if string.match(line, 'active port:') then
in_device = false
in_properties = false
in_ports = false
device['active_port'] = line:match(': (.+)'):gsub('<',''):gsub('>','')
end
if in_device then
local t = split(line, ': ')
local key = t[1]:gsub('\t+', ''):lower()
local value = t[2]:gsub('^<', ''):gsub('>$', '')
device[key] = value
end
if in_properties then
local t = split(line, '=')
local key = t[1]:gsub('\t+', ''):gsub('%.', '_'):gsub('-', '_'):gsub(':', ''):gsub("%s+$", "")
local value
if t[2] == nil then
value = t[2]
else
value = t[2]:gsub('"', ''):gsub("^%s+", ""):gsub(' Analog Stereo', '')
end
properties[key] = value
end
if in_ports then
local t = split(line, ': ')
local key = t[1]
if key ~= nil then
key = key:gsub('\t+', '')
end
ports[key] = t[2]
end
end
return sinks, sources
end
return utils

View file

@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="#ffffff" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-volume-2"><polygon points="11 5 6 9 2 9 2 15 6 15 11 19 11 5"></polygon><path d="M19.07 4.93a10 10 0 0 1 0 14.14M15.54 8.46a5 5 0 0 1 0 7.07"></path></svg>

Before

Width:  |  Height:  |  Size: 354 B

View file

@ -1,228 +0,0 @@
-------------------------------------------------
-- The Ultimate Volume Widget for Awesome Window Manager
-- More details could be found here:
-- https://github.com/streetturtle/awesome-wm-widgets/tree/master/volume-widget
-- @author Pavel Makhov
-- @copyright 2020 Pavel Makhov
-------------------------------------------------
local awful = require("awful")
local wibox = require("wibox")
local spawn = require("awful.spawn")
local gears = require("gears")
local beautiful = require("beautiful")
local watch = require("awful.widget.watch")
local utils = require("awesome-wm-widgets.volume-widget.utils")
local LIST_DEVICES_CMD = [[sh -c "pacmd list-sinks; pacmd list-sources"]]
local function GET_VOLUME_CMD(device) return 'amixer -D ' .. device .. ' sget Master' end
local function INC_VOLUME_CMD(device, step) return 'amixer set Master ' .. step .. '%+' end
local function DEC_VOLUME_CMD(device, step) return 'amixer set Master ' .. step .. '%-' end
local function TOG_VOLUME_CMD(device) return 'amixer set Master toggle' end
local widget_types = {
icon_and_text = require("awesome-wm-widgets.volume-widget.widgets.icon-and-text-widget"),
icon = require("awesome-wm-widgets.volume-widget.widgets.icon-widget"),
arc = require("awesome-wm-widgets.volume-widget.widgets.arc-widget"),
horizontal_bar = require("awesome-wm-widgets.volume-widget.widgets.horizontal-bar-widget"),
vertical_bar = require("awesome-wm-widgets.volume-widget.widgets.vertical-bar-widget")
}
local volume = {}
local rows = { layout = wibox.layout.fixed.vertical }
local popup = awful.popup{
bg = beautiful.bg_normal,
ontop = true,
visible = false,
shape = gears.shape.rounded_rect,
border_width = 1,
border_color = beautiful.bg_focus,
maximum_width = 400,
offset = { y = 5 },
widget = {}
}
local function build_main_line(device)
if device.active_port ~= nil and device.ports[device.active_port] ~= nil then
return device.properties.device_description .. ' · ' .. device.ports[device.active_port]
else
return device.properties.device_description
end
end
local function build_rows(devices, on_checkbox_click, device_type)
local device_rows = { layout = wibox.layout.fixed.vertical }
for _, device in pairs(devices) do
local checkbox = wibox.widget {
checked = device.is_default,
color = beautiful.bg_normal,
paddings = 2,
shape = gears.shape.circle,
forced_width = 20,
forced_height = 20,
check_color = beautiful.fg_urgent,
widget = wibox.widget.checkbox
}
checkbox:connect_signal("button::press", function()
spawn.easy_async(string.format([[sh -c 'pacmd set-default-%s "%s"']], device_type, device.name), function()
on_checkbox_click()
end)
end)
local row = wibox.widget {
{
{
{
checkbox,
valign = 'center',
layout = wibox.container.place,
},
{
{
text = build_main_line(device),
align = 'left',
widget = wibox.widget.textbox
},
left = 10,
layout = wibox.container.margin
},
spacing = 8,
layout = wibox.layout.align.horizontal
},
margins = 4,
layout = wibox.container.margin
},
bg = beautiful.bg_normal,
widget = wibox.container.background
}
row:connect_signal("mouse::enter", function(c) c:set_bg(beautiful.bg_focus) end)
row:connect_signal("mouse::leave", function(c) c:set_bg(beautiful.bg_normal) end)
local old_cursor, old_wibox
row:connect_signal("mouse::enter", function()
local wb = mouse.current_wibox
old_cursor, old_wibox = wb.cursor, wb
wb.cursor = "hand1"
end)
row:connect_signal("mouse::leave", function()
if old_wibox then
old_wibox.cursor = old_cursor
old_wibox = nil
end
end)
row:connect_signal("button::press", function()
spawn.easy_async(string.format([[sh -c 'pacmd set-default-%s "%s"']], device_type, device.name), function()
on_checkbox_click()
end)
end)
table.insert(device_rows, row)
end
return device_rows
end
local function build_header_row(text)
return wibox.widget{
{
markup = "<b>" .. text .. "</b>",
align = 'center',
widget = wibox.widget.textbox
},
bg = beautiful.bg_normal,
widget = wibox.container.background
}
end
local function rebuild_popup()
spawn.easy_async(LIST_DEVICES_CMD, function(stdout)
local sinks, sources = utils.extract_sinks_and_sources(stdout)
for i = 0, #rows do rows[i]=nil end
table.insert(rows, build_header_row("SINKS"))
table.insert(rows, build_rows(sinks, function() rebuild_popup() end, "sink"))
table.insert(rows, build_header_row("SOURCES"))
table.insert(rows, build_rows(sources, function() rebuild_popup() end, "source"))
popup:setup(rows)
end)
end
local function worker(user_args)
local args = user_args or {}
local mixer_cmd = args.mixer_cmd or 'pavucontrol'
local widget_type = args.widget_type
local refresh_rate = args.refresh_rate or 1
local step = args.step or 5
local device = args.device or 'pulse'
if widget_types[widget_type] == nil then
volume.widget = widget_types['icon_and_text'].get_widget(args.icon_and_text_args)
else
volume.widget = widget_types[widget_type].get_widget(args)
end
local function update_graphic(widget, stdout)
local mute = string.match(stdout, "%[(o%D%D?)%]") -- \[(o\D\D?)\] - [on] or [off]
if mute == 'off' then widget:mute()
elseif mute == 'on' then widget:unmute()
end
local volume_level = string.match(stdout, "(%d?%d?%d)%%") -- (\d?\d?\d)\%)
volume_level = string.format("% 3d", volume_level)
widget:set_volume_level(volume_level)
end
function volume:inc(s)
spawn.easy_async(INC_VOLUME_CMD(device, s or step), function(stdout) update_graphic(volume.widget, stdout) end)
end
function volume:dec(s)
spawn.easy_async(DEC_VOLUME_CMD(device, s or step), function(stdout) update_graphic(volume.widget, stdout) end)
end
function volume:toggle()
spawn.easy_async(TOG_VOLUME_CMD(device), function(stdout) update_graphic(volume.widget, stdout) end)
end
function volume:mixer()
if mixer_cmd then
spawn.easy_async(mixer_cmd)
end
end
volume.widget:buttons(
awful.util.table.join(
awful.button({}, 3, function()
if popup.visible then
popup.visible = not popup.visible
else
rebuild_popup()
popup:move_next_to(mouse.current_widget_geometry)
end
end),
awful.button({}, 4, function() volume:inc() end),
awful.button({}, 5, function() volume:dec() end),
awful.button({}, 2, function() volume:mixer() end),
awful.button({}, 1, function() volume:toggle() end)
)
)
watch(GET_VOLUME_CMD(device), refresh_rate, update_graphic, volume.widget)
return volume.widget
end
return setmetatable(volume, { __call = function(_, ...) return worker(...) end })

View file

@ -1,46 +0,0 @@
local wibox = require("wibox")
local beautiful = require('beautiful')
local ICON_DIR = os.getenv("HOME") .. '/.config/awesome/awesome-wm-widgets/volume-widget/icons/'
local widget = {}
function widget.get_widget(widgets_args)
local args = widgets_args or {}
local thickness = args.thickness or 2
local main_color = args.main_color or beautiful.fg_color
local bg_color = args.bg_color or '#ffffff11'
local mute_color = args.mute_color or beautiful.fg_urgent
local size = args.size or 18
return wibox.widget {
{
id = "icon",
image = ICON_DIR .. 'audio-volume-high-symbolic.svg',
resize = true,
widget = wibox.widget.imagebox,
},
max_value = 100,
thickness = thickness,
start_angle = 4.71238898, -- 2pi*3/4
forced_height = size,
forced_width = size,
bg = bg_color,
paddings = 2,
widget = wibox.container.arcchart,
set_volume_level = function(self, new_value)
self.value = new_value
end,
mute = function(self)
self.colors = { mute_color }
end,
unmute = function(self)
self.colors = { main_color }
end
}
end
return widget

View file

@ -1,58 +0,0 @@
local wibox = require("wibox")
local beautiful = require('beautiful')
local gears = require("gears")
local ICON_DIR = os.getenv("HOME") .. '/.config/awesome/awesome-wm-widgets/volume-widget/icons/'
local widget = {}
function widget.get_widget(widgets_args)
local args = widgets_args or {}
local main_color = args.main_color or beautiful.fg_normal
local mute_color = args.mute_color or beautiful.fg_urgent
local bg_color = args.bg_color or '#ffffff11'
local width = args.width or 50
local margins = args.margins or 10
local shape = args.shape or 'bar'
local with_icon = args.with_icon == true and true or false
local bar = wibox.widget {
{
{
id = "icon",
image = ICON_DIR .. 'audio-volume-high-symbolic.svg',
resize = false,
widget = wibox.widget.imagebox,
},
valign = 'center',
visible = with_icon,
layout = wibox.container.place,
},
{
id = 'bar',
max_value = 100,
forced_width = width,
color = main_color,
margins = { top = margins, bottom = margins },
background_color = bg_color,
shape = gears.shape[shape],
widget = wibox.widget.progressbar,
},
spacing = 4,
layout = wibox.layout.fixed.horizontal,
set_volume_level = function(self, new_value)
self:get_children_by_id('bar')[1]:set_value(tonumber(new_value))
end,
mute = function(self)
self:get_children_by_id('bar')[1]:set_color(mute_color)
end,
unmute = function(self)
self:get_children_by_id('bar')[1]:set_color(main_color)
end
}
return bar
end
return widget

View file

@ -1,59 +0,0 @@
local wibox = require("wibox")
local beautiful = require('beautiful')
local widget = {}
local ICON_DIR = os.getenv("HOME") .. '/.config/awesome/awesome-wm-widgets/volume-widget/icons/'
function widget.get_widget(widgets_args)
local args = widgets_args or {}
local font = args.font or beautiful.font
local icon_dir = args.icon_dir or ICON_DIR
return wibox.widget {
{
{
id = "icon",
resize = false,
widget = wibox.widget.imagebox,
},
valign = 'center',
layout = wibox.container.place
},
{
id = 'txt',
font = font,
widget = wibox.widget.textbox
},
layout = wibox.layout.fixed.horizontal,
set_volume_level = function(self, new_value)
self:get_children_by_id('txt')[1]:set_text(new_value)
local volume_icon_name
if self.is_muted then
volume_icon_name = 'audio-volume-muted-symbolic'
else
local new_value_num = tonumber(new_value)
if (new_value_num >= 0 and new_value_num < 33) then
volume_icon_name="audio-volume-low-symbolic"
elseif (new_value_num < 66) then
volume_icon_name="audio-volume-medium-symbolic"
else
volume_icon_name="audio-volume-high-symbolic"
end
end
self:get_children_by_id('icon')[1]:set_image(icon_dir .. volume_icon_name .. '.svg')
end,
mute = function(self)
self.is_muted = true
self:get_children_by_id('icon')[1]:set_image(icon_dir .. 'audio-volume-muted-symbolic.svg')
end,
unmute = function(self)
self.is_muted = false
end
}
end
return widget

View file

@ -1,46 +0,0 @@
local wibox = require("wibox")
local widget = {}
local ICON_DIR = os.getenv("HOME") .. '/.config/awesome/awesome-wm-widgets/volume-widget/icons/'
function widget.get_widget(widgets_args)
local args = widgets_args or {}
local icon_dir = args.icon_dir or ICON_DIR
return wibox.widget {
{
id = "icon",
resize = false,
widget = wibox.widget.imagebox,
},
valign = 'center',
layout = wibox.container.place,
set_volume_level = function(self, new_value)
local volume_icon_name
if self.is_muted then
volume_icon_name = 'audio-volume-muted-symbolic'
else
local new_value_num = tonumber(new_value)
if (new_value_num >= 0 and new_value_num < 33) then
volume_icon_name="audio-volume-low-symbolic"
elseif (new_value_num < 66) then
volume_icon_name="audio-volume-medium-symbolic"
else
volume_icon_name="audio-volume-high-symbolic"
end
end
self:get_children_by_id('icon')[1]:set_image(icon_dir .. volume_icon_name .. '.svg')
end,
mute = function(self)
self.is_muted = true
self:get_children_by_id('icon')[1]:set_image(icon_dir .. 'audio-volume-muted-symbolic.svg')
end,
unmute = function(self)
self.is_muted = false
end
}
end
return widget

View file

@ -1,64 +0,0 @@
local wibox = require("wibox")
local beautiful = require('beautiful')
local gears = require("gears")
local ICON_DIR = os.getenv("HOME") .. '/.config/awesome/awesome-wm-widgets/volume-widget/icons/'
local widget = {}
function widget.get_widget(widgets_args)
local args = widgets_args or {}
local main_color = args.main_color or beautiful.fg_normal
local mute_color = args.mute_color or beautiful.fg_urgent
local bg_color = args.bg_color or '#ffffff11'
local width = args.width or 10
local margins = args.height or 2
local shape = args.shape or 'bar'
local with_icon = args.with_icon == true and true or false
local bar = wibox.widget {
{
{
id = "icon",
image = ICON_DIR .. 'audio-volume-high-symbolic.svg',
resize = false,
widget = wibox.widget.imagebox,
},
valign = 'center',
visible = with_icon,
layout = wibox.container.place,
},
{
{
id = 'bar',
max_value = 100,
forced_width = width,
forced_height = 5,
margins = { top = margins, bottom = margins },
color = main_color,
background_color = bg_color,
shape = gears.shape[shape],
widget = wibox.widget.progressbar,
},
forced_width = width,
direction = 'east',
layout = wibox.container.rotate,
},
spacing = 4,
layout = wibox.layout.fixed.horizontal,
set_volume_level = function(self, new_value)
self:get_children_by_id('bar')[1]:set_value(tonumber(new_value))
end,
mute = function(self)
self:get_children_by_id('bar')[1]:set_color(mute_color)
end,
unmute = function(self)
self:get_children_by_id('bar')[1]:set_color(main_color)
end
}
return bar
end
return widget

View file

@ -1,21 +1,15 @@
-- ____ ____ _ __ -- ____ ____ _ _
-- | _ \| _ \| |/ / -- | _ \| _ \| |/ /
-- | | | | |_) | ' / Clay Gomera (Drake) -- | | | | |_) | ' / Clay Gomera (Drake)
-- | |_| | _ <| . \ My custom awesome config -- | |_| | _ <| . \ My custom awesome config
-- |____/|_| \_\_|\_\ -- |____/|_| \_\_|\_\
-- --
-- BEGINNING OF LIBRARIES -- -- BEGINNING OF LIBRARIES --
-- Standard awesome library -- Standard awesome library
local gears = require("gears") --Utilities such as color parsing and objects local gears = require("gears") --Utilities such as color parsing and objects
local awful = require("awful") --Everything related to window managment local awful = require("awful") --Everything related to window managment
require("awful.autofocus") require("awful.autofocus")
-- Custom libraries
local battery_widget = require("awesome-wm-widgets.battery-widget.battery")
local volume_widget = require('awesome-wm-widgets.volume-widget.volume')
local brightness_widget = require("awesome-wm-widgets.brightness-widget.brightness")
local logout_menu_widget = require("awesome-wm-widgets.logout-menu-widget.logout-menu")
-- Widget and layout library -- Widget and layout library
local wibox = require("wibox") local wibox = require("wibox")
-- Theme handling library -- Theme handling library
@ -115,7 +109,7 @@ local terminal = "alacritty"
local edit = "emacsclient -c -a emacs" local edit = "emacsclient -c -a emacs"
local file = "alacritty -e ./.config/vifm/scripts/vifmrun" local file = "alacritty -e ./.config/vifm/scripts/vifmrun"
local web = "qutebrowser" local web = "qutebrowser"
local music = "alacritty -e musikcube" local music = "alacritty -e mocp"
local games = "retroarch" local games = "retroarch"
-- Key bindings variables -- Key bindings variables
local modkey = "Mod4" local modkey = "Mod4"
@ -294,31 +288,18 @@ globalkeys = my_table.join(
-- games -- games
awful.key({ modkey }, "F7", function () awful.util.spawn(games) end, awful.key({ modkey }, "F7", function () awful.util.spawn(games) end,
{description = "Launch gaming app", group = "Apps"}), {description = "Launch gaming app", group = "Apps"}),
-- misc
awful.key({ modkey, "Shift" }, "p", function () awful.util.spawn("alacritty -e pulsemixer") awful.util.spawn("alacritty -e alsamixer") end,
{description = "Launch mixers", group = "Apps"}),
awful.key({ modkey, altkey }, "w", function () awful.util.spawn("alacritty -e nmtui connect") end,
{description = "Launch mixers", group = "Apps"}),
-- Volume -- Volume
awful.key({}, "XF86AudioRaiseVolume", function() volume_widget:inc(5) end, awful.key({}, "XF86AudioRaiseVolume", function() awful.spawn("amixer set Master 5%+") end,
{description = "Increase volume", group = "Quick Actions"}), {description = "Increase volume", group = "Quick Actions"}),
awful.key({}, "XF86AudioLowerVolume", function() volume_widget:dec(5) end, awful.key({}, "XF86AudioLowerVolume", function() awful.spawn("amixer set Master 5%-") end,
{description = "Decrease volume", group = "Quick Actions"}), {description = "Decrease volume", group = "Quick Actions"}),
awful.key({}, "XF86AudioMute", function() volume_widget:toggle() end, awful.key({}, "XF86AudioMute", function() awful.spawn("amixer set Master toggle") end,
{description = "Mute volume", group = "Quick Actions"}), {description = "Mute volume", group = "Quick Actions"}),
-- Brightness -- Brightness
awful.key({}, "XF86MonBrightnessUp", function () brightness_widget:inc(5) end, awful.key({}, "XF86MonBrightnessUp", function () awful.spawn("xbacklight -inc 10") end,
{description = "Increase brightness", group = "Quick Actions"}), {description = "Increase brightness", group = "Quick Actions"}),
awful.key({}, "XF86MonBrightnessDown", function () brightness_widget:dec(5) end, awful.key({}, "XF86MonBrightnessDown", function () awful.spawn("xbacklight -dec 10") end,
{description = "Decrease brightness", group = "Quick Actions"}), {description = "Decrease brightness", group = "Quick Actions"}),
-- Screenshots
awful.key({ modkey }, "Print", function() awful.util.spawn("scrot") end,
{description = "Take a screenshot (Complete screen mode)", group = "Quick Actions"}),
awful.key({ modkey, modkey1 }, "Print", function() awful.util.spawn("scrot -s") end,
{description = "Take a screenshot (Area selection mode)", group = "Quick Actions"}),
-- Screen configuration tool
awful.key({ modkey }, "p", function() awful.util.spawn("arandr") end,
{description = "Launch screen configuration tool", group = ("Quick Actions")}),
-- Screenlocker -- Screenlocker
awful.key({ modkey, modkey1 }, "l", function() awful.spawn(screenlocker) end, awful.key({ modkey, modkey1 }, "l", function() awful.spawn(screenlocker) end,
{description = "Lock the screen", group = "Quick Actions"}), {description = "Lock the screen", group = "Quick Actions"}),
@ -547,6 +528,7 @@ client.connect_signal("unfocus", function(c) c.border_color = beautiful.border_n
-- BEGINNING OF AUTOSTART -- -- BEGINNING OF AUTOSTART --
awful.util.spawn_with_shell("sh $HOME/.fehbg &") awful.util.spawn_with_shell("sh $HOME/.fehbg &")
awful.util.spawn_with_shell("lxpolkit &") awful.util.spawn_with_shell("lxpolkit &")
awful.util.spawn_with_shell("picom --config ~/.config/picom/picom.conf &")
awful.util.spawn_with_shell("/usr/bin/emacs --daemon &") awful.util.spawn_with_shell("/usr/bin/emacs --daemon &")
awful.util.spawn_with_shell("pulseaudio &")
awful.util.spawn_with_shell("picom --config $HOME/.config/picom/picom.conf &")
-- END OF AUTOSTART -- -- END OF AUTOSTART --

View file

@ -5,10 +5,6 @@
-- |____/|_| \_\_|\_\ -- |____/|_| \_\_|\_\
-- --
--[[
VARIABLES
]]
local gears = require("gears") local gears = require("gears")
local lain = require("lain") local lain = require("lain")
local lain_helpers = require("lain.helpers") local lain_helpers = require("lain.helpers")
@ -17,12 +13,6 @@ local wibox = require("wibox")
local lgi = require("lgi") local lgi = require("lgi")
local dpi = require("beautiful.xresources").apply_dpi local dpi = require("beautiful.xresources").apply_dpi
-- Custom libraries
local battery_widget = require("awesome-wm-widgets.battery-widget.battery")
local volume_widget = require('awesome-wm-widgets.volume-widget.volume')
local brightness_widget = require("awesome-wm-widgets.brightness-widget.brightness")
local logout_menu_widget = require("awesome-wm-widgets.logout-menu-widget.logout-menu")
local os = os local os = os
local my_table = awful.util.table or gears.table -- 4.{0,1} compatibility local my_table = awful.util.table or gears.table -- 4.{0,1} compatibility
@ -123,6 +113,84 @@ local clock = awful.widget.watch(
widget:set_markup(" " .. markup.font(theme.font, stdout)) widget:set_markup(" " .. markup.font(theme.font, stdout))
end end
) )
-- Battery
local baticon = wibox.widget.imagebox(theme.widget_battery)
local bat = lain.widget.bat({
settings = function()
if bat_now.status and bat_now.status ~= "N/A" then
if bat_now.ac_status == 1 then
baticon:set_image(theme.widget_ac)
elseif not bat_now.perc and tonumber(bat_now.perc) <= 5 then
baticon:set_image(theme.widget_battery_empty)
elseif not bat_now.perc and tonumber(bat_now.perc) <= 15 then
baticon:set_image(theme.widget_battery_low)
else
baticon:set_image(theme.widget_battery)
end
widget:set_markup(markup.font(theme.font, " " .. bat_now.perc .. "% "))
else
widget:set_markup(markup.font(theme.font, " AC "))
baticon:set_image(theme.widget_ac)
end
end
})
-- CPU
local cpuicon = wibox.widget.imagebox(theme.widget_cpu)
local cpu = lain.widget.cpu({
settings = function()
widget:set_markup(markup.font(theme.font, " " .. cpu_now.usage .. "% "))
end
})
-- MEM
local memicon = wibox.widget.imagebox(theme.widget_mem)
local mem = lain.widget.mem({
settings = function()
widget:set_markup(markup.font(theme.font, " " .. mem_now.used .. "MB "))
end
})
-- Net
local neticon = wibox.widget.imagebox(theme.widget_net)
local net = lain.widget.net({
settings = function()
widget:set_markup(markup.font(theme.font,
markup("#7AC82E", "DN: " .. string.format("%2.fK", net_now.received))
.. " | " ..
markup("#46A8C3", "UP: " .. string.format("%2.fK", net_now.sent) .. " ")))
end
})
-- ALSA volume
local volicon = wibox.widget.imagebox(theme.widget_vol)
theme.volume = lain.widget.alsa({
settings = function()
if volume_now.status == "off" then
volicon:set_image(theme.widget_vol_mute)
elseif tonumber(volume_now.level) == 0 then
volicon:set_image(theme.widget_vol_no)
elseif tonumber(volume_now.level) <= 50 then
volicon:set_image(theme.widget_vol_low)
else
volicon:set_image(theme.widget_vol)
end
widget:set_markup(markup.font(theme.font, " " .. volume_now.level .. "% "))
end
})
theme.volume.widget:buttons(awful.util.table.join(
awful.button({}, 4, function ()
awful.util.spawn("amixer set Master 1%+")
theme.volume.update()
end),
awful.button({}, 5, function ()
awful.util.spawn("amixer set Master 1%-")
theme.volume.update()
end)
))
-- Separators -- Separators
local spr = wibox.widget.textbox(' ') local spr = wibox.widget.textbox(' ')
local arrl_dl = separators.arrow_left(theme.bg_focus, "alpha") local arrl_dl = separators.arrow_left(theme.bg_focus, "alpha")
@ -175,21 +243,24 @@ function theme.at_screen_connect(s)
wibox.container.background(mykeyboardlayout, theme.bg_focus), wibox.container.background(mykeyboardlayout, theme.bg_focus),
arrl_dl, arrl_dl,
arrl_ld, arrl_ld,
wibox.container.background(volume_widget{ wibox.container.background(volicon, theme.bg_focus),
widget_type = 'icon_and_text', wibox.container.background(theme.volume.widget, theme.bg_focus),
device = 'default'}, theme.bg_focus),
arrl_dl, arrl_dl,
arrl_ld, arrl_ld,
wibox.container.background(battery_widget(), theme.bg_focus), wibox.container.background(baticon, theme.bg_focus),
wibox.container.background(bat.widget, theme.bg_focus),
arrl_dl, arrl_dl,
arrl_ld, arrl_ld,
wibox.container.background(brightness_widget{ wibox.container.background(cpuicon, theme.bg_focus),
type = 'icon_and_text', wibox.container.background(cpu.widget, theme.bg_focus),
program = 'xbacklight'}, theme.bg_focus),
arrl_dl, arrl_dl,
arrl_ld, arrl_ld,
wibox.container.background(logout_menu_widget{ wibox.container.background(memicon, theme.bg_focus),
font = 'mononoki Nerd Font'}, theme.bg_focus), wibox.container.background(mem.widget, theme.bg_focus),
arrl_dl,
arrl_ld,
wibox.container.background(neticon, theme.bg_focus),
wibox.container.background(net.widget, theme.bg_focus),
}, },
}, },
{ {

View file

@ -1,3 +1,5 @@
(beacon-mode 1)
(map! :leader (map! :leader
(:prefix ("b". "buffer") (:prefix ("b". "buffer")
:desc "List bookmarks" "L" #'list-bookmarks :desc "List bookmarks" "L" #'list-bookmarks
@ -90,6 +92,11 @@
(kbd "g <down>") 'centaur-tabs-forward-group (kbd "g <down>") 'centaur-tabs-forward-group
(kbd "g <up>") 'centaur-tabs-backward-group) (kbd "g <up>") 'centaur-tabs-backward-group)
(map! :leader
(:prefix ("c h" . "Help info from Clippy")
:desc "Clippy describes function under point" "f" #'clippy-describe-function
:desc "Clippy describes variable under point" "v" #'clippy-describe-variable))
(use-package dashboard (use-package dashboard
:init ;; tweak dashboard config before loading it :init ;; tweak dashboard config before loading it
(setq dashboard-set-heading-icons t) (setq dashboard-set-heading-icons t)
@ -296,6 +303,11 @@ List of keybindings (SPC h b b)")
:desc "Toggle line highlight globally" "H" #'global-hl-line-mode :desc "Toggle line highlight globally" "H" #'global-hl-line-mode
:desc "Toggle truncate lines" "t" #'toggle-truncate-lines)) :desc "Toggle truncate lines" "t" #'toggle-truncate-lines))
(setq minimap-window-location 'right)
(map! :leader
(:prefix ("t" . "toggle")
:desc "Toggle minimap-mode" "m" #'minimap-mode))
(set-face-attribute 'mode-line nil :font "Ubuntu Mono-13") (set-face-attribute 'mode-line nil :font "Ubuntu Mono-13")
(setq doom-modeline-height 30 ;; sets modeline height (setq doom-modeline-height 30 ;; sets modeline height
doom-modeline-bar-width 5 ;; sets right bar width doom-modeline-bar-width 5 ;; sets right bar width

View file

@ -6,12 +6,14 @@
* TABLE OF CONTENTS :toc: * TABLE OF CONTENTS :toc:
- [[#about-this-config][ABOUT THIS CONFIG]] - [[#about-this-config][ABOUT THIS CONFIG]]
- [[#beacon][BEACON]]
- [[#bookmarks-and-buffers][BOOKMARKS AND BUFFERS]] - [[#bookmarks-and-buffers][BOOKMARKS AND BUFFERS]]
- [[#bookmarks][Bookmarks]] - [[#bookmarks][Bookmarks]]
- [[#buffers][Buffers]] - [[#buffers][Buffers]]
- [[#keybindings-within-ibuffer-mode][Keybindings within ibuffer mode]] - [[#keybindings-within-ibuffer-mode][Keybindings within ibuffer mode]]
- [[#calendar][CALENDAR]] - [[#calendar][CALENDAR]]
- [[#centaur-tabs][CENTAUR-TABS]] - [[#centaur-tabs][CENTAUR-TABS]]
- [[#clippy][CLIPPY]]
- [[#dashboard][DASHBOARD]] - [[#dashboard][DASHBOARD]]
- [[#configuring-dashboard][Configuring Dashboard]] - [[#configuring-dashboard][Configuring Dashboard]]
- [[#dashboard-in-emacsclient][Dashboard in Emacsclient]] - [[#dashboard-in-emacsclient][Dashboard in Emacsclient]]
@ -32,6 +34,7 @@
- [[#ivy-posframe][IVY-POSFRAME]] - [[#ivy-posframe][IVY-POSFRAME]]
- [[#ivy-keybindings][IVY KEYBINDINGS]] - [[#ivy-keybindings][IVY KEYBINDINGS]]
- [[#line-settings][LINE SETTINGS]] - [[#line-settings][LINE SETTINGS]]
- [[#minimap][MINIMAP]]
- [[#modeline][MODELINE]] - [[#modeline][MODELINE]]
- [[#mouse-support][MOUSE SUPPORT]] - [[#mouse-support][MOUSE SUPPORT]]
- [[#neotree][NEOTREE]] - [[#neotree][NEOTREE]]
@ -54,6 +57,13 @@
* ABOUT THIS CONFIG * ABOUT THIS CONFIG
This is my personal Doom Emacs config. Doom Emacs is a distribution of Emacs that uses the "evil" keybindings (Vim keybindings) and includes a number of nice extensions and a bit of configuration out of the box. I am maintaining this config not just for myself, but also for those that want to explore some of what is possible with Emacs. I will add a lot of examples of plugins and settings, some of them I may not even use personally. I do this because many people following me on YouTube look at my configs as "documentation". This config is a fork of DistroTube's config. This is my personal Doom Emacs config. Doom Emacs is a distribution of Emacs that uses the "evil" keybindings (Vim keybindings) and includes a number of nice extensions and a bit of configuration out of the box. I am maintaining this config not just for myself, but also for those that want to explore some of what is possible with Emacs. I will add a lot of examples of plugins and settings, some of them I may not even use personally. I do this because many people following me on YouTube look at my configs as "documentation". This config is a fork of DistroTube's config.
* BEACON
Never lose your cursor. When you scroll, your cursor will shine! This is a global minor-mode. Turn it on everywhere with:
#+begin_src emacs-lisp
(beacon-mode 1)
#+end_src
* BOOKMARKS AND BUFFERS * BOOKMARKS AND BUFFERS
Doom Emacs uses 'SPC b' for keybindings related to bookmarks and buffers. Doom Emacs uses 'SPC b' for keybindings related to bookmarks and buffers.
@ -207,6 +217,22 @@ To use tabs in Doom Emacs, be sure to uncomment "tabs" in Doom's init.el. Displ
(kbd "g <up>") 'centaur-tabs-backward-group) (kbd "g <up>") 'centaur-tabs-backward-group)
#+END_SRC #+END_SRC
* CLIPPY
Gives us a popup box with "Clippy, the paper clip". You can make him say various things by calling 'clippy-say' function. But the more useful functions of clippy are the two describe functions provided: 'clippy-describe-function' and 'clippy-describe-variable'. Hit the appropriate keybinding while the point is over a function/variable to call it. A popup with helpful clippy will appear, telling you about the function/variable (using describe-function and describe-variable respectively).
| COMMAND | DESCRIPTION | KEYBINDING |
|--------------------------+---------------------------------------+------------|
| clippy-describe-function | /Clippy describes function under point/ | SPC c h f |
| clippy-describe-variable | /Clippy describes variable under point/ | SPC c h v |
#+begin_src emacs-lisp
(map! :leader
(:prefix ("c h" . "Help info from Clippy")
:desc "Clippy describes function under point" "f" #'clippy-describe-function
:desc "Clippy describes variable under point" "v" #'clippy-describe-variable))
#+end_src
* DASHBOARD * DASHBOARD
Emacs Dashboard is an extensible startup screen showing you recent files, bookmarks, agenda items and an Emacs banner. Emacs Dashboard is an extensible startup screen showing you recent files, bookmarks, agenda items and an Emacs banner.
@ -522,6 +548,7 @@ Some custom functions to insert the date. The function 'insert-todays-date' can
:desc "Insert any date" "a" #'dt/insert-any-date :desc "Insert any date" "a" #'dt/insert-any-date
:desc "Insert todays date" "t" #'dt/insert-todays-date)) :desc "Insert todays date" "t" #'dt/insert-todays-date))
#+end_src #+end_src
* IVY * IVY
Ivy is a generic completion mechanism for Emacs. Ivy is a generic completion mechanism for Emacs.
@ -593,6 +620,20 @@ I set comment-line to 'SPC TAB TAB' which is a rather comfortable keybinding for
:desc "Toggle truncate lines" "t" #'toggle-truncate-lines)) :desc "Toggle truncate lines" "t" #'toggle-truncate-lines))
#+END_SRC #+END_SRC
* MINIMAP
A minimap sidebar displaying a smaller version of the current buffer on either the left or right side. It highlights the currently shown region and updates its position automatically. Be aware that this minimap program does not work in Org documents. This is not unusual though because I have tried several minimap programs and none of them can handle Org.
| COMMAND | DESCRIPTION | KEYBINDING |
|--------------+-------------------------------------------+------------|
| minimap-mode | /Toggle minimap-mode/ | SPC t m |
#+begin_src emacs-lisp
(setq minimap-window-location 'right)
(map! :leader
(:prefix ("t" . "toggle")
:desc "Toggle minimap-mode" "m" #'minimap-mode))
#+end_src
* MODELINE * MODELINE
The modeline is the bottom status bar that appears in Emacs windows. For more information on what is available to configure in the Doom modeline, check out: The modeline is the bottom status bar that appears in Emacs windows. For more information on what is available to configure in the Doom modeline, check out:
https://github.com/seagle0128/doom-modeline https://github.com/seagle0128/doom-modeline

View file

@ -66,14 +66,22 @@
(package! elfeed-goodies) (package! elfeed-goodies)
(package! elpher) (package! elpher)
(package! emojify) (package! emojify)
(package! esxml)
(package! evil-tutor) (package! evil-tutor)
(package! ivy-posframe) (package! ivy-posframe)
(package! mw-thesaurus) (package! mw-thesaurus)
(package! org-board)
(package! org-web-tools)
(package! ox-gemini) (package! ox-gemini)
(package! pacmacs) (package! pacmacs)
(package! peep-dired) (package! peep-dired)
(package! password-store) (package! password-store)
(package! rainbow-mode) (package! rainbow-mode)
(package! request)
(package! resize-window) (package! resize-window)
(package! s)
(package! tldr) (package! tldr)
(package! wc-mode) (package! wc-mode)
(package! beacon)
(package! clippy)
(package! minimap)

View file

@ -1,229 +0,0 @@
## ____ ____ _ __
## | _ \| _ \| |/ /
## | | | | |_) | ' / Clay Gomera (Drake)
## | |_| | _ <| . \ My custom config.fish
## |____/|_| \_\_|\_\
##
if status is-interactive
# Commands to run in interactive sessions can go here
end
### EXPORT
set -U fish_greeting ""
set EDITOR "emacsclient -t -a ''" # $EDITOR use Emacs in terminal
set VISUAL "emacsclient -c -a emacs" # $VISUAL use Emacs in GUI mode
### ADDING TO THE PATH
# First line removes the path; second line sets it. Without the first line,
# your path gets massive and fish becomes very slow.
set -e fish_user_paths
set -U fish_user_paths $HOME/.local/bin $HOME/Applications $fish_user_paths
# Vi mode
function fish_user_key_bindings
# fish_default_key_bindings
fish_vi_key_bindings
end
### "bat" as manpager
set -x MANPAGER "sh -c 'col -bx | bat -l man -p'"
### AUTOCOMPLETE AND HIGHLIGHT COLORS ###
set fish_color_normal brcyan
set fish_color_autosuggestion '#7d7d7d'
set fish_color_command brcyan
set fish_color_error '#ff6c6b'
set fish_color_param brcyan
### FUNCTIONS
# Functions needed for !! and !$
function __history_previous_command
switch (commandline -t)
case "!"
commandline -t $history[1]; commandline -f repaint
case "*"
commandline -i !
end
end
function __history_previous_command_arguments
switch (commandline -t)
case "!"
commandline -t ""
commandline -f history-token-search-backward
case "*"
commandline -i '$'
end
end
# The bindings for !! and !$
if [ $fish_key_bindings = "fish_vi_key_bindings" ];
bind -Minsert ! __history_previous_command
bind -Minsert '$' __history_previous_command_arguments
else
bind ! __history_previous_command
bind '$' __history_previous_command_arguments
end
# Function for creating a backup file
# ex: backup file.txt
# result: copies file as file.txt.bak
function backup --argument filename
cp $filename $filename.bak
end
# Function for copying files and directories, even recursively.
# ex: copy DIRNAME LOCATIONS
# result: copies the directory and all of its contents.
function copy
set count (count $argv | tr -d \n)
if test "$count" = 2; and test -d "$argv[1]"
set from (echo $argv[1] | trim-right /)
set to (echo $argv[2])
command cp -r $from $to
else
command cp $argv
end
end
# Function for printing a column (splits input on whitespace)
# ex: echo 1 2 3 | coln 3
# output: 3
function coln
while read -l input
echo $input | awk '{print $'$argv[1]'}'
end
end
# Function for printing a row
# ex: seq 3 | rown 3
# output: 3
function rown --argument index
sed -n "$index p"
end
# Function for ignoring the first 'n' lines
# ex: seq 10 | skip 5
# results: prints everything but the first 5 lines
function skip --argument n
tail +(math 1 + $n)
end
# Function for taking the first 'n' lines
# ex: seq 10 | take 5
# results: prints only the first 5 lines
function take --argument number
head -$number
end
### ALIASES
# navigation
alias ..='cd ..'
alias .2='cd ../..'
alias .3='cd ../../..'
alias .4='cd ../../../..'
alias .5='cd ../../../../..'
# bat as cat
alias cat='bat'
# editors
alias vim='nvim'
alias em="/usr/bin/emacs -nw"
alias emacs="emacsclient -c -a 'emacs'"
alias doomsync="~/.emacs.d/bin/doom sync"
alias doomdoctor="~/.emacs.d/bin/doom doctor"
alias doomupgrade="~/.emacs.d/bin/doom upgrade"
alias doompurge="~/.emacs.d/bin/doom purge"
alias doominstall="~/.emacs.d/bin/doom install"
# Changing "ls" to "exa"
alias ls='exa -al --color=always --group-directories-first' # my preferred listing
alias la='exa -a --color=always --group-directories-first' # all files and dirs
alias ll='exa -l --color=always --group-directories-first' # long format
alias lt='exa -aT --color=always --group-directories-first' # tree listing
alias l.='exa -a | egrep "^\."'
# xbps
alias xb-up='sudo xbps-install -Su && xcheckrestart' # update the whole system
alias xb-get='sudo xbps-install -S' # install a program
alias xb-qry='sudo xbps-query' # query details about a program
alias xb-rmv='sudo xbps-remove -R' # remove a package with all its dependencies (it may brake something)
alias xb-rmv-sec='sudo xbps-remove' # remove a package with all its dependencies (secure way)
alias xb-cln='sudo xbps-remove -o && sudo xbps-remove -O' # remove unnecesary packages and clean cache
# Colorize grep output (good for log files)
alias grep='grep --color=auto'
alias egrep='egrep --color=auto'
alias fgrep='fgrep --color=auto'
# confirm before overwriting something
alias rm='rm -i'
alias mv='mv -i'
alias cp='cp -i'
# git
alias git-clone='git clone'
# ani-cli
alias ani='ani-cli'
alias ani-q='ani-cli -q' # to select video quality
# ytfzf
alias yt='ytfzf -f -t'
# notflix
alias nt='notflix'
# mount and unmount drives
alias mnt='sudo mount'
alias umnt='sudo umount'
# mixers
alias mx='pulsemixer'
alias amx='alsamixer'
# music player
alias mk='musikcube'
# power management
alias po='loginctl poweroff'
alias sp='loginctl suspend'
alias rb='loginctl reboot'
# file manager
alias fm='/home/drk/.config/vifm/scripts/./vifmrun'
# system monitor
alias tp='btop'
alias top='btop'
alias htop='btop'
# get error messages from journalctl
alias jctl="journalctl -p 3 -xb"
# youtube-dl
alias yta-aac="youtube-dl --extract-audio --audio-format aac "
alias yta-best="youtube-dl --extract-audio --audio-format best "
alias yta-flac="youtube-dl --extract-audio --audio-format flac "
alias yta-m4a="youtube-dl --extract-audio --audio-format m4a "
alias yta-mp3="youtube-dl --extract-audio --audio-format mp3 "
alias yta-opus="youtube-dl --extract-audio --audio-format opus "
alias yta-vorbis="youtube-dl --extract-audio --audio-format vorbis "
alias yta-wav="youtube-dl --extract-audio --audio-format wav "
alias ytv-best="youtube-dl -f bestvideo+bestaudio "
# Network Manager and bluetooth
alias netstats='nmcli dev'
alias wfi='nmtui-connect'
alias wfi-scan='nmcli dev wifi list'
alias wfi-edit='nmtui-edit'
alias wfi-on='nmcli radio wifi on'
alias wfi-off='nmcli radio wifi off'
alias blt='bluetoothctl'
# the terminal rickroll
alias rr='curl -s -L https://raw.githubusercontent.com/keroserene/rickrollrc/master/roll.sh | bash'
### SETTING THE STARSHIP PROMPT ###
starship init fish | source

55
.config/scripts/deploy.sh Executable file
View file

@ -0,0 +1,55 @@
#!/bin/sh
# This is script is meant to deploy all my configs to an specific directory
# Directory list
dir1="$HOME/.config/awesome/"
dir2="$HOME/.config/alacritty/"
dir3="$HOME/.config/picom/"
dir4="$HOME/.config/vifm/"
dir6="$HOME/.config/doom/"
dir7="$HOME/.config/scripts/"
# File List
newsboaturl="$HOME/.newsboat/urls"
zshrc="$HOME/.zshrc"
bashrc="$HOME/.bashrc"
starshiprc="$HOME/.config/starship.toml"
mocrc="$HOME/.moc/config"
mocth="$HOME/.moc/themes/"
# Deploy directory
echo "Checking the deploy directory, creating if it's not created"
echo "Deleting the last deploy if it's there"
deploydir="$HOME/.deploy"
rm -rf "${deploydir:?}"/*
mkdir -p "$HOME/.deploy/"
mkdir -p "$HOME/.deploy/.config/"
mkdir -p "$HOME/.deploy/.moc/"
mkdir -p "$HOME/.deploy/.newsboat/"
# Deploying
echo "Deploying the awesomewm config";
cp -r "$dir1" "$deploydir/.config/";
echo "Deploying the alacritty config";
cp -r "$dir2" "$deploydir/.config/";
echo "Deploying the picom config";
cp -r "$dir3" "$deploydir/.config/";
echo "Deploying the vifm config";
cp -r "$dir4" "$deploydir/.config/";
echo "Deploying the zsh config";
cp "$zshrc" "$deploydir/";
echo "Deploying the starship config";
cp "$starshiprc" "$deploydir/.config/";
echo "Deploying the bash config";
cp "$bashrc" "$deploydir/";
echo "Deploying the moc config";
cp -r "$mocrc" "$deploydir/.moc/";
echo "Deploying the moc themes";
cp -r "$mocth" "$deploydir/.moc/";
echo "Deploying the DOOM Emacs config";
cp -r "$dir6" "$deploydir/.config/";
echo "Deploying scripts";
cp -r "$dir7" "$deploydir/.config/";
echo "Deploying the newsboat config";
cp "$newsboaturl" "$deploydir/.newsboat/";
rm "$deploydir"/.config/vifm/vifminfo*

View file

@ -29,6 +29,7 @@ selectnet() {
exit 0 exit 0
fi fi
} }
selectnet
# Typing password # Typing password
selectpass() { selectpass() {
@ -39,11 +40,11 @@ selectpass() {
exit 0 exit 0
fi fi
} }
selectnet
selectpass selectpass
# Main connection command # Main connection command
nmcli dev wifi connect "$query" password ""$passqry"" nmcli device wifi connect "$query" password "$passqry" || nmcli device wifi connect "$query"
# Check notification # Check notification
notify-send "Checking if the connection was successful" notify-send "Checking if the connection was successful"

View file

@ -5,8 +5,6 @@
## |____/|_| \_\_|\_\ ## |____/|_| \_\_|\_\
## ##
# ~/.config/starship.toml
# disable starship from forcing a new line to be taken. Solved the empty line # disable starship from forcing a new line to be taken. Solved the empty line
# at start of terminal # at start of terminal
add_newline = false add_newline = false

690
.moc/config Normal file
View file

@ -0,0 +1,690 @@
# This is a configuration file for the MOC player. It should be named
# 'config' and placed in the ~/.moc directory. As this file can specify
# commands which invoke other applications, MOC will refuse to start if it
# is not owned by either root or the current user, or if it is writable by
# anyone other than its owner. All options are given with their default
# values, and therefore commented.
# Comments begin with '#'.
# You can use quotes and escape ('\') in parameters.
#
# You can have variable values substituted by enclosing the variable name
# as "${...}". (This only applies to the portion of the option following
# the '='.) Variables are substituted first from the environment then,
# if not found, from the configuration options. (Note that the value of
# a configuration option substituted is that which it has at the time the
# substitution variable is encountered.) If there is a naming conflict
# between an environment and configuration variable, you may be able to
# resolve it by using lowercase as the environment variable matches are
# case-sensitive whereas the configuration variables are not.
#
# You can also use the form "${...:-...}" where the value in the second
# position will be substituted if the variable name given in the first
# position is unset or null.
#
# So, for example:
#
# MusicDir = /music/${USER:-public}
# Fastdir1 = ${MusicDir}/mp3/rock
# Fastdir2 = ${MusicDir}/mp3/electronic
# Fastdir3 = ${MusicDir}/mp3/rap
# Fastdir4 = ${MusicDir}/mp3/etc
#
# Variable names are limited to those accepted by the BASH shell; that
# is, those comprising the upper- and lowercase ASCII characters, digits
# and the underscore.
#
# If you need to use the "${" sequence for any other purpose, write "$${"
# and it will be replaced by "${" and not treated as a substitution.
#
# Some options take lists of strings as their values. The strings are
# separated by colons. Additional strings can be appended to the list
# using "+=" in place of a plain "=" to assign the value. For an example,
# see the XTerms option.
#
# You can override any configuration option when you run MOC using the
# '-O' command line option:
#
# mocp -O AutoNext=no -O messagelingertime=1 -O XTerms+=xxt:xwt
#
# This command line option can be repeated as many times as needed and
# the configuration option name is not case sensitive. (Note that MOC
# does not perform variable substitution on the value of such overridden
# configuration options.) Most option values are set before the
# configuration file is processed (which allows the new values to be
# picked up by substitutions), however list-valued options are overridden
# afterwards (which gives the choice of whether the configured values are
# replaced or added to).
# Remember that the client and server are separate processes and the
# server will retain the configuration values formed from the environment
# within which it was originally started.
# Show file titles (title, author, album) instead of file names?
ReadTags = yes
# In which directory do you store your music files? If you specify it
# you will be able to jump straight to this directory with the '-m'
# parameter or the 'm' command. This can also point to a playlist.
#
# Example: MusicDir = "/home/joe/music"
#
MusicDir = "~/Music"
# Start in the music directory by default? If set to 'no', start
# in the current directory by default. A single directory on
# the command line takes precedence.
StartInMusicDir = yes
# How to sort? FileName is the option's only value for now.
#Sort = FileName
# Show errors in the streams (for example, broken frames in MP3 files)?
#ShowStreamErrors = no
# Ignore CRC errors in MP3 files? Most players do that, so the default
# value is 'yes'.
#MP3IgnoreCRCErrors = yes
# Set playback toggles.
#Repeat = no
#Shuffle = no
#AutoNext = yes
# Default FormatString:
#
# %n - Track number
# %a - Artist
# %A - Album
# %t - Title
# %(X:TRUE:FALSE) - Ternary expression: if X exists, do TRUE,
# otherwise FALSE. The escape character must
# be doubled (i.e., '\\'). (See zshmisc
# documentation for more information.)
#
#FormatString = "%(n:%n :)%(a:%a - :)%(t:%t:)%(A: \(%A\):)"
# Input and output buffer sizes (in kilobytes).
#InputBuffer = 512 # Minimum value is 32KB
#OutputBuffer = 512 # Minimum value is 128KB
# How much to fill the input buffer before playing (in kilobytes)?
# This can't be greater than the value of InputBuffer. While this has
# a positive effect for network streams, it also causes the broadcast
# audio to be delayed.
#Prebuffering = 64
# Use this HTTP proxy server for internet streams. If not set, the
# environment variables http_proxy and ALL_PROXY will be used if present.
#
# Format: HTTPProxy = PROXY_NAME:PORT
#
#HTTPProxy =
# Sound driver - OSS, ALSA, JACK, SNDIO (on OpenBSD) or null (only for
# debugging). You can enter more than one driver as a colon-separated
# list. The first working driver will be used.
#SoundDriver = JACK:ALSA:OSS
# Jack output settings.
#JackClientName = "moc"
#JackStartServer = no
#JackOutLeft = "system:playback_1"
#JackOutRight = "system:playback_2"
# OSS output settings.
#OSSDevice = /dev/dsp
#OSSMixerDevice = /dev/mixer
#OSSMixerChannel1 = pcm # 'pcm', 'master' or 'speaker'
#OSSMixerChannel2 = master # 'pcm', 'master' or 'speaker'
# ALSA output settings. If you need to dump the audio produced by MOC
# to a file for diagnostic purposes, the following setting of 'ALSADevice'
# should do that:
#
# ALSADevice=tee:hw,'/tmp/out.wav',wav
#
#ALSADevice = default
#ALSAMixer1 = PCM
#ALSAMixer2 = Master
# Under some circumstances on 32-bit systems, audio played continously
# for long periods of time may begin to stutter. Setting this option to
# 'yes' will force MOC to avoid ALSA's dmix resampling and prevent this
# stutter. But it also has other implications:
#
# - You may experience unacceptably high CPU load.
# - ALSA's resampler plug-ins will not be used.
# - The resampling may be of lower quality than ALSA would provide.
# - You may need to try different "ResampleMethod" option settings.
# - The "ForceSampleRate" option may be ineffective.
# - If libsamplerate is not configured, many audios may be unplayable.
#
#ALSAStutterDefeat = no
# Save software mixer state?
# If enabled, a file 'softmixer' will be created in '~/.moc/' storing the
# mixersetting set when the server is shut down.
# Note that there is a "hidden" 'Amplification' setting in that file.
# Amplification (0-200) is used to scale the mixer setting (0-100). This
# results in a higher signal amplitude but may also produce clipping.
#Softmixer_SaveState = yes
# Save equalizer state?
# If enabled, a file 'equalizer' will be created in '~/.moc/' storing the
# equalizer settings when the server is shut down.
# Note that there is a "hidden" 'Mixin' setting in that file.
# Mixin (0.0-1.0) is used to determine how much of the original signal is
# used after equalizing. 0 means to only use the equalized sound, while 1
# effectively disabled the mixer. The default is 0.25.
#Equalizer_SaveState = yes
# Show files with dot at the beginning?
ShowHiddenFiles = no
# Hide file name extensions?
HideFileExtension = yes
# Show file format in menu?
ShowFormat = yes
# Show file time in menu? Possible values: 'yes', 'no' and 'IfAvailable'
# (meaning show the time only when it is already known, which often works
# faster).
ShowTime = yes
# Show time played as a percentage in the time progress bar.
#ShowTimePercent = no
# Values of the TERM environment variable which are deemed to be managed by
# screen(1). If you are setting a specific terminal using screen(1)'s
# '-T <term>' option, then you will need to add 'screen.<term>' to this list.
# Note that this is only a partial test; the value of the WINDOW environment
# variable must also be a number (which screen(1) sets).
#ScreenTerms = screen:screen-w:vt100
# Values of the TERM environment variable which are deemed to be xterms. If
# you are using MOC within screen(1) under an xterm, then add screen(1)'s
# TERM setting here as well to cause MOC to update the xterm's title.
#XTerms = xterm
#XTerms += xterm-colour:xterm-color
#XTerms += xterm-256colour:xterm-256color
#XTerms += rxvt:rxvt-unicode
#XTerms += rxvt-unicode-256colour:rxvt-unicode-256color
#XTerms += eterm
# Theme file to use. This can be absolute path or relative to
# /usr/share/moc/themes/ (depends on installation prefix) or
# ~/.moc/themes/ .
#
# Example: Theme = laras_theme
#
Theme = transparent-background
# The theme used when running on an xterm.
#
# Example: XTermTheme = transparent-background
#
#XTermTheme =
# Should MOC try to autoload the default lyrics file for an audio? (The
# default lyrics file is a text file with the same file name as the audio
# file name with any trailing "extension" removed.)
#AutoLoadLyrics = yes
# MOC directory (where pid file, socket and state files are stored).
# You can use ~ at the beginning.
#MOCDir = ~/.moc
# Use mmap() to read files. mmap() is much slower on NFS.
#UseMMap = no
# Use MIME to identify audio files. This can make for slower loading
# of playlists but is more accurate than using "extensions".
#UseMimeMagic = no
# Assume this encoding for ID3 version 1/1.1 tags (MP3 files). Unlike
# ID3v2, UTF-8 is not used here and MOC can't guess how tags are encoded.
# Another solution is using librcc (see the next option). This option is
# ignored if UseRCC is set to 'yes'.
#ID3v1TagsEncoding = WINDOWS-1250
# Use librcc to fix ID3 version 1/1.1 tags encoding.
#UseRCC = yes
# Use librcc to filenames and directory names encoding.
#UseRCCForFilesystem = yes
# When this option is set the player assumes that if the encoding of
# ID3v2 is set to ISO-8859-1 then the ID3v1TagsEncoding is actually
# that and applies appropriate conversion.
#EnforceTagsEncoding = no
# Enable the conversion of filenames from the local encoding to UTF-8.
#FileNamesIconv = no
# Enable the conversion of the xterm title from UTF-8 to the local encoding.
#NonUTFXterm = no
# Should MOC precache files to assist gapless playback?
#Precache = yes
# Remember the playlist after exit?
SavePlaylist = yes
# When using more than one client (interface) at a time, do they share
# the playlist?
SyncPlaylist = yes
# Choose a keymap file (relative to '~/.moc/' or using an absolute path).
# An annotated example keymap file is included ('keymap.example').
#
# Example: Keymap = my_keymap
#
#Keymap =
# Use ASCII rather than graphic characters for drawing lines. This
# helps on some terminals.
#ASCIILines = no
# FastDirs, these allow you to jump directly to a directory, the key
# bindings are in the keymap file.
#
# Examples: Fastdir1 = /mp3/rock
# Fastdir2 = /mp3/electronic
# Fastdir3 = /mp3/rap
# Fastdir4 = /mp3/etc
#
#Fastdir1 =
#Fastdir2 =
#Fastdir3 =
#Fastdir4 =
#Fastdir5 =
#Fastdir6 =
#Fastdir7 =
#Fastdir8 =
#Fastdir9 =
#Fastdir10 =
# How fast to seek (in number of seconds per keystroke). The first
# option is for normal seek and the second for silent seek.
#SeekTime = 1
#SilentSeekTime = 5
# PreferredDecoders allows you to specify which decoder should be used
# for any given audio format. It is a colon-separated list in which
# each entry is of the general form 'code(decoders)', where 'code'
# identifies the audio format and 'decoders' is a comma-separated list
# of decoders in order of preference.
#
# The audio format identifier may be either a filename extension or a
# MIME media type. If the latter, the format is 'type/subtype' (e.g.,
# 'audio/flac'). Because different systems may give different MIME
# media types, any 'x-' prefix of the subtype is ignored both here and
# in the actual file MIME type (so all combinations of 'audio/flac' and
# 'audio/x-flac' match each other).
#
# For Internet streams the matching is done on MIME media type and on
# actual content. For files the matches are made on MIME media type
# (if the 'UseMimeMagic' option is set) and on filename extension. The
# MIME media type of a file is not determined until the first entry for
# MIME is encountered in the list.
#
# The matching is done in the order of appearance in the list with any
# entries added from the command line being matched before those listed
# here. Therefore, if you place all filename extension entries before
# all MIME entries you will speed up MOC's processing of directories
# (which could be significant for remote file systems).
#
# The decoder list may be empty, in which case no decoders will be used
# for files (and files with that audio format ignored) while Internet
# streams will be assessed on the actual content. Any decoder position
# may contain an asterisk, in which case any decoder not otherwise listed
# which can handle the audio format will be used. It is not an error to
# list the same decoder twice, but neither does it make sense to do so.
#
# If you have a mix of audio and non-audio files in your directories, you
# may wish to include entries at top of the list which ignore non-audio
# files by extension.
#
# In summary, the PreferredDecoders option provides fine control over the
# type of matching which is performed (filename extension, MIME media
# type and streamed media content) and which decoder(s) (if any) are used
# based on the option's list entries and their ordering.
#
# Examples: aac(aac,ffmpeg) first try FAAD2 for AACs then FFmpeg
# mp3() ignore MP3 files
# wav(*,sndfile) use sndfile for WAV as a last resort
# ogg(vorbis,*):flac(flac,*) try Xiph decoders first
# ogg():audio/ogg() ignore OGG files, and
# force Internet selection by content
# gz():html() ignore some non-audio files
#
# Any unspecified audio formats default to trying all decoders.
# Any unknown (or misspelt) drivers are ignored.
# All names are case insensitive.
# The default setting reflects the historical situation modified by
# the experience of users.
#
#PreferredDecoders = aac(aac,ffmpeg):m4a(ffmpeg)
#PreferredDecoders += mpc(musepack,*,ffmpeg):mpc8(musepack,*,ffmpeg)
#PreferredDecoders += sid(sidplay2):mus(sidplay2)
#PreferredDecoders += wav(sndfile,*,ffmpeg)
#PreferredDecoders += wv(wavpack,*,ffmpeg)
#PreferredDecoders += audio/aac(aac):audio/aacp(aac):audio/m4a(ffmpeg)
#PreferredDecoders += audio/wav(sndfile,*)
# The following PreferredDecoders attempt to handle the ambiguity surrounding
# container types such as OGG for files. The first two entries will force
# a local file to the correct decoder (assuming the .ogg file contains Vorbis
# audio), while the MIME media types will cause Internet audio streams to
# be assessed on content (which may be either Vorbis or Speex).
#
#PreferredDecoders += ogg(vorbis,ffmpeg):oga(vorbis,ffmpeg):ogv(ffmpeg)
#PreferredDecoders += opus(ffmpeg)
#PreferredDecoders += spx(speex)
#PreferredDecoders += application/ogg(vorbis):audio/ogg(vorbis)
# Which resampling method to use. There are a few methods of resampling
# sound supported by libresamplerate. The default is 'Linear') which is
# also the fastest. A better description can be found at:
#
# http://www.mega-nerd.com/libsamplerate/api_misc.html#Converters
#
# but briefly, the following methods are based on bandlimited interpolation
# and are higher quality, but also slower:
#
# SincBestQuality - really slow (I know you probably have an xx GHz
# processor, but it's still not enough to not see
# this in the top output :) The worst case
# Signal-to-Noise Ratio is 97dB.
# SincMediumQuality - much faster.
# SincFastest - the fastest bandlimited interpolation.
#
# And these are lower quality, but much faster methods:
#
# ZeroOrderHold - really poor quality, but it's really fast.
# Linear - a bit better and a bit slower.
#
#ResampleMethod = Linear
# Always use this sample rate (in Hz) when opening the audio device (and
# resample the sound if necessary). When set to 0 the device is opened
# with the file's rate.
#ForceSampleRate = 0
# By default, even if the sound card reports that it can output 24bit samples
# MOC converts 24bit PCM to 16bit. Setting this option to 'yes' allows MOC
# to use 24bit output. (The MP3 decoder, for example, uses this format.)
# This is disabled by default because there were reports that it prevents
# MP3 files from playing on some soundcards.
#Allow24bitOutput = no
# Use realtime priority for output buffer thread. This will prevent gaps
# while playing even with heavy load. The user who runs MOC must have
# permissions to set such a priority. This could be dangerous, because it
# is possible that a bug in MOC will freeze your computer.
#UseRealtimePriority = no
# The number of audio files for which MOC will cache tags. When this limit
# is reached, file tags are discarded on a least recently used basis (with
# one second resolution). You can disable the cache by giving it a size of
# zero. Note that if you decrease the cache size below the number of items
# currently in the cache, the number will not decrease immediately (if at
# all).
#TagsCacheSize = 256
# Number items in the playlist.
PlaylistNumbering = yes
# Main window layouts can be configured. You can change the position and
# size of the menus (directory and playlist). You have three layouts and
# can switch between then using the 'l' key (standard mapping). By default,
# only two layouts are configured.
#
# The format is as follows:
#
# - Each layout is described as a list of menu entries.
# - Each menu entry is of the form:
#
# menu(position_x, position_y, width, height)
#
# where 'menu' is either 'directory' or 'playlist'.
# - The parameters define position and size of the menu. They can
# be absolute numbers (like 10) or a percentage of the screen size
# (like 45%).
# - 'width' and 'height' can have also value of 'FILL' which means
# fill the screen from the menu's position to the border.
# - Menus may overlap.
#
# You must describe at least one menu (default is to fill the whole window).
# There must be at least one layout (Layout1) defined; others can be empty.
#
# Example: Layout1 = playlist(50%,50%,50%,50%)
# Layout2 = ""
# Layout3 = ""
#
# Just one layout, the directory will occupy the whole
# screen, the playlist will have 1/4 of the screen size
# and be positioned at lower right corner. (Note that
# because the playlist will be hidden by the directory
# you will have to use the TAB key to make the playlist
# visible.)
#
# Example: Layout1 = playlist(0,0,100%,10):directory(0,10,100%,FILL)
#
# The screen is split into two parts: playlist at the top
# and the directory menu at the bottom. Playlist will
# occupy 10 lines and the directory menu the rest.
#
#Layout1 = directory(0,0,50%,100%):playlist(50%,0,FILL,100%)
#Layout2 = directory(0,0,100%,100%):playlist(0,0,100%,100%)
#Layout3 = ""
# When the song changes, should the menu be scrolled so that the currently
# played file is visible?
#FollowPlayedFile = yes
# What to do if the interface was started and the server is already playing
# something from the playlist? If CanStartInPlaylist is set to 'yes', the
# interface will switch to the playlist. When set to 'no' it will start
# from the last directory.
#CanStartInPlaylist = yes
# Executing external commands (1 - 10) invoked with key commands (F1 - F10
# by default).
#
# Some arguments are substituted before executing:
#
# %f - file path
# %i - title made from tags
# %S - start block mark (in seconds)
# %E - end block mark (in seconds)
#
# Data from tags can also be substituted:
#
# %t - title
# %a - album
# %r - artist
# %n - track
# %m - time of the file (in seconds)
#
# The parameters above apply to the currently selected file. If you change
# them to capital letters, they are taken from the file currently playing.
#
# Programs are run using execv(), not a shell, so you can't do things like
# redirecting the output to a file. The command string is split using blank
# characters as separators; the first element is the command to be executed
# and the rest are its parameters, so if you use "echo Playing: %I" we run
# program 'echo' (from $PATH) with 2 parameters: the string 'Playing:' and
# the title of the file currently playing. Even if the title contains
# spaces, it's still one parameter and it's safe if it contains `rm -rf /`.
#
# Examples: ExecCommand1 = "cp %f /mnt/usb_drive"
# ExecCommand2 = "/home/joe/now_playing %I"
#
#ExecCommand1 =
#ExecCommand2 =
#ExecCommand3 =
#ExecCommand4 =
#ExecCommand5 =
#ExecCommand6 =
#ExecCommand7 =
#ExecCommand8 =
#ExecCommand9 =
#ExecCommand10 =
# Display the cursor in the line with the selected file. Some braille
# readers (the Handy Tech modular series ZMU 737, for example) use the
# cursor to focus and can make use of it to present the file line even
# when other fields are changing.
#UseCursorSelection = no
# Set the terminal title when running under xterm.
#SetXtermTitle = yes
# Set the terminal title when running under screen(1). If MOC can detect
# that it is running under screen(1), then it will set an appropriate
# title (see description of ScreenTerms above). However, if multiple
# levels of screen management are involved, detection might fail and this
# could cause a screen upset. In that situation you can use this option
# to force screen titles off.
#SetScreenTitle = yes
# Display full paths instead of just file names in the playlist.
#PlaylistFullPaths = yes
# The following setting describes how block markers are displayed in
# the play time progress bar. Its value is a string of exactly three
# characters. The first character is displayed in a position which
# corresponds to the time marked as the start of a block and the last
# character to the time marked as the end of the block. The middle
# character is displayed instead if both the start and the end of the block
# would fall in the same position (within the resolution of the interface).
# You can turn off the displaying of these block marker positions by using
# three space characters.
#BlockDecorators = "`\"'"
# How long (in seconds) to leave a message displayed on the screen.
# Setting this to a high value allows you to scroll through the messages
# using the 'hide_message' key. Setting it to zero means you'll have to
# be quick to see any message at all. Any new messages will be queued up
# and displayed after the current message's linger time expires.
#MessageLingerTime = 3
# Does MOC display a prefix on delayed messages indicating
# the number of queued messages still to be displayed?
#PrefixQueuedMessages = yes
# String to append to the queued message count if any
# error messages are still waiting to be displayed.
#ErrorMessagesQueued = "!"
# Self-describing ModPlug options (with 'yes' or 'no' values).
#ModPlug_Oversampling = yes
#ModPlug_NoiseReduction = yes
#ModPlug_Reverb = no
#ModPlug_MegaBass = no
#ModPlug_Surround = no
# ModPlug resampling mode.
# Valid values are:
#
# FIR - 8 tap fir filter (extremely high quality)
# SPLINE - Cubic spline interpolation (high quality)
# LINEAR - Linear interpolation (fast, good quality)
# NEAREST - No interpolation (very fast, extremely bad sound quality)
#
#ModPlug_ResamplingMode = FIR
# Other self-describing ModPlug audio characteristic options.
# (Note that the 32 bit sample size seems to be buggy.)
#ModPlug_Channels = 2 # 1 or 2 channels
#ModPlug_Bits = 16 # 8, 16 or 32 bits
#ModPlug_Frequency = 44100 # 11025, 22050, 44100 or 48000 Hz
#ModPlug_ReverbDepth = 0 # 0 (quiet) to 100 (loud)
#ModPlug_ReverbDelay = 0 # Delay in ms (usually 40-200ms)
#ModPlug_BassAmount = 0 # 0 (quiet) to 100 (loud).
#ModPlug_BassRange = 10 # Cutoff in Hz (10-100).
#ModPlug_SurroundDepth = 0 # Surround level 0(quiet)-100(heavy).
#ModPlug_SurroundDelay = 0 # Surround delay in ms, usually 5-40ms.
#ModPlug_LoopCount = 0 # 0 (never), n (times) or -1 (forever)
# Self-describing TiMidity audio characteristic options.
#TiMidity_Rate = 44100 # Between 8000 and 48000
#TiMidity_Bits = 16 # 8 or 16
#TiMidity_Channels = 2 # 1 or 2
#TiMidity_Volume = 100 # 0 to 800
# You can setup a TiMidity-Config-File here.
# Leave it unset to use library defaults (/etc/timidity.cfg mostly).
# Setting it to 'yes' also uses the library defaults.
# Set it to 'no' if you don't have any configuration file.
# Otherwise set it to the name of a specific file.
#TiMidity_Config =
# Self-describing SidPlay2 audio characteristic options.
#SidPlay2_DefaultSongLength = 180 # If not in database (in seconds)
#SidPlay2_MinimumSongLength = 0 # Play at least n (in seconds)
#SidPlay2_Frequency = 44100 # 4000 to 48000
#SidPlay2_Bits = 16 # 8 or 16
#SidPlay2_Optimisation = 0 # 0 (worst quality) to 2 (best quality)
# Set path to a HVSC-compatible database (if not set, database is disabled).
#SidPlay2_Database =
# SidPlay2 playback Mode:
#
# "M": Mono (best for many SIDs)
# "S": Stereo
# "L"/"R": Left / Right
#
#SidPlay2_PlayMode = "M"
# Use start-song information from SID ('yes') or start at first song
# ('no'). Songs before the start-song won't be played. (Note that this
# option previously took the values 1 and 0; these are now deprecated
# in favour of 'yes' and 'no'.)
#SidPlay2_StartAtStart = yes
# Play sub-tunes. (Note that this option previously took the values 1
# and 0; these are now deprecated in favour of 'yes' and 'no'.)
#SidPlay2_PlaySubTunes = yes
# Run the OnSongChange command when a new song starts playing.
# Specify the full path (i.e. no leading '~') of an executable to run.
# Arguments will be passed, and you can use the following escapes:
#
# %a artist
# %r album
# %f filename
# %t title
# %n track
# %d file duration in XX:YY form
# %D file duration, number of seconds
#
# No pipes/redirects can be used directly, but writing a shell script
# can do the job.
#
# Example: OnSongChange = "/home/jack/.moc/myscript %a %r"
#
#OnSongChange =
# If RepeatSongChange is 'yes' then MOC will execute the command every time
# a song starts playing regardless of whether or not it is just repeating.
# Otherwise the command will only be executed when a different song is
# started.
#RepeatSongChange = no
# Run the OnStop command (full path, no arguments) when MOC changes state
# to stopped (i.e., when user stopped playing or changes a song).
#OnStop = "/home/jack/.moc/myscript_on_stop"
# This option determines which song to play after finishing all the songs
# in the queue. Setting this to 'yes' causes MOC to play the song which
# follows the song being played before queue playing started. If set to
# 'no', MOC will play the song following the last song in the queue if it
# is in the playlist. The default is 'yes' because this is the way other
# players usually behave. (Note that this option previously took the
# values 1 and 0; these are now deprecated in favour of 'yes' and 'no'.)
#QueueNextSongReturn = yes

34
.moc/themes/black_theme Normal file
View file

@ -0,0 +1,34 @@
# Black theme by Arn <arn.alduomacil@gmail.com>
background = white black
frame = white black
window_title = white black
directory = white black
selected_directory = white black reverse
playlist = white black
selected_playlist = white black reverse
file = white black
selected_file = white black reverse
marked_file = white black bold
marked_selected_file = white black bold,reverse
info = white black underline
status = white black
title = white black bold
state = white black
current_time = white black bold
time_left = white black bold
total_time = white black bold
time_total_frames = white black
sound_parameters = white black bold
legend = white black
disabled = white black
enabled = white black bold
empty_mixer_bar = white black
filled_mixer_bar = white black reverse
empty_time_bar = white black
filled_time_bar = white black reverse
entry = white black
entry_title = white black
error = white black bold,underline
message = white black
plist_time = white black

34
.moc/themes/darkdot_theme Normal file
View file

@ -0,0 +1,34 @@
# Theme to match the 'darkdot' vim theme, by David Lazar (david_bv|at|yahoo|com)
background = default default
frame = white default
window_title = white default
directory = blue default bold
selected_directory = black cyan
playlist = white default bold
selected_playlist = black cyan
file = white default
selected_file = black cyan
marked_file = white default bold
marked_selected_file = white cyan bold
info = white default
status = white default
title = white default bold
state = white default bold
current_time = white default bold
time_left = black default bold
total_time = white default
time_total_frames = white default
sound_parameters = white default bold
legend = white default
disabled = black default bold
enabled = white default bold
empty_mixer_bar = white default
filled_mixer_bar = black white
empty_time_bar = white default
filled_time_bar = black white
entry = white default
entry_title = white default
error = white red bold
message = white default
plist_time = white default

125
.moc/themes/example_theme Normal file
View file

@ -0,0 +1,125 @@
# Example color theme for MOC.
# You can use a theme by copying it to ~/.moc/themes directory and using
# Theme config option or -T command line option.
#
# Fill free to make your own themes and send me them. It will be included in
# official MOC releases or on the MOC web site.
#
# The format of this file is:
# Lines beginning with # are comments.
# Blank lines are ignored.
# Every other line is expected to be in format:
#
# ELEMENT = FOREGROUND_COLOR BACKGROUND_COLOR [ATTRIBUTE[,ATTRIBUTE,..]]
#
# or
#
# colordef COLOR = RED GREEN BLUE
#
# Where names are case insensitive.
#
# ELEMENT is an element of MOC interface. This can be:
# background - default background for regions when nothing is displayed
# frame - frames for windows
# window_title - the title of the window (eg name of the current
# directory)
# directory - a directory in the menu
# selected_directory - a directory that is selected using arrows
# playlist - playlist file
# selected_playlist - see selected directory
# file - an ordinary file in the menu (mp3, ogg, ...)
# selected_file - see selected directory
# marked_file - a file that is currently being played
# marked_selected_file - a file that is currently being played and is also
# selected using arrows
# info - information shown at the right side of files
# selected_info - see selected directory
# marked_info - a file (its time) that is currently being played
# marked_selected_info - a file (its time) that is currently being played
# and is also selected using arrows
# status - the status line with a message
# title - the title of the file that is currently being played
# state - the state: play, stop, or paused (>, [], ||)
# current_time - current time of playing
# time_left - the time left to the end of playing the current file
# total_time - the length of the currently played file
# time_total_frames - the brackets outside the total time of a file ([10:13])
# sound_parameters - the frequency and bitrate numbers
# legend - "KHz" and "Kbps"
# disabled - disabled element ([STEREO])
# enabled - enabled element
# empty_mixer_bar - "empty" part of the volume bar
# filled_mixer_bar - "filled" part of the volume bar
# empty_time_bar - "empty" part of the time bar
# filled_time_bar - "filled" part of the time bar
# entry - place wher user can type a search query or a file name
# entry_title - the title of an entry
# error - error message
# message - information message
# plist_time - total time of displayed items
#
# FOREGOUND_COLOR and BACKGROUND_COLOR can have one of the following values:
# black, red, green, yellow, blue, magenta, cyan, white, default (can be
# transparent), grey (not standard, but works)
#
# Optional ATTRIBUTE parameters can be (from ncurses manual):
# normal - default (no highlight)
# standout - best highlighting mode of the terminal
# underline - underlining
# reverse - reverse video
# blink - blinking
# dim - half bright
# bold - extra bright or bold
# protect - protected mode
#
# You can specify a list of attributes separated by commas: attr1,attr2,attr3.
# Don't use spaces anywhere in such a list.
#
# With colordef you can change the definition of a color. It works only if
# your terminal supports it, if not those lines will be silently ignored.
# COLOR must be a valid color name and the RED GREEN and BLUE are numbers
# from 0 to 1000. Example:
#
# colordef red = 1000 0 0
#
# HINT: you have only 8 colors, but combined with attributes bold and/or
# reversed you actually get more colors.
#
# If you don't specify some elements, the default values will be used.
#
# Here follows the default configuration:
background = white blue
frame = white blue
window_title = white blue
directory = white blue bold
selected_directory = white black bold
playlist = white blue bold
selected_playlist = white black bold
file = white blue
selected_file = white black
marked_file = green blue bold
marked_selected_file = green black bold
info = blue blue bold
selected_info = blue black bold
marked_info = blue blue bold
marked_selected_info = blue black bold
status = white blue
title = white blue bold
state = white blue bold
current_time = white blue bold
time_left = white blue bold
total_time = white blue bold
time_total_frames = white blue
sound_parameters = white blue bold
legend = white blue
disabled = blue blue bold
enabled = white blue bold
empty_mixer_bar = white blue
filled_mixer_bar = black cyan
empty_time_bar = white blue
filled_time_bar = black cyan
entry = white blue
entry_title = black cyan
error = red blue bold
message = green blue bold
plist_time = white blue

35
.moc/themes/green_theme Normal file
View file

@ -0,0 +1,35 @@
# green theme by Jacek Lehmann
# best viewed on shaded or black terminal
background = default default
frame = black default
window_title = green default
directory = red default
selected_directory = yellow default
playlist = blue default
selected_playlist = magenta default
file = green default
selected_file = cyan default
marked_file = green default bold
marked_selected_file = cyan default bold
info = cyan default
status = magenta default
title = green default
state = magenta default
current_time = magenta default
time_left = cyan default
total_time = cyan default
time_total_frames = magenta default
sound_parameters = cyan default
legend = magenta default
disabled = black default
enabled = yellow default
empty_mixer_bar = green default
filled_mixer_bar = black green
empty_time_bar = green default
filled_time_bar = black green
entry = yellow default
entry_title = red default
error = red default
message = yellow default
plist_time = magenta default

36
.moc/themes/moca_theme Normal file
View file

@ -0,0 +1,36 @@
#
# Theme: moca
# Author: Nicola Vitale <nivit@email.it>
#
background = white black
frame = white black
window_title = yellow black bold
directory = white black
selected_directory = white black bold
playlist = white black
selected_playlist = cyan black bold
file = white black
selected_file = yellow red bold
marked_file = cyan black blink,bold
marked_selected_file = cyan red blink,bold
info = magenta black bold
status = yellow black bold
title = cyan black bold
state = red black bold
current_time = green black bold
time_left = magenta black bold
total_time = red black bold
time_total_frames = red black bold
sound_parameters = white black bold
legend = white black
disabled = white black bold
enabled = blue black bold
empty_mixer_bar = cyan blue
filled_mixer_bar = blue cyan
empty_time_bar = green magenta
filled_time_bar = magenta green
entry = white black
entry_title = magenta black bold
error = red black bold
message = green black bold
plist_time = red black bold

34
.moc/themes/nightly_theme Normal file
View file

@ -0,0 +1,34 @@
# Author: Wim Speekenbrink <w.speek@wanadoo.nl>
background = blue black
frame = blue black bold
window_title = blue black bold
directory = blue black bold
selected_directory = black magenta
playlist = blue black bold
selected_playlist = black magenta
file = blue black bold
selected_file = black magenta
marked_file = green black bold
marked_selected_file = green magenta bold
info = green black bold
status = blue black bold
title = green black bold
state = blue black bold
current_time = magenta black bold
time_left = magenta black bold
total_time = magenta black bold
time_total_frames = blue black bold
sound_parameters = magenta black bold
legend = blue black bold
disabled = black black
enabled = blue black bold
empty_mixer_bar = blue black bold
filled_mixer_bar = black magenta
empty_time_bar = blue black bold
filled_time_bar = black magenta
entry = green black bold
entry_title = green black bold
error = red black bold
message = green black bold
plist_time = green black bold

36
.moc/themes/red_theme Normal file
View file

@ -0,0 +1,36 @@
# rednblack theme by yyz
# works good on a light term
#property fg bg fx
background = default default
frame = black default
window_title = black default
directory = red default
selected_directory = black default bold
playlist = blue default
selected_playlist = black default bold
file = red default
selected_file = black default bold
marked_file = red default underline
marked_selected_file = black default bold
info = red default
status = black default
title = red default
state = black default
current_time = black default
time_left = black default
total_time = black default
time_total_frames = black default
sound_parameters = black default
legend = black default
disabled = white default
enabled = black default
empty_mixer_bar = black default
filled_mixer_bar = black red
empty_time_bar = black default
filled_time_bar = black red
entry = black default
entry_title = red default
error = red default
message = black default
plist_time = black default

View file

@ -0,0 +1,34 @@
# Transparent background theme by Marcin Michałowski
background = default default
frame = white default
window_title = white default
directory = white default bold
selected_directory = white blue bold
playlist = white default bold
selected_playlist = white blue bold
file = white default
selected_file = white blue
marked_file = green default bold
marked_selected_file = green blue bold
info = blue default bold
status = white default
title = white default bold
state = white default bold
current_time = white default bold
time_left = white default bold
total_time = white default bold
time_total_frames = white default
sound_parameters = white default bold
legend = white default
disabled = blue default bold
enabled = white default bold
empty_mixer_bar = white default
filled_mixer_bar = black cyan
empty_time_bar = white default
filled_time_bar = black cyan
entry = white default
entry_title = black cyan
error = red default bold
message = green default bold
plist_time = white default bold

View file

@ -0,0 +1,35 @@
# Yellow/Red theme - mostly Yellow. By Morten Grunnet Buhl
# Doesn't work on terminals when underline is not supported (like Linux console)
background = red default
frame = red default
window_title = yellow default underline,dim
directory = yellow default
selected_directory = yellow default underline
playlist = yellow default
selected_playlist = yellow default
file = yellow default
selected_file = yellow default underline
marked_file = yellow default bold
marked_selected_file = red default bold,underline
info = yellow default
status = yellow default
title = yellow default
state = yellow default
current_time = yellow default
time_left = yellow default
total_time = yellow default
time_total_frames = yellow default
sound_parameters = yellow default
legend = yellow default
disabled = red default dim
enabled = yellow default bold
empty_mixer_bar = yellow red
filled_mixer_bar = red yellow
empty_time_bar = yellow default
filled_time_bar = default yellow
entry = yellow default
entry_title = yellow default bold
error = cyan default
message = yellow default
plist_time = yellow default

11
.newsboat/urls Normal file
View file

@ -0,0 +1,11 @@
https://archlinux.org/feeds/news/ "Reading"
https://www.linux.com/feed/ "Reading"
https://linuxhandbook.com/rss/ "Reading"
https://www.gamingonlinux.com/article_rss.php "Reading"
https://www.omgubuntu.co.uk/feed "Reading"
https://askubuntu.com/feeds "Reading"
https://itsubuntu.com/feed/ "Reading"
https://www.tecmint.com/feed/ "Reading"
https://www.linuxfoundation.org/feed/ "Reading"
https://linuxhint.com/feed/ "Reading"
https://techhut.tv/rss/ "Reading"

246
.zshrc Normal file
View file

@ -0,0 +1,246 @@
## ____ ____ _ __
## | _ \| _ \| |/ /
## | | | | |_) | ' / Clay Gomera (Drake)
## | |_| | _ <| . \ My custom zshrc
## |____/|_| \_\_|\_\
##
### EXPORT
export TERM="xterm-256color" # getting proper colors
export HISTORY_IGNORE="(ls|cd|pwd|exit|sudo reboot|history|cd -|cd ..)"
export EDITOR="emacsclient -t -a ''" # $EDITOR use Emacs in terminal
export VISUAL="emacsclient -c -a emacs" # $VISUAL use Emacs in GUI mode
### SET MANPAGER
### "bat" as manpager
export MANPAGER="sh -c 'col -bx | bat -l man -p'"
### SET VI MODE ###
# Comment this line out to enable default emacs-like bindings
bindkey -v
# If not running interactively, don't do anything
[[ $- != *i* ]] && return
### PATH
if [ -d "$HOME/.bin" ] ;
then PATH="$HOME/.bin:$PATH"
fi
if [ -d "$HOME/.local/bin" ] ;
then PATH="$HOME/.local/bin:$PATH"
fi
if [ -d "$HOME/Applications" ] ;
then PATH="$HOME/Applications:$PATH"
fi
### CHANGE TITLE OF TERMINALS
case ${TERM} in
xterm*|rxvt*|Eterm*|aterm|kterm|gnome*|alacritty|st|konsole*)
PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME%%.*}:${PWD/#$HOME/\~}\007"'
;;
screen*)
PROMPT_COMMAND='echo -ne "\033_${USER}@${HOSTNAME%%.*}:${PWD/#$HOME/\~}\033\\"'
;;
esac
### Function extract for common file formats ###
SAVEIFS=$IFS
IFS=$(echo -en "\n\b")
function extract {
if [ -z "$1" ]; then
# display usage if no parameters given
echo "Usage: extract <path/file_name>.<zip|rar|bz2|gz|tar|tbz2|tgz|Z|7z|xz|ex|tar.bz2|tar.gz|tar.xz>"
echo " extract <path/file_name_1.ext> [path/file_name_2.ext] [path/file_name_3.ext]"
else
for n in "$@"
do
if [ -f "$n" ] ; then
case "${n%,}" in
*.cbt|*.tar.bz2|*.tar.gz|*.tar.xz|*.tbz2|*.tgz|*.txz|*.tar)
tar xvf "$n" ;;
*.lzma) unlzma ./"$n" ;;
*.bz2) bunzip2 ./"$n" ;;
*.cbr|*.rar) unrar x -ad ./"$n" ;;
*.gz) gunzip ./"$n" ;;
*.cbz|*.epub|*.zip) unzip ./"$n" ;;
*.z) uncompress ./"$n" ;;
*.7z|*.arj|*.cab|*.cb7|*.chm|*.deb|*.dmg|*.iso|*.lzh|*.msi|*.pkg|*.rpm|*.udf|*.wim|*.xar)
7z x ./"$n" ;;
*.xz) unxz ./"$n" ;;
*.exe) cabextract ./"$n" ;;
*.cpio) cpio -id < ./"$n" ;;
*.cba|*.ace) unace x ./"$n" ;;
*)
echo "extract: '$n' - unknown archive method"
return 1
;;
esac
else
echo "'$n' - file does not exist"
return 1
fi
done
fi
}
IFS=$SAVEIFS
### ALIASES ###
# navigation
up () {
local d=""
local limit="$1"
# Default to limit of 1
if [ -z "$limit" ] || [ "$limit" -le 0 ]; then
limit=1
fi
for ((i=1;i<=limit;i++)); do
d="../$d"
done
# perform cd. Show error if cd fails
if ! cd "$d"; then
echo "Couldn't go up $limit dirs.";
fi
}
alias ..='cd ..'
alias .2='cd ../..'
alias .3='cd ../../..'
alias .4='cd ../../../..'
alias .5='cd ../../../../..'
# bat as cat
alias cat='bat'
# editors
alias vim='nvim'
alias em='/usr/bin/emacs -nw'
alias emacs='emacsclient -c -a emacs'
alias doomsync='~/.emacs.d/bin/doom sync'
alias doomdoctor='~/.emacs.d/bin/doom doctor'
alias doomupgrade='~/.emacs.d/bin/doom upgrade'
alias doompurge='~/.emacs.d/bin/doom purge'
alias doominstall='~/.emacs.d/bin/doom install'
# Changing "ls" to "exa"
alias ls='exa -al --color=always --group-directories-first' # my preferred listing
alias la='exa -a --color=always --group-directories-first' # all files and dirs
alias ll='exa -l --color=always --group-directories-first' # long format
alias lt='exa -aT --color=always --group-directories-first' # tree listing
alias l.='exa -a | egrep "^\."'
# xbps
alias xb-up='sudo xbps-install -Su && xcheckrestart' # update the whole system
alias xb-get='sudo xbps-install -S' # install a program
alias xb-qry='sudo xbps-query' # query details about a program
alias xb-rmv='sudo xbps-remove -R' # remove a package with all its dependencies (it may brake something)
alias xb-rmv-sec='sudo xbps-remove' # remove a package with all its dependencies (secure way)
alias xb-cln='sudo xbps-remove -o && sudo xbps-remove -O' # remove unnecesary packages and clean cache
# Colorize grep output (good for log files)
alias grep='grep --color=auto'
alias egrep='egrep --color=auto'
alias fgrep='fgrep --color=auto'
# confirm before overwriting something
alias rm='rm -i'
alias mv='mv -i'
alias cp='cp -i'
# git
alias addup='git add -u'
alias addall='git add .'
alias branch='git branch'
alias checkout='git checkout'
alias clone='git clone'
alias commit='git commit -m'
alias fetch='git fetch'
alias pull='git pull origin'
alias push='git push origin'
alias stat='git status' # 'status' is protected name so using 'stat' instead
alias tag='git tag'
alias newtag='git tag -a'
# adding flags
alias df='df -h' # human-readable sizes
alias free='free -m' # show sizes in MB
# ani-cli
alias ani='ani-cli'
alias ani-q='ani-cli -q' # to select video quality
# ytfzf
alias yt='ytfzf -f -t'
# notflix
alias nt='notflix'
# mount and unmount drives
alias mnt='sudo mount'
alias umnt='sudo umount'
# mixers
alias mx='pulsemixer'
alias amx='alsamixer'
# music player
alias mk='mocp'
# power management
alias po='loginctl poweroff'
alias sp='loginctl suspend'
alias rb='loginctl reboot'
# file manager
alias fm='./.config/vifm/scripts/vifmrun'
alias vifm='./.config/vifm/scripts/vifmrun'
# system monitor
alias tp='btop'
alias top='btop'
alias htop='btop'
# ps
alias psa="ps auxf"
alias psgrep="ps aux | grep -v grep | grep -i -e VSZ -e"
alias psmem='ps auxf | sort -nr -k 4'
alias pscpu='ps auxf | sort -nr -k 3'
# get error messages from journalctl
alias jctl="journalctl -p 3 -xb"
# youtube-dl
alias yta-aac="youtube-dl --extract-audio --audio-format aac "
alias yta-best="youtube-dl --extract-audio --audio-format best "
alias yta-flac="youtube-dl --extract-audio --audio-format flac "
alias yta-m4a="youtube-dl --extract-audio --audio-format m4a "
alias yta-mp3="youtube-dl --extract-audio --audio-format mp3 "
alias yta-opus="youtube-dl --extract-audio --audio-format opus "
alias yta-vorbis="youtube-dl --extract-audio --audio-format vorbis "
alias yta-wav="youtube-dl --extract-audio --audio-format wav "
alias ytv-best="youtube-dl -f bestvideo+bestaudio "
# Network Manager and bluetooth
alias netstats='nmcli dev'
alias wfi='nmtui-connect'
alias wfi-scan='nmcli dev wifi list'
alias wfi-edit='nmtui-edit'
alias wfi-on='nmcli radio wifi on'
alias wfi-off='nmcli radio wifi off'
alias blt='bluetoothctl'
# the terminal rickroll
alias rr='curl -s -L https://raw.githubusercontent.com/keroserene/rickrollrc/master/roll.sh | bash'
# Deploy script
alias deploynow='sh $HOME/.config/scripts/deploy.sh'
### SETTING THE STARSHIP PROMPT ###
eval "$(starship init zsh)"