From a6a8819a7d468eebaa2f2b9b75125e7df878fe13 Mon Sep 17 00:00:00 2001 From: Midgard <2885-Midgard@users.noreply.framagit.org> Date: Sat, 11 Jun 2022 20:00:32 +0200 Subject: [PATCH] Update configs --- beets.config.yaml | 16 ++++----- compton.conf | 19 +++++----- gitignore | 4 ++- i3/battery.sh | 6 ++-- i3/config | 89 ++++++++++++++++++++++++++++------------------ i3/lock.sh | 25 +++++++------ i3/monitors.sh | 12 +++---- i3/monitors/config | 4 +-- i3/rename.sh | 44 ++++++++++++++++------- i3/terminal.sh | 27 ++++++++++---- ncmpcpp/bindings | 14 ++++---- ncmpcpp/config | 86 +++++++++++++++++++++++++++++++++++++------- rofi/config | 7 ++-- rofi/midgard.rasi | 21 +++++------ 14 files changed, 247 insertions(+), 127 deletions(-) diff --git a/beets.config.yaml b/beets.config.yaml index 77c17dd..1c4e904 100644 --- a/beets.config.yaml +++ b/beets.config.yaml @@ -1,5 +1,5 @@ directory: ~/mus -library: ~/.local/share/beets/library.db +library: ~/mus/beets.db asciify_paths: yes import: @@ -27,7 +27,7 @@ rewrite: 'title ^★$': 'Blackstar' replace: - '[#"()\[\]<>:\*\|{}\\!\?]': _ + '[#"()\[\]<>:\*\|{}\\!\?ʻ`]': _ "'": _ '[\\/]': _ '[\.,;]': _ @@ -59,7 +59,7 @@ languages: ["nl", "en"] bell: yes plugins: - - acousticbrainz + #- acousticbrainz - badfiles - edit - fetchart @@ -74,7 +74,7 @@ plugins: - mpdupdate - permissions - play - - replaygain + #- replaygain - rewrite - scrub - the @@ -108,7 +108,10 @@ lastgenre: source: track # lyrics: -# mbsubmit: + +mbsubmit: + threshold: strong + # mbsync: mpd: @@ -122,9 +125,6 @@ permissions: play: command: mpv --vid=no --shuffle -replaygain: - backend: gstreamer - the: strip: yes # this string is split on spaces so we use the escape sequence diff --git a/compton.conf b/compton.conf index fbe448e..ef6a952 100644 --- a/compton.conf +++ b/compton.conf @@ -56,19 +56,19 @@ glx-swap-method = "undefined"; ################################# # Enabled client-side shadows on windows. -shadow = true; +shadow = false; # Don't draw shadows on DND windows. no-dnd-shadow = true; # Avoid drawing shadows on dock/panel windows. no-dock-shadow = true; # The blur radius for shadows. (default 12) -shadow-radius = 10; +shadow-radius = 4; # The left offset for shadows. (default -15) shadow-offset-x = 0; # The top offset for shadows. (default -15) shadow-offset-y = 0; # The translucency for shadows. (default .75) -shadow-opacity = 0.25; +shadow-opacity = 0.15; # Set if you want different colour shadows # shadow-red = 0.0; @@ -115,11 +115,10 @@ shadow-ignore-shaped = false; ################################# menu-opacity = 1; -inactive-opacity = 0.9; +#inactive-opacity = 0.9; active-opacity = 1; frame-opacity = 1; inactive-opacity-override = false; -alpha-step = 0.06; # Fix tabbed windows opacity-rule = [ @@ -136,7 +135,7 @@ opacity-rule = [ # inactive-dim-fixed = true; # Blur background of transparent windows. Bad performance with X Render backend. GLX backend is preferred. -blur-background = true; +blur-background = false; # Blur background of opaque windows with transparent frames as well. # blur-background-frame = true; # Do not let blur radius adjust based on window opacity. @@ -157,11 +156,11 @@ fading = true; # The time between steps in a fade in milliseconds. (default 10). fade-delta = 10; # Opacity change between steps while fading in. (default 0.028). -fade-in-step = 0.09; +fade-in-step = 0.20; # Opacity change between steps while fading out. (default 0.03). -fade-out-step = 0.06; +fade-out-step = 0.05; # Fade windows in/out when opening/closing -#no-fading-openclose = true; +no-fading-openclose = false; # Specify a list of conditions of windows that should not be faded. fade-exclude = [ ]; @@ -204,8 +203,6 @@ vsync = "opengl-swc"; # Enable DBE painting mode, intended to use with VSync to (hopefully) eliminate tearing. # Reported to have no effect, though. dbe = false; -# Painting on X Composite overlay window. Recommended. -paint-on-overlay = true; # Limit compton to repaint at most once every 1 / refresh_rate second to boost performance. # This should not be used with --vsync drm/opengl/opengl-oml as they essentially does --sw-opti's job already, diff --git a/gitignore b/gitignore index d19df3b..fa6d393 100644 --- a/gitignore +++ b/gitignore @@ -3,12 +3,14 @@ *.bak *~ +.mypy_cache/ -## My designated "out of repo" directory name +## My designated "out of repo" things # Author: Midgard xyzzy +update--.sh ## Things you just don't want in a Git repo diff --git a/i3/battery.sh b/i3/battery.sh index b6f38ad..1f8c8f6 100755 --- a/i3/battery.sh +++ b/i3/battery.sh @@ -1,5 +1,7 @@ #!/bin/bash +set -euo pipefail + # Legacy battery monitor. I'm writing a better one, I should publish it some # time. @@ -16,8 +18,8 @@ lower_backlight() { } while true; do - now=$(cat /sys/class/power_supply/BAT0/energy_now 2>/dev/null) - full=$(cat /sys/class/power_supply/BAT0/energy_full 2>/dev/null) + now=$(cat /sys/class/power_supply/BAT0/charge_now 2>/dev/null) + full=$(cat /sys/class/power_supply/BAT0/charge_full 2>/dev/null) if [ ! -z $now ] && [ ! -z $full ]; then percentage=$(( 100 * now / full )) diff --git a/i3/config b/i3/config index eff1409..8c61d42 100644 --- a/i3/config +++ b/i3/config @@ -27,15 +27,15 @@ mode "resize" { bindsym Ctrl+k resize shrink height 2 px or 1 ppt bindsym Ctrl+l resize grow width 2 px or 1 ppt - bindsym h resize shrink width 10 px or 10 ppt - bindsym j resize grow height 10 px or 10 ppt - bindsym k resize shrink height 10 px or 10 ppt - bindsym l resize grow width 10 px or 10 ppt + bindsym h resize shrink width 10 px or 5 ppt + bindsym j resize grow height 10 px or 5 ppt + bindsym k resize shrink height 10 px or 5 ppt + bindsym l resize grow width 10 px or 5 ppt - bindsym Shift+h resize shrink width 30 px or 30 ppt - bindsym Shift+j resize grow height 30 px or 30 ppt - bindsym Shift+k resize shrink height 30 px or 30 ppt - bindsym Shift+l resize grow width 30 px or 30 ppt + bindsym Shift+h resize shrink width 30 px or 10 ppt + bindsym Shift+j resize grow height 30 px or 10 ppt + bindsym Shift+k resize shrink height 30 px or 10 ppt + bindsym Shift+l resize grow width 30 px or 10 ppt # back to normal: Enter, Escape or mod+r bindsym Return mode "default" @@ -54,7 +54,7 @@ no_focus [title="IntelliJ"] # gaps when more than one window is open on a workspace for_window [class="^.*"] border pixel 0 -gaps inner 10 +gaps inner 5 smart_gaps on @@ -65,8 +65,13 @@ smart_gaps on # Belgian layout, swap Alt and Super, set caps lock as compose key ♥ exec_always --no-startup-id setxkbmap \ -layout be \ - -option altwin:swap_lalt_lwin \ - -option compose:caps + -option compose:caps \ + -option shift:both_capslock \ + -option altwin:swap_lalt_lwin + #-option caps:none \ +# Mouse acceleration, https://wiki.archlinux.org/title/Mouse_acceleration +exec_always --no-startup-id xinput --set-prop 'SynPS/2 Synaptics TouchPad' 'libinput Accel Speed' 0.5 +exec_always --no-startup-id xinput --set-prop 'SynPS/2 Synaptics TouchPad' 'libinput Tapping Enabled' 1 # enable NumLock exec_always --no-startup-id numlockx on @@ -75,6 +80,7 @@ exec_always --no-startup-id numlockx on set $macromode "macro: [l]olol" mode $macromode { bindsym l mode default, exec --no-startup-id "sleep 0.1; for i in $(seq $(( RANDOM % 5 + 3 ))); do xdotool key l o; done; xdotool key l Return" + bindsym d mode default, exec --no-startup-id "sleep 0.1; xdotool type $(d)" # Define your own cool macros here # back to normal: Enter, Escape or mod+r @@ -92,7 +98,7 @@ bindsym $mod+c mode $macromode ################ # lock the screen -bindsym Mod1+l exec --no-startup-id $HOME/.config/i3/lock.sh +bindsym $mod+i exec --no-startup-id $HOME/.config/i3/lock.sh # start a terminal bindsym $mod+Return exec $term @@ -102,7 +108,7 @@ bindsym $mod+w exec $term bindsym XF86Calculator exec "$termexec -T exec-with-shortcut --dynamic-title-mode=none -x bash -c 'exec-with-shortcut; read'" # start web browser -set $browser TZ=UTC firefox +set $browser TZ=UTC /usr/bin/firejail --name=firefox --profile=/etc/firejail/firefox.profile /usr/lib64/firefox/firefox bindsym XF86HomePage exec $browser # open file manager @@ -111,28 +117,33 @@ bindsym XF86MyComputer exec $filemanager bindsym XF86Explorer exec $filemanager # open mail client -set $mailclient thunderbird +#set $mailclient thunderbird +set $mailclient $termexec -e alot -C1 bindsym XF86Mail exec $mailclient # change display layout -bindsym $mod+XF86Display exec arandr -bindsym XF86Display exec --no-startup-id $HOME/.config/i3/monitors.sh +bindsym $mod+XF86Display exec arandr +bindsym XF86Display exec --no-startup-id $HOME/.config/i3/monitors.sh +bindsym Mod1+$mod+XF86Display exec arandr +bindsym Mod1+p exec --no-startup-id $HOME/.config/i3/monitors.sh + +# fill password +bindsym $mod+p exec $HOME/.local/bin/dpass # program launcher -set $launcher rofi -show combi -display-combi $USER@$(cat /etc/hostname) +set $launcher sh -c 'killall rofi || rofi -show combi -display-combi \\">>>\\"' #bindsym $mod+space exec --no-startup-id "$launcher" -bindsym $mod+Shift+space exec --no-startup-id rofi -show window +#bindsym $mod+Shift+space exec --no-startup-id rofi -show window -set $openmode "open: [f]irefox, [e]mail, [i]rc, [I]DE, [m]pd client, [M]pd server, [t]or, [g]ucharmap, [j]osm, [a]randr, [ ] launcher" +set $openmode "open: [f]irefox, [e]mail, [i]rc, [m]pd client, [M]pd server, [t]or, [g]ucharmap, [j]osm, [a]randr, [ ] launcher" mode $openmode { - bindsym f exec firefox, mode default + bindsym f exec $browser, mode default bindsym e exec $mailclient, mode default bindsym i exec $termexec -e weechat, mode default - bindsym shift+i exec idea, mode default bindsym m exec mpdclient, mode default - bindsym shift+m exec --no-startup-id mpd $HOME/.config/mpd/mpd.conf, mode default - bindsym t exec "$HOME/.tor-browser-en/INSTALL/Browser/start-tor-browser --detach", mode default + #bindsym shift+m exec --no-startup-id mpd $HOME/.config/mpd/mpd.conf, mode default + bindsym t exec "$HOME/etc/tor-browser_en-US/Browser/start-tor-browser --detach", mode default bindsym g exec gucharmap, mode default bindsym j exec josm, mode default bindsym a exec arandr, mode default @@ -148,6 +159,7 @@ mode $openmode { } bindsym $mod+o mode $openmode +bindsym $mod+d exec "$launcher" set $mpc /usr/bin/mpc @@ -159,21 +171,21 @@ mode $mpdmode { bindsym h exec --no-startup-id $mpc seek -5 bindsym l exec --no-startup-id $mpc seek +5 bindsym Backspace exec --no-startup-id $mpc seek 0% - bindsym u exec --no-startup-id pamixer -i $volumeStep - bindsym d exec --no-startup-id pamixer -d $volumeStep + bindsym u exec --no-startup-id $mpc volume +$volumeStep + bindsym d exec --no-startup-id $mpc volume -$volumeStep bindsym s exec --no-startup-id $mpc stop, mode "default" bindsym Return exec mpdclient, mode "default" bindsym KP_Enter exec mpdclient, mode "default" bindsym o exec mpdclient, mode "default" - # back to normal: Escape or mod+r + # back to normal: Escape or mod+m bindsym Escape mode "default" bindsym $mod+m mode "default" } bindsym $mod+m mode $mpdmode -bindsym $mod+space exec --no-startup-id $mpc toggle +#bindsym $mod+space exec --no-startup-id $mpc toggle ############################# @@ -201,9 +213,12 @@ bindsym XF86MonBrightnessUp exec --no-startup-id $HOME/.config/i3/backlight. bindsym XF86PowerOff exec sudo shutdown -h now set $scrot scrot '/tmp/screenshot_%Y-%m-%d_%H-%M-%S.png' -bindsym --release $mod+Print exec --no-startup-id "notify-send -a 'scrot' -t 750 'Select rectangle'; $scrot --select --delay 1" -bindsym --release $mod+Shift+Print exec --no-startup-id $scrot -bindsym --release $mod+Ctrl+Print exec --no-startup-id "$scrot --select --delay $(echo $'2\n3\n5\n10\n15' | rofi -p 'scrot delay' -dmenu)" +#bindsym --release $mod+Print exec --no-startup-id "notify-send -a 'scrot' -t 750 'Select rectangle'; $scrot --select --delay 1" +#bindsym --release $mod+Shift+Print exec --no-startup-id $scrot +#bindsym --release $mod+Ctrl+Print exec --no-startup-id "$scrot --select --delay $(echo $'2\n3\n5\n10\n15' | rofi -p 'scrot delay' -dmenu)" +bindsym --release Print exec --no-startup-id "$scrot --select --delay 1" +bindsym --release Shift+Print exec --no-startup-id "$scrot" +bindsym --release Ctrl+Print exec --no-startup-id "$scrot --select --delay $(echo $'2\n3\n5\n10\n15' | rofi -p 'scrot delay' -dmenu)" # Window stuff {{{2 @@ -250,10 +265,12 @@ bindsym $mod+z layout tabbed bindsym $mod+e layout toggle split # toggle tiling / floating -bindsym $mod+Shift+d floating toggle +#bindsym $mod+Shift+d floating toggle +bindsym $mod+Shift+space floating toggle # change focus between tiling / floating windows -bindsym $mod+d focus mode_toggle +#bindsym $mod+d focus mode_toggle +bindsym $mod+space focus mode_toggle # focus the parent container bindsym $mod+a focus parent @@ -272,7 +289,7 @@ bindsym $mod+Shift+r restart bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'Quit i3?' -b 'Yes' 'i3-msg exit'" #bindsym $mod+Shift+e exec "i3-msg exit" -bindsym $mod+p exec "sleep 8; notify-send -u critical -a Tasks \\"Urgent reminder\\" \\"You've got to leave now!\\"" +#bindsym $mod+p exec "sleep 8; notify-send -u critical -a Tasks \\"Urgent reminder\\" \\"You've got to leave now!\\"" @@ -390,7 +407,7 @@ mode "workspace" { bindsym Shift+colon move container to workspace number 39 : bindsym Shift+equal move container to workspace number 40 = - # back to normal: Enter, Escape or mod+r + # back to normal: Enter, Escape or mod+s bindsym Return mode "default" bindsym KP_Enter mode "default" bindsym Escape mode "default" @@ -413,6 +430,7 @@ bindsym $mod+shift+x move workspace to output up #bar { #status_command python /usr/lib/python3.6/site-packages/powerline/bindings/i3/powerline-i3.py #font pango:PowerlineFont 12 + #font pango:Fira Mono 8 ##status_command i3status #position top @@ -443,7 +461,8 @@ exec_always --no-startup-id "$HOME/.config/i3/background.sh" for_window [title="Tor Browser$"] floating enable for_window [class="Peek"] floating enable for_window [instance="^$" class="^Wfica_Seamless$"] floating enable -for_window [class="org-openstreetmap-josm-gui-MainApplication" instance="sun-awt-X11-XDialogPeer" title="^Download$|^Mapillary image|^Geotagged Images"] floating disable +#for_window [class="org-openstreetmap-josm-gui-MainApplication" instance="sun-awt-X11-XDialogPeer" title="^Download$|^Mapillary image|^Geotagged Images"] floating disable +for_window [class="org-openstreetmap-josm-gui-MainApplication" title="^Download$|^Mapillary image|^Geotagged Images"] floating disable for_window [class="Nextcloud" instance="nextcloud"] floating disable for_window [class="Xfce4-settings-manager"] floating disable for_window [title="^openBVE$"] floating disable diff --git a/i3/lock.sh b/i3/lock.sh index 344f5b4..8d26487 100755 --- a/i3/lock.sh +++ b/i3/lock.sh @@ -2,18 +2,21 @@ set -euo pipefail -ssh_agent_file="/run/user/$EUID/ssh-agent-session" -if pgrep -u "$USER" ssh-agent > /dev/null && [[ -f "$ssh_agent_file" ]]; then - source "$ssh_agent_file" - if ! ssh-add -D; then - notify-send -u normal -i lock -a i3 'Failed to clear SSH key cache' 'ssh-add had a non-zero exit code.' - fi -else - notify-send -u normal -i lock -a i3 'No SSH agent running' 'No running SSH agent detected, so not clearing the key cache.' -fi +#ssh_agent_file="/run/user/$EUID/ssh-agent-session" +#if pgrep -u "$USER" ssh-agent > /dev/null && [[ -f "$ssh_agent_file" ]]; then +# source "$ssh_agent_file" +# if ! ssh-add -D; then +# notify-send -u normal -i lock -a i3 'Failed to clear SSH key cache' 'ssh-add had a non-zero exit code.' +# fi +#else +# notify-send -u normal -i lock -a i3 'No SSH agent running' 'No running SSH agent detected, so not clearing the key cache.' +#fi if ! gpg-connect-agent reloadagent /bye; then - notify-send -u normal -i lock -a i3 'Failed to clear GPG key cache' 'gpg-connect-agent had a non-zero exit code.' + : +# notify-send -u normal -i lock -a i3 'Failed to clear GPG key cache' 'gpg-connect-agent had a non-zero exit code.' fi -exec i3lock --tiling --lock-console --show-failed-attempts --color=000000 --image="$HOME/img/bg/Red-billed_streamertail_Trochilus_polytmus_female_in_flight_2_lock.png" +if ! i3lock --tiling --lock-console --show-failed-attempts --color=000000 --image="$HOME/img/bg/Red-billed_streamertail_Trochilus_polytmus_female_in_flight_2_lock.png"; then + exec i3lock +fi diff --git a/i3/monitors.sh b/i3/monitors.sh index eed4740..ca7eea2 100755 --- a/i3/monitors.sh +++ b/i3/monitors.sh @@ -78,7 +78,7 @@ toggle_two_screens() { else xrandr \ --output "$one" --auto --primary \ - --output "$two" --auto --left-of "$builtin" \ + --output "$two" --auto --right-of "$builtin" \ --output "$off" --off builtin_on fi @@ -94,18 +94,18 @@ toggle_three_screens() { xrandr \ --output "$one" --off \ --output "$two" --auto --primary \ - --output "$three" --auto --left-of "$two" + --output "$three" --auto --right-of "$two" builtin_off elif ! actv "$one" && actv "$two" && actv "$three"; then xrandr \ --output "$one" --auto --primary \ --output "$two" --off \ - --output "$three" --auto --left-of "$one" + --output "$three" --auto --right-of "$one" builtin_on elif actv "$one" && ! actv "$two" && actv "$three"; then xrandr \ --output "$one" --auto --primary \ - --output "$two" --auto --left-of "$one" \ + --output "$two" --auto --right-of "$one" \ --output "$three" --off builtin_on elif actv "$one" && actv "$two" && ! actv "$three"; then @@ -129,8 +129,8 @@ toggle_three_screens() { else xrandr \ --output "$one" --auto --primary \ - --output "$two" --auto --left-of "$one" \ - --output "$three" --auto --left-of "$two" + --output "$two" --auto --right-of "$one" \ + --output "$three" --auto --right-of "$two" builtin_on fi trigger_change_and_exit diff --git a/i3/monitors/config b/i3/monitors/config index a85cfbc..70469ef 100644 --- a/i3/monitors/config +++ b/i3/monitors/config @@ -1,5 +1,5 @@ #!/bin/false builtin="eDP-1" -ext1="HDMI-1" -ext2="VGA-1" +ext1="HDMI-2" +ext2="DP-1" diff --git a/i3/rename.sh b/i3/rename.sh index 2847a87..615c75e 100755 --- a/i3/rename.sh +++ b/i3/rename.sh @@ -1,27 +1,47 @@ #!/bin/bash -cur_ws="$(i3-msg -t get_workspaces | jq '.[] | select(.focused==true)')" +set -euo pipefail + +with_number=false +if test "${1:-}" = --with-number; then with_number=true; fi + +cur_ws="$(swaymsg -t get_workspaces | jq '.[] | select(.focused==true)')" cur_ws_number="$(echo "$cur_ws" | jq '.num')" -cur_ws_name="$(echo "$cur_ws" | jq --raw-output '.name')" +cur_ws_fullname="$(echo "$cur_ws" | jq --raw-output '.name')" # Strip workspace number from name -if [[ $cur_ws_name == [0-9] ]]; then +if [[ $cur_ws_fullname == [0-9] ]]; then cur_ws_name="" else - cur_ws_name="${cur_ws_name#[0-9]:}" + cur_ws_name="${cur_ws_fullname#-}" + cur_ws_name="${cur_ws_fullname#[0-9]:}" cur_ws_name="${cur_ws_name# }" fi +if test "$with_number" = true; then + prompt="rename and renumber workspace $cur_ws_number:" + default="$cur_ws_fullname" +else + prompt="rename workspace $cur_ws_number:" + default="$cur_ws_name" +fi + newname="$( - rofi -dmenu \ - -p "rename workspace $cur_ws_number:" || - echo "$cur_ws_name" + rofi -dmenu -p "$prompt" )" +if test "$with_number" = true; then + if test -z "$newname"; then + exit 1 + fi +else + if test -z "$newname"; then + newname="$cur_ws_number" + else + newname="$cur_ws_number: $newname" + fi +fi + echo "renaming to \`$newname\`" -if [[ -z $newname ]]; then - i3-msg "rename workspace to \"$cur_ws_number\"" -else - i3-msg "rename workspace to \"$cur_ws_number: ${newname//"/\\"}\"" -fi +swaymsg "rename workspace to \"${newname//"/\\"}\"" diff --git a/i3/terminal.sh b/i3/terminal.sh index 152e7f4..7544820 100755 --- a/i3/terminal.sh +++ b/i3/terminal.sh @@ -1,11 +1,25 @@ #!/bin/bash +set -uo pipefail +# A failure in this script should not prevent the terminal from opening +set +e + +#CMD=i3-sensible-terminal +CMD=alacritty +#CMD=xfce4-terminal + # If a window with a path in its title is focused, open a terminal with that # location as working directory. Like this, terminals are opened in the same -# directory as the currently focused one. I modified my oh-my-zsh to always -# also print the directory, even when a command is executing. +# directory as the currently focused one. -if [[ $(xtitle) =~ (in|^.*@.*:)\ (~?)(/.*) ]]; then +sway_focused_window() { + swaymsg -t get_tree | jq -r '.. | select(.focused?) | .name' +} + +title="$(sway_focused_window || xtitle)" +path="" + +if [[ $title =~ (in|^.*@$(hostname):)(~?)(/.*) ]]; then path="${BASH_REMATCH[3]}" [[ ${BASH_REMATCH[2]} == "~" ]] && path="$HOME$path" @@ -15,9 +29,8 @@ if [[ $(xtitle) =~ (in|^.*@.*:)\ (~?)(/.*) ]]; then fi # Open terminal at specified path -cmd=i3-sensible-terminal -if [[ -n $path ]]; then - exec env -C "$path" $cmd "$@" +if [[ -n $path ]] && [[ -r $path ]]; then + exec env -C "$path" $CMD "$@" else - exec $cmd "$@" + exec $CMD "$@" fi diff --git a/ncmpcpp/bindings b/ncmpcpp/bindings index bbd6fb9..53c533e 100644 --- a/ncmpcpp/bindings +++ b/ncmpcpp/bindings @@ -411,8 +411,8 @@ def_key "ctrl-left" #def_key "e" # edit_song # -def_key "e" - dummy +#def_key "e" +# dummy # edit_library_tag # #def_key "e" @@ -424,9 +424,9 @@ def_key "e" #def_key "e" # edit_playlist_name # -#def_key "e" -# edit_lyrics -# +def_key "e" + edit_lyrics + #def_key "i" # show_song_info # @@ -442,8 +442,8 @@ def_key "L" def_key "V" select_range # -def_key "i" - reverse_selection +#def_key "i" +# reverse_selection # def_key "escape" remove_selection diff --git a/ncmpcpp/config b/ncmpcpp/config index 3fd8182..84baacd 100644 --- a/ncmpcpp/config +++ b/ncmpcpp/config @@ -32,10 +32,10 @@ mpd_music_dir = ~/mus # ##### music visualizer ##### ## -## Note: In order to make music visualizer work you'll need to use mpd fifo -## output, whose format parameter has to be set to 44100:16:1 for mono -## visualization or 44100:16:2 for stereo visualization. Example configuration -## (it has to be put into mpd.conf): +## In order to make music visualizer work with MPD you need to use the fifo +## output. Its format parameter has to be set to 44100:16:1 for mono +## visualization or 44100:16:2 for stereo visualization. As an example here is +## the relevant section for mpd.conf: ## ## audio_output { ## type "fifo" @@ -44,8 +44,23 @@ mpd_music_dir = ~/mus ## format "44100:16:2" ## } ## +## If the visualization on occasion diverges from the audio output, please set +## 'buffer_time' parameter of your audio output in mpd.conf to '100000' (100ms) +## or less to prevent that from happening. +## +## Note: If you're using Mopidy, an address of a udpsink gstreamer's output is +## also accepted. For example, the following section in mopidy.conf: +## +## [audio] +## output = tee name=t ! queue ! autoaudiosink t. +## ! queue ! audio/x-raw,rate=44100,channels=2,format=S16LE +## ! udpsink host=localhost port=5555 +## +## will make localhost:5555 available as a source of data for the stereo +## visualizer. +## # -visualizer_fifo_path = /tmp/mpd.fifo +visualizer_data_source = /tmp/mpd.fifo # ## ## Note: Below parameter is needed for ncmpcpp to determine which output @@ -53,7 +68,7 @@ visualizer_fifo_path = /tmp/mpd.fifo ## sound as currently there are some problems with it. ## # -visualizer_output_name = my_fifo +visualizer_output_name = fifo # ## ## If you set format to 44100:16:2, make it 'yes'. @@ -61,13 +76,16 @@ visualizer_output_name = my_fifo visualizer_in_stereo = yes # ## -## Note: Below parameter defines how often ncmpcpp has to "synchronize" -## visualizer and audio outputs. 30 seconds is optimal value, but if you -## experience synchronization problems, set it to lower value. Keep in mind -## that sane values start with >=10. +## Note: set below to >=10 only if you have synchronization issues with +## visualization and audio. +## +## Old text: Below parameter defines how often ncmpcpp has to "synchronize" +## visualizer and audio outputs. 30 seconds is optimal value, but if you +## experience synchronization problems, set it to lower value. Keep in mind +## that sane values start with >=10. ## # -#visualizer_sync_interval = 15 +#visualizer_sync_interval = 0 # ## ## Note: To enable spectrum frequency visualization you need to compile ncmpcpp @@ -77,9 +95,14 @@ visualizer_in_stereo = yes ## Available values: spectrum, wave, wave_filled, ellipse. ## visualizer_type = spectrum + + +# default: visualizer_fps = 60 +visualizer_fps = 30 # #default: visualizer_look = ●▮ visualizer_look = ╸─ +#visualizer_look = ╸▎ # #visualizer_color = blue, cyan, green, yellow, magenta, red # @@ -87,6 +110,29 @@ visualizer_look = ╸─ ## #visualizer_color = 41, 83, 119, 155, 185, 215, 209, 203, 197, 161 visualizer_color = 144 + +## Use unicode block characters for a smoother, more continuous look. +## This will override the visualizer_look option. With transparent terminals +## and visualizer_in_stereo set, artifacts may be visible on the bottom half of +## the visualization. +# +visualizer_spectrum_smooth_look = yes + +## A value between 1 and 5 inclusive. Specifying a larger value makes the +## visualizer look at a larger slice of time, which results in less jumpy +## visualizer output. +# +#visualizer_spectrum_dft_size = 2 +# +#visualizer_spectrum_gain = 10 +# +## Left-most frequency of visualizer in Hz, must be less than HZ MAX +# +visualizer_spectrum_hz_min = 20 +# +## Right-most frequency of visualizer in Hz, must be greater than HZ MIN +# +visualizer_spectrum_hz_max = 18000 # ##### system encoding ##### ## @@ -193,7 +239,10 @@ alternative_header_first_line_format = $1$aqqu$/a$9 $b{{%t}|{%f}}$/b$(243){ (%y) # # #alternative_header_second_line_format = {{$4$b%a$/b$9}{ - $7%b$9}{ ($4%y$9)}}|{%D} +# dark alternative_header_second_line_format = {{{$7%b$9 $3#{%d/}%n$9}|{from $7%b$9}} {by $4%a$9}}|{%D} +# light +#alternative_header_second_line_format = {{{$7%b$9 $3#{%d/}%n$9}|{from $7%b$9}} {by $(95)%a$9}}|{%D} # #current_item_prefix = $(yellow)$r # @@ -268,7 +317,10 @@ selected_item_suffix = ]$9 ## # #song_columns_list_format = (20)[]{a} (6f)[green]{NE} (50)[white]{t|f:Title} (20)[cyan]{b} (7f)[magenta]{l} +# dark song_columns_list_format = (20)[cyan]{brE} (5f)[green]{NE} (20)[yellow]{arE} (1)[]{} (7f)[magenta]{lr} (2)[white]{} (40)[white]{t|f:Title} +# light +#song_columns_list_format = (20)[cyan]{brE} (5f)[green]{NE} (20)[95]{arE} (1)[]{} (7f)[magenta]{lr} (2)[black]{} (40)[black]{t|f:Title} # ##### various settings ##### # @@ -367,6 +419,7 @@ header_visibility = no titles_visibility = no # #header_text_scrolling = yes +header_text_scrolling = no # #cyclic_scrolling = no # @@ -545,16 +598,25 @@ external_editor = vi #state_flags_color = default:b # #main_window_color = yellow +# dark main_window_color = white +# light +#main_window_color = black # #color1 = white # #color2 = green # -#progressbar_color = black:b +# dark +progressbar_color = black:b +# light +#progressbar_color = 255:b # #progressbar_elapsed_color = green:b +# dark progressbar_elapsed_color = white +# light +#progressbar_elapsed_color = black # #statusbar_color = default # diff --git a/rofi/config b/rofi/config index 377769c..1262b5c 100644 --- a/rofi/config +++ b/rofi/config @@ -63,14 +63,14 @@ rofi.levenshtein-sort: true ! "Parse known_hosts file for ssh mode" Set from: Default ! rofi.parse-known-hosts: true ! "Set the modi to combine in combi mode" Set from: Commandline -rofi.combi-modi: drun,window,ssh,run +rofi.combi-modi: drun,window,run ! "Set the matching algorithm. (normal, regex, glob, fuzzy)" Set from: Commandline rofi.matching: glob ! "Tokenize input string" Set from: Default ! rofi.tokenize: true ! "Monitor id to show on" Set from: Default -! rofi.m: -5 -rofi.m: primary +rofi.m: -5 +!rofi.m: primary ! "Margin between rows *DEPRECATED*" Set from: Default ! rofi.line-margin: 2 ! "Padding within rows *DEPRECATED*" Set from: Default @@ -129,6 +129,7 @@ rofi.theme: ~/.config/rofi/midgard.rasi ! rofi.display-drun: ! "The display name of this browser" Set from: Commandline ! rofi.display-combi: $USER@$HOST +rofi.display-combi:  >>> ! "The display name of this browser" Set from: Default ! rofi.display-keys: ! "Paste primary selection" Set from: Default diff --git a/rofi/midgard.rasi b/rofi/midgard.rasi index 6f8dbb3..a298b36 100644 --- a/rofi/midgard.rasi +++ b/rofi/midgard.rasi @@ -15,7 +15,8 @@ foreground: rgba(193, 193, 193, 100%); alt-foreground: rgba(193, 193, 193, 50%); - highlighted-background: rgba( 85, 54, 31, 50%); + /*highlighted-background: rgba( 85, 54, 31, 50%);*/ + highlighted-background: rgba(132, 107, 146, 50%); scrollbar-background: transparent; scrollbar-handle: @alt-foreground; @@ -25,23 +26,23 @@ #window { border: none; - width: 100%; - height: 100%; - location: north; - anchor: north; - children: [mainbox, dummy]; - background-color: rgba(0,0,0,0.5); + /*width: 100%;*/ + height: 50%; + location: south; + anchor: south; + children: [mainbox]; + background-color: rgba(0,0,0,0.7); font: "Fira Code Light 14"; } #dummy { - expand: true; + /*expand: true;*/ } #mainbox { - expand: false; + expand: true; padding: 0px 0px 6px; - margin: 0 25%; + /*margin: 0 25%;*/ background-color: rgba(0,0,0,0.6); }