Dump nixos config after scrubing

This commit is contained in:
Mariano Uvalle 2025-05-03 23:42:03 -07:00
commit 5fa4c76c24
854 changed files with 30072 additions and 0 deletions

View file

@ -0,0 +1,73 @@
# Spotify Shell
![demo](./demo.gif)
## Features
1. Supports following commands (same as `sp` client):
- `play`/`pause`/`next`;
- any other string will start a search and play the first result for a given search query;
- feh - shows the current artwork with `feh`;
1. Stores history and allows navigating through it;
1. Highly customizable
## Controls
Keyboard navigation (copied from [`awful.prompt`](https://awesomewm.org/doc/api/libraries/awful.prompt.html) API documentation page):
| Name | Usage |
|---|---|
| CTRL+A | beginning-of-line |
| CTRL+B | backward-char |
| CTRL+C | cancel |
| CTRL+D | delete-char |
| CTRL+E | end-of-line |
| CTRL+J | accept-line |
| CTRL+M | accept-line |
| CTRL+F | move-cursor-right |
| CTRL+H | backward-delete-char |
| CTRL+K | kill-line |
| CTRL+U | unix-line-discard |
| CTRL+W | unix-word-rubout |
| CTRL+BACKSPACE | unix-word-rubout |
| SHIFT+INSERT | paste |
| HOME | beginning-of-line |
| END | end-of-line |
| CTRL+R | reverse history search, matches any history entry containing search term. |
| CTRL+S | forward history search, matches any history entry containing search term. |
| CTRL+UP | ZSH up line or search, matches any history entry starting with search term. |
| CTRL+DOWN | ZSH down line or search, matches any history entry starting with search term. |
| CTRL+DELETE | delete the currently visible history entry from history file. This does not delete new commands or history entries under user editing. |
## Installation
1. Install [sp](https://gist.github.com/streetturtle/fa6258f3ff7b17747ee3) - CLI client for [Spotify for Linux](https://www.spotify.com/ca-en/download/linux/):
```bash
$ sudo git clone https://gist.github.com/fa6258f3ff7b17747ee3.git ~/dev/
$ sudo ln -s ~/dev/sp /usr/local/bin/
```
Check if it works by running `sp help`.
1. Get an 'id' and 'secret' from [developer.spotify.com](https://beta.developer.spotify.com/documentation/general/guides/app-settings/) and paste it in the header of the `sp` (`SP_ID` and `SP_SECRET`) - this enables search feature.
1. Clone this repo under **~/.config/awesome/**
1. Require spotify-shell at the beginning of **rc.lua**:
```lua
local spotify_shell = require("awesome-wm-widgets.spotify-shell.spotify-shell")
```
1. Add a shortcut which will show Spotify Shell widget:
```lua
awful.key({ modkey, }, "d", function () spotify_shell.launch() end, {description = "spotify shell", group = "music"}),
```
1. It uses icon from [Papirus Icon Theme](https://github.com/PapirusDevelopmentTeam/papirus-icon-theme). So you should either install this icon theme, or download an icon you want to use and provide path to it in **spotify-shell.lua**.

Binary file not shown.

After

Width:  |  Height:  |  Size: 457 KiB

View file

@ -0,0 +1,75 @@
-------------------------------------------------
-- Spotify Shell for Awesome Window Manager
-- Simplifies interaction with Spotify for Linux
-- More details could be found here:
-- https://github.com/streetturtle/awesome-wm-widgets/tree/master/spotify-shell
-- @author Pavel Makhov
-- @copyright 2018 Pavel Makhov
-------------------------------------------------
local awful = require("awful")
local gfs = require("gears.filesystem")
local wibox = require("wibox")
local gears = require("gears")
local ICON = '/usr/share/icons/Papirus-Light/32x32/apps/spotify-linux-48x48.svg'
local spotify_shell = awful.widget.prompt()
local w = wibox {
bg = '#1e252c',
border_width = 1,
border_color = '#84bd00',
max_widget_size = 500,
ontop = true,
height = 50,
width = 250,
shape = function(cr, width, height)
gears.shape.rounded_rect(cr, width, height, 3)
end
}
w:setup {
{
{
image = ICON,
widget = wibox.widget.imagebox,
resize = false
},
id = 'icon',
top = 9,
left = 10,
layout = wibox.container.margin
},
{
layout = wibox.container.margin,
left = 10,
spotify_shell,
},
id = 'left',
layout = wibox.layout.fixed.horizontal
}
local function launch()
w.visible = true
awful.placement.top(w, { margins = {top = 40}, parent = awful.screen.focused()})
awful.prompt.run{
prompt = "<b>Spotify Shell</b>: ",
bg_cursor = '#84bd00',
textbox = spotify_shell.widget,
history_path = gfs.get_dir('cache') .. '/spotify_history',
exe_callback = function(input_text)
if not input_text or #input_text == 0 then return end
awful.spawn("sp " .. input_text)
end,
done_callback = function()
w.visible = false
end
}
end
return {
launch = launch
}