Compare commits

..

3 commits

Author SHA1 Message Date
61e5074af3 mpv 2022-04-05 14:12:34 -03:00
227161c1a6 zprofile: Crear XDG_RUNTIME_DIR 2022-04-05 13:47:03 -03:00
011ec1b725 i3status 2022-04-05 13:47:03 -03:00
4 changed files with 99 additions and 0 deletions

54
.config/i3status/config Normal file
View file

@ -0,0 +1,54 @@
# i3status configuration file.
# see "man i3status" for documentation.
# It is important that this file is edited as UTF-8.
# The following line should contain a sharp s:
# ß
# If the above line is not correctly displayed, fix your editor first!
general {
colors = false
interval = 5
output_format = "i3bar"
}
#order += "ipv6"
order += "wireless _first_"
order += "ethernet _first_"
order += "battery all"
#order += "disk /"
#order += "load"
#order += "memory"
order += "tztime local"
wireless _first_ {
format_up = "WiFi"
format_down = "sin WiFi"
}
ethernet _first_ {
format_up = "Eth %ip"
format_down = ""
}
battery all {
format = "%status %percentage"
}
disk "/" {
format = "%avail"
}
load {
format = "%1min"
}
memory {
format = "%used | %available"
threshold_degraded = "1G"
format_degraded = "MEMORY < %available"
}
tztime local {
format = "%A %m/%d %H:%M"
}

5
.config/mpv/mpv.conf Normal file
View file

@ -0,0 +1,5 @@
sub-font=Inter
sub-blur=10
slang=eng,spa
save-position-on-quit=yes
hwdec=vaapi

View file

@ -0,0 +1,34 @@
mp.add_key_binding("y", "fzf", function ()
local pl = mp.get_property_native("playlist")
if not pl then return end
local input_path = os.tmpname()
local input_file = io.open(input_path, "w")
for i, v in pairs(pl) do
local desc = v.filename
if v.title then desc = v.title end
input_file:write(i-1 .. ": " .. desc .. "\n")
end
input_file:close()
local output_path = os.tmpname()
os.execute("footclient bash -i -c 'cat "..input_path.." | fzf --no-sort > "..output_path.."'")
local output_file = io.open(output_path, "r")
local line = output_file:read("*l")
output_file:close()
os.remove(output_path)
if line then
local index = string.match(line, "%d+")
mp.commandv("playlist-play-index", index)
end
os.remove(input_path)
end)
mp.observe_property("media-title", "native", function (name, value)
if value then
print("Playing: " .. value)
end
end)

View file

@ -1,8 +1,14 @@
source ~/.profile
if ! "$REMOTE" && test "$(tty)" = /dev/tty1; then
doas mkdir -p /run/user
doas chmod 777 /run/user
XDG_RUNTIME_DIR="/run/user/$(id -u)"
mkdir -p "$XDG_RUNTIME_DIR"
chmod 700 "$XDG_RUNTIME_DIR"
mkdir -p "$HOME/.local/share/sway"
log="$HOME/.local/share/sway/$(date +%Y-%m-%d@%H:%M:%S).log"
exec env \
XDG_RUNTIME_DIR="$XDG_RUNTIME_DIR" \
XDG_CURRENT_DESKTOP=sway \
XDG_SESSION_DESKTOP=sway \
dbus-run-session sway >"$log" 2>&1