diff --git a/.gitignore b/.gitignore index 04204c7..eb6cfbf 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -config +modules/radix/secrets.scm diff --git a/buer.scm b/buer.scm index bc42c04..5fc5c11 100644 --- a/buer.scm +++ b/buer.scm @@ -1,10 +1,20 @@ #|Modules|# (use-modules - #|GNU |# (gnu) (gnu artwork) (gnu services) (gnu system nss) - #|Guix |# (guix gexp) (guix packages) (guix records) + #|GNU |# (gnu) + (gnu artwork) + (gnu services) + #|Guix |# (guix gexp) + (guix packages) + (guix records) #|Misc |# (ice-9 match) - #|Radix|# (radix packages linux) (radix services linux) (radix system setuid) - (radix utils) (radix config secrets)) + #|Radix|# (radix packages linux) + (radix services linux) + (radix system setuid) + (radix secrets) + (radix utils)) + +(use-system-modules + #|N|# nss) (use-service-modules #|A|# admin diff --git a/files/awesome/README.rst b/files/awesome/README.rst new file mode 100644 index 0000000..44e8e3e --- /dev/null +++ b/files/awesome/README.rst @@ -0,0 +1,182 @@ +Awesome WM Copycats +=================== + +------------------------- +Themes for Awesome WM 4.x +------------------------- + +:Author: Luca CPZ +:Version: git +:License: BY-NC-SA_ +:Source: https://github.com/lcpz/awesome-copycats + +Description +=========== + +A set of themes for the Awesome_ window manager, version 4.x. + +See branches_ for previous versions. + +Purpose +======= + +The main purpose of this repository is to spread ready to use configurations, which can also serve as a cookbook for customisation. + +A secondary aim is to add new themes only when they constitute different UI/UX designs. + +Features +======== + +- Modularity +- Autohide widgets +- Autostart windowless processes +- Fast MPD and volume shortcuts (first time this trick has been used in Awesome) +- Shortcuts for copying to the clipboard, toggle wiboxes, widgets popups, screenshots capture, moving and magnifying clients +- Quake drop-down terminal +- Calendar with current day highlighted and months switch with a click/scroll +- Notifications for new mails, current song, volume level, hdd critical state, low battery +- OpenWeatherMap integration +- Net carrier status notifier +- Symbolic tag names +- DWM-like textual layoutbox +- Cairo wibar +- Custom layouts +- No borders when there's only one visible client +- Freedesktop.org compliant menu and desktop icons +- Vi-like client focus +- Non-empty tag browsing +- On-the-fly useless gaps resize +- Dynamic tagging + +Gallery +======= + +**Multicolor**, inspired by lucamanni_ + +.. image:: http://dotshare.it/public/images/uploads/650.png + +**Powerarrow**, porting of romockee_'s + +.. image:: http://dotshare.it/public/images/uploads/1453.png + +**Powerarrow Dark** + +.. image:: http://dotshare.it/public/images/uploads/649.jpg + +**Steamburn**, porting of ok100_'s dwm + +.. image:: http://dotshare.it/public/images/uploads/648.png + +**Blackburn** + +.. image:: http://dotshare.it/public/images/uploads/553.png + +**Dremora** + +.. image:: http://dotshare.it/public/images/uploads/652.png + +**Rainbow** + +.. image:: http://dotshare.it/public/images/uploads/606.png + +**Holo**, requested by amouly_ + +.. image:: http://dotshare.it/public/images/uploads/651.jpg + +**Copland**, inspired by foozer_ + +.. image:: http://dotshare.it/public/images/uploads/655.png + +**Vertex**, requested by swordfischer_ + +.. image:: http://dotshare.it/public/images/uploads/1432.jpg + +Installation +============ + +.. code-block:: shell + + git clone --recurse-submodules --remote-submodules --depth 1 -j 2 https://github.com/lcpz/awesome-copycats.git + mv -bv awesome-copycats/{*,.[^.]*} ~/.config/awesome; rm -rf awesome-copycats + +In case you do not want the Git files, use the following as the second command: + +.. code-block:: shell + + mv -bv awesome-copycats/* ~/.config/awesome; rm -rf awesome-copycats + +Usage +===== + +The modular structure allows to + +* set variables +* define startup processes +* change keybindings and layouts +* set client properties + +in ``rc.lua``, and + +* configure widgets +* define wiboxes and screen settings + +in ``theme.lua``, so that you just need to change ``chosen_theme`` variable in ``rc.lua`` to preserve your preferences *and* switch the theme, instead of having file redundancy. + +Just do the following: + +.. code-block:: shell + + $ cd ~/.config/awesome + $ cp rc.lua.template rc.lua + +Then, set the variable ``chosen_theme`` in ``rc.lua`` to your preferred theme, do your settings, and restart Awesome (``Mod4 + ctrl + r``). + +To customize a theme, head over to ``themes/$chosen_theme/theme.lua``. + +Otherwise, if you want to be synced with upstream, modify the theme path in ``rc.lua`` like this: + +.. code-block:: diff + + -beautiful.init(string.format("%s/.config/awesome/themes/%s/theme.lua", os.getenv("HOME"), chosen_theme)) + +beautiful.init(string.format("%s/.config/awesome/themes/%s/theme-personal.lua", os.getenv("HOME"), chosen_theme)) + +then, copy ``theme.lua`` to ``theme-personal.lua`` and do your customizations there. + +This way, you can safely ``git pull`` anytime. + +Notes +===== + +Complements are provided by lain_ and freedesktop_. **Be sure** to satisfy their dependencies_. In particular, mail_ and weather_ widgets have **mandatory** arguments. + +The fonts used in the screenshots are: Terminus_ (Multicolor, Powerarrow, Powerarrow Dark), Roboto_ (Holo, Vertex) and Tamzen_ (other ones). + +As taglist font, Blackburn and Dremora use Icons_, Vertex uses FontAwesome_: be sure to have bitmaps enabled if running under Debian or Ubuntu_. + +Every theme has a colorscheme_. + +Additional default software used: :: + + amixer dmenu librewolf mpc mpd scrot unclutter xbacklight xsel slock + +.. _BY-NC-SA: http://creativecommons.org/licenses/by-nc-sa/4.0 +.. _Awesome: http://github.com/awesomeWM/awesome +.. _branches: https://github.com/lcpz/awesome-copycats/branches +.. _lucamanni: https://github.com/lucamanni/awesome +.. _romockee: https://github.com/romockee/powerarrow +.. _ok100: http://ok100.deviantart.com/art/DWM-January-2013-348656846 +.. _amouly: https://bbs.archlinux.org/viewtopic.php?pid=1307158#p1307158 +.. _swordfischer: https://github.com/lcpz/awesome-copycats/issues/53 +.. _foozer: http://dotshare.it/dots/499 +.. _lain: https://github.com/lcpz/lain +.. _freedesktop: https://github.com/lcpz/awesome-freedesktop +.. _Terminus: http://terminus-font.sourceforge.net +.. _Roboto: https://fonts.google.com/specimen/Roboto +.. _Tamzen: https://github.com/sunaku/tamzen-font +.. _Icons: https://github.com/lcpz/dots/tree/master/.fonts +.. _FontAwesome: https://github.com/FortAwesome/Font-Awesome +.. _Ubuntu: https://wiki.ubuntu.com/Fonts#Enabling_Bitmapped_Fonts +.. _colorscheme: https://github.com/lcpz/dots/tree/master/.colors +.. _dependencies: https://github.com/lcpz/lain/wiki#dependencies +.. _mail: https://github.com/lcpz/lain/wiki/mail +.. _weather: https://github.com/lcpz/lain/wiki/weather diff --git a/files/awesome/rc.lua b/files/awesome/rc.lua new file mode 100644 index 0000000..073325d --- /dev/null +++ b/files/awesome/rc.lua @@ -0,0 +1,1047 @@ +-- awesome_mode: api-level=4:screen=on +-- If LuaRocks is installed, make sure that packages installed through it are +-- found (e.g. lgi). If LuaRocks is not installed, do nothing. +pcall(require, "luarocks.loader") + +-- @DOC_REQUIRE_SECTION@ +-- Standard awesome library +local gears = require("gears") +local awful = require("awful") + require("awful.autofocus") + require("collision")() + +-- Widget and layout library +local wibox = require("wibox") + +-- Theme handling library +local beautiful = require("beautiful") + +-- Notification library +local naughty = require("naughty") + +-- Declarative object management +local ruled = require("ruled") +local menubar = require("menubar") +local hotkeys_popup = require("awful.hotkeys_popup") + +-- Freedesktop +local freedesktop = require("freedesktop") + +-- Lain utils +local lain = require("lain") + +-- DPI +local dpi = require("beautiful.xresources").apply_dpi + +-- Table +local my_table = awful.util.table or gears.table -- 4.{0,1} compatibility + +-- Enable hotkeys help widget for VIM and other apps +-- when client with a matching name is opened: +-- require("awful.hotkeys_popup.keys") + +-- {{{ Error handling +-- Check if awesome encountered an error during startup and fell back to +-- another config (This code will only ever execute for the fallback config) +-- @DOC_ERROR_HANDLING@ +naughty.connect_signal("request::display_error", function(message, startup) + naughty.notification { + urgency = "critical", + title = "Oops, an error happened"..(startup and " during startup!" or "!"), + message = message + } +end) +-- }}} + +-- {{{ Variable definitions +-- @DOC_LOAD_THEME@ +-- Themes define colours, icons, font and wallpapers. +local themes = { +--[[ 1 ]] "anemofilia", +--[[ 2 ]] "default", +--[[ 3 ]] "gtk", +--[[ 4 ]] "sky", +--[[ 5 ]] "xresources", +--[[ 6 ]] "zenburn", +} +choosen_theme = themes[1] +beautiful.init( + string.format("%s/themes/%s/theme.lua", + gears.filesystem.get_dir("config"), + choosen_theme) +) +local theme = beautiful.get() + +-- @DOC_DEFAULT_APPLICATIONS@ +-- This is used later as the default terminal and editor to run. +terminal = "st" +editor = "kak" +browser = "icecat" +editor_cmd = terminal.." -e "..editor +file_manager = terminal.." -g 137x31-320+16 -c Lf -e "..gears.filesystem.get_dir("config").."/../lf/lfrun" +irc_client = terminal.." -g 137x31-320+16 -c Weechat -e weechat" +rss_reader = terminal.." -g 137x31-320+16 -e newsraft" +music_player = terminal.." -g 137x31-320+16 -e ncmpcpp" +link_handler = "dmenu_link" + +-- Default modkey. +-- Usually, Mod4 is the key with a logo between Control and Alt. +-- If you do not like this or do not have such a key, +-- I suggest you to remap Mod4 to another key using xmodmap or other tools. +-- However, you can use another modifier like Mod1, but it may interact with others. +modkey = "Mod4" +altkey = "Mod1" +-- }}} + +-- {{{ Menu +-- @DOC_MENU@ +-- Create a launcher widget and a main menu +myawesomemenu = { + { "hotkeys", function() hotkeys_popup.show_help(nil, awful.screen.focused()) end }, + { "manual", terminal .. " -e man awesome" }, + { "edit config", editor_cmd .. " " .. awesome.conffile }, + { "restart", awesome.restart }, + { "quit", function() awesome.quit() end }, +} + +mymainmenu = freedesktop.menu.build { + before = { + { "awesome", myawesomemenu }, + -- other triads can be put here + }, + after = { + { "open terminal", terminal }, + -- other triads can be put here + } +} + +mylauncher = awful.widget.launcher({ + image = beautiful.awesome_icon, + menu = mymainmenu +}) + +-- Menubar configuration +menubar.utils.terminal = terminal +-- }}} + +-- {{{ Tag layout +-- @DOC_LAYOUT@ +-- Table of layouts to cover with awful.layout.inc, order matters. +tag.connect_signal("request::default_layouts", + function() + awful.layout.append_default_layouts({ + --awful.layout.suit.floating, + awful.layout.suit.tile, + --awful.layout.suit.tile.left, + awful.layout.suit.tile.bottom, + --awful.layout.suit.tile.top, + awful.layout.suit.max, + --awful.layout.suit.fair, + --awful.layout.suit.fair.horizontal, + --awful.layout.suit.spiral, + --awful.layout.suit.spiral.dwindle, + --awful.layout.suit.max.fullscreen, + --awful.layout.suit.magnifier, + --awful.layout.suit.corner.nw, + }) + end) +-- }}} + +-- {{{ Wallpaper +-- @DOC_WALLPAPER@ +screen.connect_signal("request::wallpaper", + function(s) + awful.wallpaper { + screen = s, + widget = { + { + image = beautiful.wallpaper, + upscale = true, + downscale = true, + widget = wibox.widget.imagebox, + }, + valign = "center", + halign = "center", + tiled = false, + widget = wibox.container.tile, + } + } + end) +-- }}} + +-- {{{ Wibar +local markup = lain.util.markup +local separators = lain.util.separators + +-- Keyboard map indicator and switcher +mykeyboardlayout = awful.widget.keyboardlayout() + +-- Create a textclock widget +mytextclock = wibox.widget.textclock() + +local clock = awful.widget.watch( + "date +'%a %d %b %R'", 60, + function(widget, stdout) + widget:set_markup(" " .. markup.font(beautiful.font, stdout)) + end +) + +-- Calendar +beautiful.cal = lain.widget.cal({ + icons = "", + attach_to = { clock }, + notification_preset = { + font = beautiful.font, + fg = beautiful.fg_normal, + bg = beautiful.bg_normal + } +}) + +-- MPD +local musicplr = terminal .. " -title Music -g 137x31-320+16 -e ncmpcpp" +local mpdicon = wibox.widget.imagebox(beautiful.widget_music) +mpdicon:buttons(my_table.join( + awful.button({ modkey }, 1, function () awful.spawn.with_shell(musicplr) end), + awful.button({ }, 1, function () + os.execute("mpc prev") + beautiful.mpd.update() + end), + awful.button({ }, 2, function () + os.execute("mpc toggle") + beautiful.mpd.update() + end), + awful.button({ }, 3, function () + os.execute("mpc next") + beautiful.mpd.update() + end))) +beautiful.mpd = lain.widget.mpd({ + settings = function() + if mpd_now.state == "play" then + artist = mpd_now.artist .. " " + title = mpd_now.title .. " " + mpdicon:set_image(beautiful.widget_music_on) + elseif mpd_now.state == "pause" then + artist = "mpd " + title = "paused " + else + artist = "" + title = "" + mpdicon:set_image(beautiful.widget_music) + end + + widget:set_markup(markup.font(beautiful.font, markup("#8581E0", artist) .. title)) + end +}) + +-- Mail IMAP check +--[[ +local mailicon = wibox.widget.imagebox(beautiful.widget_mail) +mailicon:buttons(my_table.join(awful.button({ }, 1, function () awful.spawn(mail) end))) +beautiful.mail = lain.widget.imap({ + timeout = 180, + server = "server", + mail = "luisguilhermecoelho@usp.br", + password = "", + settings = function() + if mailcount > 0 then + widget:set_markup(markup.font(beautiful.font, " " .. mailcount .. " ")) + mailicon:set_image(beautiful.widget_mail_on) + else + widget:set_text("") + mailicon:set_image(beautiful.widget_mail) + end + end +}) +--]] + +-- MEM +local memicon = wibox.widget.imagebox(beautiful.widget_mem) +local mem = lain.widget.mem({ + settings = function() + widget:set_markup(markup.font(beautiful.font, mem_now.used .. "MB ")) + end +}) + +-- CPU +local cpuicon = wibox.widget.imagebox(beautiful.widget_cpu) +local cpu = lain.widget.cpu({ + settings = function() + widget:set_markup(markup.font(beautiful.font, cpu_now.usage .. "% ")) + end +}) + +-- Coretemp +local tempicon = wibox.widget.imagebox(beautiful.widget_temp) +local temp = lain.widget.temp({ + settings = function() + widget:set_markup(markup.font(beautiful.font, math.ceil(coretemp_now) .. "°C ")) + end +}) + +-- Battery +local baticon = wibox.widget.imagebox(beautiful.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(beautiful.widget_ac) + elseif bat_now.perc and tonumber(bat_now.perc) < 25 then + baticon:set_image(beautiful.widget_battery_20) + elseif bat_now.perc and tonumber(bat_now.perc) < 45 then + baticon:set_image(beautiful.widget_battery_40) + elseif bat_now.perc and tonumber(bat_now.perc) < 65 then + baticon:set_image(beautiful.widget_battery_60) + elseif bat_now.perc and tonumber(bat_now.perc) < 85 then + baticon:set_image(beautiful.widget_battery_80) + else + baticon:set_image(beautiful.widget_battery_100) + end + widget:set_markup(markup.font(beautiful.font, bat_now.perc .. "% ")) + else + widget:set_markup(markup.font(beautiful.font, "AC ")) + baticon:set_image(beautiful.widget_ac) + end + end +}) + +-- ALSA volume +local volicon = wibox.widget.imagebox(beautiful.widget_vol) +beautiful.volume = lain.widget.alsa({ + settings = function() + if volume_now.status == "off" then + volicon:set_image(beautiful.widget_vol_mute) + elseif volume_now.level then + if tonumber(volume_now.level) == 0 then + volicon:set_image(beautiful.widget_vol_no) + elseif tonumber(volume_now.level) <= 50 then + volicon:set_image(beautiful.widget_vol_low) + else + volicon:set_image(beautiful.widget_vol) + end + end + + widget:set_markup(markup.font(beautiful.font, volume_now.level .. "% ")) + end +}) +beautiful.volume.widget:buttons(awful.util.table.join( + awful.button({}, 4, function () + awful.util.spawn("amixer set Master 1%+") + beautiful.volume.update() + end), + awful.button({}, 5, function () + awful.util.spawn("amixer set Master 1%-") + beautiful.volume.update() + end) +)) + +-- Net +local netdownicon = wibox.widget.imagebox(beautiful.widget_netdown) +local netdowninfo = wibox.widget.textbox() +local netupicon = wibox.widget.imagebox(beautiful.widget_netup) +local netupinfo = lain.widget.net({ + settings = function() + widget:set_markup(markup.font(beautiful.font, net_now.sent .. " ")) + netdowninfo:set_markup(markup.font(beautiful.font, net_now.received .. " ")) + end +}) + +-- Separators +local spr = wibox.widget.textbox(' ') +local arrl_dl = separators.arrow_left(beautiful.bg_focus, "alpha") +local arrl_ld = separators.arrow_left("alpha", beautiful.bg_focus) + +-- @DOC_FOR_EACH_SCREEN@ +screen.connect_signal("request::desktop_decoration", function(s) + -- Each screen has its own tag table. + awful.tag({ "α", "β", "γ", "δ", "ε", "ζ", "η" }, s, awful.layout.layouts[1]) + + -- Create a promptbox for each screen + s.mypromptbox = awful.widget.prompt() + + -- Create an imagebox widget which will contain an icon indicating which layout we're using. + -- We need one layoutbox per screen. + s.mylayoutbox = awful.widget.layoutbox { + screen = s, + buttons = { + awful.button({ }, 1, function () awful.layout.inc( 1) end), + awful.button({ }, 3, function () awful.layout.inc(-1) end), + awful.button({ }, 4, function () awful.layout.inc(-1) end), + awful.button({ }, 5, function () awful.layout.inc( 1) end), + } + } + + -- Create a taglist widget + s.mytaglist = awful.widget.taglist { + screen = s, + filter = awful.widget.taglist.filter.all, + buttons = { + awful.button({ }, 1, function(t) t:view_only() end), + awful.button({ modkey }, 1, function(t) + if client.focus then + client.focus:move_to_tag(t) + end + end), + awful.button({ }, 3, awful.tag.viewtoggle), + awful.button({ modkey }, 3, function(t) + if client.focus then + client.focus:toggle_tag(t) + end + end), + -- Changing workspaces with scroll is so irritating + -- awful.button({ }, 4, function(t) awful.tag.viewprev(t.screen) end), + -- awful.button({ }, 5, function(t) awful.tag.viewnext(t.screen) end), + } + } + + -- @TASKLIST_BUTTON@ + -- Create a tasklist widget + s.mytasklist = awful.widget.tasklist { + screen = s, + filter = awful.widget.tasklist.filter.currenttags, + buttons = { + awful.button({ }, 1, function (c) + c:activate { context = "tasklist", action = "toggle_minimization" } + end), + awful.button({ }, 3, function() awful.menu.client_list { theme = { width = 250 } } end), + awful.button({ }, 4, function() awful.client.focus.byidx(-1) end), + awful.button({ }, 5, function() awful.client.focus.byidx( 1) end), + } + } + + -- @DOC_WIBAR@ + -- Create the wibox + s.mywibox = awful.wibar { + height = dpi(19), + position = "top", + screen = s, + -- @DOC_SETUP_WIDGETS@ + widget = { + layout = wibox.layout.align.horizontal, + { -- Left widgets + layout = wibox.layout.fixed.horizontal, + --mylauncher, + s.mytaglist, + s.mypromptbox, + }, + -- Middle widget + s.mytasklist, + { -- Right widgets + layout = wibox.layout.fixed.horizontal, + --mykeyboardlayout, + --wibox.widget.systray(), + spr, + arrl_ld, + wibox.container.background(netdownicon, beautiful.bg_focus), + wibox.container.background(netdowninfo, beautiful.bg_focus), + wibox.container.background(netupicon, beautiful.bg_focus), + wibox.container.background(netupinfo.widget, beautiful.bg_focus), + arrl_dl, + wibox.container.background(memicon, beautiful.bg_normal), + wibox.container.background(mem.widget, beautiful.bg_normal), + arrl_ld, + wibox.container.background(cpuicon, beautiful.bg_focus), + wibox.container.background(cpu.widget, beautiful.bg_focus), + arrl_dl, + wibox.container.background(tempicon, beautiful.bg_normal), + wibox.container.background(temp.widget, beautiful.bg_normal), + arrl_ld, + wibox.container.background(volicon, beautiful.bg_focus), + wibox.container.background(beautiful.volume.widget, beautiful.bg_focus), + arrl_dl, + wibox.container.background(baticon, beautiful.bg_normal), + wibox.container.background(bat.widget, beautiful.bg_normal), + arrl_ld, + wibox.container.background(clock, beautiful.bg_focus), + wibox.container.background(spr, beautiful.bg_focus), + arrl_dl, + wibox.container.background(s.mylayoutbox, beautiful.bg_normal), + }, + } + } +--[[ + s.mybottomwibox = awful.wibar { + height = dpi(19), + position = "bottom", + screen = s, + -- @DOC_SETUP_WIDGETS@ + widget = { + layout = wibox.layout.align.horizontal, + { -- Left widgets + layout = wibox.layout.fixed.horizontal, + --s.mypromptbox, + spr,--mylauncher, + --s.mytaglist, + --s.mypromptbox, + }, + -- Middle widget + --s.mytasklist, + spr, + { -- Right widgets + layout = wibox.layout.fixed.horizontal, + --mykeyboardlayout, + --wibox.widget.systray(), + spr, + arrl_ld, + wibox.container.background(mpdicon, theme.bg_focus), + wibox.container.background(beautiful.mpd.widget, theme.bg_focus), + --arrl_dl, + --wibox.container.background(mailicon, theme.bg_normal), + --wibox.container.background(beautiful.mail.widget, theme.bg_normal), + }, + } + } +--]] +end) + +-- }}} + +-- {{{ Mouse bindings +-- @DOC_ROOT_BUTTONS@ +awful.mouse.append_global_mousebindings({ + awful.button({ }, 2, function () mymainmenu:toggle() end), + --awful.button({ }, 4, awful.tag.viewprev), + --awful.button({ }, 5, awful.tag.viewnext), +}) +-- }}} + +-- {{{ Key bindings +-- @DOC_GLOBAL_KEYBINDINGS@ + +-- General Awesome keys +awful.keyboard.append_global_keybindings({ + awful.key({ modkey, }, "s", + function () hotkeys_popup.widget.new( + { width = 909, + height = 0.525*awful.screen.focused().workarea.height, + font = "Meslo LG M DZ 8", + description_font = "Meslo LG M DZ 8"}):show_help() end, + {description="show help", group="awesome"}), +--[[awful.key({ modkey, }, "w", function () + mymainmenu:show() end, + {description = "show main menu", group = "awesome"}), ]] + awful.key({ modkey, "Control" }, "r", awesome.restart, + {description = "reload awesome", group = "awesome"}), + awful.key({ modkey, "Control" }, "q", awesome.quit, + {description = "quit awesome", group = "awesome"}), + awful.key({ altkey, }, "Print", function () + os.execute("screenshot activewindow") end, + {description = "print focused window", group = "launcher"}), + awful.key({ }, "Print", function () + os.execute("screenshot selectregion") end, + {description = "print selected region", group = "launcher"}), + awful.key({ }, "XF86WebCam", function () + os.execute("cam") end, + {description = "run cam", group = "launcher"}), + awful.key({ modkey, }, "c", function () + awful.spawn("keepassxc") end, + {description = "run keepassxc", group = "launcher"}), + awful.key({ modkey, }, "a", function () + awful.spawn.raise_or_spawn("telegram-desktop") end, + {description = "run telegram-desktop", group = "launcher"}), + awful.key({ modkey, }, "r", function () + awful.spawn.with_shell("notify-send $(rem)") end, + {description = "run telegram-desktop", group = "launcher"}), + awful.key({ modkey, }, "w", function () + awful.spawn.raise_or_spawn(irc_client) end, + {description = "run irc client", group = "launcher"}), + awful.key({ modkey, }, "e", function () + awful.spawn(editor_cmd) end, + {description = "run editor", group = "launcher"}), + awful.key({ modkey, }, "Down", function () + awful.spawn(music_player) end, + {description = "run music player", group = "launcher"}), + awful.key({ modkey, }, "b", function () + awful.spawn(browser) end, + {description = "run browser", group = "launcher"}), + awful.key({ modkey, }, "d", function () + awful.spawn(file_manager) end, + {description = "run file manager", group = "launcher"}), + awful.key({ }, "XF86Launch1", function () + awful.spawn.raise_or_spawn(rss_reader) end, + {description = "run newsraft", group = "launcher"}), + awful.key({"Mod4" }, "x", function () + os.execute("xkill") end, + {description = "launch xkill", group = "launcher"}), + awful.key({"Mod4" }, "z", function () + os.execute("/home/radio/.local/bin/zlib") end, + {description = "loot some ships", group = "launcher"}), + awful.key({"Mod4" }, "g", function () + awful.spawn("st -e lf /home/radio/projects/guile/radix") end, + {description = "run link handler", group = "launcher"}), + awful.key({ modkey, }, "Return", function () + awful.spawn(terminal) end, + {description = "run terminal", group = "launcher",}), + awful.key({ modkey, }, ":", function () + awful.screen.focused().mypromptbox:run() end, + {description = "run prompt", group = "launcher"}), +--[[ + awful.key({ modkey }, "p", function() + menubar.show() end, + {description = "show the menubar", group = "launcher"}), + awful.key({ modkey }, "x", + function () + awful.prompt.run { + prompt = "Run Lua code: ", + textbox = awful.screen.focused().mypromptbox.widget, + exe_callback = awful.util.eval, + history_path = awful.util.get_cache_dir() .. "/history_eval" + } + end, + {description = "lua execute prompt", group = "awesome"}), +--]] +}) + +-- Tags related keybindings +awful.keyboard.append_global_keybindings({ + awful.key({ modkey, }, "h", awful.tag.viewprev, + {description = "focus previous tag", group = "tag"}), + awful.key({ modkey, }, "l", awful.tag.viewnext, + {description = "focus next tag", group = "tag"}), + awful.key({ modkey, }, "Escape", awful.tag.history.restore, + {description = "go back", group = "tag"}), +}) + +-- Focus related keybindings +awful.keyboard.append_global_keybindings({ + awful.key({ modkey, }, "j", function () + awful.client.focus.byidx( 1) end, + {description = "focus previous by index", group = "client"} + ), + awful.key({ modkey, }, "k", function () + awful.client.focus.byidx(-1) end, + {description = "focus next by index", group = "client"} + ), + awful.key({ modkey, }, "Tab", function () + awful.client.focus.history.previous() + if client.focus then + client.focus:raise() + end + end, + {description = "go back", group = "client"}), + awful.key({ modkey, "Control" }, "h", function () + awful.screen.focus_relative( 1) end, + {description = "focus the next screen", group = "screen"}), + awful.key({ modkey, "Control" }, "l", function () + awful.screen.focus_relative(-1) end, + {description = "focus the previous screen", group = "screen"}), + awful.key({ modkey, "Control" }, "n", function () + local c = awful.client.restore() + -- Focus restored client + if c then + c:activate { raise = true, context = "key.unminimize" } + end + end, + {description = "restore minimized", group = "client"}), +}) + +-- Layout related keybindings +awful.keyboard.append_global_keybindings({ + --awful.key({ modkey, "Shift" }, "j", function () + -- awful.client.swap.byidx( 1) end, + -- {description = "swap with next client by index", group = "client"}), + --awful.key({ modkey, "Shift" }, "k", function () + -- awful.client.swap.byidx( -1) end, + -- {description = "swap with previous client by index", group = "client"}), + --awful.key({ modkey, }, "l", function () + -- awful.tag.incmwfact( 0.05) end, + -- {description = "increase master width factor", group = "layout"}), + --awful.key({ modkey, }, "h", function () + -- awful.tag.incmwfact(-0.05) end, + -- {description = "decrease master width factor", group = "layout"}), + awful.key({ modkey, }, "u", awful.client.urgent.jumpto, + {description = "jump to urgent client", group = "client"}), + awful.key({ modkey, "Control" }, "h", function () + awful.tag.incnmaster( 1, nil, true) end, + {description = "increase the number of master clients", group = "layout"}), + awful.key({ modkey, "Control" }, "l", function () + awful.tag.incnmaster(-1, nil, true) end, + {description = "decrease the number of master clients", group = "layout"}), + --awful.key({ modkey, "Control" }, "h", function () + -- awful.tag.incncol( 1, nil, true) end, + -- {description = "increase the number of columns", group = "layout"}), + --awful.key({ modkey, "Control" }, "l", function () + -- awful.tag.incncol(-1, nil, true) end, + -- {description = "decrease the number of columns", group = "layout"}), + awful.key({ modkey, }, "space", function () + awful.layout.inc( 1) end, + {description = "select next", group = "layout"}), + awful.key({ modkey, "Control" }, "space", function () + awful.layout.inc(-1) end, + {description = "select previous", group = "layout"}), +}) + +-- @DOC_NUMBER_KEYBINDINGS@ + +awful.keyboard.append_global_keybindings({ + awful.key { + modifiers = { modkey }, + keygroup = "numrow", + description = "only view tag", + group = "tag", + on_press = function (index) + local screen = awful.screen.focused() + local tag = screen.tags[index] + if tag then + tag:view_only() + end + end, + }, + awful.key { + modifiers = { modkey, "Control" }, + keygroup = "numrow", + description = "toggle tag", + group = "tag", + on_press = function (index) + local screen = awful.screen.focused() + local tag = screen.tags[index] + if tag then + awful.tag.viewtoggle(tag) + end + end, + }, + awful.key { + modifiers = { modkey, "Shift" }, + keygroup = "numrow", + description = "move focused client to tag", + group = "tag", + on_press = function (index) + if client.focus then + local tag = client.focus.screen.tags[index] + if tag then + client.focus:move_to_tag(tag) + end + end + end, + }, + awful.key { + modifiers = { modkey, "Control", "Shift" }, + keygroup = "numrow", + description = "toggle focused client on tag", + group = "tag", + on_press = function (index) + if client.focus then + local tag = client.focus.screen.tags[index] + if tag then + client.focus:toggle_tag(tag) + end + end + end, + }, +}) + +-- Audio related keybindings +awful.keyboard.append_global_keybindings({ + awful.key({ }, "XF86AudioRaiseVolume", function () + awful.util.spawn("amixer -q set Master 1%+", false) end, + {description = "volume up", group = "hotkeys"}), + awful.key({ }, "XF86AudioLowerVolume", function () + awful.util.spawn("amixer -q set Master 1%-", false) end, + {description = "volume down", group = "hotkeys"}), + awful.key({ }, "XF86AudioMute", function () + awful.util.spawn("amixer -D set Master 1+ toggle", false) end, + {description = "toggle mute", group = "hotkeys"}), +}) + +-- MPD related keybinds +awful.keyboard.append_global_keybindings({ + awful.key({ }, "XF86AudioPlay", function () + os.execute("mpc toggle") + -- beautiful.mpd.update() -- MPD widget must be set + end, + {description = "mpc toggle", group = "widgets"}), + awful.key({ }, "XF86AudioStop", function () + os.execute("mpc stop") + -- beautiful.mpd.update() -- MPD widget must be set + end, + {description = "mpc stop", group = "widgets"}), + awful.key({ }, "XF86AudioPrev", function () + os.execute("mpc prev") + -- beautiful.mpd.update() -- MPD widget must be set + end, + {description = "mpc prev", group = "widgets"}), + awful.key({ }, "XF86AudioNext", function () + os.execute("mpc next") + -- beautiful.mpd.update() -- MPD widget must be set + end, + {description = "mpc next", group = "widgets"}), +-- awful.key({ altkey }, "0", function () +-- local common = { text = "MPD widget ", position = "top_middle", timeout = 2 } +-- if beautiful.mpd.timer.started then +-- beautiful.mpd.timer:stop() +-- common.text = common.text .. lain.util.markup.bold("OFF") +-- else +-- beautiful.mpd.timer:start() +-- common.text = common.text .. lain.util.markup.bold("ON") +-- end +-- naughty.notify(common) +-- end, +-- {description = "ncmpcpp on/off", group = "widgets"}), +}) + +-- Generic hotkeys +awful.keyboard.append_global_keybindings({ + awful.key({ "Control", }, "space", function() + naughty.destroy_all_notifications() end, + {description = "destroy notifications", group = "hotkeys"}), + awful.key({ }, "XF86Sleep", function () + os.execute("doas zzz") end, + {description = "Sleep", group = "hotkeys"}), + awful.key({ }, "XF86Battery", function () + os.execute("i3lock -u -i /home/radio/Pictures/guix-artwork/backgrounds/guix-silver-checkered-16-9.svg") end, + {description = "lock screen", group = "hotkeys"}), +}) + +-- Show/hide wibox +awful.keyboard.append_global_keybindings({ + awful.key({ modkey }, "Up", function () + for s in screen do + s.mywibox.visible = not s.mywibox.visible + end + end, + {description = "toggle wibox", group = "awesome"}), +--[[ awful.key({ modkey }, "Down", function () + for s in screen do + s.mybottomwibox.visible = not s.mybottomwibox.visible + end + end, + {description = "toggle bottom wibox", group = "awesome"}), +--]] +}) + +-- @DOC_CLIENT_BUTTONS@ +client.connect_signal("request::default_mousebindings", function() + awful.mouse.append_client_mousebindings({ + awful.button({ }, 1, function (c) + c:activate { context = "mouse_click" } end), + awful.button({ modkey, }, 1, function (c) + c:activate { context = "mouse_click", action = "mouse_move" } end), + awful.button({ modkey, }, 3, function (c) + c:activate { context = "mouse_click", action = "mouse_resize"} end), + }) +end) + +-- @DOC_CLIENT_KEYBINDINGS@ +client.connect_signal("request::default_keybindings", function() + awful.keyboard.append_client_keybindings({ + awful.key({ modkey, }, "f", function (c) + c.fullscreen = not c.fullscreen + c:raise() + end, + {description = "toggle fullscreen", group = "client"}), + awful.key({ modkey, }, "q", function (c) + c:kill() end, + {description = "close", group = "client"}), + awful.key({ modkey, "Shift" }, "Return", function (c) + c:swap(awful.client.getmaster()) end, + {description = "move to master", group = "client"}), + awful.key({ modkey, }, "o", function (c) + c:move_to_screen() end, + {description = "move to screen", group = "client"}), + awful.key({ modkey, }, "t", function (c) + c.ontop = not c.ontop end, + {description = "toggle keep on top", group = "client"}), + awful.key({ modkey, }, "n", function (c) + c.minimized = true end , + {description = "minimize", group = "client"}), + awful.key({ modkey, }, "m", lain.util.magnify_client, + {description = "toggle magnify", group = "client"})}) +end) + +-- }}} + +-- {{{ Rules +-- Rules to apply to new clients. +-- @DOC_RULES@ +ruled.client.connect_signal("request::rules", function() + -- @DOC_GLOBAL_RULE@ + -- All clients will match this rule. + ruled.client.append_rule { + id = "global", + rule = { }, + properties = { + focus = awful.client.focus.filter, + raise = true, + screen = awful.screen.preferred, + placement = awful.placement.no_overlap+awful.placement.no_offscreen + } + } + + -- @DOC_FLOATING_RULE@ + -- Floating clients. + ruled.client.append_rule { + id = "floating", + rule_any = { + instance = { + "copyq", + "pinentry" + }, + class = { + "Arandr", + "TelegramDesktop", + "KeePassXC", + "Gpick", + "Keepassxc", + "Tor Browser", + "Weechat", + "Wpa_gui", + "veromix", + "xtightvncviewer" + }, + -- Note that the name property shown in xprop might be set slightly after creation of the client + -- and the name shown there might not match defined rules here. + name = { + "Event Tester", -- xev. + }, + role = { + "AlarmWindow", -- Thunderbird's calendar. + "ConfigManager", -- Thunderbird's about:config. + "pop-up", -- e.g. Browser's (detached) Developer Tools. + } + }, + properties = { floating = true } + } + + -- Please st, respect my size hints :( + ruled.client.append_rule { + id = "respeitador de size hints", + rule_any = { + class = {"Emacs", "St"}, + }, + properties = { size_hints_honor = false } + } + + -- @DOC_ONTOP_RULE@ + -- Ontop clients. + ruled.client.append_rule { + id = "ontop", + rule_any = { + name = { "Media viewer" }, + class = { "mpv" }, + }, + properties = { ontop = true }, + } + + -- Establish a default size and position for telegram + ruled.client.append_rule { + id = "TelegramDesktop", + rule_any = { + class = { "TelegramDesktop" }, + }, + except_any = { + name = { "Choose Files", "Media viewer" } + }, + properties = { + above = true, + placement = awful.placement.centered, + width = 380, + height = awful.screen.focused().workarea.height - 4 * beautiful.useless_gap - 2 + } + } + + -- @DOC_DIALOG_RULE@ + -- Add titlebars to normal clients and dialogs + ruled.client.append_rule { + -- @DOC_CSD_TITLEBARS@ + id = "titlebars", + rule_any = { type = { "normal", "dialog" } }, + properties = { titlebars_enabled = false } + } + + -- Set Firefox to always map on the tag named "2" on screen 1. + -- ruled.client.append_rule { + -- rule = { class = "Firefox" }, + -- properties = { screen = 1, tag = "2" } + -- } +end) +-- }}} + +-- {{{ Titlebars +-- @DOC_TITLEBARS@ +-- Add a titlebar if titlebars_enabled is set to true in the rules. +client.connect_signal("request::titlebars", function(c) + -- buttons for the titlebar + local buttons = { + awful.button({ }, 1, function() + c:activate { context = "titlebar", action = "mouse_move" } + end), + awful.button({ }, 3, function() + c:activate { context = "titlebar", action = "mouse_resize"} + end), + } + + awful.titlebar(c).widget = { + { -- Left + awful.titlebar.widget.iconwidget(c), + buttons = buttons, + layout = wibox.layout.fixed.horizontal + }, + { -- Middle + { -- Title + halign = "center", + widget = awful.titlebar.widget.titlewidget(c) + }, + buttons = buttons, + layout = wibox.layout.flex.horizontal + }, + { -- Right + awful.titlebar.widget.floatingbutton (c), + awful.titlebar.widget.maximizedbutton(c), + awful.titlebar.widget.stickybutton (c), + awful.titlebar.widget.ontopbutton (c), + awful.titlebar.widget.closebutton (c), + layout = wibox.layout.fixed.horizontal() + }, + layout = wibox.layout.align.horizontal + } +end) +-- }}} + +--{{{ Autorun programs +autorun = true +autorunApps = { + "xrdb /home/radio/.Xresources", + "keepassxc", + "/home/radio/.profile", + "xmodmap .xmodmap", + "mpd --no-config", + "xset r rate 160 35", + "xset b off", + "setxkbmap -layout 'us,br' -option 'grp:menu_switch,parens:swap_brackets,caps:swapescape'", + "xbanish", + -- "/home/radio/.config/tox/toxic-scripts/auto-open.sh", + "xset r rate 200 30", + "pkill oneko", + "oneko -tofocus -bg '#606060' -fg '#101010' -speed 22", + "adjust-trackpoint", + } +if autorun then + for app = 1, #autorunApps do + awful.util.spawn(autorunApps[app]) + end +end +---}}} + + +-- {{{ Notifications + +ruled.notification.connect_signal('request::rules', function() + -- All notifications will match this rule. + ruled.notification.append_rule { + rule = { }, + properties = { + screen = awful.screen.preferred, + implicit_timeout = 5, + } + } +end) + +naughty.connect_signal("request::display", function(n) + naughty.layout.box { notification = n } +end) + +-- }}} + +-- Enable sloppy focus, so that focus follows mouse. +client.connect_signal("mouse::enter", function(c) + c:activate { context = "mouse_enter", raise = false } +end) diff --git a/files/awesome/themes/anemofilia-old/icons/ac.png b/files/awesome/themes/anemofilia-old/icons/ac.png new file mode 100755 index 0000000..92c74fd Binary files /dev/null and b/files/awesome/themes/anemofilia-old/icons/ac.png differ diff --git a/files/awesome/themes/anemofilia-old/icons/ac.png~ b/files/awesome/themes/anemofilia-old/icons/ac.png~ new file mode 100755 index 0000000..1298817 Binary files /dev/null and b/files/awesome/themes/anemofilia-old/icons/ac.png~ differ diff --git a/files/awesome/themes/anemofilia-old/icons/battery_100.png b/files/awesome/themes/anemofilia-old/icons/battery_100.png new file mode 100644 index 0000000..428b4ed Binary files /dev/null and b/files/awesome/themes/anemofilia-old/icons/battery_100.png differ diff --git a/files/awesome/themes/anemofilia-old/icons/battery_20.png b/files/awesome/themes/anemofilia-old/icons/battery_20.png new file mode 100644 index 0000000..8e4305f Binary files /dev/null and b/files/awesome/themes/anemofilia-old/icons/battery_20.png differ diff --git a/files/awesome/themes/anemofilia-old/icons/battery_40.png b/files/awesome/themes/anemofilia-old/icons/battery_40.png new file mode 100644 index 0000000..ad6fc38 Binary files /dev/null and b/files/awesome/themes/anemofilia-old/icons/battery_40.png differ diff --git a/files/awesome/themes/anemofilia-old/icons/battery_60.png b/files/awesome/themes/anemofilia-old/icons/battery_60.png new file mode 100644 index 0000000..f7c6d78 Binary files /dev/null and b/files/awesome/themes/anemofilia-old/icons/battery_60.png differ diff --git a/files/awesome/themes/anemofilia-old/icons/battery_80.png b/files/awesome/themes/anemofilia-old/icons/battery_80.png new file mode 100644 index 0000000..7f31597 Binary files /dev/null and b/files/awesome/themes/anemofilia-old/icons/battery_80.png differ diff --git a/files/awesome/themes/anemofilia-old/icons/battery_empty.png b/files/awesome/themes/anemofilia-old/icons/battery_empty.png new file mode 100755 index 0000000..b841ace Binary files /dev/null and b/files/awesome/themes/anemofilia-old/icons/battery_empty.png differ diff --git a/files/awesome/themes/anemofilia-old/icons/battery_empty.png~ b/files/awesome/themes/anemofilia-old/icons/battery_empty.png~ new file mode 100755 index 0000000..84645aa Binary files /dev/null and b/files/awesome/themes/anemofilia-old/icons/battery_empty.png~ differ diff --git a/files/awesome/themes/anemofilia-old/icons/battery_low.png~ b/files/awesome/themes/anemofilia-old/icons/battery_low.png~ new file mode 100755 index 0000000..8d44edf Binary files /dev/null and b/files/awesome/themes/anemofilia-old/icons/battery_low.png~ differ diff --git a/files/awesome/themes/anemofilia-old/icons/centerwork.png b/files/awesome/themes/anemofilia-old/icons/centerwork.png new file mode 100755 index 0000000..9071516 Binary files /dev/null and b/files/awesome/themes/anemofilia-old/icons/centerwork.png differ diff --git a/files/awesome/themes/anemofilia-old/icons/centerworkh.png b/files/awesome/themes/anemofilia-old/icons/centerworkh.png new file mode 100755 index 0000000..b1d1379 Binary files /dev/null and b/files/awesome/themes/anemofilia-old/icons/centerworkh.png differ diff --git a/files/awesome/themes/anemofilia-old/icons/cpu.png b/files/awesome/themes/anemofilia-old/icons/cpu.png new file mode 100755 index 0000000..e493262 Binary files /dev/null and b/files/awesome/themes/anemofilia-old/icons/cpu.png differ diff --git a/files/awesome/themes/anemofilia-old/icons/cpu.png~ b/files/awesome/themes/anemofilia-old/icons/cpu.png~ new file mode 100755 index 0000000..985eb65 Binary files /dev/null and b/files/awesome/themes/anemofilia-old/icons/cpu.png~ differ diff --git a/files/awesome/themes/anemofilia-old/icons/dwindle.png b/files/awesome/themes/anemofilia-old/icons/dwindle.png new file mode 100755 index 0000000..649ea99 Binary files /dev/null and b/files/awesome/themes/anemofilia-old/icons/dwindle.png differ diff --git a/files/awesome/themes/anemofilia-old/icons/fairh.png b/files/awesome/themes/anemofilia-old/icons/fairh.png new file mode 100755 index 0000000..66b7125 Binary files /dev/null and b/files/awesome/themes/anemofilia-old/icons/fairh.png differ diff --git a/files/awesome/themes/anemofilia-old/icons/fairv.png b/files/awesome/themes/anemofilia-old/icons/fairv.png new file mode 100755 index 0000000..13c4836 Binary files /dev/null and b/files/awesome/themes/anemofilia-old/icons/fairv.png differ diff --git a/files/awesome/themes/anemofilia-old/icons/floating1.png b/files/awesome/themes/anemofilia-old/icons/floating1.png new file mode 100644 index 0000000..05cca28 Binary files /dev/null and b/files/awesome/themes/anemofilia-old/icons/floating1.png differ diff --git a/files/awesome/themes/anemofilia-old/icons/hdd.png b/files/awesome/themes/anemofilia-old/icons/hdd.png new file mode 100755 index 0000000..0fb6833 Binary files /dev/null and b/files/awesome/themes/anemofilia-old/icons/hdd.png differ diff --git a/files/awesome/themes/anemofilia-old/icons/keyboardicon.png b/files/awesome/themes/anemofilia-old/icons/keyboardicon.png new file mode 100644 index 0000000..13e2a24 Binary files /dev/null and b/files/awesome/themes/anemofilia-old/icons/keyboardicon.png differ diff --git a/files/awesome/themes/anemofilia-old/icons/magnifier.png b/files/awesome/themes/anemofilia-old/icons/magnifier.png new file mode 100755 index 0000000..60d3e0d Binary files /dev/null and b/files/awesome/themes/anemofilia-old/icons/magnifier.png differ diff --git a/files/awesome/themes/anemofilia-old/icons/mail.png b/files/awesome/themes/anemofilia-old/icons/mail.png new file mode 100755 index 0000000..75a02fb Binary files /dev/null and b/files/awesome/themes/anemofilia-old/icons/mail.png differ diff --git a/files/awesome/themes/anemofilia-old/icons/mail_on.png b/files/awesome/themes/anemofilia-old/icons/mail_on.png new file mode 100755 index 0000000..d5a15b2 Binary files /dev/null and b/files/awesome/themes/anemofilia-old/icons/mail_on.png differ diff --git a/files/awesome/themes/anemofilia-old/icons/max.png b/files/awesome/themes/anemofilia-old/icons/max.png new file mode 100755 index 0000000..0cba687 Binary files /dev/null and b/files/awesome/themes/anemofilia-old/icons/max.png differ diff --git a/files/awesome/themes/anemofilia-old/icons/max.png~ b/files/awesome/themes/anemofilia-old/icons/max.png~ new file mode 100755 index 0000000..bea6b55 Binary files /dev/null and b/files/awesome/themes/anemofilia-old/icons/max.png~ differ diff --git a/files/awesome/themes/anemofilia-old/icons/mem.png b/files/awesome/themes/anemofilia-old/icons/mem.png new file mode 100755 index 0000000..5b2910e Binary files /dev/null and b/files/awesome/themes/anemofilia-old/icons/mem.png differ diff --git a/files/awesome/themes/anemofilia-old/icons/net.png b/files/awesome/themes/anemofilia-old/icons/net.png new file mode 100755 index 0000000..bc42fdc Binary files /dev/null and b/files/awesome/themes/anemofilia-old/icons/net.png differ diff --git a/files/awesome/themes/anemofilia-old/icons/net_down.png b/files/awesome/themes/anemofilia-old/icons/net_down.png new file mode 100755 index 0000000..a7e76ae Binary files /dev/null and b/files/awesome/themes/anemofilia-old/icons/net_down.png differ diff --git a/files/awesome/themes/anemofilia-old/icons/net_down.png~ b/files/awesome/themes/anemofilia-old/icons/net_down.png~ new file mode 100755 index 0000000..09433b1 Binary files /dev/null and b/files/awesome/themes/anemofilia-old/icons/net_down.png~ differ diff --git a/files/awesome/themes/anemofilia-old/icons/net_up.png b/files/awesome/themes/anemofilia-old/icons/net_up.png new file mode 100755 index 0000000..827db64 Binary files /dev/null and b/files/awesome/themes/anemofilia-old/icons/net_up.png differ diff --git a/files/awesome/themes/anemofilia-old/icons/net_up.png~ b/files/awesome/themes/anemofilia-old/icons/net_up.png~ new file mode 100755 index 0000000..395d014 Binary files /dev/null and b/files/awesome/themes/anemofilia-old/icons/net_up.png~ differ diff --git a/files/awesome/themes/anemofilia-old/icons/net_wired.png b/files/awesome/themes/anemofilia-old/icons/net_wired.png new file mode 100755 index 0000000..e8cc2bd Binary files /dev/null and b/files/awesome/themes/anemofilia-old/icons/net_wired.png differ diff --git a/files/awesome/themes/anemofilia-old/icons/note.png b/files/awesome/themes/anemofilia-old/icons/note.png new file mode 100755 index 0000000..4cadb42 Binary files /dev/null and b/files/awesome/themes/anemofilia-old/icons/note.png differ diff --git a/files/awesome/themes/anemofilia-old/icons/note_on.png b/files/awesome/themes/anemofilia-old/icons/note_on.png new file mode 100755 index 0000000..ac4c19e Binary files /dev/null and b/files/awesome/themes/anemofilia-old/icons/note_on.png differ diff --git a/files/awesome/themes/anemofilia-old/icons/scissors.png b/files/awesome/themes/anemofilia-old/icons/scissors.png new file mode 100755 index 0000000..f8c700d Binary files /dev/null and b/files/awesome/themes/anemofilia-old/icons/scissors.png differ diff --git a/files/awesome/themes/anemofilia-old/icons/spiral.png b/files/awesome/themes/anemofilia-old/icons/spiral.png new file mode 100755 index 0000000..d9ee0f6 Binary files /dev/null and b/files/awesome/themes/anemofilia-old/icons/spiral.png differ diff --git a/files/awesome/themes/anemofilia-old/icons/submenu.png b/files/awesome/themes/anemofilia-old/icons/submenu.png new file mode 100755 index 0000000..b55ebce Binary files /dev/null and b/files/awesome/themes/anemofilia-old/icons/submenu.png differ diff --git a/files/awesome/themes/anemofilia-old/icons/task.png b/files/awesome/themes/anemofilia-old/icons/task.png new file mode 100755 index 0000000..9701b68 Binary files /dev/null and b/files/awesome/themes/anemofilia-old/icons/task.png differ diff --git a/files/awesome/themes/anemofilia-old/icons/temp.png b/files/awesome/themes/anemofilia-old/icons/temp.png new file mode 100755 index 0000000..a0cf39f Binary files /dev/null and b/files/awesome/themes/anemofilia-old/icons/temp.png differ diff --git a/files/awesome/themes/anemofilia-old/icons/tile1.png b/files/awesome/themes/anemofilia-old/icons/tile1.png new file mode 100644 index 0000000..3f1b72f Binary files /dev/null and b/files/awesome/themes/anemofilia-old/icons/tile1.png differ diff --git a/files/awesome/themes/anemofilia-old/icons/tilebottom1.png b/files/awesome/themes/anemofilia-old/icons/tilebottom1.png new file mode 100644 index 0000000..03120f0 Binary files /dev/null and b/files/awesome/themes/anemofilia-old/icons/tilebottom1.png differ diff --git a/files/awesome/themes/anemofilia-old/icons/tileleft1.png b/files/awesome/themes/anemofilia-old/icons/tileleft1.png new file mode 100644 index 0000000..16b12ce Binary files /dev/null and b/files/awesome/themes/anemofilia-old/icons/tileleft1.png differ diff --git a/files/awesome/themes/anemofilia-old/icons/tiletop1.png b/files/awesome/themes/anemofilia-old/icons/tiletop1.png new file mode 100644 index 0000000..f16a015 Binary files /dev/null and b/files/awesome/themes/anemofilia-old/icons/tiletop1.png differ diff --git a/files/awesome/themes/anemofilia-old/icons/titlebar/close_focus.png b/files/awesome/themes/anemofilia-old/icons/titlebar/close_focus.png new file mode 100755 index 0000000..b2051b0 Binary files /dev/null and b/files/awesome/themes/anemofilia-old/icons/titlebar/close_focus.png differ diff --git a/files/awesome/themes/anemofilia-old/icons/titlebar/close_normal.png b/files/awesome/themes/anemofilia-old/icons/titlebar/close_normal.png new file mode 100755 index 0000000..da6028c Binary files /dev/null and b/files/awesome/themes/anemofilia-old/icons/titlebar/close_normal.png differ diff --git a/files/awesome/themes/anemofilia-old/icons/titlebar/floating_focus_active.png b/files/awesome/themes/anemofilia-old/icons/titlebar/floating_focus_active.png new file mode 100755 index 0000000..5fe84c0 Binary files /dev/null and b/files/awesome/themes/anemofilia-old/icons/titlebar/floating_focus_active.png differ diff --git a/files/awesome/themes/anemofilia-old/icons/titlebar/floating_focus_inactive.png b/files/awesome/themes/anemofilia-old/icons/titlebar/floating_focus_inactive.png new file mode 100755 index 0000000..47f19f6 Binary files /dev/null and b/files/awesome/themes/anemofilia-old/icons/titlebar/floating_focus_inactive.png differ diff --git a/files/awesome/themes/anemofilia-old/icons/titlebar/floating_normal_active.png b/files/awesome/themes/anemofilia-old/icons/titlebar/floating_normal_active.png new file mode 100755 index 0000000..576fa36 Binary files /dev/null and b/files/awesome/themes/anemofilia-old/icons/titlebar/floating_normal_active.png differ diff --git a/files/awesome/themes/anemofilia-old/icons/titlebar/floating_normal_inactive.png b/files/awesome/themes/anemofilia-old/icons/titlebar/floating_normal_inactive.png new file mode 100755 index 0000000..4adc5e9 Binary files /dev/null and b/files/awesome/themes/anemofilia-old/icons/titlebar/floating_normal_inactive.png differ diff --git a/files/awesome/themes/anemofilia-old/icons/titlebar/maximized_focus_active.png b/files/awesome/themes/anemofilia-old/icons/titlebar/maximized_focus_active.png new file mode 100755 index 0000000..7d9a11a Binary files /dev/null and b/files/awesome/themes/anemofilia-old/icons/titlebar/maximized_focus_active.png differ diff --git a/files/awesome/themes/anemofilia-old/icons/titlebar/maximized_focus_inactive.png b/files/awesome/themes/anemofilia-old/icons/titlebar/maximized_focus_inactive.png new file mode 100755 index 0000000..bce1d00 Binary files /dev/null and b/files/awesome/themes/anemofilia-old/icons/titlebar/maximized_focus_inactive.png differ diff --git a/files/awesome/themes/anemofilia-old/icons/titlebar/maximized_normal_active.png b/files/awesome/themes/anemofilia-old/icons/titlebar/maximized_normal_active.png new file mode 100755 index 0000000..9f24945 Binary files /dev/null and b/files/awesome/themes/anemofilia-old/icons/titlebar/maximized_normal_active.png differ diff --git a/files/awesome/themes/anemofilia-old/icons/titlebar/maximized_normal_inactive.png b/files/awesome/themes/anemofilia-old/icons/titlebar/maximized_normal_inactive.png new file mode 100755 index 0000000..2e56d32 Binary files /dev/null and b/files/awesome/themes/anemofilia-old/icons/titlebar/maximized_normal_inactive.png differ diff --git a/files/awesome/themes/anemofilia-old/icons/titlebar/ontop_focus_active.png b/files/awesome/themes/anemofilia-old/icons/titlebar/ontop_focus_active.png new file mode 100755 index 0000000..41a69e2 Binary files /dev/null and b/files/awesome/themes/anemofilia-old/icons/titlebar/ontop_focus_active.png differ diff --git a/files/awesome/themes/anemofilia-old/icons/titlebar/ontop_focus_inactive.png b/files/awesome/themes/anemofilia-old/icons/titlebar/ontop_focus_inactive.png new file mode 100755 index 0000000..2f3a2be Binary files /dev/null and b/files/awesome/themes/anemofilia-old/icons/titlebar/ontop_focus_inactive.png differ diff --git a/files/awesome/themes/anemofilia-old/icons/titlebar/ontop_normal_active.png b/files/awesome/themes/anemofilia-old/icons/titlebar/ontop_normal_active.png new file mode 100755 index 0000000..0f937b7 Binary files /dev/null and b/files/awesome/themes/anemofilia-old/icons/titlebar/ontop_normal_active.png differ diff --git a/files/awesome/themes/anemofilia-old/icons/titlebar/ontop_normal_inactive.png b/files/awesome/themes/anemofilia-old/icons/titlebar/ontop_normal_inactive.png new file mode 100755 index 0000000..a9a3206 Binary files /dev/null and b/files/awesome/themes/anemofilia-old/icons/titlebar/ontop_normal_inactive.png differ diff --git a/files/awesome/themes/anemofilia-old/icons/titlebar/sticky_focus_active.png b/files/awesome/themes/anemofilia-old/icons/titlebar/sticky_focus_active.png new file mode 100755 index 0000000..a9bc8a2 Binary files /dev/null and b/files/awesome/themes/anemofilia-old/icons/titlebar/sticky_focus_active.png differ diff --git a/files/awesome/themes/anemofilia-old/icons/titlebar/sticky_focus_inactive.png b/files/awesome/themes/anemofilia-old/icons/titlebar/sticky_focus_inactive.png new file mode 100755 index 0000000..5493d8e Binary files /dev/null and b/files/awesome/themes/anemofilia-old/icons/titlebar/sticky_focus_inactive.png differ diff --git a/files/awesome/themes/anemofilia-old/icons/titlebar/sticky_normal_active.png b/files/awesome/themes/anemofilia-old/icons/titlebar/sticky_normal_active.png new file mode 100755 index 0000000..1e150f5 Binary files /dev/null and b/files/awesome/themes/anemofilia-old/icons/titlebar/sticky_normal_active.png differ diff --git a/files/awesome/themes/anemofilia-old/icons/titlebar/sticky_normal_inactive.png b/files/awesome/themes/anemofilia-old/icons/titlebar/sticky_normal_inactive.png new file mode 100755 index 0000000..7e6c99b Binary files /dev/null and b/files/awesome/themes/anemofilia-old/icons/titlebar/sticky_normal_inactive.png differ diff --git a/files/awesome/themes/anemofilia-old/icons/vol.png b/files/awesome/themes/anemofilia-old/icons/vol.png new file mode 100644 index 0000000..17335e7 Binary files /dev/null and b/files/awesome/themes/anemofilia-old/icons/vol.png differ diff --git a/files/awesome/themes/anemofilia-old/icons/vol.png~ b/files/awesome/themes/anemofilia-old/icons/vol.png~ new file mode 100644 index 0000000..7c3be43 Binary files /dev/null and b/files/awesome/themes/anemofilia-old/icons/vol.png~ differ diff --git a/files/awesome/themes/anemofilia-old/icons/vol_low.png b/files/awesome/themes/anemofilia-old/icons/vol_low.png new file mode 100644 index 0000000..2c78312 Binary files /dev/null and b/files/awesome/themes/anemofilia-old/icons/vol_low.png differ diff --git a/files/awesome/themes/anemofilia-old/icons/vol_low.png~ b/files/awesome/themes/anemofilia-old/icons/vol_low.png~ new file mode 100644 index 0000000..c85a146 Binary files /dev/null and b/files/awesome/themes/anemofilia-old/icons/vol_low.png~ differ diff --git a/files/awesome/themes/anemofilia-old/icons/vol_mute.png b/files/awesome/themes/anemofilia-old/icons/vol_mute.png new file mode 100644 index 0000000..bb6e4cb Binary files /dev/null and b/files/awesome/themes/anemofilia-old/icons/vol_mute.png differ diff --git a/files/awesome/themes/anemofilia-old/icons/vol_mute.png~ b/files/awesome/themes/anemofilia-old/icons/vol_mute.png~ new file mode 100644 index 0000000..8f3b431 Binary files /dev/null and b/files/awesome/themes/anemofilia-old/icons/vol_mute.png~ differ diff --git a/files/awesome/themes/anemofilia-old/icons/vol_no.png b/files/awesome/themes/anemofilia-old/icons/vol_no.png new file mode 100644 index 0000000..8576456 Binary files /dev/null and b/files/awesome/themes/anemofilia-old/icons/vol_no.png differ diff --git a/files/awesome/themes/anemofilia-old/icons/vol_no.png~ b/files/awesome/themes/anemofilia-old/icons/vol_no.png~ new file mode 100644 index 0000000..0649889 Binary files /dev/null and b/files/awesome/themes/anemofilia-old/icons/vol_no.png~ differ diff --git a/files/awesome/themes/anemofilia-old/theme.lua b/files/awesome/themes/anemofilia-old/theme.lua new file mode 100644 index 0000000..e10956c --- /dev/null +++ b/files/awesome/themes/anemofilia-old/theme.lua @@ -0,0 +1,380 @@ +--[[ + _ __ _ _ _ _ _ + / \ _ __ ___ _ __ ___ ___ / _(_| (_) __ _ | |_| |__ ___ _ __ ___ ___ + / _ \ | '_ \ / _ | '_ ` _ \ / _ \| |_| | | |/ _` | | __| '_ \ / _ | '_ ` _ \ / _ \ + / ___ \| | | | __| | | | | | (_) | _| | | | (_| | | |_| | | | __| | | | | | __/ +/_/ \_|_| |_|\___|_| |_| |_|\___/|_| |_|_|_|\__,_| \__|_| |_|\___|_| |_| |_|\___| + + +--]] +local gears = require("gears") +local lain = require("lain") +local awful = require("awful") +local wibox = require("wibox") +local dpi = require("beautiful.xresources").apply_dpi + +local os = os +local my_table = awful.util.table or gears.table -- 4.{0,1} compatibility + +local theme = {} +theme.dir = os.getenv("HOME") .. "/.config/awesome/themes/anemofilia" +theme.wallpaper = os.getenv("HOME") .. "Pictures/Wallpapers/\wall" --theme.dir .. "/wall.png" +theme.font = "Meslo LG M DZ 9" +theme.fg_normal = "#DDDDDD" +theme.fg_focus = "#8581E0"--"#EA6F81" +theme.fg_urgent = "#DCE081"--"#CC9393" +theme.bg_normal = "#1A1A1A" +theme.bg_focus = "#313131" +theme.bg_urgent = "#1A1A1A" +theme.border_width = dpi(1) +theme.border_normal = "#3F3F3F" +theme.border_focus = "#8581E0"--"#7F7F7F" +theme.border_marked = "#CC9393" +theme.tasklist_bg_focus = "#1A1A1A" +theme.titlebar_bg_focus = theme.bg_focus +theme.titlebar_bg_normal = theme.bg_normal +theme.titlebar_fg_focus = theme.fg_focus +theme.menu_height = dpi(20) +theme.menu_width = dpi(140) +theme.menu_submenu_icon = theme.dir .. "/icons/submenu.png" +theme.taglist_squares_sel = theme.dir .. "/icons/square_sel.png" +theme.taglist_squares_unsel = theme.dir .. "/icons/square_unsel.png" +theme.layout_tile = theme.dir .. "/icons/tile1.png" +theme.layout_tileleft = theme.dir .. "/icons/tileleft1.png" +theme.layout_tilebottom = theme.dir .. "/icons/tilebottom1.png" +theme.layout_tiletop = theme.dir .. "/icons/tiletop1.png" +theme.layout_fairv = theme.dir .. "/icons/fairv.png" +theme.layout_fairh = theme.dir .. "/icons/fairh.png" +theme.layout_spiral = theme.dir .. "/icons/spiral.png" +theme.layout_dwindle = theme.dir .. "/icons/dwindle.png" +theme.layout_max = theme.dir .. "/icons/max.png" +theme.layout_fullscreen = theme.dir .. "/icons/fullscreen.png" +theme.layout_magnifier = theme.dir .. "/icons/magnifier.png" +theme.layout_floating = theme.dir .. "/icons/floating1.png" +theme.widget_ac = theme.dir .. "/icons/ac.png" +theme.widget_battery_100 = theme.dir .. "/icons/battery_100.png" +theme.widget_battery_80 = theme.dir .. "/icons/battery_80.png" +theme.widget_battery_60 = theme.dir .. "/icons/battery_60.png" +theme.widget_battery_40 = theme.dir .. "/icons/battery_40.png" +theme.widget_battery_20 = theme.dir .. "/icons/battery_20.png" +theme.widget_mem = theme.dir .. "/icons/mem.png" +theme.widget_cpu = theme.dir .. "/icons/cpu.png" +theme.widget_temp = theme.dir .. "/icons/temp.png" +theme.widget_netdown = theme.dir .. "/icons/net_down.png" +theme.widget_netup = theme.dir .. "/icons/net_up.png" +theme.widget_hdd = theme.dir .. "/icons/hdd.png" +theme.widget_music = theme.dir .. "/icons/note.png" +theme.widget_music_on = theme.dir .. "/icons/note_on.png" +theme.widget_vol = theme.dir .. "/icons/vol.png" +theme.widget_vol_low = theme.dir .. "/icons/vol_low.png" +theme.widget_vol_no = theme.dir .. "/icons/vol_no.png" +theme.widget_vol_mute = theme.dir .. "/icons/vol_mute.png" +theme.widget_mail = theme.dir .. "/icons/mail.png" +theme.widget_mail_on = theme.dir .. "/icons/mail_on.png" +theme.tasklist_plain_task_name = false +theme.tasklist_disable_icon = true +theme.gap_single_client = true +theme.useless_gap = dpi(4) +theme.titlebar_close_button_focus = theme.dir .. "/icons/titlebar/close_focus.png" +theme.titlebar_close_button_normal = theme.dir .. "/icons/titlebar/close_normal.png" +theme.titlebar_ontop_button_focus_active = theme.dir .. "/icons/titlebar/ontop_focus_active.png" +theme.titlebar_ontop_button_normal_active = theme.dir .. "/icons/titlebar/ontop_normal_active.png" +theme.titlebar_ontop_button_focus_inactive = theme.dir .. "/icons/titlebar/ontop_focus_inactive.png" +theme.titlebar_ontop_button_normal_inactive = theme.dir .. "/icons/titlebar/ontop_normal_inactive.png" +theme.titlebar_sticky_button_focus_active = theme.dir .. "/icons/titlebar/sticky_focus_active.png" +theme.titlebar_sticky_button_normal_active = theme.dir .. "/icons/titlebar/sticky_normal_active.png" +theme.titlebar_sticky_button_focus_inactive = theme.dir .. "/icons/titlebar/sticky_focus_inactive.png" +theme.titlebar_sticky_button_normal_inactive = theme.dir .. "/icons/titlebar/sticky_normal_inactive.png" +theme.titlebar_floating_button_focus_active = theme.dir .. "/icons/titlebar/floating_focus_active.png" +theme.titlebar_floating_button_normal_active = theme.dir .. "/icons/titlebar/floating_normal_active.png" +theme.titlebar_floating_button_focus_inactive = theme.dir .. "/icons/titlebar/floating_focus_inactive.png" +theme.titlebar_floating_button_normal_inactive = theme.dir .. "/icons/titlebar/floating_normal_inactive.png" +theme.titlebar_maximized_button_focus_active = theme.dir .. "/icons/titlebar/maximized_focus_active.png" +theme.titlebar_maximized_button_normal_active = theme.dir .. "/icons/titlebar/maximized_normal_active.png" +theme.titlebar_maximized_button_focus_inactive = theme.dir .. "/icons/titlebar/maximized_focus_inactive.png" +theme.titlebar_maximized_button_normal_inactive = theme.dir .. "/icons/titlebar/maximized_normal_inactive.png" + +local markup = lain.util.markup +local separators = lain.util.separators + +local mykeyboardlayout = awful.widget.keyboardlayout:new() + +-- Textclock +local clockicon = wibox.widget.imagebox(theme.widget_clock) +local clock = awful.widget.watch( + "date +'%a %d %b %R'", 60, + function(widget, stdout) + widget:set_markup(" " .. markup.font(theme.font, stdout)) + end +) + +-- Calendar +theme.cal = lain.widget.cal({ + icons = "", + attach_to = { clock }, + notification_preset = { + font = theme.font, + fg = theme.fg_normal, + bg = theme.bg_normal + } +}) +--]]-- + +-- Mail IMAP check +local mailicon = wibox.widget.imagebox(theme.widget_mail) +--[[ commented because it needs to be set before use +mailicon:buttons(my_table.join(awful.button({ }, 1, function () awful.spawn(mail) end))) +theme.mail = lain.widget.imap({ + timeout = 180, + server = "server", + mail = "luisguilhermecoelho@usp.br", + password = "ZeugmaTau-6,283Anemofilia", + settings = function() + if mailcount > 0 then + widget:set_markup(markup.font(theme.font, " " .. mailcount .. " ")) + mailicon:set_image(theme.widget_mail_on) + else + widget:set_text("") + mailicon:set_image(theme.widget_mail) + end + end +}) +--]] + +-- MPD +local musicplr = awful.util.terminal .. " -title Music -g 130x34-320+16 -e ncmpcpp" +local mpdicon = wibox.widget.imagebox(theme.widget_music) +mpdicon:buttons(my_table.join( + awful.button({ modkey }, 1, function () awful.spawn.with_shell(musicplr) end), + awful.button({ }, 1, function () + os.execute("mpc prev") + theme.mpd.update() + end), + awful.button({ }, 2, function () + os.execute("mpc toggle") + theme.mpd.update() + end), + awful.button({ }, 3, function () + os.execute("mpc next") + theme.mpd.update() + end))) +theme.mpd = lain.widget.mpd({ + settings = function() + if mpd_now.state == "play" then + artist = mpd_now.artist .. " " + title = mpd_now.title .. " " + mpdicon:set_image(theme.widget_music_on) + elseif mpd_now.state == "pause" then + artist = "mpd " + title = "paused " + else + artist = "" + title = "" + mpdicon:set_image(theme.widget_music) + end + + widget:set_markup(markup.font(theme.font, markup("#EA6F81", artist) .. title)) + 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 +}) + +-- 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 +}) + +-- Coretemp +local tempicon = wibox.widget.imagebox(theme.widget_temp) +local temp = lain.widget.temp({ + settings = function() + widget:set_markup(markup.font(theme.font, math.ceil(coretemp_now) .. "°C ")) + end +}) + +-- / fs +local fsicon = wibox.widget.imagebox(theme.widget_hdd) +--[[ commented because it needs Gio/Glib >= 2.54 +theme.fs = lain.widget.fs({ + notification_preset = { fg = theme.fg_normal, bg = theme.bg_normal, font = "Terminus 10" }, + settings = function() + widget:set_markup(markup.font(theme.font, " " .. fs_now["/"].percentage .. "% ")) + 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 bat_now.perc and tonumber(bat_now.perc) < 25 then + baticon:set_image(theme.widget_battery_20) + elseif bat_now.perc and tonumber(bat_now.perc) < 45 then + baticon:set_image(theme.widget_battery_40) + elseif bat_now.perc and tonumber(bat_now.perc) < 65 then + baticon:set_image(theme.widget_battery_60) + elseif bat_now.perc and tonumber(bat_now.perc) < 85 then + baticon:set_image(theme.widget_battery_80) + else + baticon:set_image(theme.widget_battery_100) + 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 +}) + +-- 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) +)) + +-- Net +local netdownicon = wibox.widget.imagebox(theme.widget_netdown) +local netdowninfo = wibox.widget.textbox() +local netupicon = wibox.widget.imagebox(theme.widget_netup) +local netupinfo = lain.widget.net({ + settings = function() + widget:set_markup(markup.font(theme.font, net_now.sent .. " ")) + netdowninfo:set_markup(markup.font(theme.font, net_now.received .. " ")) + end +}) + +-- System tray +local systray = wibox.widget.systray() +systray:set_base_size(20) +systray:set_reverse(true) + +-- Separators +local spr = wibox.widget.textbox(' ') +local arrl_dl = separators.arrow_left(theme.bg_focus, "alpha") +local arrl_ld = separators.arrow_left("alpha", theme.bg_focus) + +function theme.at_screen_connect(s) + -- Quake application + s.quake = lain.util.quake({ app = awful.util.terminal }) + + -- If wallpaper is a function, call it with the screen + local wallpaper = theme.wallpaper + if type(wallpaper) == "function" then + wallpaper = wallpaper(s) + end + gears.wallpaper.maximized(wallpaper, s, true) + + -- Tags + awful.tag(awful.util.tagnames, s, awful.layout.layouts) + + -- Create a promptbox for each screen + s.mypromptbox = awful.widget.prompt() + -- Create an imagebox widget which will contains an icon indicating which layout we're using. + -- We need one layoutbox per screen. + s.mylayoutbox = awful.widget.layoutbox(s) + s.mylayoutbox:buttons(my_table.join( + awful.button({}, 1, function () awful.layout.inc( 1) end), + awful.button({}, 2, function () awful.layout.set( awful.layout.layouts[1] ) end), + awful.button({}, 3, function () awful.layout.inc(-1) end), + awful.button({}, 4, function () awful.layout.inc( 1) end), + awful.button({}, 5, function () awful.layout.inc(-1) end))) + -- Create a taglist widget + s.mytaglist = awful.widget.taglist(s, awful.widget.taglist.filter.all, awful.util.taglist_buttons) + + -- Create a tasklist widget + s.mytasklist = awful.widget.tasklist(s, awful.widget.tasklist.filter.currenttags, awful.util.tasklist_buttons) + + -- Create the wibox + s.mywibox = awful.wibar({ position = "top", screen = s, height = dpi(19), bg = theme.bg_normal, fg = theme.fg_normal }) + + -- Add widgets to the wibox + s.mywibox:setup { + layout = wibox.layout.align.horizontal, + { -- Left widgets + layout = wibox.layout.fixed.horizontal, + --spr, + s.mytaglist, + s.mypromptbox, + spr, + }, + s.mytasklist, -- Middle widget + { -- Right widgets + layout = wibox.layout.fixed.horizontal, + --systray, + spr, + --arrl_dl, + --wibox.container.background(mpdicon, theme.bg_focus), + --wibox.container.background(theme.mpd.widget, theme.bg_focus), + arrl_ld, + --wibox.container.background(mailicon, theme.bg_focus), + --wibox.container.background(theme.mail.widget, theme.bg_focus), + wibox.container.background(netdownicon, theme.bg_focus), + wibox.container.background(netdowninfo, theme.bg_focus), + wibox.container.background(netupicon, theme.bg_focus), + wibox.container.background(netupinfo.widget, theme.bg_focus), + arrl_dl, + wibox.container.background(memicon, theme.bg_normal), + wibox.container.background(mem.widget, theme.bg_normal), + arrl_ld, + wibox.container.background(cpuicon, theme.bg_focus), + wibox.container.background(cpu.widget, theme.bg_focus), + arrl_dl, + wibox.container.background(tempicon, theme.bg_normal), + wibox.container.background(temp.widget, theme.bg_normal), + arrl_ld, + --wibox.container.background(fsicon, theme.bg_focus), + --wibox.container.background(theme.fs.widget, theme.bg_focus), + --arrl_dl, + wibox.container.background(volicon, theme.bg_focus), + wibox.container.background(theme.volume.widget, theme.bg_focus), + arrl_dl, + wibox.container.background(baticon, theme.bg_normal), + wibox.container.background(bat.widget, theme.bg_normal), + arrl_ld, + --wibox.container.background(neticon, theme.bg_focus), + --wibox.container.background(net.widget, theme.bg_focus), + --arrl_dl, + wibox.container.background(clock, theme.bg_focus), + wibox.container.background(spr, theme.bg_focus), + arrl_dl, + wibox.container.background(s.mylayoutbox, theme.bg_normal), + + }, + } +end + +return theme diff --git a/files/awesome/themes/anemofilia-old/wall.png b/files/awesome/themes/anemofilia-old/wall.png new file mode 100644 index 0000000..3d4d2e0 Binary files /dev/null and b/files/awesome/themes/anemofilia-old/wall.png differ diff --git a/files/awesome/themes/anemofilia/anemofilia-background.png b/files/awesome/themes/anemofilia/anemofilia-background.png new file mode 100644 index 0000000..7ab8fd3 Binary files /dev/null and b/files/awesome/themes/anemofilia/anemofilia-background.png differ diff --git a/files/awesome/themes/anemofilia/awesome-icon.png b/files/awesome/themes/anemofilia/awesome-icon.png new file mode 100644 index 0000000..70978d3 Binary files /dev/null and b/files/awesome/themes/anemofilia/awesome-icon.png differ diff --git a/files/awesome/themes/anemofilia/icons/ac.png b/files/awesome/themes/anemofilia/icons/ac.png new file mode 100755 index 0000000..92c74fd Binary files /dev/null and b/files/awesome/themes/anemofilia/icons/ac.png differ diff --git a/files/awesome/themes/anemofilia/icons/battery_100.png b/files/awesome/themes/anemofilia/icons/battery_100.png new file mode 100644 index 0000000..428b4ed Binary files /dev/null and b/files/awesome/themes/anemofilia/icons/battery_100.png differ diff --git a/files/awesome/themes/anemofilia/icons/battery_20.png b/files/awesome/themes/anemofilia/icons/battery_20.png new file mode 100644 index 0000000..8e4305f Binary files /dev/null and b/files/awesome/themes/anemofilia/icons/battery_20.png differ diff --git a/files/awesome/themes/anemofilia/icons/battery_40.png b/files/awesome/themes/anemofilia/icons/battery_40.png new file mode 100644 index 0000000..ad6fc38 Binary files /dev/null and b/files/awesome/themes/anemofilia/icons/battery_40.png differ diff --git a/files/awesome/themes/anemofilia/icons/battery_60.png b/files/awesome/themes/anemofilia/icons/battery_60.png new file mode 100644 index 0000000..f7c6d78 Binary files /dev/null and b/files/awesome/themes/anemofilia/icons/battery_60.png differ diff --git a/files/awesome/themes/anemofilia/icons/battery_80.png b/files/awesome/themes/anemofilia/icons/battery_80.png new file mode 100644 index 0000000..7f31597 Binary files /dev/null and b/files/awesome/themes/anemofilia/icons/battery_80.png differ diff --git a/files/awesome/themes/anemofilia/icons/battery_empty.png b/files/awesome/themes/anemofilia/icons/battery_empty.png new file mode 100755 index 0000000..b841ace Binary files /dev/null and b/files/awesome/themes/anemofilia/icons/battery_empty.png differ diff --git a/files/awesome/themes/anemofilia/icons/cpu.png b/files/awesome/themes/anemofilia/icons/cpu.png new file mode 100755 index 0000000..e493262 Binary files /dev/null and b/files/awesome/themes/anemofilia/icons/cpu.png differ diff --git a/files/awesome/themes/anemofilia/icons/mail.png b/files/awesome/themes/anemofilia/icons/mail.png new file mode 100755 index 0000000..75a02fb Binary files /dev/null and b/files/awesome/themes/anemofilia/icons/mail.png differ diff --git a/files/awesome/themes/anemofilia/icons/mail_on.png b/files/awesome/themes/anemofilia/icons/mail_on.png new file mode 100755 index 0000000..168c289 Binary files /dev/null and b/files/awesome/themes/anemofilia/icons/mail_on.png differ diff --git a/files/awesome/themes/anemofilia/icons/mail_on.png~ b/files/awesome/themes/anemofilia/icons/mail_on.png~ new file mode 100755 index 0000000..d5a15b2 Binary files /dev/null and b/files/awesome/themes/anemofilia/icons/mail_on.png~ differ diff --git a/files/awesome/themes/anemofilia/icons/mem.png b/files/awesome/themes/anemofilia/icons/mem.png new file mode 100755 index 0000000..5b2910e Binary files /dev/null and b/files/awesome/themes/anemofilia/icons/mem.png differ diff --git a/files/awesome/themes/anemofilia/icons/net_down.png b/files/awesome/themes/anemofilia/icons/net_down.png new file mode 100755 index 0000000..a7e76ae Binary files /dev/null and b/files/awesome/themes/anemofilia/icons/net_down.png differ diff --git a/files/awesome/themes/anemofilia/icons/net_up.png b/files/awesome/themes/anemofilia/icons/net_up.png new file mode 100755 index 0000000..827db64 Binary files /dev/null and b/files/awesome/themes/anemofilia/icons/net_up.png differ diff --git a/files/awesome/themes/anemofilia/icons/net_wired.png b/files/awesome/themes/anemofilia/icons/net_wired.png new file mode 100755 index 0000000..e8cc2bd Binary files /dev/null and b/files/awesome/themes/anemofilia/icons/net_wired.png differ diff --git a/files/awesome/themes/anemofilia/icons/note.png b/files/awesome/themes/anemofilia/icons/note.png new file mode 100755 index 0000000..4cadb42 Binary files /dev/null and b/files/awesome/themes/anemofilia/icons/note.png differ diff --git a/files/awesome/themes/anemofilia/icons/note_on.png b/files/awesome/themes/anemofilia/icons/note_on.png new file mode 100755 index 0000000..0013fd9 Binary files /dev/null and b/files/awesome/themes/anemofilia/icons/note_on.png differ diff --git a/files/awesome/themes/anemofilia/icons/note_on.png~ b/files/awesome/themes/anemofilia/icons/note_on.png~ new file mode 100755 index 0000000..ac4c19e Binary files /dev/null and b/files/awesome/themes/anemofilia/icons/note_on.png~ differ diff --git a/files/awesome/themes/anemofilia/icons/screenlog.0 b/files/awesome/themes/anemofilia/icons/screenlog.0 new file mode 100644 index 0000000..e69de29 diff --git a/files/awesome/themes/anemofilia/icons/temp.png b/files/awesome/themes/anemofilia/icons/temp.png new file mode 100755 index 0000000..a0cf39f Binary files /dev/null and b/files/awesome/themes/anemofilia/icons/temp.png differ diff --git a/files/awesome/themes/anemofilia/icons/vol.png b/files/awesome/themes/anemofilia/icons/vol.png new file mode 100644 index 0000000..a22a620 Binary files /dev/null and b/files/awesome/themes/anemofilia/icons/vol.png differ diff --git a/files/awesome/themes/anemofilia/icons/vol_low.png b/files/awesome/themes/anemofilia/icons/vol_low.png new file mode 100644 index 0000000..2c78312 Binary files /dev/null and b/files/awesome/themes/anemofilia/icons/vol_low.png differ diff --git a/files/awesome/themes/anemofilia/icons/vol_mute.png b/files/awesome/themes/anemofilia/icons/vol_mute.png new file mode 100644 index 0000000..bb6e4cb Binary files /dev/null and b/files/awesome/themes/anemofilia/icons/vol_mute.png differ diff --git a/files/awesome/themes/anemofilia/icons/vol_no.png b/files/awesome/themes/anemofilia/icons/vol_no.png new file mode 100644 index 0000000..8576456 Binary files /dev/null and b/files/awesome/themes/anemofilia/icons/vol_no.png differ diff --git a/files/awesome/themes/anemofilia/layouts/fairv.png b/files/awesome/themes/anemofilia/layouts/fairv.png new file mode 100755 index 0000000..13c4836 Binary files /dev/null and b/files/awesome/themes/anemofilia/layouts/fairv.png differ diff --git a/files/awesome/themes/anemofilia/layouts/farih.png b/files/awesome/themes/anemofilia/layouts/farih.png new file mode 100644 index 0000000..66b7125 Binary files /dev/null and b/files/awesome/themes/anemofilia/layouts/farih.png differ diff --git a/files/awesome/themes/anemofilia/layouts/floating.png b/files/awesome/themes/anemofilia/layouts/floating.png new file mode 100644 index 0000000..05cca28 Binary files /dev/null and b/files/awesome/themes/anemofilia/layouts/floating.png differ diff --git a/files/awesome/themes/anemofilia/layouts/max.png b/files/awesome/themes/anemofilia/layouts/max.png new file mode 100755 index 0000000..0cba687 Binary files /dev/null and b/files/awesome/themes/anemofilia/layouts/max.png differ diff --git a/files/awesome/themes/anemofilia/layouts/tile.png b/files/awesome/themes/anemofilia/layouts/tile.png new file mode 100644 index 0000000..3f1b72f Binary files /dev/null and b/files/awesome/themes/anemofilia/layouts/tile.png differ diff --git a/files/awesome/themes/anemofilia/layouts/tilebottom.png b/files/awesome/themes/anemofilia/layouts/tilebottom.png new file mode 100644 index 0000000..03120f0 Binary files /dev/null and b/files/awesome/themes/anemofilia/layouts/tilebottom.png differ diff --git a/files/awesome/themes/anemofilia/layouts/tileleft.png b/files/awesome/themes/anemofilia/layouts/tileleft.png new file mode 100644 index 0000000..16b12ce Binary files /dev/null and b/files/awesome/themes/anemofilia/layouts/tileleft.png differ diff --git a/files/awesome/themes/anemofilia/layouts/tiletop.png b/files/awesome/themes/anemofilia/layouts/tiletop.png new file mode 100644 index 0000000..f16a015 Binary files /dev/null and b/files/awesome/themes/anemofilia/layouts/tiletop.png differ diff --git a/files/awesome/themes/anemofilia/taglist/square_sel.png b/files/awesome/themes/anemofilia/taglist/square_sel.png new file mode 100644 index 0000000..2ebe2bb Binary files /dev/null and b/files/awesome/themes/anemofilia/taglist/square_sel.png differ diff --git a/files/awesome/themes/anemofilia/taglist/square_unsel.png b/files/awesome/themes/anemofilia/taglist/square_unsel.png new file mode 100644 index 0000000..4e9ef5d Binary files /dev/null and b/files/awesome/themes/anemofilia/taglist/square_unsel.png differ diff --git a/files/awesome/themes/anemofilia/taglist/squarefz.png b/files/awesome/themes/anemofilia/taglist/squarefz.png new file mode 100644 index 0000000..0927720 Binary files /dev/null and b/files/awesome/themes/anemofilia/taglist/squarefz.png differ diff --git a/files/awesome/themes/anemofilia/taglist/squarez.png b/files/awesome/themes/anemofilia/taglist/squarez.png new file mode 100644 index 0000000..9b41c26 Binary files /dev/null and b/files/awesome/themes/anemofilia/taglist/squarez.png differ diff --git a/files/awesome/themes/anemofilia/theme.lua b/files/awesome/themes/anemofilia/theme.lua new file mode 100644 index 0000000..7239bae --- /dev/null +++ b/files/awesome/themes/anemofilia/theme.lua @@ -0,0 +1,143 @@ +--[[ +░█████╗░███╗░░██╗███████╗███╗░░░███╗░█████╗░███████╗██╗██╗░░░░░██╗░█████╗░ +██╔══██╗████╗░██║██╔════╝████╗░████║██╔══██╗██╔════╝██║██║░░░░░██║██╔══██╗ +███████║██╔██╗██║█████╗░░██╔████╔██║██║░░██║█████╗░░██║██║░░░░░██║███████║ +██╔══██║██║╚████║██╔══╝░░██║╚██╔╝██║██║░░██║██╔══╝░░██║██║░░░░░██║██╔══██║ +██║░░██║██║░╚███║███████╗██║░╚═╝░██║╚█████╔╝██║░░░░░██║███████╗██║██║░░██║ +╚═╝░░╚═╝╚═╝░░╚══╝╚══════╝╚═╝░░░░░╚═╝░╚════╝░╚═╝░░░░░╚═╝╚══════╝╚═╝╚═╝░░╚═╝ +▀▀█▀▀ █░░█ █▀▀ █▀▄▀█ █▀▀ +░░█░░ █▀▀█ █▀▀ █░▀░█ █▀▀ +░░▀░░ ▀░░▀ ▀▀▀ ▀░░░▀ ▀▀▀ +-]] + +local themes_path = require("gears.filesystem").get_dir("config").."/themes/" +local rnotification = require("ruled.notification") +local dpi = require("beautiful.xresources").apply_dpi + +-- {{{ Main +local theme = {} +theme.dir = themes_path .. "anemofilia" +theme.wallpaper = theme.dir .. "/anemofilia-background.png" +-- }}} + +-- {{{ Styles +theme.font = "Meslo LG M DZ 9" +theme.notification_font = theme.font +-- }}} + +-- {{{ Colors +theme.fg_normal = "#DDDDDD" +theme.fg_focus = "#8581E0" +theme.fg_urgent = "#DCE081" +theme.bg_normal = "#1A1A1A" +theme.bg_focus = "#313131" +theme.bg_urgent = "#1A1A1A" +theme.bg_systray = theme.bg_normal +theme.tasklist_bg_focus = theme.bg_normal +-- }}} + +-- Tasklist +--theme.tasklist_plain_task_name = true +theme.tasklist_disable_icon = true + +-- {{{ Borders +theme.useless_gap = dpi(4) +theme.border_width = dpi(1) +theme.border_color_normal = "#3F3F3F" +theme.border_color_active = "#8581E0" +theme.border_color_marked = "#CC9393" +-- }}} + +-- {{{ Titlebars +theme.titlebar_bg_focus = "#3F3F3F" +theme.titlebar_bg_normal = "#3F3F3F" +-- }}} + +-- {{{ Wibox icons + theme.widget_ac = theme.dir .. "/icons/ac.png" + theme.widget_battery_100 = theme.dir .. "/icons/battery_100.png" + theme.widget_battery_80 = theme.dir .. "/icons/battery_80.png" + theme.widget_battery_60 = theme.dir .. "/icons/battery_60.png" + theme.widget_battery_40 = theme.dir .. "/icons/battery_40.png" + theme.widget_battery_20 = theme.dir .. "/icons/battery_20.png" + theme.widget_mem = theme.dir .. "/icons/mem.png" + theme.widget_cpu = theme.dir .. "/icons/cpu.png" + theme.widget_temp = theme.dir .. "/icons/temp.png" + theme.widget_netdown = theme.dir .. "/icons/net_down.png" + theme.widget_netup = theme.dir .. "/icons/net_up.png" + theme.widget_hdd = theme.dir .. "/icons/hdd.png" + theme.widget_music = theme.dir .. "/icons/note.png" + theme.widget_music_on = theme.dir .. "/icons/note_on.png" + theme.widget_vol = theme.dir .. "/icons/vol.png" + theme.widget_vol_low = theme.dir .. "/icons/vol_low.png" + theme.widget_vol_no = theme.dir .. "/icons/vol_no.png" + theme.widget_vol_mute = theme.dir .. "/icons/vol_mute.png" +-- }}} + +-- There are other variable sets +-- overriding the default one when +-- defined, the sets are: +-- [taglist|tasklist]_[bg|fg]_[focus|urgent|occupied|empty|volatile] +-- titlebar_[normal|focus] +-- tooltip_[font|opacity|fg_color|bg_color|border_width|border_color] +-- Example: +--theme.taglist_bg_focus = "#CC9393" +-- }}} + +-- {{{ Widgets +-- You can add as many variables as +-- you wish and access them by using +-- beautiful.variable in your rc.lua +-- theme.fg_widget = "#AECF96" +-- theme.fg_center_widget = "#88A175" +-- theme.fg_end_widget = "#FF5656" +-- theme.bg_widget = "#494B4F" +-- theme.border_widget = "#FF8800" +-- }}} + +-- {{{ Menu +-- Variables set for theming the menu: +-- menu_[bg|fg]_[normal|focus] +-- menu_[border_color|border_width] +theme.menu_height = dpi(20) +theme.menu_width = dpi(140) +-- }}} + +-- {{{ Icons +-- {{{ Taglist +theme.taglist_squares_sel = theme.dir .. "/taglist/square_sel.png" +theme.taglist_squares_unsel = theme.dir .. "/taglist/square_unsel.png" +--theme.taglist_squares_resize = "false" +-- }}} + +-- {{{ Misc +theme.awesome_icon = theme.dir .. "/awesome-icon.png" +-- }}} + +-- {{{ Layout +theme.layout_tile = theme.dir .. "/layouts/tile.png" +theme.layout_tileleft = theme.dir .. "/layouts/tileleft.png" +theme.layout_tilebottom = theme.dir .. "/layouts/tilebottom.png" +theme.layout_tiletop = theme.dir .. "/layouts/tiletop.png" +theme.layout_fairv = theme.dir .. "/layouts/fairv.png" +theme.layout_fairh = theme.dir .. "/layouts/fairh.png" +theme.layout_max = theme.dir .. "/layouts/max.png" +theme.layout_fullscreen = theme.dir .. "/layouts/fullscreen.png" +theme.layout_magnifier = theme.dir .. "/layouts/magnifier.png" +theme.layout_floating = theme.dir .. "/layouts/floating.png" +-- }}} + +-- Set different colors for urgent notifications. +rnotification.connect_signal('request::rules', function() + rnotification.append_rule { + rule = { urgency = 'critical' }, + properties = { + bg = '#ff0000', + fg = '#ffffff' + } + } +end) + +return theme + +-- vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80 diff --git a/files/bash/bash-functions b/files/bash/bash-functions new file mode 100644 index 0000000..fe080cf --- /dev/null +++ b/files/bash/bash-functions @@ -0,0 +1,5 @@ +tf() { setsid -f "$@" >/dev/null 2>&1 & disown; } +doas() { [ $# -eq 0 ] && $(which doas) -s || $(which doas) "$@"; } +man() { kak -e "evaluate-commands man $1"; } +zxz(){ printf "$1\n$(curl -F file=@$1 http://0x0.st)\n"; } + diff --git a/files/bash/bash-profile b/files/bash/bash-profile new file mode 100644 index 0000000..1b87029 --- /dev/null +++ b/files/bash/bash-profile @@ -0,0 +1,10 @@ +# Set up the system, user profile, and related variables. +# /etc/profile will be sourced by bash automatically +# Set up the home environment profile. +if [ -f ~/.profile ]; then source ~/.profile; fi + +# Honor per-interactive-shell startup file +if [ -f ~/.bashrc ]; then source ~/.bashrc; fi +. "$GUIX_PROFILE/etc/profile" +[ "$(tty)" = "/dev/tty1" ] && sx 1>/dev/null 2>&1 + diff --git a/files/bash/bashrc b/files/bash/bashrc new file mode 100644 index 0000000..2bb10df --- /dev/null +++ b/files/bash/bashrc @@ -0,0 +1,47 @@ +alias df="df -h" +alias diff="diff --color=auto" +alias grep="grep --color=auto" +alias ip="ip --color=auto" +alias ls="ls --color=auto --group-directories-first --classify -hlv" +alias ln="ln -sfn" +alias info="info --init-file $XDG_CONFIG_HOME/infokeys" +alias m="yt-dlp --prefer-free-formats --extract-audio" +alias v="yt-dlp --prefer-free-formats" +alias present="xrandr --output LVDS-1 --mode 1366x768 --scale 1x1 --output VGA-1 --same-as LVDS-1 --mode 1920x1080 --scale 0.711x0.711" +alias lf="$XDG_CONFIG_HOME/lf/lfrun" +alias gpg="gpg --homedir $XDG_DATA_HOME/gnupg" +alias radio="https://radio.vern.cc" +alias ':e'="kak" +alias ':q'="exit" + +[ -f /etc/bashrc ] && source /etc/bashrc +export PATH="$PATH:$(du $HOME/.local/bin/ \ + | cut -f2 \ + | tr '\n' ':' \ + | sed 's/:*$//')" +export SHELL +if [[ $- != *i* ]]; then + [[ -n "$SSH_CLIENT" ]] && source /etc/profile + return +fi +PS1='${GUIX_ENVIRONMENT:+[env ${GUIX_ENVIRONMENT}]\n}\u at \W $(git branch &>/dev/null && git branch 2>/dev/null | sed -n "s/* \(.*\)/on \1 /p")> ' +[ "$TERM" = "linux" ] && {\ + echo -en "\e]P0"'070707' + echo -en "\e]P1"'df6760' + echo -en "\e]P2"'8be760' + echo -en "\e]P3"'ffd17a' + echo -en "\e]P4"'9688d9' + echo -en "\e]P5"'86adff' + echo -en "\e]P6"'86adff' + echo -en "\e]P7"'f1f1f1' + echo -en "\e]P8"'070707' + echo -en "\e]P9"'df6760' + echo -en "\e]PA"'8be760' + echo -en "\e]PB"'ffd17a' + echo -en "\e]PC"'9688d9' + echo -en "\e]PD"'86adff' + echo -en "\e]PE"'86adff' + echo -en "\e]PF"'f1f1f1' +} +trap 'printf "\033]0;%s\007" "${BASH_COMMAND//[^[:print:]]/}"' DEBUG + diff --git a/files/doas/doas-completion b/files/doas/doas-completion new file mode 100644 index 0000000..8aab5ae --- /dev/null +++ b/files/doas/doas-completion @@ -0,0 +1,56 @@ +# bash completion for doas(8) -*- shell-script -*- + +_doas() +{ + local cur prev words cword split + _init_completion -s || return + + local i mode=normal + + [[ $mode == normal ]] && + for ((i = 1; i <= cword; i++)); do + if [[ ${words[i]} != -* ]]; then + local PATH=$PATH:/sbin:/usr/sbin:/usr/local/sbin + local root_command=${words[i]} + _command_offset $i + return + fi + if [[ ${words[i]} == -@(!(-*)e*|-edit) ]]; then + mode=edit + break + fi + [[ ${words[i]} == \ + -@(user|other-user|group|close-from|prompt|!(-*)[uUgCp]) ]] && + ((i++)) + done + + case "$prev" in + --user | --other-user | -!(-*)[uU]) + COMPREPLY=($(compgen -u -- "$cur")) + return + ;; + --group | -!(-*)g) + COMPREPLY=($(compgen -g -- "$cur")) + return + ;; + --close-from | --prompt | -!(-*)[Cp]) + return + ;; + esac + + $split && return + + if [[ $cur == -* ]]; then + local opts=$(_parse_help "$1") + COMPREPLY=($(compgen -W '${opts:-$(_parse_usage "$1")}' -- "$cur")) + [[ ${COMPREPLY-} == *= ]] && compopt -o nospace + return + fi + if [[ $mode == edit ]]; then + _filedir + fi +} && + complete -F _doas doas + +# ex: filetype=sh + diff --git a/files/doas/doas.conf b/files/doas/doas.conf new file mode 100644 index 0000000..c3bf8d7 --- /dev/null +++ b/files/doas/doas.conf @@ -0,0 +1,18 @@ +permit setenv { GUILE_LOAD_PATH } :wheel +permit keepenv :wheel cmd kak args +permit keepenv :wheel cmd emacsclient args +permit nopass :wheel cmd halt args +permit nopass :wheel cmd reboot args +permit nopass :wheel cmd guix args pull +permit nopass :wheel cmd herd args status +permit nopass :wheel cmd herd args doc thinkfan +permit nopass :wheel cmd herd args stop thinkfan +permit nopass :wheel cmd herd args start thinkfan +permit nopass :wheel cmd herd args status thinkfan +permit nopass :wheel cmd herd args restart thinkfan +permit nopass :wheel cmd herd args doc wpa-supplicant +permit nopass :wheel cmd herd args stop wpa-supplicant +permit nopass :wheel cmd herd args start wpa-supplicant +permit nopass :wheel cmd herd args status wpa-supplicant +permit nopass :wheel cmd herd args restart wpa-supplicant + diff --git a/files/emacs/init.el b/files/emacs/init.el new file mode 100644 index 0000000..20744d0 --- /dev/null +++ b/files/emacs/init.el @@ -0,0 +1,229 @@ +;; Who am I? +(setq user-full-name "Luis Guilherme Coelho" + user-email-address "lgcoelho@disroot.org" + copyright-names-regexp (format "%s <%s>" + user-full-name + user-mail-address)) +(load-file "~/projects/guix/etc/copyright.el") + +;; Emacs directories +(setq user-emacs-directory "~/.config/emacs") + +;; Organizing backups +(setq backup-directory-alist + '(("." . "~/.local/share/emacs/saves"))) + +;; Emacs load path +(add-to-list 'load-path + "~/.guix-profile/share/emacs/site-lisp") +(setq-default buffer-file-coding-system + 'utf-8-unix) + +;; Garbage collection +(setq gc-cons-threshold (* 50 1000 1000)) + +;; No more tabs +(setq-default indent-line-function 'insert-tab + indent-tabs-mode nil) + +;; Profile emacs startup +(add-hook 'emacs-startup-hook + (lambda () (message + "*:** Emacs loaded in %s seconds with %d garbage collections." + (emacs-init-time "%.2f") + gcs-done))) + +;; Disable compiler and large file warnings +(setq native-comp-async-report-warnings-errors nil + large-file-warning-threshold nil) + +;; Remove start message and scratch message +(setq inhibit-startup-message t + initial-scratch-message nil) + +;; Enable some minor modes globally +(dolist (mode '(server-mode ; Emacs server + savehist-mode ; Command history + column-number-mode ; Cursor column number + global-prettify-symbols-mode ; Pretty symbols + delete-selection-mode)) ; Normal selection behavior + (funcall mode 1)) + +;; Disable some minor modes globally +(dolist (mode '(tool-bar-mode menu-bar-mode ; Menus + scroll-bar-mode ; Scroll-bar + tooltip-mode ; Tooltip + indent-tabs-mode ; Tabs + blink-cursor-mode ; Cursor + fringe-mode)) ; Fringe + (funcall mode 0)) + +;; Line numbers settings +(setq display-line-numbers-type 'relative + display-line-numbers-current-absolute t + display-line-numbers-grow-only t + display-line-numbers-width-start t) + +;; Display whitespaces +(setq-default fill-column 80) +(setq whitespace-display-mappings + '((space-mark ?\ [?⋅] [?.]) + (space-mark ?\xA0 [?⋅] [?_]) + (newline-mark ?\n [?¬ ?\n] [?$ ?\n]) + (tab-mark ?\t [?» ?\t] [?\\ ?\t]))) +(dolist (mode '(text-mode-hook + prog-mode-hook + conf-mode-hook)) + (add-hook mode (lambda () + (setq display-line-numbers-witdth + (length (format "%s" (count-lines (point-max) + (point-min))))) + (dolist (mode '(display-line-numbers-mode + rainbow-delimiters-mode + display-fill-column-indicator-mode + whitespace-mode)) + (funcall mode 1))))) +(add-hook 'org-mode-hook + (lambda () + (dolist (mode '(whitespace-mode + display-fill-column-indicator-mode)) + (funcall mode 0)) + (setq org-pretty-entities t))) + +;; Aesthetics +(load-theme 'meimuna t) +(setq cursor-type 'box) + +;; Smooth scroll +(setq scroll-step 1) + +;; Please never show me a dialog box again +(setq use-dialog-box nil) + +;; IRC +(setq circe-nick "anemofilia") +(setq circe-channels '("#emacs" + "#gnu" + "#guile" + "#guix" + "#libreboot")) + +;; EMMS +(setq emms-player-list '(emms-player-mpv)) + +(require 'setup) +(setup-define :pkg + (lambda (feature-or-package) + `(unless (locate-file ,(symbol-name feature-or-package) + load-path + (get-load-suffixes)) + (:package ',feature-or-package))) + :documentation "Install PACKAGE if it is not available locally. +This macro can be used as NAME, and it will replace itself with +the first PACKAGE." + :repeatable t + :shorthand #'cadr) + +(setup-define :disabled + (lambda () `,(setup-quit)) + :documentation "Always stop evaluating the body.") + +(setup-define :load-after + (lambda (features &rest body) + (let ((body `(progn + (require ',(setup-get 'feature)) + ,@body))) + (dolist (feature (if (listp features) + (nreverse features) + (list features))) + (setq body `(with-eval-after-load ',feature ,body))) + body)) + :documentation "Load the current feature after FEATURES." + :indent 1) + +(setup-define :file-match + (lambda (regexp) + `(add-to-list 'auto-mode-alist (cons ,regexp ',(setup-get 'mode)))) + :documentation "Associate the current mode with files that match REGEXP." + :debug '(form) + :repeatable t) + +(setup-define :leader + (lambda (&rest args) + `(with-eval-after-load 'general + (general-define-key ,@args + :states 'normal + :keymaps 'override + :prefix "SPC" + :global-prefix "C-SPC"))) + :documentation "Define a leader keybind" + :debug '(form) + :indent 0) + +(setup-define :local-leader + (lambda (&rest args) + `(with-eval-after-load 'general + (let ((map ',(setup-get 'map))) + (general-define-key ,@args + :states 'normal + :keymaps map + :prefix "SPC m" + :global-prefix "C-SPC m")))) + :documentation "Define a local leader keybind" + :debug '(form) + :indent 0) + +(setup-define :ignore-buffers + (lambda (&rest buffers) + `(setq ignored-buffers (append ignored-buffers ',buffers))) + :documentation "Ignore buffers") + +(setup-define :display-rule + (lambda (condition &rest actions) + `(add-to-list 'display-buffer-alist '(,condition . ,actions))) + :documentation "Add to display buffer alist") + +(setup (:pkg kakoune) + (:option ryo-modal-cursor-type 'box + ryo-modal-cursor-color "#8581E0") + (:global "" + (lambda () + (interactive) + (if (minibufferp) + (keyboard-escape-quit) + (ryo-modal-mode)))) + (kakoune-setup-keybinds) + (ryo-modal-keys + ("M-s" mc/split-region))) +: +;; Use a real file manager +(setup (:pkg dirvish) + (:hook hl-line-mode) + (:option dirvish-attributes nil + dirvish-listing-switches '(--group-directories-first --classify)) + ;'(vc-state subtree-state all-the-icons collapse git-msg file-time file-size)) + (dirvish-override-dired-mode)) + +(setup (:pkg org-bullets org-present org-roam org-modern)) +(setup (:pkg elfeed elfeed-org)) +(setup (:pkg geiser geiser-guile macrostep-geiser)) +(setup (:pkg cape corfu corfu-doc consult-lsp vertico orderless)) + +(custom-set-variables + ;; custom-set-variables was added by Custom. + ;; If you edit it by hand, you could mess it up, so be careful. + ;; Your init file should contain only one such instance. + ;; If there is more than one, they won't work right. + '(custom-enabled-themes '(meimuna)) + '(custom-safe-themes + '("5df271e8c563dcd5b7be07ab5b5a615567b20a36b7c748475df0bb512332f0e1" "c202b7618764218b8ecb21a13c5dc9b318f0879f54105847fa5e1868afb19369" "044d60490c760e63bd39232445702271257a47ab384a3871649ea03a3d2b430a" "322a73057be183963dcd4fbfaa859e636fc8aa5f76f2a24f32a8ee5cc73be484" "671f76d55e2917bcae38168c2363fc21a335683583543b3fe49018cf5542908d" "f2db82bef0fb3e3922053605326d82b3e6494aed5c938440358710e9b78da7d9" "47263df55a6df473a5b9ba13107523f285db25dbbfd793ed5beaf47b7ec11c8e" "452da09d018e5f7bffa1e293c224c8711aa37dc9e7dd1dce24c9be6a0f6067c3" "f2c28b88fc49c9577269afcfdbf4630135c2bc2a4813f379c9a8a3979953e706" "38d107472028475f6d47938a91abf170587b718f4ca84f258ea8d72babe25201" "12bd9d840d3e0f54c607ca63acca59b083eca3cb18b9e5c7b34dfb6a400eaf4b" default)) + '(package-selected-packages + '(eat mines setup kakoune magit-popup edit-indirect bui geiser-guile auctex)) + '(whitespace-style + '(face trailing tabs spaces lines lines-tail lines-char newline missing-newline-at-eof empty indentation::tab indentation::space indentation big-indent space-after-tab::tab space-after-tab::space space-after-tab space-before-tab::tab space-before-tab::space space-before-tab space-mark tab-mark newline-mark))) +(custom-set-faces + ;; custom-set-faces was added by Custom. + ;; If you edit it by hand, you could mess it up, so be careful. + ;; Your init file should contain only one such instance. + ;; If there is more than one, they won't work right. + '(whitespace-line ((t nil)))) diff --git a/files/emacs/meimuna-theme.el b/files/emacs/meimuna-theme.el new file mode 100644 index 0000000..d02f596 --- /dev/null +++ b/files/emacs/meimuna-theme.el @@ -0,0 +1,131 @@ +(deftheme meimuna + "Created 2022-01-11.") + +(custom-theme-set-faces + 'meimuna + '(cursor ((t (:background "#8581e0" :foreground "#ffffff")))) + '(fixed-pitch ((t (:family "Monospace")))) + '(variable-pitch ((((type w32)) (:foundry "outline" :family "Arial")) (t (:family "Sans Serif")))) + '(escape-glyph ((t (:background "#211d3c" :foreground "khaki")))) + '(homoglyph ((t (:foreground "khaki")))) + '(minibuffer-prompt ((t (:foreground "#8581e0")))) + '(highlight ((t (:background "#8581e0" :foreground "black")))) + '(region ((t (:extend t :background "#1F102f")))) + '(shadow ((t (:foreground "#999999")))) + '(secondary-selection ((t (:extend t :background "#9a9a9a")))) + '(font-lock-builtin-face ((t (:foreground "#ffd17a")))) + '(font-lock-comment-delimiter-face ((t (:foreground "#86adff")))) + '(font-lock-comment-face ((t (:foreground "#86adff")))) + '(font-lock-constant-face ((t (:foreground "#df6760")))) + '(font-lock-doc-face ((t (:foreground "#9a99e7" :inherit font-lock-string-face)))) + '(font-lock-function-name-face ((t (:foreground "#86adff")))) + '(font-lock-keyword-face ((t (:foreground "#8681e0")))) + '(font-lock-negation-char-face ((t nil))) + '(font-lock-preprocessor-face ((t (:inherit font-lock-builtin-face)))) + '(font-lock-regexp-grouping-backslash ((t (:inherit (bold))))) + '(font-lock-regexp-grouping-construct ((t (:inherit bold)))) + '(font-lock-string-face ((t (:foreground "#fc97ff")))) + '(font-lock-type-face ((t (:foreground "#ffd17a")))) + '(font-lock-variable-name-face ((t nil))) + '(font-lock-warning-face ((t (:foreground "#dce081" :weight bold)))) + '(button ((t (:inherit (link))))) + '(link ((t (:foreground "#8c86e4" :underline (:color foreground-color :style line))))) + '(link-visited ((t (:foreground "#999999" :inherit link)))) + '(fringe ((t (:foreground "#506080" :background "#111111")))) + '(header-line ((default (:inherit (mode-line))) (((type tty)) (:underline (:color foreground-color :style line) :inverse-video nil)) (((class color grayscale) (background light)) (:box nil :foreground "grey20" :background "grey90")) (((class color grayscale) (background dark)) (:box nil :foreground "grey90" :background "grey20")) (((class mono) (background light)) (:underline (:color foreground-color :style line) :box nil :inverse-video nil :foreground "black" :background "white")) (((class mono) (background dark)) (:underline (:color foreground-color :style line) :box nil :inverse-video nil :foreground "white" :background "black")))) + '(tooltip ((t (:foreground "#FFFFFF" :background "#5f5e8a")))) + '(mode-line ((t (:background "#303030" :foreground "#9688d9")))) + '(mode-line-buffer-id ((t (:weight bold :box nil)))) + '(mode-line-emphasis ((t (:weight bold)))) + '(mode-line-highlight ((t (:box nil)))) + '(mode-line-inactive ((t (:background "#111111" :foreground "dim gray")))) + '(isearch ((t (:foreground "white" :background "#5533AA")))) + '(isearch-fail ((t (:foreground "#999")))) + '(lazy-highlight ((t (:inherit default :background "#8581e0")))) + '(match ((t (:background "#8581e0" :foreground "white")))) + '(next-error ((t (:inherit (region))))) + '(query-replace ((t (:inherit isearch :background "khaki" :foreground "#101010")))) + '(line-number-current-line ((t (:inherit line-number :background "#313131" :foreground "#8581e0")))) + '(line-number ((t (:inherit (shadow default))))) + '(line-number-major-tick ((((class color grayscale) (background light)) (:bold t :background "grey85")) (((class color grayscale) (background dark)) (:bold t :background "grey75")) (t (:inherit (line-number))))) + '(org-document-title ((t (:height 1.2 :underline nil :inherit org-level-1)))) + '(org-level-1 ((t (:inherit default :extend t :foreground "#f6f3e8" :height 1.1 :family "Sans Serif")))) + '(org-level-2 ((t (:family "Sans Serif" :height 1.0 :foreground "#f6f3e8" :extend t :inherit default)))) + '(org-level-3 ((t (:foreground "#f6f3e8" :extend t :inherit default)))) + '(org-level-4 ((t (:inherit default :extend t :foreground "#f6f3e8")))) + '(org-level-5 ((t (:inherit default :extend t :foreground "#f6f3e8")))) + '(org-level-6 ((t (:extend t :foreground "#f6f3e8" :inherit (default))))) + '(org-level-7 ((t (:extend t :foreground "#f6f3e8" :inherit (default))))) + '(org-level-8 ((t (:extend t :foreground "#f6f3e8" :inherit (default))))) + '(org-todo ((t (:foreground "#00ff00" :weight bold)))) + '(org-done ((t (:foreground "#ff0000" :weight bold)))) + '(org-table ((t (:foreground "#999999")))) + '(org-ellipsis ((t (:foreground "#fff")))) + '(org-block-begin-line ((t (:background "#606590" :extend t :inherit \#fff)))) + '(org-block-end-line ((t (:inherit \#fff :extend t :background "#606590")))) + '(org-scheduled ((t (:foreground "#606590" :weight bold)))) + '(org-date ((t (:underline (:color foreground-color :style line) :foreground "#8c86e4")))) + '(org-tag ((t (:bold t)))) + '(org-warning ((t (:inherit font-lock-warning-face)))) + '(org-headline-todo ((t (:foreground "#fff")))) + '(org-sexp-date ((t (:foreground "#999999")))) + '(org-agenda-date ((t (:foreground "#999999")))) + '(org-date-selected ((t (:foreground "#999999" :inverse-video t)))) + '(org-footnote ((t (:underline (:color foreground-color :style line) :style ni :foreground "#8c86e4")))) + '(org-agenda-date-today ((t (:inherit org-agenda-date :foreground "#444083" :weight bold)))) + '(org-agenda-date-weekend ((t (:inherit org-agenda-date :foreground "#444083" :weight bold)))) + '(org-formula ((t (:foreground "khaki")))) + '(org-scheduled-previously ((t (:foreground "khaki")))) + '(org-upcoming-deadline ((t (:foreground "khaki" :weight bold)))) + '(org-document-info ((t (:foreground "#fff")))) + '(org-drawer ((t (:foreground "#999999")))) + '(org-latex-and-related ((t (:foreground "#fff")))) + '(org-scheduled-today ((t (:foreground "khaki" :weight ultra-bold)))) + '(org-time-grid ((t (:foreground "#8c86e4")))) + '(whitespace-space ((t (:inherit default :foreground "#606060")))) + '(whitespace-hspace ((t (:inherit whitespace-space)))) + '(whitespace-tab ((t (:inherit whitespace-space)))) + '(whitespace-newline ((t (:inherit whitespace-space)))) + '(whitespace-trailing ((t (:inherit whitespace-space)))) + '(whitespace-space-before-tab ((t (:inherit whitespace-space)))) + '(whitespace-indentation ((t (:inherit whitespace-space)))) + '(whitespace-big-indent ((t (:inherit whitespace-space)))) + '(whitespace-empty ((t (:extend t :inherit whitespace-space)))) + '(whitespace-space-after-tab ((t (:inherit whitespace-space)))) + '(whitespace-missing-newline-at-eof ((t (:inherit whitespace-space)))) + '(whitespace-line ((t nil))) + '(fill-column-indicator ((t (:foreground "#303030" :background "#303030" :inherit shadow)))) + '(rainbow-delimiters-depth-1-face ((t (:inherit rainbow-delimiters-base-face :foreground "#a790d3")))) + '(rainbow-delimiters-depth-2-face ((t (:inherit rainbow-delimiters-base-face :foreground "#6cdae0")))) + '(rainbow-delimiters-depth-3-face ((t (:inherit rainbow-delimiters-base-face :foreground "#ff7f50")))) + '(rainbow-delimiters-depth-4-face ((t (:inherit rainbow-delimiters-base-face :foreground "#ffea8c")))) + '(rainbow-delimiters-depth-5-face ((t (:inherit rainbow-delimiters-base-face :foreground "#83dcaf")))) + '(rainbow-delimiters-depth-6-face ((t (:inherit rainbow-delimiters-base-face :foreground "#eba4d4")))) + '(rainbow-delimiters-depth-7-face ((t (:inherit rainbow-delimiters-base-face :foreground "#8b5be7")))) + '(rainbow-delimiters-unmatched-face ((t (:inherit default)))) + '(rainbow-delimiters-mismatched-face ((t (:inherit default)))) + '(rainbow-delimiters-base-error-face ((default (:inherit (rainbow-delimiters-base-face))) (t (:foreground "#88090B")))) + '(trailing-whitespace ((t (:inherit whitespace-space)))) + '(hl-line ((t (:inherit highlight :extend t)))) + '(dired-broken-symlink ((t (:foreground "red1" :weight bold)))) + '(eros-result-overlay-face ((t (:foreground "#808080")))) + '(eat-term-color-1 ((t (:background "#df6760" :foreground "#df6760")))) + '(eat-term-color-0 ((t (:inherit (ansi-color-black))))) + '(eat-term-color-2 ((t (:background "#8be760" :foreground "#8be760")))) + '(eat-term-color-3 ((t (:background "#ffd17a" :foreground "#ffd17a")))) + '(eat-term-color-4 ((t (:background "#9688d9" :foreground "#9688d9")))) + '(eat-term-color-5 ((t (:background "#fc97ff" :foreground "#fc97ff")))) + '(eat-term-color-6 ((t (:background "#86adff" :foreground "#86adff")))) + '(eat-term-color-7 ((t (:background "#f1f1f1" :foreground "#f1f1f1")))) + '(eat-term-color-8 ((t (:background "#808080" :foreground "#808080")))) + '(eat-term-color-9 ((t (:inherit eat-term-color-1)))) + '(eat-term-color-10 ((t (:inherit eat-term-color-2)))) + '(eat-term-color-11 ((t (:inherit eat-term-color-3)))) + '(eat-term-color-12 ((t (:inherit eat-term-color-4)))) + '(eat-term-color-13 ((t (:inherit eat-term-color-5)))) + '(eat-term-color-14 ((t (:inherit eat-term-color-6)))) + '(eat-term-color-15 ((t (:background "#f1f1f1" :foreground "#f1f1f1")))) + '(default ((t (:inherit nil :extend nil :stipple nil :background "#101010" :foreground "#f0f0f0" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :height 90 :width normal :foundry "PfEd" :family "Meslo LG M DZ")))) + '(geiser-font-lock-repl-output ((t (:foreground "#d0d0d0"))))) + +(provide-theme 'meimuna) diff --git a/files/fish/config.fish b/files/fish/config.fish new file mode 100644 index 0000000..d714361 --- /dev/null +++ b/files/fish/config.fish @@ -0,0 +1,3 @@ +if status is-interactive + # Commands to run in interactive sessions can go here +end diff --git a/files/fish/fish_variables b/files/fish/fish_variables new file mode 100644 index 0000000..1a82b8a --- /dev/null +++ b/files/fish/fish_variables @@ -0,0 +1,31 @@ +# This file contains fish universal variable definitions. +# VERSION: 3.0 +SETUVAR __fish_initialized:3400 +SETUVAR fish_color_autosuggestion:555\x1ebrblack +SETUVAR fish_color_cancel:\x2dr +SETUVAR fish_color_command:blue +SETUVAR fish_color_comment:red +SETUVAR fish_color_cwd:green +SETUVAR fish_color_cwd_root:red +SETUVAR fish_color_end:green +SETUVAR fish_color_error:brred +SETUVAR fish_color_escape:brcyan +SETUVAR fish_color_history_current:\x2d\x2dbold +SETUVAR fish_color_host:normal +SETUVAR fish_color_host_remote:yellow +SETUVAR fish_color_normal:normal +SETUVAR fish_color_operator:brcyan +SETUVAR fish_color_param:cyan +SETUVAR fish_color_quote:yellow +SETUVAR fish_color_redirection:cyan\x1e\x2d\x2dbold +SETUVAR fish_color_search_match:bryellow\x1e\x2d\x2dbackground\x3dbrblack +SETUVAR fish_color_selection:white\x1e\x2d\x2dbold\x1e\x2d\x2dbackground\x3dbrblack +SETUVAR fish_color_status:red +SETUVAR fish_color_user:brgreen +SETUVAR fish_color_valid_path:\x2d\x2dunderline +SETUVAR fish_key_bindings:fish_default_key_bindings +SETUVAR fish_pager_color_completion:normal +SETUVAR fish_pager_color_description:B3A06D\x1eyellow\x1e\x2di +SETUVAR fish_pager_color_prefix:normal\x1e\x2d\x2dbold\x1e\x2d\x2dunderline +SETUVAR fish_pager_color_progress:brwhite\x1e\x2d\x2dbackground\x3dcyan +SETUVAR fish_pager_color_selected_background:\x2dr diff --git a/files/fish/functions/fish_greeting.fish b/files/fish/functions/fish_greeting.fish new file mode 100644 index 0000000..e69de29 diff --git a/files/fish/functions/fish_prompt.fish b/files/fish/functions/fish_prompt.fish new file mode 100644 index 0000000..6bde68c --- /dev/null +++ b/files/fish/functions/fish_prompt.fish @@ -0,0 +1,35 @@ +function blue + set_color blue; printf $argv; set_color normal +end +function normal + set_color normal; printf $argv; set_color normal +end + +function fish_cwd_prompt + set -l cwd (pwd) + test $cwd = $HOME && printf "~" || \ + normal "%s/%s" (basename (dirname $cwd)) (basename $cwd) +end + +function fish_prompt + if test -n "$GUIX_ENVIRONMENT" + normal "(env "; blue "%s" (basename $GUIX_ENVIRONMENT); normal ")" + git branch &>/dev/null + test $status -eq 0 && normal ":" + end + test $status && fish_git_prompt | sed 's/ //' + test $status || test -n "$GUIX_ENVIRONMENT" && printf '\n' + + switch "$fish_key_bindings" + case fish_vi_key_bindings fish_hybrid_key_bindings + test $fish_bind_mode = 'default' && normal ':' || normal '+' + end + + blue (whoami); normal ' at '; blue (prompt_hostname) + normal ' in '; blue (fish_cwd_prompt) + normal ' > ' +end + +function fish_default_mode_prompt -d "Display vi prompt mode" + # Do nothing +end diff --git a/files/git/config b/files/git/config new file mode 100644 index 0000000..39b219a --- /dev/null +++ b/files/git/config @@ -0,0 +1,25 @@ +[user] + email = anemofilia@disroot.org + name = anemofilia + signingkey = 1B4E8236558D92ADB60CA3C6F52555639A8209E2 +[color] + ui = true +[core] + editor = kak +[filter "lfs"] + required = true + clean = git-lfs clean -- %f + smudge = git-lfs smudge -- %f + process = git-lfs filter-process +[init] + defaultBranch = main +[usern] + name = anemofilia +[alias] + see = log --graph --all --oneline + last = log -1 HEAD + unstage = reset HEAD +[credential] + helper = cache +[commit] + gpgsign = false diff --git a/files/infokeys b/files/infokeys new file mode 100644 index 0000000..2c1edb3 --- /dev/null +++ b/files/infokeys @@ -0,0 +1,51 @@ +#info +gk first-node +gj last-node +\mb beginning-of-node +\me end-of-node +j next-line +k prev-line +f scroll-forward-page-only +^f scroll-forward-page-only +\m\ scroll-forward-page-only +z scroll-forward-page-only-set-window +b scroll-backward-page-only +^b scroll-backward-page-only +w scroll-backward-page-only-set-window +\kd select-reference-this-line +^j down-line +^k up-line +d scroll-half-screen-down +^d scroll-half-screen-down +u scroll-half-screen-up +^u scroll-half-screen-up +K next-node +J prev-node +TAB up-node +' last-node +\mt top-node +\md dir-node +^xg goto-node +I goto-invocation-node +n search-next +N search-previous +\mf xref-item +^xr xref-item +\mg select-reference-this-line +^x^j select-reference-this-line +^x^m select-reference-this-line +^c abort-key +\mh get-info-help-node +:q quit +ZZ quit + +#echo-area +\mh echo-area-backward +\ml echo-area-forward +\m0 echo-area-beg-of-line +\m$ echo-area-end-of-line +\mw echo-area-forward-word +\mx echo-area-delete +\mu echo-area-abort +^v echo-area-quoted-insert +\mX echo-area-kill-word diff --git a/files/lf/.lfrc.swp b/files/lf/.lfrc.swp new file mode 100644 index 0000000..c59a563 Binary files /dev/null and b/files/lf/.lfrc.swp differ diff --git a/files/lf/cleaner b/files/lf/cleaner new file mode 100755 index 0000000..a184d84 --- /dev/null +++ b/files/lf/cleaner @@ -0,0 +1,4 @@ +#!/bin/sh +if [ -n "$FIFO_UEBERZUG" ]; then + printf '{"action": "remove", "identifier": "PREVIEW"}\n' > "$FIFO_UEBERZUG" +fi diff --git a/files/lf/lfrc b/files/lf/lfrc new file mode 100644 index 0000000..5b9f660 --- /dev/null +++ b/files/lf/lfrc @@ -0,0 +1,196 @@ +#!/bin/sh + +# set '-eu' options for shell commands +# These options are used to have safer shell commands. Option '-e' is used to +# exit on error and option '-u' is used to give error for unset variables. +# Option '-f' disables pathname expansion which can be useful when $f, $fs, and +# $fx variables contain names with '*' or '?' characters. However, this option +# is used selectively within individual commands as it can be limiting at +# times. +set shellopts '-eu' + +# set internal field separator (IFS) to "\n" for shell commands +# This is useful to automatically split file names in $fs and $fx properly +# since default file separator used in these variables (i.e. 'filesep' option) +# is newline. You need to consider the values of these options and create your +# commands accordingly. +set ifs "\n" + +# leave some space at the top and the bottom of the screen +set scrolloff 10 + +# Basic Settings +set preview true +set shell bash +set previewer ~/.config/lf/preview +set cleaner ~/.config/lf/cleaner +set drawbox true +set info time + +# Custom Functions +cmd open ${{ + setsid -f xdg-open "$f" >/dev/null 2>&1 & +}} + +cmd __cd :cd "$1" + +# cd +cmd cd ${{ + kill $pid + eval "inotifywait -me MODIFY $1 | \ + while read LINE; do send $id :reload; done &" + pid=$! + send $id :__cd +}} + +# Share on telegram +cmd send %wmctrl -x -a Telegram.TelegramDesktop && telegram-desktop -sendpath $(readlink -f "$f") + +# Open lf config +cmd config $$EDITOR "~/.config/lf/lfrc" + +# mkdir with :mkdir +cmd mkdir %mkdir -- "$@" + +# rename file +cmd rename %mv "$f" $(echo "$@" | sed 's/ /\ /g') + +# Open editor +cmd edit ${{ + setsid -f "$TERMINAL -e $EDITOR $f" & +}} + +# Change file mode bits +cmd chmod %chmod "$@" && echo "Mode bits changed" & lf -remote reload + +# Copy filename without extension +cmd yank-basename $basename -a -- $fx | head -c-1 | xclip --clipboard + +# Upload selected files to 0x0 and yank it's path and link +cmd share %printf "$fx\n $(curl -F file="@$fx" http://0x0.st)" | xsel -b && echo "File shared" + +# Rotate file +cmd rotate-file %{{ + case "$1" in + right) direction=1;; + left) direction=-1;; + *) direction=0;; + esac + case $(file --mime-type "$f" -bL) in + image/*) convert "$f" -rotate $((90*direction)) "$f";; + application/pdf) pdftk "$f" cat 1-end"$1" output "rotated-${f##*/}" \ + && rm "$f" \ + && mv "rotated-${f##*/}" "$f";; + video/*) ffmpeg -i "$f" -vf "transpose=$((direction+1))" "rotated-${f##*/}" \ + && rm "$f" \ + && mv "rotated-${f##*/}" "$f";; + inode/directory) for file in $(ls "$f"); do rotate "$1" "$file"; done;; + esac + echo "File rotated" +}} + +# Rotate selected files +cmd rotate %{{ + case "$1" in + right) direction=1;; + left) direction=-1;; + *) direction=0;; + esac + for file in "$fx"; do + case $(file --mime-type "${file}" -bL) in + image/*) convert "${file}" -rotate $((90*direction)) "${file}";; + application/pdf) pdftk "${file}" cat 1-end"$1" output "rotated-${file##*/}" \ + && rm "${file}" \ + && mv "rotated-${file##*/}" "$file";; + video/*) ffmpeg -i "${file}" -vf "transpose=$((direction+1))" "rotated-${file##*/}" \ + && rm "${file}" \ + && mv "rotated-${file##*/}" "${file}";; + esac + done + echo "File rotated!" +}} + +cmd extract ${{ + set -f + case $f in + *.tar.bz|*.tar.bz2|*.tbz|*.tbz2) tar xjvf $f;; + *.tar.gz|*.tgz) tar xzvf $f;; + *.tar.xz|*.txz) tar xJvf $f;; + *.zip) unzip $f;; + *.rar) unrar x $f;; + *.7z) 7z x $f;; + esac +}} + +cmd compress ${{ + set -f + mkdir $1 + cp -r $fx $1 + tar czf $1.tar.gz $1 + rm -rf $1 +}} + +cmd newfold %{{ + set -f + mkdir -- "$1" + mv -- $fx "$1" +}} + +cmd term &{{ + setsid -f $TERMINAL >/dev/null 2>&1 & disown +}} + +cmd e :edit +cmd q :quit + +# Bindings +# Remove some defaults +map n +map e +map r +map dd + +# File openers +map ee $$EDITOR "$f" +map e! $doas $EDITOR "$f" +map b &setsid -f $BROWSER "$f" + +# Basic functions +mao l cd "$f" +map c copy && echo "$fx" | xsel -b +map d delete +map x cut +map open +map delete +map rc push :rename +map re $lf -remote "send $id :rename$(printf '%q' ${f##*/})" +map set hidden! +map push $ +map push :newfold +map :rotate right +map :rotate left +map :term + +# Movement +map gk top +map gj bottom +map gD cd ~/desktop +map gc cd ~/.config +map gd cd ~/documents +map gl cd ~/.local/share/downloads +map gm cd ~/music +map gp cd ~/pictures +map gv cd ~/videos + +# run on startup +cmd on-cd &{{ + # '&' commands run silently in background (which is what we want here), + # but are not connected to stdout. + # To make sure our escape sequence still reaches stdout we pipe it to /dev/tty + printf "\033]0; $(pwd | sed "s|$HOME|~|;s|.*/||g") - lf\007" > /dev/tty +}} + +# also run at startup +on-cd + +%[ $LF_LEVEL -eq 1 ] || echo "Warning: You're in a nested lf instance of depth $LF_LEVEL!" diff --git a/files/lf/lfrun b/files/lf/lfrun new file mode 100755 index 0000000..5bb0ba3 --- /dev/null +++ b/files/lf/lfrun @@ -0,0 +1,19 @@ +#!/bin/sh +set -e + +cleanup() { + exec 3>&- + rm "$FIFO_UEBERZUG" +} + +if [ -n "$SSH_CLIENT" ] || [ -n "$SSH_TTY" ]; then + lf "$@" +else + [ ! -d "$HOME/.cache/lf" ] && mkdir --parents "$HOME/.cache/lf" + export FIFO_UEBERZUG="$HOME/.cache/lf/ueberzug-$$" + mkfifo "$FIFO_UEBERZUG" + ueberzug layer -s <"$FIFO_UEBERZUG" -p json & + exec 3>"$FIFO_UEBERZUG" + trap cleanup EXIT + lf "$@" 3>&- +fi diff --git a/files/lf/preview b/files/lf/preview new file mode 100755 index 0000000..4b70b2e --- /dev/null +++ b/files/lf/preview @@ -0,0 +1,83 @@ +#!/bin/sh + +image() { + if [ -n "$DISPLAY" ] && [ -z "$WAYLAND_DISPLAY" ]; then + printf '{"action": "add", "identifier": "PREVIEW", "x": "%s", "y": "%s", "width": "%s", "height": "%s", "scaler": "contain", "path": "%s"}\n' "$4" "$5" "$(($2-1))" "$(($3-1))" "$1" > "$FIFO_UEBERZUG" + exit 1 + else + chafa "$1" -s "$4x" + fi +} + +batorcat() { + file="$1" + shift + if command -v bat > /dev/null 2>&1 + then + bat --color=always --style=plain --pager=never "$file" "$@" + else + cat "$file" + fi +} + +CACHE="$HOME/.cache/lf/thumbnail.$(stat --printf '%n\0%i\0%F\0%s\0%W\0%Y' -- "$(readlink -f "$1")" | sha256sum | awk '{print $1}'))" + +case "$(printf "%s\n" "$(readlink -f "$1")" | awk '{print tolower($0)}')" in + *.tgz|*.tar.gz) tar tzf "$1" ;; + *.tar.bz2|*.tbz2) tar tjf "$1" ;; + *.tar.txz|*.txz) xz --list "$1" ;; + *.tar) tar tf "$1" ;; + *.zip|*.jar|*.war|*.ear|*.oxt) unzip -l "$1" ;; + *.rar) unrar l "$1" ;; + *.md) glow -s dark "$1" ;; + *.7z) 7z l "$1" ;; + *.[1-8]) man "$1" | col -b ;; + *.o) nm "$1";; + *.torrent) transmission-show "$1" ;; + *.iso) iso-info --no-header -l "$1" ;; + *.odt|*.ods|*.odp|*.sxw) odt2txt "$1" ;; + *.doc) catdoc "$1" ;; + *.docx) docx2txt "$1" - ;; + *.xml|*.html) w3m -dump "$1";; + *.xls|*.xlsx) + ssconvert --export-type=Gnumeric_stf:stf_csv "$1" "fd://1" | batorcat --language=csv + ;; + *.wav|*.mp3|*.flac|*.m4a|*.wma|*.ape|*.ac3|*.og[agx]|*.spx|*.opus|*.as[fx]|*.mka) + exiftool "$1" + ;; + *.pdf) + [ ! -f "${CACHE}.jpg" ] && \ + pdftoppm -jpeg -f 1 -singlefile "$1" "$CACHE" + image "${CACHE}.jpg" "$2" "$3" "$4" "$5" + ;; + *.epub) + [ ! -f "$CACHE" ] && \ + epub-thumbnailer "$1" "$CACHE" 1024 + image "$CACHE" "$2" "$3" "$4" "$5" + ;; + *.cbz|*.cbr|*.cbt) + [ ! -f "$CACHE" ] && \ + comicthumb "$1" "$CACHE" 1024 + image "$CACHE" "$2" "$3" "$4" "$5" + ;; + *.avi|*.mp4|*.wmv|*.dat|*.3gp|*.ogv|*.mkv|*.mpg|*.mpeg|*.vob|*.fl[icv]|*.m2v|*.mov|*.webm|*.ts|*.mts|*.m4v|*.r[am]|*.qt|*.divx) + [ ! -f "${CACHE}.jpg" ] && \ + ffmpegthumbnailer -i "$1" -o "${CACHE}.jpg" -s 0 -q 5 + image "${CACHE}.jpg" "$2" "$3" "$4" "$5" + ;; + *.bmp|*.jpg|*.jpeg|*.png|*.xpm|*.webp|*.gif|*.jfif) + image "$1" "$2" "$3" "$4" "$5" + ;; + *.svg) + [ ! -f "${CACHE}.jpg" ] && \ + convert "$1" "${CACHE}.jpg" + image "${CACHE}.jpg" "$2" "$3" "$4" "$5" + ;; + *.ino) + batorcat --language=cpp "$1" + ;; + *) + batorcat "$1" + ;; +esac +exit 0 diff --git a/files/mpv/input.conf b/files/mpv/input.conf new file mode 100644 index 0000000..9cb8e78 --- /dev/null +++ b/files/mpv/input.conf @@ -0,0 +1,105 @@ +# mpv keybindings +# +# Location of user-defined bindings: ~/.config/mpv/input.conf +# +# List of commands and further details: DOCS/man/input.rst +# List of special keys: --input-keylist +# Keybindings testing mode: mpv --input-test --force-window --idle +# +# Use 'ignore' to unbind a key fully (e.g. 'ctrl+a ignore'). +# +# You can use modifier-key combinations like Shift+Left or Ctrl+Alt+x with +# the modifiers Shift, Ctrl, Alt and Meta (may not work on the terminal). +# +# The default keybindings are hardcoded into the mpv binary. +# You can disable them completely with: --no-input-default-bindings + +h no-osd seek -5 # seek 5 seconds backward +l no-osd seek 5 # seek 5 seconds forward +Ctrl+h no-osd sub-seek -1 # seek to the previous subtitle +Ctrl+l no-osd sub-seek 1 # seek to the next subtitle +Ctrl+ESC revert-seek # undo the previous (or marked) seek + +j add sub-pos +1 # move subtitles down +k add sub-pos -1 # move subtitles up + +Shift+l add chapter -1 # seek to the previous chapter +Shift+h add chapter 1 # seek to the next chapter + +Ctrl+Shift+h sub-step -1 # change subtitle timing such that the previous subtitle is displayed +Ctrl+Shift+l sub-step 1 # change subtitle timing such that the next subtitle is displayed + +Alt+h add video-pan-x 0.1 # move the video right +Alt+l add video-pan-x -0.1 # move the video left +Alt+k add video-pan-y 0.1 # move the video down +Alt+j add video-pan-y -0.1 # move the video up + +Alt++ add video-zoom 0.1 # zoom in +Alt+- add video-zoom -0.1 # zoom out +Alt+ESC set video-zoom 0 ; set video-pan-x 0 ; set video-pan-y 0 # reset zoom and pan settings + +[ add speed 0.25 # decrease the playback speed +] add speed 0.25 # increase the playback speed +ESC set speed 1.0 # reset the speed to normal + +#XF86_PLAY cycle pause # toggle pause/playback mode +#XF86_PAUSE cycle pause # toggle pause/playback mode +#Xf86_NEXT playlist-next # skip to the next file +#Xf86_PREV playlist-prev # skip to the previous file + +VOLUME_UP add volume 1 +VOLUME_DOWN add volume -1 +m cycle mute # toggle mute + +1 add contrast -1 +2 add contrast 1 +3 add brightness -1 +4 add brightness 1 +5 add gamma -1 +6 add gamma 1 +7 add saturation -1 +8 add saturation 1 + +SPACE cycle pause # toggle pause/playback mode +q quit # Are u kidding me? +Q quit-watch-later # exit and remember the playback position + +. frame-step # advance one frame and pause +, frame-back-step # go back by one frame and pause + +ENTER script-binding console/enable # open the console + +i script-binding stats/display-stats-toggle # toggle displaying information and statistics + +> add sub-delay -0.1 # shift subtitles 100 ms earlier +< add sub-delay +0.1 # delay subtitles by 100 ms +Ctrl+Shift++ add sub-scale +0.1 # increase the subtitle font size +Ctrl+Shift+- add sub-scale -0.1 # decrease the subtitle font size +#j cycle sub # switch subtitle track +#J cycle sub down # switch subtitle track backwards +#v cycle sub-visibility # hide or show the subtitles +#Alt+v cycle secondary-sub-visibility # hide or show the secondary subtitles + +#ctrl++ add audio-delay 0.100 # change audio/video sync by delaying the audio +#ctrl+- add audio-delay -0.100 # change audio/video sync by shifting the audio earlier + +s screenshot # take a screenshot of the video in its original resolution with subtitles +S screenshot window # take a screenshot of the window with OSD and subtitles +Alt+s screenshot each-frame # automatically screenshot every frame; issue this command again to stop taking screenshots + +#d cycle deinterlace # toggle the deinterlacing filter +#V cycle sub-ass-vsfilter-aspect-compat # toggle stretching SSA/ASS subtitles with anamorphic videos to match the historical renderer +#u cycle-values sub-ass-override "force" "no" # toggle overriding SSA/ASS subtitle styles with the normal styles + +#A cycle-values video-aspect-override "16:9" "4:3" "2.35:1" "-1" # cycle the video aspect ratio ("-1" is the container aspect) +a vf toggle hflip # Flip video like a mirror + + +#E cycle edition # switch edition +#l ab-loop # set/clear A-B loop points +#L cycle-values loop-file "inf" "no" # toggle infinite looping +#ctrl+h cycle-values hwdec "auto" "no" # toggle hardware decoding + +F8 show-text ${playlist} # show the playlist +F9 show-text ${track-list} # show the list of video, audio and sub tracks + diff --git a/files/mpv/lua-settings/torque-progressbar.conf b/files/mpv/lua-settings/torque-progressbar.conf new file mode 100644 index 0000000..bc98770 --- /dev/null +++ b/files/mpv/lua-settings/torque-progressbar.conf @@ -0,0 +1,108 @@ +#[=[ mouse zone settings ]=]# +# Height of area at the bottom of the screen that expands the bar and +# shows times when mouse is hovered over it. Pixels. +hover-zone-height=40 +# The height of the area at the top of the screen that shows the file +# name when the mouse is hovered over it. Pixels. +top-hover-zone-height=40 + +#[=[ default color settings ]=]-- +# Default foreground and background colors. Will be used for all color +# settings (except chapter-marker-before) unless set explicitly. +# Format is BGR hex because ASS is dumb. +foreground=FC799E +background=2D2D2D + +#[=[ progress bar options ]=]# +# whether or not to draw the progress bar at all. +enable-bar=yes +# [[ bar size options ]] # +# Inactive bar height. Pixels. Bar is invisible when inactive if 0. +bar-height-inactive=0 +# Active (i.e. hovered) bar height. Pixels. +bar-height-active=18 +# [[ bar color options ]] # +# Progress bar foreground color. BGR hex. +bar-foreground=FC799E +bar-background=2D2D2D + +#[=[ elapsed time options ]=]# +enable-elapsed-time=yes +# Elapsed time foreground and background colors. BGR hex. +elapsed-foreground=FC799E +elapsed-background=2D2D2D + +#[=[ remaining time options ]=]# +enable-remaining-time=yes +# Remaining time foreground and background colors. BGR hex. +remaining-foreground=FC799E +remaining-background=2D2D2D + +#[=[ hover time options ]=]# +enable-hover-time=yes +# Hover time foreground and background colors. BGR hex. +hover-time-foreground=FC799E +hover-time-background=2D2D2D + +#[=[ title display options ]=]# +enable-title=yes +# Font size for the title. Integer. +title-font-size=12 +# Title/playlist foreground and background colors. BGR hex. +title-foreground=FC799E +title-background=2D2D2D + +#[=[ pause indicator options ]=]# +# Flash an icon in the center of the screen when pausing/unpausing. +pause-indicator=yes +# Pause indicator foreground and background colors. BGR hex. +pause-indicator-foreground=FC799E +pause-indicator-background=2D2D2D + +#[=[ chapter marker options ]=]# +# Enable or disable chapter position markers on the progress bar +# entirely. +enable-chapter-markers=yes +# [[ chapter marker size options ]] # +# Width of chapter markers in pixels. Probably want an even number. +chapter-marker-width=2 +# Width of chapter markers in pixels when the seek bar is active. +# Still probably want an even number. +chapter-marker-width-active=4 +# Fraction of the height of the active progress bar that chapter +# markers. 0 is 0, 1 is the height of the active progress bar. +chapter-marker-active-height-fraction=1 +# [[ chapter marker color options ]] # +# color of chapter marker before/after it has been passed. BGR hex. +chapter-marker-before=7A77F2 +chapter-marker-after=2D2D2D + +#[=[ timing options ]=]# +# Amount of time (in seconds) to display OSD when button is pressed. +request-display-duration=2 +# How often the display is redrawn, in seconds. Affects smoothness of +# animations, but lower values may use more CPU (the default is +# negligible on my old C2D, and looks okay to me) +redraw-period=0.03 + +#[=[ /!\ FONT SIZE/METRICS STUFF. CHANGE AT YOUR OWN RISK /!\ ]=]# +# Font for displaying the title and times. Changing this may warrant +# modifying some of the font metrics numbers below for proper +# display. Not recommended. +font=Source Sans Pro Semibold +# Font size for time elapsed and remaining. +time-font-size=30 +# Font size for hover time. +hover-time-font-size=26 +# Manually calculated collision/placement metrics based on font +# sizes. Probably want to change these if you change the font or +# sizes. Unfortunately, my automated solution isnt easy to set up. +# Pixels. +hover-time-left-margin=120 +hover-time-right-margin=130 +# These primarily affect animations. If the script thinks the items +# are off screen, they wont be drawn. Positive numbers will look +# goofy. +elapsed-offscreen-pos=-100 +remaining-offscreen-pos=-100 +title-offscreen-pos=-40 diff --git a/files/mpv/mpv.conf b/files/mpv/mpv.conf new file mode 100644 index 0000000..f274d1b --- /dev/null +++ b/files/mpv/mpv.conf @@ -0,0 +1,80 @@ +cover-art-auto = no +no-keepaspect-window +no-terminal + +## GIF +[extension.webm] +loop-file = inf +[extension.gif] +loop-file = inf +osc = no + +## Music +[extension.opus] +no-video +[extension.mp3] +no-video +[extension.flac] +no-video +[extension.ogg] +no-video +[extension.m4a] +no-video + +## Screenshot +screenshot-format=png +screenshot-tag-colorspace=yes +screenshot-high-bit-depth=yes +screenshot-sw=yes +screenshot-png-compression=0 +screenshot-png-filter=0 +screenshot-template='%F%wM%wS' + +## Image +# classic opengl-hq parameter, change at will +scale=spline36 +cscale=spline36 +dscale=mitchell +dither-depth=auto +correct-downscaling +sigmoid-upscaling +# debanding seems rarely useful with images +#deband +# dark grey background instead of pure black +background=0.2 + +## MISC +mute=yes +# the osc is mostly useful for videos +osc=no +# don't try to autoload subtitles or audio files +sub-auto=no +audio-file-auto=no +# get rid of the useless V: 00:00:00 / 00:00:00 line +term-status-msg= + +# replace mpv with mvi in the window title +title="${?media-title:${media-title}}${!media-title:No file} - mvi" + +# don't slideshow by default +image-display-duration=inf +# loop files in case of webms or gifs +loop-file=inf +# and loop the whole playlist +loop-playlist=inf + +# you need this if you plan to use drag-to-pan or pan-follows-cursor with MOUSE_LEFT +window-dragging=no + +#according to haasn, aspect ratio info for PNG and JPG is "universally bust" +[extension.png] +video-aspect-override=no + +[extension.jpg] +video-aspect-override=no + +[extension.jpeg] +profile=extension.jpg + +[silent] +msg-level=all=no diff --git a/files/newsraft/config b/files/newsraft/config new file mode 100644 index 0000000..18f4466 --- /dev/null +++ b/files/newsraft/config @@ -0,0 +1,28 @@ +# Set some settings +set global-section-name All +set color-list-item-important-fg black +set color-list-item-important-bg red + +set color-list-item-unread-fg blue +set color-list-feed-unread-fg blue +set color-list-section-unread-fg blue + +set scrolloff 2 + +# Remove some binds +unbind g +unbind y +unbind v + +bind s status-history-menu + +# Bind some binds +bind y exec echo %l | xsel -b +bind b exec setsid -f icecat %l >/dev/null 2>&1 & disown +bind m exec setsid -f mpv %l >/dev/null 2>&1 & disown +bind v exec setsid -f nsxiv-url %l >/dev/null 2>&1 & disown +bind c exec kak ~/.config/newsraft/config +bind gk select-first +bind gj select-last +bind R reload-all +bind z exec ~/bin/bookmark %l diff --git a/files/newsraft/feeds b/files/newsraft/feeds new file mode 100644 index 0000000..09b1bc3 --- /dev/null +++ b/files/newsraft/feeds @@ -0,0 +1,115 @@ +@ Articles +https://bt.ht/atom.xml "Brad Taunt" +https://rss.app/feeds/k6IcXeqAm5sNQXth.xml "Cem Keylan" +https://cyber.dabamos.de/blog/feed.rss "Cyber Dabamos" +https://drewdevault.com/blog/index.xml "Drew Devault" +https://edwardsnowden.substack.com/feed "Edward Snowden" {60} +https://feeds.twit.tv/floss.xml "Floss Weekly" +https://forums.freebsd.org/forums/howtos-and-faqs-moderated.39/index.rss "FreeBSD Forum Hacks and FAQ's" +https://forums.freebsd.org/forums/-/index.rss "FreeBSD Forum Index" +https://m7.rs/feed.xml "Gabriel Fontes (Based)" +https://gsthnz.com/posts/index.xml "Gustavo Heinz" +https://lukesmith.xyz/rss.xml "Luke Smith" {60} +https://www.privacytools.io/guides/rss.xml "Privacy Tools" +https://ohhelloana.blog/feed.xml "Oh Hello Ana" +https://stallman.org/rss/rss.xml "Richard Stallman" +https://simonsafar.com/index.xml "Simon Safar" +https://www.thedroneely.com/posts/rss.xml "Thedro Neely" +https://wilw.dev/rss.xml "Will Webberley's blog" + +@ Chess +https://yewtu.be/feed/channel/UCQHX6ViZmPsWiYSFAyS0a3Q "Gotham Chess" +https://yewtu.be/feed/channel/UCwWm-fABiYbcL7ro8qONd6Q "GM Krikor" +https://yewtu.be/feed/channel/UCweCc7bSMX5J4jEH7HFImng "GMHikaru" +https://yewtu.be/feed/channel/UCSAo4zvM1oAJ_i4C6q6ejBA "Raffael Chess" +https://yewtu.be/feed/channel/UC5K-TQsItHnNLjqYf8A3CTw "Xadrez Brasil" + +@ Politics {60} +https://yewtu.be/feed/channel/UCkSjy-IOEq-eMtarZl2uH1Q "Arthur do Val" +https://yewtu.be/feed/channel/UC7-Pp09PJX_SYP9oyMzUAtg "Assim disse o João" +https://odysee.com/$/rss/@Fhoer:f "Fhoer" +https://yewtu.be/feed/channel/UCqbz_4hrf2D58UFBOleuFnQ "História Cabeluda" +https://yewtu.be/feed/channel/UCAMExYqcweM7PUebKfmLdFA "História Pública" +https://odysee.com/$/rss/@ideiasradicais:a4 "Ideias Radicais" +https://yewtu.be/feed/channel/UCpHQyEuBXwYBvXC1_NResCg "Kim Kataguiri" +https://yewtu.be/feed/channel/UCCmh3nJayT-7jEM6hg2vP9Q "Laura Sabino" +https://www.yewtu.be/feed/channel/UCk5BcU1rOy6hepflk7_q_Pw "Meteoro Brasil" +https://yewtu.be/feed/channel/UCZdJE8KpuFm6NRafHTEIC-g "Tempero Drag" +https://yewtu.be/feed/channel/UC0fGGprihDIlQ3ykWvcb9hg "Tese Onze" + +@ Hacker Videos {60} +https://odysee.com/$/rss/@blenderdumbass:f "Blender Dumbass" +https://odysee.com/$/rss/@BrodieRobertson:5 "Brodie Robertson" +https://odysee.com/$/rss/@debxp:9 "Debxp" +https://odysee.com/$/rss/@DistroTube:2 "Distrotube" +https://yewtu.be/feed/channel/UCAXxhRve_scJJdJI4cwRSLg "Eriberto Mota" +https://fossandcrafts.org/rss-feed-ogg.rss "Foss && Crafts" +https://odysee.com/$/rss/@rossmanngroup:a "Louis Rossman" +https://odysee.com/$/rss/@Luke:7 "Luke Smith" +https://odysee.com/$/rss/@AlphaNerd:8 "Mental Outlaw" +https://odysee.com/$/rss/@monerocommunityworkgroup:8 "Monero Community Workgroup" +https://odysee.com/$/rss/@Mythologos:3 "Mythologos" +https://odysee.com/$/rss/@kretcheu2001:8 "Paulo Kretcheu" +https://odysee.com/$/rss/@slackjeff:1 "Slackjeff" +https://yewtu.be/feed/channel/UCjr2bPAyPV7t35MvcgT3W8Q "The Hated One" +https://odysee.com/$/rss/@TheLinuxExperiment:e "The Linux Experiment" + +@ Enviromental News {720} +https://www.greenpeace.org/brasil/feed/ "Greenpeace - Brasil" +https://www.greenpeace.org/international/feed/ "Greenpeace - International" +https://revistaforum.com.br/rss/feed.html?r=5 "Revista Fórum - Meio Ambiente" + +@ Free Software Projects {86400} +https://guix.gnu.org/feeds/blog.atom "GuixSD" +https://hpc.guix.info/blog/feed.xml "Guix High Performance Computing" +https://www.hyperbola.info/feeds/news/ "HyperbolaBSD News" +https://jank-lang.org/blog/feed.xml "Jank Lang" +https://github.com/luakit/luakit/commits/master.atom "Luakit" +https://github.com/dmbaturin/ocamlbook.org/commits/master.atom "OCaml Textbook" +https://www.parabola.nu/feeds/news/ "Parabola GNU News" +https://www.parabola.nu/feeds/packages/ "Parabola GNU Packages" +https://github.com/mini-rose/rose/commits/master.atom "Rose" +https://blog.tox.chat/feed/ "Tox Project" + +@ Social Media {180} +https://rsshub.app/acm/amturingaward "A.M. Turing Award" +https://www.reddit.com/r/bash/.rss "r/bash" +https://www.reddit.com/r/commandline/.rss "r/commandline" +https://rsshub.app/twitter/user/CppCon "Twitter: CppCon" +https://rsshub.app/twitter/user/CppStack "Twitter: C++ StackOverflow" +https://rsshub.app/twitter/user/cppnow "Twitter: C++ Now" +https://rsshub.app/twitter/user/meetingcpp "Twitter: Meeting C++" +https://rsshub.app/twitter/user/CppLibHunt "Twitter: C++ LibHunt" +https://rsshub.app/atcoder/contest/en/upcoming "Upcoming Contests - At Coder" + +@ Mathematics and Computer Science {60} +https://yewtu.be/feed/channel/UCYO_jab_esuFRV4b17AJtAw "3Blue1Brown" +https://yewtu.be/feed/channel/UCzBjutX2PmitNF4avysL-vg "Aleph 0" +https://yewtu.be/feed/channel/UC9-y-6csu5WGm29I7JiwpnA "Computerphile" +https://yewtu.be/feed/channel/UCq7UdlqyyZA7Bi-OB5xIU5Q "James Boyer" +https://yewtu.be/feed/channel/UC0-gvTKzYKQcjzKcSPfeIkA "Kinertia" +https://yewtu.be/feed/channel/UC1_uAIS3r8Vu6JjXWvastJg "Mathologer" +https://yewtu.be/feed/channel/UC6jM0RFkr4eSkzT5Gx0HOAw "Michael Penn" +https://yewtu.be/feed/channel/UCoxcjq-8xIDTYp3uz647V5A "Numberphile" + +@ News {60} +https://agencia.fapesp.br/rss/ "Agência Fapesp" +https://baixacultura.org/feed/ "Baixa Cultura" +https://www.brasildefato.com.br/rss2.xml "Brasil de Fato" +https://static.fsf.org/fsforg/rss/news.xml "Free Software Foundation" +https://hnrss.org/newest?q=C%2B%2B+OR+mesh+OR+GNU+OR+Free+Software+OR+P2P "Hacker News" +https://theintercept.com/feed/?lang=pt "Intercept - Brasil" +https://theintercept.com/feed/?lang=en "Intercept - International" +https://morss.it/https://jornal.usp.br/ "Jornal USP" +https://www.nexojornal.com.br/rss.xml "Nexo Jornalismo" +https://nucleo.jor.br/rss/ "Núcleo Jornalismo" +https://www.phoronix.com/rss.php "Phoronix" +https://revistaforum.com.br/rss/feed.html?r=96 "Revista Fórum - Brasil" +https://revistaforum.com.br/rss/feed.html?r=4 "Revista Fórum - Internacional" +https://revistaforum.com.br/rss/feed.html?r=1 "Revista Fórum - Política" +https://revistaforum.com.br/rss/feed.html?r=735 "Revista Fórum - Tecnologia" +http://rss.slashdot.org/Slashdot/slashdotMain "Slashdot" + +@ Vegan {10} +https://yewtu.be/feed/channel/UCYamjJAo9qHUIN1jLYEDN4w "Eduardo Corassa" +https://yewtu.be/feed/channel/UCZ6JHFBaDUJ9wfo41HSII_w "Fábio Chaves" diff --git a/files/thinkfan/modprobe.d/thinkfan.conf b/files/thinkfan/modprobe.d/thinkfan.conf new file mode 100644 index 0000000..beee4fb --- /dev/null +++ b/files/thinkfan/modprobe.d/thinkfan.conf @@ -0,0 +1 @@ +options thinkpad_acpi experimental=1 fan_control=1 diff --git a/files/thinkfan/thinkfan.conf b/files/thinkfan/thinkfan.conf new file mode 100644 index 0000000..bb0884f --- /dev/null +++ b/files/thinkfan/thinkfan.conf @@ -0,0 +1,16 @@ +fans: +- tpacpi: /proc/acpi/ibm/fan +sensors: + - hwmon: /sys/devices/platform/coretemp.0/hwmon + indices: [1,2,3] +levels: + - [0, 0, 35] + - [1, 30, 40] + - [2, 35, 45] + - [3, 40, 50] + - [4, 45, 55] + - [5, 50, 60] + - [6, 55, 65] + - [7, 60, 70] + - ["level full-speed", 65, 260] + diff --git a/files/zathura/zathurarc b/files/zathura/zathurarc new file mode 100644 index 0000000..2ce7bd6 --- /dev/null +++ b/files/zathura/zathurarc @@ -0,0 +1,22 @@ +set selection-clipboard clipboard + +map gk goto top +map gj goto bottom +unmap d + +set pages-per-row 1 + +set statusbar-home-tilde true +set recolor-keephue true + +set index-bg "#000000" +set index-active-fg "#000000" +set index-active-bg "#9688D9" + +set completion-bg "#000000" +set completion-highlight-fg "#000000" +set completion-highlight-bg "#9688D9" + +# LATEX +set synctex true +set synctex-editor-command "code -g %{input}:%{line}" diff --git a/modules/radix/files/doas.scm b/modules/radix/files/doas.scm new file mode 100644 index 0000000..0aafe22 --- /dev/null +++ b/modules/radix/files/doas.scm @@ -0,0 +1,9 @@ +(define-module (radix files doas) + #:use-module (gnu) + #:export (completion config)) + +(define completion + (local-file "../../../files/doas/doas-completion")) + +(define config + (local-file "../../../files/doas/doas.conf")) diff --git a/modules/radix/files/emacs.scm b/modules/radix/files/emacs.scm new file mode 100644 index 0000000..b635125 --- /dev/null +++ b/modules/radix/files/emacs.scm @@ -0,0 +1,9 @@ +(define-module (radix files emacs) + #:use-module (gnu) + #:export (init theme)) + +(define init + (local-file "../../../files/emacs/init.el")) + +(define theme + (local-file "../../../files/emacs/meimuna-theme.el")) diff --git a/modules/radix/files/fish.scm b/modules/radix/files/fish.scm new file mode 100644 index 0000000..65932c5 --- /dev/null +++ b/modules/radix/files/fish.scm @@ -0,0 +1,15 @@ +(define-module (radix files fish) + #:use-module (gnu) + #:export (variables + functions-greeting + functions-prompt)) + +(define variables + (local-file "../../../files/fish/fish_variables")) + +(define functions-greeting + (plain-file "../../../files/fish/functions/fish_greeting.fish")) + +(define functions-prompt + (local-file "../../../files/fish/functions/fish_prompt.fish")) + diff --git a/modules/radix/files/git.scm b/modules/radix/files/git.scm new file mode 100644 index 0000000..1f88379 --- /dev/null +++ b/modules/radix/files/git.scm @@ -0,0 +1,6 @@ +(define-module (radix files git) + #:use-module (gnu) + #:export (config)) + +(define config + (local-file "../../../files/git/config")) diff --git a/modules/radix/files/info.scm b/modules/radix/files/info.scm new file mode 100644 index 0000000..bf2f692 --- /dev/null +++ b/modules/radix/files/info.scm @@ -0,0 +1,6 @@ +(define-module (radix files info) + #:use-module (gnu) + #:export (keys)) + +(define keys + (local-file "../../../files/infokeys")) diff --git a/modules/radix/files/lf.scm b/modules/radix/files/lf.scm new file mode 100644 index 0000000..f43df6f --- /dev/null +++ b/modules/radix/files/lf.scm @@ -0,0 +1,15 @@ +(define-module (radix files lf) + #:use-module (gnu) + #:export (cleaner config run preview)) + +(define cleaner + (local-file "../../../files/lf/cleaner")) + +(define config + (local-file "../../../files/lf/lfrc")) + +(define run + (local-file "../../../files/lf/lfrun")) + +(define preview + (local-file "../../../files/lf/preview")) diff --git a/modules/radix/files/mpv.scm b/modules/radix/files/mpv.scm new file mode 100644 index 0000000..7486196 --- /dev/null +++ b/modules/radix/files/mpv.scm @@ -0,0 +1,10 @@ +(define-module (radix files mpv) + #:use-module (gnu) + #:export (config input)) + +(define config + (local-file "../../../files/mpv/mpv.conf")) + +(define input + (local-file "../../../files/mpv/input.conf")) + diff --git a/modules/radix/files/newsraft.scm b/modules/radix/files/newsraft.scm new file mode 100644 index 0000000..94babc0 --- /dev/null +++ b/modules/radix/files/newsraft.scm @@ -0,0 +1,9 @@ +(define-module (radix files newsraft) + #:use-module (gnu) + #:export (config input)) + +(define config + (local-file "../../../files/newsraft/config")) + +(define input + (local-file "../../../files/newsraft/feeds")) diff --git a/modules/radix/files/thinkfan.scm b/modules/radix/files/thinkfan.scm new file mode 100644 index 0000000..9ed52f4 --- /dev/null +++ b/modules/radix/files/thinkfan.scm @@ -0,0 +1,9 @@ +(define-module (radix files thinkfan) + #:use-module (gnu) + #:export (config modprobe-config)) + +(define config + (local-file "../../../files/thinkfan/thinkfan.conf")) + +(define modprobe-config + (local-file "../../../files/thinkfan/modprobe.d/thinkfan.conf")) diff --git a/modules/radix/files/zathura.scm b/modules/radix/files/zathura.scm new file mode 100644 index 0000000..bc30d37 --- /dev/null +++ b/modules/radix/files/zathura.scm @@ -0,0 +1,6 @@ +(define-module (radix files zathura) + #:use-module (gnu) + #:export (config)) + +(define config + (local-file "../../../files/zathura/zathurarc")) diff --git a/radio.scm b/radio.scm index 48f15d4..8e21154 100644 --- a/radio.scm +++ b/radio.scm @@ -1,10 +1,15 @@ #|Modules|# (use-modules - #|GNU |# (gnu) (gnu home) (gnu home services) + #|GNU |# (gnu) + (gnu home) + (gnu home services) #|Guix |# (guix colors) - #|Radix|# (radix packages fonts) (radix packages wm) (radix home services) + #|Radix|# (radix packages fonts) + (radix packages wm) + (radix home services) (radix utils) - #|SRFI |# (srfi srfi-13) (srfi srfi-26)) + #|SRFI |# (srfi srfi-13) + (srfi srfi-26)) (use-package-modules #|A|# admin