From 3083c9d4e02ce3b81fbaf8ece2ba4e66144f6160 Mon Sep 17 00:00:00 2001 From: Momin Barlas Date: Tue, 9 May 2023 13:03:32 -0400 Subject: [PATCH 1/3] Several unique changes made to improve the user experience. - Added a lock screen on close of the lid using xss-lock - Replaced mpd with mopidy - Added a lock screen signal so that the lock screen can be called from anywhere - Added xss-lock and mopidy to the autostart - Reconfigured ncmpcpp's visualizer to use localhost:5555 as the source - Configured ncmpcpp's lyrics_fetchers variable - Added a new picom config file that allows better hiding of the user's session when locked (picom1.conf is the config from rxyhn's dotfiles) - Updated the README to reflect the changes - Added hibernate button to exit screen - Modified exit screen commands to run even if a process is inhibiting the action --- .github/README.md | 9 +- config/awesome/configuration/autostart.lua | 4 +- config/awesome/configuration/picom.conf | 46 +++- config/awesome/configuration/picom1.conf | 135 +++++++++++ config/awesome/modules/exit-screen.lua | 256 +++++++++++---------- config/awesome/signal/lockScreen.lua | 6 + config/awesome/utilities/lockOnClose | 4 + config/mopidy/mopidy.conf | 112 +++++++++ config/mpd/mpd.conf | 35 --- config/ncmpcpp/config | 10 +- 10 files changed, 438 insertions(+), 179 deletions(-) create mode 100644 config/awesome/configuration/picom1.conf create mode 100644 config/awesome/signal/lockScreen.lua create mode 100755 config/awesome/utilities/lockOnClose create mode 100644 config/mopidy/mopidy.conf delete mode 100644 config/mpd/mpd.conf diff --git a/.github/README.md b/.github/README.md index 8305ff5b..5b9e026f 100644 --- a/.github/README.md +++ b/.github/README.md @@ -133,15 +133,12 @@ paru -S awesome-git paru -Sy picom-git wezterm rofi acpi acpid acpi_call upower lxappearance-gtk3 \ jq inotify-tools polkit-gnome xdotool xclip gpick ffmpeg blueman redshift \ pipewire pipewire-alsa pipewire-pulse alsa-utils brightnessctl feh maim \ -mpv mpd mpc mpdris2 python-mutagen ncmpcpp playerctl --needed +mpv mopidy mopidy-mpd mopidy-local mopidy-mpris mpc mpdris2 python-mutagen \ +ncmpcpp-git playerctl xss-lock --needed ``` -> Enable Services +:Note: If your _AUR Helper_ is [yay](https://github.com/Jguer/yay), you can replace `paru` with `yay`. -```sh -systemctl --user enable mpd.service -systemctl --user start mpd.service -``` diff --git a/config/awesome/configuration/autostart.lua b/config/awesome/configuration/autostart.lua index 42e3ce5f..0a5647fe 100644 --- a/config/awesome/configuration/autostart.lua +++ b/config/awesome/configuration/autostart.lua @@ -9,7 +9,8 @@ local function autostart_apps() awful.spawn("picom --config " .. config_dir .. "configuration/picom.conf", false) end) --- Music Server - helpers.run.run_once_pgrep("mpd") + helpers.run.run_once_pgrep("mopidy") + helpers.run.run_once_pgrep("mopidy local scan") helpers.run.run_once_pgrep("mpDris2") --- Polkit Agent helpers.run.run_once_ps( @@ -19,6 +20,7 @@ local function autostart_apps() --- Other stuff helpers.run.run_once_grep("blueman-applet") helpers.run.run_once_grep("nm-applet") + helpers.run.run_once_grep("xss-lock -- .config/awesome/utilities/lockOnClose.sh") end autostart_apps() diff --git a/config/awesome/configuration/picom.conf b/config/awesome/configuration/picom.conf index fed10ecf..24d26e1b 100644 --- a/config/awesome/configuration/picom.conf +++ b/config/awesome/configuration/picom.conf @@ -2,8 +2,7 @@ # ░█▀▀░░█░░█░░░█░█░█░█░░░░█░░░█░█░█░█░█▀▀ # ░▀░░░▀▀▀░▀▀▀░▀▀▀░▀░▀░▀░░▀▀▀░▀▀▀░▀░▀░▀░░ # -# rxyhn X compositor configuration - +# BaigHack3rss X compositor configuration # ░█▀▀░█▀█░█▀▄░█▀█░█▀▀░█▀▄░█▀▀ # ░█░░░█░█░█▀▄░█░█░█▀▀░█▀▄░▀▀█ @@ -69,9 +68,25 @@ fade-exclude = [ active-opacity = 1.0; inactive-opacity = 1.0; frame-opacity = 1.0; +# frame-opacity = 0.7; inactive-dim = 0.0; -opacity-rule = []; +opacity-rule = [ +# "100:class_g = 'slop'", # maim + "70:class_g = 'org.wezfurlong.wezterm'", + "70:class_g = 'Code'", + "70:class_g = 'Thunar'", + "70:class_g = 'music'", +# "70:class_g = 'discord'", +# "70:name = 'Virtual Machine Manager'", +# "70:name = 'New VM'", +# "70:class_g = 'Locate ISO media volume'", +# "70:class_g = 'libreoffice-writer'", +# "70:class_g = 'libreoffice-impress'", + "70:class_g = 'Spotify'", + "70:class_g = 'Ulauncher'", + "70:class_g = 'Joplin'", +]; focus-exclude = [ #"class_g ?= 'rofi'" @@ -92,17 +107,24 @@ focus-exclude = [ # ░▀▀░░▀▀▀░▀▀▀░▀░▀░▀░▀░▀▀▀░▀░▀░▀▀▀ blur: { - method = "dual_kawase"; - strength = 10; + method = "dual_kawase"; + strength = 3; background = false; background-frame = true; - background-fixed = true; + background-fixed = false; } blur-background-exclude = [ # Exclude everything except windows of type "splash" - # (Notice the inverse condition) - "window_type != 'splash'" + # (Notice the inverse condition)` + "window_type != 'splash' && + class_g != 'Code' && + class_g != 'music' && + class_g != 'Thunar' && + class_g != 'Spotify' && + class_g != 'Ulauncher' && + class_g != 'Joplin' && + class_g != 'org.wezfurlong.wezterm' && class_g != 'discord'", ]; @@ -111,7 +133,7 @@ blur-background-exclude = [ # ░▀▀▀░▀▀▀░▀░▀░▀▀▀░▀░▀░▀░▀░▀▀▀░░░▀▀▀░▀▀▀░░▀░░░▀░░▀▀▀░▀░▀░▀▀▀░▀▀▀ backend = "glx"; -glx-no-stencil = false; +glx-no-stencil = true; glx-copy-from-front = false; use-damage = true; vsync = true; @@ -119,6 +141,10 @@ detect-rounded-corners = true; detect-client-leader = true; detect-transient = true; unredir-if-possible = true; +transparent-clipping = true; +transparent-clipping-exclude = [ + "window_type != 'splash'" +]; wintypes: { @@ -132,4 +158,4 @@ wintypes: dialog = {full-shadow = true}; dock = {full-shadow = true;}; dropdown_menu = { full-shadow = true;}; -}; +}; \ No newline at end of file diff --git a/config/awesome/configuration/picom1.conf b/config/awesome/configuration/picom1.conf new file mode 100644 index 00000000..fed10ecf --- /dev/null +++ b/config/awesome/configuration/picom1.conf @@ -0,0 +1,135 @@ +# ░█▀█░▀█▀░█▀▀░█▀█░█▄█░░░░█▀▀░█▀█░█▀█░█▀▀ +# ░█▀▀░░█░░█░░░█░█░█░█░░░░█░░░█░█░█░█░█▀▀ +# ░▀░░░▀▀▀░▀▀▀░▀▀▀░▀░▀░▀░░▀▀▀░▀▀▀░▀░▀░▀░░ +# +# rxyhn X compositor configuration + + +# ░█▀▀░█▀█░█▀▄░█▀█░█▀▀░█▀▄░█▀▀ +# ░█░░░█░█░█▀▄░█░█░█▀▀░█▀▄░▀▀█ +# ░▀▀▀░▀▀▀░▀░▀░▀░▀░▀▀▀░▀░▀░▀▀▀ + +corner-radius = 12; +rounded-corners-exclude = [ + # "class_g ?= 'rofi'", + "class_g ?= 'peek'", + "window_type *= 'dock'", + "window_type = 'menu'", + "window_type = 'tooltip'", + # "window_type = 'popup_menu'", + "window_type = 'dropdown_menu'" +]; + + +# ░█▀▀░█░█░█▀█░█▀▄░█▀█░█░█ +# ░▀▀█░█▀█░█▀█░█░█░█░█░█▄█ +# ░▀▀▀░▀░▀░▀░▀░▀▀░░▀▀▀░▀░▀ + +shadow = true; +shadow-radius = 12; +shadow-opacity = 0.6; +shadow-offset-x = -12; +shadow-offset-y = -12; +shadow-color = "#000000"; +xinerama-shadow-crop = true; +shadow-ignore-shaped = false; +shadow-exclude = [ + "class_g = 'slop'", + "class_g ?= 'peek'", + "_NET_WM_WINDOW_TYPE@:a *= 'SPLASH'", + # "_NET_WM_WINDOW_TYPE@:a *= 'NOTIFICATION'", + # "window_type *= 'menu'", + "window_type = 'utility'", + "window_type = 'dropdown_menu'", + # "window_type = 'popup_menu'" +]; + + +# ░█▀▀░█▀█░█▀▄░▀█▀░█▀█░█▀▀ +# ░█▀▀░█▀█░█░█░░█░░█░█░█░█ +# ░▀░░░▀░▀░▀▀░░▀▀▀░▀░▀░▀▀▀ + +fading = true; +fade-in-step = 0.03; +fade-out-step = 0.03; +fade-delta = 5; + +no-fading-openclose = false +no-fading-destroyed-argb = true + +fade-exclude = [ + "class_g = 'slop'" # maim +] + + +# ░█▀█░█▀█░█▀█░█▀▀░▀█▀░▀█▀░█░█ +# ░█░█░█▀▀░█▀█░█░░░░█░░░█░░░█░ +# ░▀▀▀░▀░░░▀░▀░▀▀▀░▀▀▀░░▀░░░▀░ + +active-opacity = 1.0; +inactive-opacity = 1.0; +frame-opacity = 1.0; +inactive-dim = 0.0; + +opacity-rule = []; + +focus-exclude = [ + #"class_g ?= 'rofi'" + #'_NET_WM_NAME@:s = "rofi"' + "class_g ?= 'slop'", + "name = 'rofi'", + "class_g ?= 'Steam'", + "_NET_WM_WINDOW_TYPE@:a *= 'MENU'", + "window_type *= 'menu'", + "window_type = 'utility'", + "window_type = 'dropdown_menu'", + "window_type = 'popup_menu'" +]; + + +# ░█▀▄░█░░░█░█░█▀▄░█▀▄░▀█▀░█▀█░█▀▀ +# ░█▀▄░█░░░█░█░█▀▄░█▀▄░░█░░█░█░█░█ +# ░▀▀░░▀▀▀░▀▀▀░▀░▀░▀░▀░▀▀▀░▀░▀░▀▀▀ + +blur: { + method = "dual_kawase"; + strength = 10; + background = false; + background-frame = true; + background-fixed = true; +} + +blur-background-exclude = [ + # Exclude everything except windows of type "splash" + # (Notice the inverse condition) + "window_type != 'splash'" +]; + + +# ░█▀▀░█▀▀░█▀█░█▀▀░█▀▄░█▀█░█░░░░░█▀▀░█▀▀░▀█▀░▀█▀░▀█▀░█▀█░█▀▀░█▀▀ +# ░█░█░█▀▀░█░█░█▀▀░█▀▄░█▀█░█░░░░░▀▀█░█▀▀░░█░░░█░░░█░░█░█░█░█░▀▀█ +# ░▀▀▀░▀▀▀░▀░▀░▀▀▀░▀░▀░▀░▀░▀▀▀░░░▀▀▀░▀▀▀░░▀░░░▀░░▀▀▀░▀░▀░▀▀▀░▀▀▀ + +backend = "glx"; +glx-no-stencil = false; +glx-copy-from-front = false; +use-damage = true; +vsync = true; +detect-rounded-corners = true; +detect-client-leader = true; +detect-transient = true; +unredir-if-possible = true; + +wintypes: +{ + tooltip = { fade = true; full-shadow = true; focus = true; blur-background = false;}; + menu = { full-shadow = true;}; + popup_menu = { full-shadow = true;}; + utility = {full-shadow = true;}; + toolbar = {full-shadow = true;}; + normal = {full-shadow = true;}; + notification = {full-shadow = true;}; + dialog = {full-shadow = true}; + dock = {full-shadow = true;}; + dropdown_menu = { full-shadow = true;}; +}; diff --git a/config/awesome/modules/exit-screen.lua b/config/awesome/modules/exit-screen.lua index f7113f7d..79d3ea25 100644 --- a/config/awesome/modules/exit-screen.lua +++ b/config/awesome/modules/exit-screen.lua @@ -4,8 +4,6 @@ local wibox = require("wibox") local beautiful = require("beautiful") local dpi = beautiful.xresources.apply_dpi local helpers = require("helpers") -local lock_screen = require("modules.lockscreen") -lock_screen.init() --- Minimalist Exit Screen --- ~~~~~~~~~~~~~~~~~~~~~~ @@ -17,79 +15,84 @@ local reboot_text_icon = "" local suspend_text_icon = "" local exit_text_icon = "" local lock_text_icon = "" +local hibernate_text_icon = "" local button_bg = beautiful.black local button_size = dpi(120) --- Commands local poweroff_command = function() - awful.spawn.with_shell("systemctl poweroff") - awesome.emit_signal("module::exit_screen:hide") + awful.spawn.with_shell("systemctl poweroff -i") + awesome.emit_signal("module::exit_screen:hide") end local reboot_command = function() - awful.spawn.with_shell("systemctl reboot") - awesome.emit_signal("module::exit_screen:hide") + awful.spawn.with_shell("systemctl reboot -i") + awesome.emit_signal("module::exit_screen:hide") end local suspend_command = function() - awesome.emit_signal("module::exit_screen:hide") - lock_screen_show() - awful.spawn.with_shell("systemctl suspend") + awesome.emit_signal("module::exit_screen:hide") + awful.spawn.with_shell("systemctl suspend -i") +end + +local hibernate_command = function() + awesome.emit_signal("module::exit_screen:hide") + awful.spawn.with_shell("systemctl hibernate -i") end local exit_command = function() - awesome.quit() + awesome.quit() end local lock_command = function() - awesome.emit_signal("module::exit_screen:hide") - lock_screen_show() + awesome.emit_signal("module::exit_screen:hide") + awful.spawn.with_shell("loginctl lock-session") end local create_button = function(symbol, hover_color, text, command) - local icon = wibox.widget({ - forced_height = button_size, - forced_width = button_size, - align = "center", - valign = "center", - font = icon_font, - markup = helpers.ui.colorize_text(symbol, beautiful.lighter_black), - widget = wibox.widget.textbox(), - }) - - local button = wibox.widget({ - { - nil, - icon, - expand = "none", - layout = wibox.layout.align.horizontal, - }, - forced_height = button_size, - forced_width = button_size, - border_width = dpi(8), - border_color = beautiful.lighter_black, - shape = helpers.ui.rrect(beautiful.border_radius * 2), - bg = button_bg, - widget = wibox.container.background, - }) - - button:buttons(gears.table.join(awful.button({}, 1, function() - command() - end))) - - button:connect_signal("mouse::enter", function() - icon.markup = helpers.ui.colorize_text(icon.text, hover_color) - button.border_color = hover_color - end) - button:connect_signal("mouse::leave", function() - icon.markup = helpers.ui.colorize_text(icon.text, beautiful.lighter_black) - button.border_color = beautiful.lighter_black - end) - - helpers.ui.add_hover_cursor(button, "hand1") - - return button + local icon = wibox.widget({ + forced_height = button_size, + forced_width = button_size, + align = "center", + valign = "center", + font = icon_font, + markup = helpers.ui.colorize_text(symbol, beautiful.lighter_black), + widget = wibox.widget.textbox(), + }) + + local button = wibox.widget({ + { + nil, + icon, + expand = "none", + layout = wibox.layout.align.horizontal, + }, + forced_height = button_size, + forced_width = button_size, + border_width = dpi(8), + border_color = beautiful.lighter_black, + shape = helpers.ui.rrect(beautiful.border_radius * 2), + bg = button_bg, + widget = wibox.container.background, + }) + + button:buttons(gears.table.join(awful.button({}, 1, function() + command() + end))) + + button:connect_signal("mouse::enter", function() + icon.markup = helpers.ui.colorize_text(icon.text, hover_color) + button.border_color = hover_color + end) + button:connect_signal("mouse::leave", function() + icon.markup = helpers.ui.colorize_text(icon.text, beautiful.lighter_black) + button.border_color = beautiful.lighter_black + end) + + helpers.ui.add_hover_cursor(button, "hand1") + + return button end --- Create the buttons @@ -98,90 +101,95 @@ local reboot = create_button(reboot_text_icon, beautiful.color2, "Reboot", reboo local suspend = create_button(suspend_text_icon, beautiful.color3, "Suspend", suspend_command) local exit = create_button(exit_text_icon, beautiful.color4, "Exit", exit_command) local lock = create_button(lock_text_icon, beautiful.color5, "Lock", lock_command) +local hibernate = create_button(hibernate_text_icon, beautiful.color7, "Hibernate", hibernate_command) local create_exit_screen = function(s) - s.exit_screen = wibox({ - screen = s, - type = "splash", - visible = false, - ontop = true, - bg = beautiful.transparent, - fg = beautiful.fg_normal, - height = s.geometry.height, - width = s.geometry.width, - x = s.geometry.x, - y = s.geometry.y, - }) - - s.exit_screen:buttons(gears.table.join( - awful.button({}, 2, function() - awesome.emit_signal("module::exit_screen:hide") - end), - awful.button({}, 3, function() - awesome.emit_signal("module::exit_screen:hide") - end) - )) - - s.exit_screen:setup({ - nil, - { - nil, - { - poweroff, - reboot, - suspend, - exit, - lock, - spacing = dpi(50), - layout = wibox.layout.fixed.horizontal, - }, - expand = "none", - layout = wibox.layout.align.horizontal, - }, - expand = "none", - layout = wibox.layout.align.vertical, - }) + s.exit_screen = wibox({ + screen = s, + type = "splash", + visible = false, + ontop = true, + bg = beautiful.transparent, + fg = beautiful.fg_normal, + height = s.geometry.height, + width = s.geometry.width, + x = s.geometry.x, + y = s.geometry.y, + }) + + s.exit_screen:buttons(gears.table.join( + awful.button({}, 2, function() + awesome.emit_signal("module::exit_screen:hide") + end), + awful.button({}, 3, function() + awesome.emit_signal("module::exit_screen:hide") + end) + )) + + s.exit_screen:setup({ + nil, + { + nil, + { + poweroff, + reboot, + suspend, + exit, + lock, + hibernate, + spacing = dpi(50), + layout = wibox.layout.fixed.horizontal, + }, + expand = "none", + layout = wibox.layout.align.horizontal, + }, + expand = "none", + layout = wibox.layout.align.vertical, + }) end screen.connect_signal("request::desktop_decoration", function(s) - create_exit_screen(s) + create_exit_screen(s) end) screen.connect_signal("removed", function(s) - create_exit_screen(s) + create_exit_screen(s) end) local exit_screen_grabber = awful.keygrabber({ - auto_start = true, - stop_event = "release", - keypressed_callback = function(self, mod, key, command) - if key == "s" then - suspend_command() - elseif key == "e" then - exit_command() - elseif key == "l" then - lock_command() - elseif key == "p" then - poweroff_command() - elseif key == "r" then - reboot_command() - elseif key == "Escape" or key == "q" or key == "x" then - awesome.emit_signal("module::exit_screen:hide") - end - end, + auto_start = true, + stop_event = "release", + keypressed_callback = function(self, mod, key, command) + if key == "s" then + suspend_command() + elseif key == "e" then + exit_command() + elseif key == "l" then + lock_command() + elseif key == "p" then + poweroff_command() + elseif key == "r" then + reboot_command() + elseif key == "h" then + hibernate_command() + + elseif key == "Escape" or key == "q" or key == "x" then + awesome.emit_signal("module::exit_screen:hide") + end + end, }) awesome.connect_signal("module::exit_screen:show", function() - for s in screen do - s.exit_screen.visible = false - end - awful.screen.focused().exit_screen.visible = true - exit_screen_grabber:start() + for s in screen do + s.exit_screen.visible = false + end + awful.screen.focused().exit_screen.visible = true + exit_screen_grabber:start() end) awesome.connect_signal("module::exit_screen:hide", function() - exit_screen_grabber:stop() - for s in screen do - s.exit_screen.visible = false - end -end) + exit_screen_grabber:stop() + for s in screen do + s.exit_screen.visible = false + end +end) \ No newline at end of file diff --git a/config/awesome/signal/lockScreen.lua b/config/awesome/signal/lockScreen.lua new file mode 100644 index 00000000..b7ce226d --- /dev/null +++ b/config/awesome/signal/lockScreen.lua @@ -0,0 +1,6 @@ +local lockScreen = require('modules.lockscreen') +lockScreen.init() + +awesome.connect_signal("module::lock_screen:show", function() + lock_screen_show() +end) \ No newline at end of file diff --git a/config/awesome/utilities/lockOnClose b/config/awesome/utilities/lockOnClose new file mode 100755 index 00000000..f421999b --- /dev/null +++ b/config/awesome/utilities/lockOnClose @@ -0,0 +1,4 @@ +#!/bin/bash + +awesome-client 'awesome.emit_signal("module::lock_screen:show")' +exit \ No newline at end of file diff --git a/config/mopidy/mopidy.conf b/config/mopidy/mopidy.conf new file mode 100644 index 00000000..f0ab535e --- /dev/null +++ b/config/mopidy/mopidy.conf @@ -0,0 +1,112 @@ +# For further information about options in this file see: +# https://docs.mopidy.com/ +# +# The initial commented out values reflect the defaults as of: +# Mopidy 3.4.1 +# Mopidy-File 3.4.1 +# Mopidy-HTTP 3.4.1 +# Mopidy-M3U 3.4.1 +# Mopidy-MPD 3.3.0 +# Mopidy-MPRIS 3.0.3 +# Mopidy-SoftwareMixer 3.4.1 +# Mopidy-Stream 3.4.1 +# +# Available options and defaults might have changed since then, +# run `mopidy config` to see the current effective config and +# `mopidy --version` to check the current version. + +[core] +#cache_dir = $XDG_CACHE_DIR/mopidy +#config_dir = $XDG_CONFIG_DIR/mopidy +#data_dir = $XDG_DATA_DIR/mopidy +#max_tracklist_length = 10000 +#restore_state = false + +[logging] +#verbosity = 0 +#format = %(levelname)-8s %(asctime)s [%(process)d:%(threadName)s] %(name)s\n %(message)s +#color = true +#config_file = + +[audio] +mixer = software +#mixer_volume = +output = tee name=t ! queue ! autoaudiosink t. + ! queue ! audio/x-raw,rate=44100,channels=2,format=S16LE + ! udpsink host=localhost port=5555 +buffer_time = 100000 + +[proxy] +#scheme = +#hostname = +#port = +#username = +#password = + +[file] +enabled = false +#media_dirs = +# $XDG_MUSIC_DIR|Music +# ~/|Home +#excluded_file_extensions = +# .directory +# .html +# .jpeg +# .jpg +# .log +# .nfo +# .pdf +# .png +# .txt +# .zip +#show_dotfiles = false +#follow_symlinks = false +#metadata_timeout = 1000 + +[http] +#enabled = true +#hostname = 127.0.0.1 +#port = 6680 +#zeroconf = Mopidy HTTP server on $hostname +#allowed_origins = +#csrf_protection = true +#default_app = mopidy + +[m3u] +#enabled = true +#base_dir = $XDG_MUSIC_DIR +#default_encoding = latin-1 +#default_extension = .m3u8 +#playlists_dir = + +[softwaremixer] +enabled = true + +[stream] +#enabled = true +#protocols = +# http +# https +# mms +# rtmp +# rtmps +# rtsp +#metadata_blacklist = +#timeout = 5000 + +[mpd] +enabled = true +hostname = 127.0.0.1 +port = 6600 +password = +max_connections = 20 +connection_timeout = 60 +zeroconf = Mopidy MPD server on $hostname +#command_blacklist = +# listall +# listallinfo +default_playlist_scheme = m3u + +[mpris] +enabled = true +bus_type = session \ No newline at end of file diff --git a/config/mpd/mpd.conf b/config/mpd/mpd.conf deleted file mode 100644 index 69bb084f..00000000 --- a/config/mpd/mpd.conf +++ /dev/null @@ -1,35 +0,0 @@ -bind_to_address "127.0.0.1" -port "6600" - -auto_update "yes" -restore_paused "yes" - -music_directory "~/Music" -playlist_directory "~/.config/mpd/playlists" -db_file "~/.config/mpd/mpd.db" -log_file "syslog" -pid_file "/tmp/mpd.pid" -state_file "~/.config/mpd/mpd.state" - -audio_output { - type "pipewire" - name "PipeWire Sound Server" - buffer_time "100000" -} - -audio_output { - type "fifo" - name "Visualizer" - format "44100:16:2" - path "/tmp/mpd.fifo" -} - -audio_output { - type "httpd" - name "lossless" - encoder "flac" - port "8000" - max_client "8" - mixer_type "software" - format "44100:16:2" -} diff --git a/config/ncmpcpp/config b/config/ncmpcpp/config index 5c977e15..37e2b7c1 100644 --- a/config/ncmpcpp/config +++ b/config/ncmpcpp/config @@ -2,7 +2,7 @@ # --- ncmpcpp_directory = ~/.config/ncmpcpp lyrics_directory = ~/.config/ncmpcpp/lyrics -mpd_music_dir = ~/Music +# mpd_music_dir = ~/Music # GENERAL # --- @@ -30,10 +30,10 @@ startup_screen = "playlist" # VISUALIZER # --- -visualizer_data_source = "/tmp/mpd.fifo" +visualizer_data_source = "localhost:5555" visualizer_output_name = "Visualizer" visualizer_in_stereo = "no" -visualizer_sync_interval = "30" +#visualizer_sync_interval = "30" visualizer_type = "ellipse" visualizer_fps = "60" visualizer_look = ●▮ @@ -68,3 +68,7 @@ song_list_format = "$8%a - %t$R %l" song_columns_list_format = "(53)[white]{tr} (45)[blue]{a}" song_library_format = {{%a - %t} (%b)}|{%f} song_window_title_format = "Music" + +# MISCELLANEOUS +# --- +lyrics_fetchers = genius, azlyrics, sing365, metrolyrics, justsomelyrics, jahlyrics, plyrics, tekstowo, internet \ No newline at end of file From 5eb91f40e21af739547860cc8daec2a3acf7404d Mon Sep 17 00:00:00 2001 From: Momin Barlas Date: Sun, 14 May 2023 17:47:09 -0400 Subject: [PATCH 2/3] Made github activity panel togglable from user variables --- config/awesome/modules/bling | 2 +- .../ui/panels/notification-panel/init.lua | 68 +++++++++++++------ config/awesome/user_variables.lua | 1 + 3 files changed, 49 insertions(+), 22 deletions(-) diff --git a/config/awesome/modules/bling b/config/awesome/modules/bling index 70c894e5..172e5762 160000 --- a/config/awesome/modules/bling +++ b/config/awesome/modules/bling @@ -1 +1 @@ -Subproject commit 70c894e58bb88dea55e9799ad373fdaea309da9e +Subproject commit 172e576285e42cbbccf77444b2fddb5a32106b25 diff --git a/config/awesome/ui/panels/notification-panel/init.lua b/config/awesome/ui/panels/notification-panel/init.lua index cb1970af..1d30c119 100644 --- a/config/awesome/ui/panels/notification-panel/init.lua +++ b/config/awesome/ui/panels/notification-panel/init.lua @@ -4,28 +4,13 @@ local xresources = require("beautiful.xresources") local dpi = xresources.apply_dpi local wibox = require("wibox") local helpers = require("helpers") +local user_variables = require("user_variables") ---- Notification Panel ---- ~~~~~~~~~~~~~~~~~~ +local github_enabled = user_variables.widget.github.enabled -return function(s) - s.notification_panel = awful.popup({ - type = "dock", - screen = s, - minimum_height = s.geometry.height - (beautiful.wibar_height + dpi(10)), - maximum_height = s.geometry.height - (beautiful.wibar_height + dpi(10)), - minimum_width = dpi(350), - maximum_width = dpi(350), - bg = beautiful.transparent, - ontop = true, - visible = false, - placement = function(w) - awful.placement.top_right(w) - awful.placement.maximize_vertically( - w, - { honor_workarea = true, margins = { top = beautiful.useless_gap * 2 } } - ) - end, +local function makePanel(s) + local widget = {} + if github_enabled then widget = { { { ----------- TOP GROUP ----------- @@ -40,6 +25,7 @@ return function(s) { ----------- MIDDLE GROUP ----------- { { + require("ui.panels.notification-panel.github-activity"), margins = dpi(20), widget = wibox.container.margin, @@ -56,7 +42,47 @@ return function(s) shape = helpers.ui.prrect(beautiful.border_radius * 2, true, false, false, false), bg = beautiful.wibar_bg, widget = wibox.container.background, - }, + } + elseif not github_enabled then + widget = { + { + { + require("ui.panels.notification-panel.notif-center")(s), + margins = dpi(20), + widget = wibox.container.margin, + }, + layout = wibox.layout.fixed.vertical, + }, + shape = helpers.ui.prrect(beautiful.border_radius * 2, true, false, false, false), + bg = beautiful.wibar_bg, + widget = wibox.container.background, + } + end + return widget +end + +--- Notification Panel +--- ~~~~~~~~~~~~~~~~~~ + +return function(s) + s.notification_panel = awful.popup({ + type = "dock", + screen = s, + minimum_height = s.geometry.height - (beautiful.wibar_height + dpi(10)), + maximum_height = s.geometry.height - (beautiful.wibar_height + dpi(10)), + minimum_width = dpi(350), + maximum_width = dpi(350), + bg = beautiful.transparent, + ontop = true, + visible = false, + placement = function(w) + awful.placement.top_right(w) + awful.placement.maximize_vertically( + w, + { honor_workarea = true, margins = { top = beautiful.useless_gap * 2 } } + ) + end, + widget = makePanel(s), }) --- Toggle container visibility diff --git a/config/awesome/user_variables.lua b/config/awesome/user_variables.lua index ce53ee6c..ec4ab142 100644 --- a/config/awesome/user_variables.lua +++ b/config/awesome/user_variables.lua @@ -12,6 +12,7 @@ return { --- Github activity github = { + enabled = true, username = "rxyhn", }, }, From 64d3fdd1f25958cf8e25d7b4f1adf20b7386b66f Mon Sep 17 00:00:00 2001 From: Momin Barlas Date: Mon, 5 Jun 2023 18:03:02 -0400 Subject: [PATCH 3/3] Fixed a bug that caused the keyboard to be unusable after the lockscreen was unlocked. --- config/awesome/modules/lockscreen/lockscreen.lua | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/config/awesome/modules/lockscreen/lockscreen.lua b/config/awesome/modules/lockscreen/lockscreen.lua index 24b0a7e3..fcd1fd0e 100644 --- a/config/awesome/modules/lockscreen/lockscreen.lua +++ b/config/awesome/modules/lockscreen/lockscreen.lua @@ -51,7 +51,7 @@ end --- Word Clock --- ~~~~~~~~~ local char = - "I T L I S A S A M P M A C Q U A R T E R D C T W E N T Y F I V E X H A L F S T E N F T O P A S T E R U N I N E O N E S I X T H R E E F O U R F I V E T W O E I G H T E L E V E N S E V E N T W E L V E T E N S E O C L O C K" +"I T L I S A S A M P M A C Q U A R T E R D C T W E N T Y F I V E X H A L F S T E N F T O P A S T E R U N I N E O N E S I X T H R E E F O U R F I V E T W O E I G H T E L E V E N S E V E N T W E L V E T E N S E O C L O C K" local pos_map = { ["it"] = { 1, 2 }, @@ -367,8 +367,10 @@ local function grab_password() end function lock_screen_show() - set_visibility(true) - grab_password() + if not lock_screen_box.visible then + set_visibility(true) + grab_password() + end end lock_screen_box:setup({