:spark: new defaults apps by defining them on mimeapps
Browse files at this commit455fbce803112e09815b11967834b43a2511b668Parent: 8ffed3a- feat
- :spark: new defaults apps by defining them on mimeapps
5 changed files +137 -19
- .config/btop/btop.conf +4 -1
- .config/hypr/hyprland.conf +1 -1
- .config/mimeapps.list +112 -0
- .config/mpv/mpv.conf +3 -0
- .config/scripts/shared/song_detail.sh +17 -17
.config/btop/btop.confmodified+4 -1
| @@ -1,4 +1,4 @@ | |||
| 1 | -#? Config file for btop v. 1.4.4 | 1 | +#? Config file for btop v. 1.4.5 |
| 2 | 2 | ||
| 3 | #* Name of a btop++/bpytop/bashtop formatted ".theme" file, "Default" and "TTY" for builtin themes. | 3 | #* Name of a btop++/bpytop/bashtop formatted ".theme" file, "Default" and "TTY" for builtin themes. |
| 4 | #* Themes should be placed in "../share/btop/themes" relative to binary or "$HOME/.config/btop/themes" | 4 | #* Themes should be placed in "../share/btop/themes" relative to binary or "$HOME/.config/btop/themes" |
| @@ -115,6 +115,9 @@ cpu_bottom = False | |||
| 115 | #* Shows the system uptime in the CPU box. | 115 | #* Shows the system uptime in the CPU box. |
| 116 | show_uptime = True | 116 | show_uptime = True |
| 117 | 117 | ||
| 118 | +#* Shows the CPU package current power consumption in watts. Requires running `make setcap` or `make setuid` or running with sudo. | ||
| 119 | +show_cpu_watts = True | ||
| 120 | + | ||
| 118 | #* Show cpu temperature. | 121 | #* Show cpu temperature. |
| 119 | check_temp = True | 122 | check_temp = True |
| 120 | 123 | ||
.config/hypr/hyprland.confmodified+1 -1
| @@ -20,7 +20,7 @@ exec-once = sleep 3 && hyprctl keyword input:touchdevice:enabled false | |||
| 20 | exec-once = sleep 3 && swaync-client -dn | 20 | exec-once = sleep 3 && swaync-client -dn |
| 21 | exec-once = sleep 3 && wl-paste --type text --watch cliphist store # Stores only text data | 21 | exec-once = sleep 3 && wl-paste --type text --watch cliphist store # Stores only text data |
| 22 | exec-once = sleep 3 && wl-paste --type image --watch cliphist store # Stores only image data | 22 | exec-once = sleep 3 && wl-paste --type image --watch cliphist store # Stores only image data |
| 23 | - | 23 | +exec-once = sleep 4 && rfkill unblock bluetooth && bluetoothctl power on |
| 24 | 24 | ||
| 25 | # exec = gsettings set org.gnome.desktop.interface gtk-theme "Adwaita-dark" # for GTK3 apps | 25 | # exec = gsettings set org.gnome.desktop.interface gtk-theme "Adwaita-dark" # for GTK3 apps |
| 26 | # exec = gsettings set org.gnome.desktop.interface color-scheme "prefer-dark" # for GTK4 apps | 26 | # exec = gsettings set org.gnome.desktop.interface color-scheme "prefer-dark" # for GTK4 apps |
.config/mimeapps.listmodified+112 -0
| @@ -1,5 +1,117 @@ | |||
| 1 | [Default Applications] | 1 | [Default Applications] |
| 2 | video/mp4=org.gnome.Showtime.desktop | 2 | video/mp4=org.gnome.Showtime.desktop |
| 3 | +video/x-msvideo=org.gnome.Showtime.desktop | ||
| 4 | +video/x-matroska=org.gnome.Showtime.desktop | ||
| 5 | +video/quicktime=org.gnome.Showtime.desktop | ||
| 6 | +video/x-flv=org.gnome.Showtime.desktop | ||
| 7 | +video/x-ms-wmv=org.gnome.Showtime.desktop | ||
| 8 | +video/x-m4v=org.gnome.Showtime.desktop | ||
| 9 | +video/webm=org.gnome.Showtime.desktop | ||
| 10 | +video/ogg=org.gnome.Showtime.desktop | ||
| 11 | +video/mpeg=org.gnome.Showtime.desktop | ||
| 12 | +application/x-matroska=org.gnome.Showtime.desktop | ||
| 13 | +audio/mpeg=org.gnome.Decibels.desktop | ||
| 14 | +application/zip=org.gnome.FileRoller.desktop | ||
| 15 | +application/x-tar=org.gnome.FileRoller.desktop | ||
| 16 | +application/x-7z-compressed=org.gnome.FileRoller.desktop | ||
| 17 | +application/x-rar-compressed=org.gnome.FileRoller.desktop | ||
| 18 | +application/x-bzip2=org.gnome.FileRoller.desktop | ||
| 19 | +application/x-gzip=org.gnome.FileRoller.desktop | ||
| 20 | +application/x-xz=org.gnome.FileRoller.desktop | ||
| 21 | +application/x-iso9660-image=org.gnome.FileRoller.desktop | ||
| 22 | +application/vnd.rar=org.gnome.FileRoller.desktop | ||
| 23 | +audio/flac=org.gnome.Decibels.desktop | ||
| 24 | +audio/ogg=org.gnome.Decibels.desktop | ||
| 25 | +audio/wav=org.gnome.Decibels.desktop | ||
| 26 | +audio/x-wav=org.gnome.Decibels.desktop | ||
| 27 | +audio/aac=org.gnome.Decibels.desktop | ||
| 28 | +audio/x-m4a=org.gnome.Decibels.desktop | ||
| 29 | +audio/webm=org.gnome.Decibels.desktop | ||
| 30 | +audio/x-vorbis+ogg=org.gnome.Decibels.desktop | ||
| 31 | +audio/x-opus+ogg=org.gnome.Decibels.desktop | ||
| 32 | +image/jpeg=org.gnome.Loupe.desktop | ||
| 33 | +image/png=org.gnome.Loupe.desktop | ||
| 34 | +image/gif=org.gnome.Loupe.desktop | ||
| 35 | +image/webp=org.gnome.Loupe.desktop | ||
| 36 | +image/tiff=org.gnome.Loupe.desktop | ||
| 37 | +image/x-canon-crw=org.gnome.Loupe.desktop | ||
| 38 | +image/x-canon-cr2=org.gnome.Loupe.desktop | ||
| 39 | +image/x-nikon-nef=org.gnome.Loupe.desktop | ||
| 40 | +image/x-sony-arw=org.gnome.Loupe.desktop | ||
| 41 | +image/svg+xml=org.gnome.Loupe.desktop | ||
| 42 | +image/bmp=org.gnome.Loupe.desktop | ||
| 43 | +image/x-icns=org.gnome.Loupe.desktop | ||
| 44 | +application/pdf=org.gnome.Papers.desktop | ||
| 45 | +text/plain=com.system76.CosmicEdit.desktop | ||
| 46 | +text/x-python=com.system76.CosmicEdit.desktop | ||
| 47 | +text/x-c=com.system76.CosmicEdit.desktop | ||
| 48 | +text/x-c++=com.system76.CosmicEdit.desktop | ||
| 49 | +text/x-java=com.system76.CosmicEdit.desktop | ||
| 50 | +text/x-javascript=com.system76.CosmicEdit.desktop | ||
| 51 | +text/x-shellscript=com.system76.CosmicEdit.desktop | ||
| 52 | +text/x-yaml=com.system76.CosmicEdit.desktop | ||
| 53 | +text/x-json=com.system76.CosmicEdit.desktop | ||
| 54 | +text/html=com.system76.CosmicEdit.desktop | ||
| 55 | +text/css=com.system76.CosmicEdit.desktop | ||
| 56 | +text/x-rust=com.system76.CosmicEdit.desktop | ||
| 57 | +application/x-shellscript=com.system76.CosmicEdit.desktop | ||
| 58 | +application/x-python=com.system76.CosmicEdit.desktop | ||
| 3 | 59 | ||
| 4 | [Added Associations] | 60 | [Added Associations] |
| 5 | video/mp4=org.gnome.Showtime.desktop; | 61 | video/mp4=org.gnome.Showtime.desktop; |
| 62 | +video/x-msvideo=org.gnome.Showtime.desktop; | ||
| 63 | +video/x-matroska=org.gnome.Showtime.desktop; | ||
| 64 | +video/quicktime=org.gnome.Showtime.desktop; | ||
| 65 | +video/x-flv=org.gnome.Showtime.desktop; | ||
| 66 | +video/x-ms-wmv=org.gnome.Showtime.desktop; | ||
| 67 | +video/x-m4v=org.gnome.Showtime.desktop; | ||
| 68 | +video/webm=org.gnome.Showtime.desktop; | ||
| 69 | +video/ogg=org.gnome.Showtime.desktop; | ||
| 70 | +video/mpeg=org.gnome.Showtime.desktop; | ||
| 71 | +application/x-matroska=org.gnome.Showtime.desktop; | ||
| 72 | +application/zip=org.gnome.FileRoller.desktop; | ||
| 73 | +application/x-tar=org.gnome.FileRoller.desktop; | ||
| 74 | +application/x-7z-compressed=org.gnome.FileRoller.desktop; | ||
| 75 | +application/x-rar-compressed=org.gnome.FileRoller.desktop; | ||
| 76 | +application/x-bzip2=org.gnome.FileRoller.desktop; | ||
| 77 | +application/x-gzip=org.gnome.FileRoller.desktop; | ||
| 78 | +application/x-xz=org.gnome.FileRoller.desktop; | ||
| 79 | +application/x-iso9660-image=org.gnome.FileRoller.desktop; | ||
| 80 | +application/vnd.rar=org.gnome.FileRoller.desktop; | ||
| 81 | +audio/mpeg=org.gnome.Decibels.desktop; | ||
| 82 | +audio/flac=org.gnome.Decibels.desktop; | ||
| 83 | +audio/ogg=org.gnome.Decibels.desktop; | ||
| 84 | +audio/wav=org.gnome.Decibels.desktop; | ||
| 85 | +audio/x-wav=org.gnome.Decibels.desktop; | ||
| 86 | +audio/aac=org.gnome.Decibels.desktop; | ||
| 87 | +audio/x-m4a=org.gnome.Decibels.desktop; | ||
| 88 | +audio/webm=org.gnome.Decibels.desktop; | ||
| 89 | +audio/x-vorbis+ogg=org.gnome.Decibels.desktop; | ||
| 90 | +audio/x-opus+ogg=org.gnome.Decibels.desktop; | ||
| 91 | +image/jpeg=org.gnome.Loupe.desktop; | ||
| 92 | +image/png=org.gnome.Loupe.desktop; | ||
| 93 | +image/gif=org.gnome.Loupe.desktop; | ||
| 94 | +image/webp=org.gnome.Loupe.desktop; | ||
| 95 | +image/tiff=org.gnome.Loupe.desktop; | ||
| 96 | +image/x-canon-crw=org.gnome.Loupe.desktop; | ||
| 97 | +image/x-canon-cr2=org.gnome.Loupe.desktop; | ||
| 98 | +image/x-nikon-nef=org.gnome.Loupe.desktop; | ||
| 99 | +image/x-sony-arw=org.gnome.Loupe.desktop; | ||
| 100 | +image/svg+xml=org.gnome.Loupe.desktop; | ||
| 101 | +image/bmp=org.gnome.Loupe.desktop; | ||
| 102 | +image/x-icns=org.gnome.Loupe.desktop; | ||
| 103 | +application/pdf=org.gnome.Papers.desktop; | ||
| 104 | +text/plain=com.system76.CosmicEdit.desktop; | ||
| 105 | +text/x-python=com.system76.CosmicEdit.desktop; | ||
| 106 | +text/x-c=com.system76.CosmicEdit.desktop; | ||
| 107 | +text/x-c++=com.system76.CosmicEdit.desktop; | ||
| 108 | +text/x-java=com.system76.CosmicEdit.desktop; | ||
| 109 | +text/x-javascript=com.system76.CosmicEdit.desktop; | ||
| 110 | +text/x-shellscript=com.system76.CosmicEdit.desktop; | ||
| 111 | +text/x-yaml=com.system76.CosmicEdit.desktop; | ||
| 112 | +text/json=com.system76.CosmicEdit.desktop; | ||
| 113 | +text/html=com.system76.CosmicEdit.desktop; | ||
| 114 | +text/css=com.system76.CosmicEdit.desktop; | ||
| 115 | +text/x-rust=com.system76.CosmicEdit.desktop; | ||
| 116 | +application/x-shellscript=com.system76.CosmicEdit.desktop; | ||
| 117 | +application/x-python=com.system76.CosmicEdit.desktop; | ||
.config/mpv/mpv.confadded+3 -0
| @@ -0,0 +1,3 @@ | |||
| 1 | +asc=no | ||
| 2 | +ao=alsa | ||
| 3 | +audio-device=alsa/pipewire | ||
.config/scripts/shared/song_detail.shmodified+17 -17
| @@ -23,20 +23,16 @@ if command -v playerctl &> /dev/null; then | |||
| 23 | if [[ "$player_status" == "Playing" ]] || [[ "$player_status" == "Paused" ]]; then | 23 | if [[ "$player_status" == "Playing" ]] || [[ "$player_status" == "Paused" ]]; then |
| 24 | # Get the last activity time for this player | 24 | # Get the last activity time for this player |
| 25 | activity_cache="/tmp/playerctl_activity_${player}" | 25 | activity_cache="/tmp/playerctl_activity_${player}" |
| 26 | + current_time=$(date +%s) | ||
| 26 | 27 | ||
| 27 | - if [[ "$player_status" == "Playing" ]]; then | 28 | + # Always update timestamp for any Playing or Paused player |
| 28 | - # Update timestamp for playing player | 29 | + # This ensures we track when a player was last active (Playing or just paused) |
| 29 | - current_time=$(date +%s) | 30 | + echo "$current_time" > "$activity_cache" |
| 30 | - echo "$current_time" > "$activity_cache" | 31 | + |
| 32 | + # Compare timestamps to find most recent | ||
| 33 | + if [[ $current_time -gt $most_recent_time ]]; then | ||
| 31 | most_recent_time=$current_time | 34 | most_recent_time=$current_time |
| 32 | most_recent_player="$player" | 35 | most_recent_player="$player" |
| 33 | - elif [[ -f "$activity_cache" ]]; then | ||
| 34 | - # Check if paused player has a recent activity timestamp | ||
| 35 | - activity_time=$(cat "$activity_cache") | ||
| 36 | - if [[ $activity_time -gt $most_recent_time ]]; then | ||
| 37 | - most_recent_time=$activity_time | ||
| 38 | - most_recent_player="$player" | ||
| 39 | - fi | ||
| 40 | fi | 36 | fi |
| 41 | fi | 37 | fi |
| 42 | done <<< "$player_list" | 38 | done <<< "$player_list" |
| @@ -100,18 +96,22 @@ if command -v playerctl &> /dev/null; then | |||
| 100 | fi | 96 | fi |
| 101 | fi | 97 | fi |
| 102 | 98 | ||
| 99 | + # Escape special characters for waybar markup compatibility | ||
| 100 | + artist_escaped="${artist//&/&}" | ||
| 101 | + title_escaped="${title//&/&}" | ||
| 102 | + | ||
| 103 | if [[ -n "$artist" && -n "$title" && -n "$duration" && -n "$position" ]]; then | 103 | if [[ -n "$artist" && -n "$title" && -n "$duration" && -n "$position" ]]; then |
| 104 | - echo "$icon $artist - $title ($position / $duration)" | 104 | + echo "$icon $artist_escaped - $title_escaped ($position / $duration)" |
| 105 | elif [[ -n "$artist" && -n "$title" && -n "$duration" ]]; then | 105 | elif [[ -n "$artist" && -n "$title" && -n "$duration" ]]; then |
| 106 | - echo "$icon $artist - $title ($duration)" | 106 | + echo "$icon $artist_escaped - $title_escaped ($duration)" |
| 107 | elif [[ -n "$title" && -n "$duration" && -n "$position" ]]; then | 107 | elif [[ -n "$title" && -n "$duration" && -n "$position" ]]; then |
| 108 | - echo "$icon $title ($position / $duration)" | 108 | + echo "$icon $title_escaped ($position / $duration)" |
| 109 | elif [[ -n "$title" && -n "$duration" ]]; then | 109 | elif [[ -n "$title" && -n "$duration" ]]; then |
| 110 | - echo "$icon $title ($duration)" | 110 | + echo "$icon $title_escaped ($duration)" |
| 111 | elif [[ -n "$artist" && -n "$title" ]]; then | 111 | elif [[ -n "$artist" && -n "$title" ]]; then |
| 112 | - echo "$icon $artist - $title" | 112 | + echo "$icon $artist_escaped - $title_escaped" |
| 113 | elif [[ -n "$title" ]]; then | 113 | elif [[ -n "$title" ]]; then |
| 114 | - echo "$icon $title" | 114 | + echo "$icon $title_escaped" |
| 115 | else | 115 | else |
| 116 | echo "$icon Something's Playing" | 116 | echo "$icon Something's Playing" |
| 117 | fi | 117 | fi |