3 Commits

Author SHA1 Message Date
House of Vanity
6340565c27 Update build.yml 2020-09-23 19:20:43 +03:00
Alexandr
e9c59a6733 Improve player MPRIS line. 2020-09-22 15:52:55 +03:00
Alexandr Bogomyakov
5d37a86d09 Dummy commit. 2020-07-10 14:11:50 +03:00
5 changed files with 34 additions and 28 deletions

View File

@@ -1,7 +1,7 @@
# Maintainer: Alexandr Bogomyakov (ultradesu) <ab@hexor.ru> # Maintainer: Alexandr Bogomyakov (ultradesu) <ab@hexor.ru>
pkgname=tmux-helper pkgname=tmux-helper
pkgver=0.3.3 pkgver=0.3.4
pkgrel=1 pkgrel=1
pkgdesc="Tmux helper" pkgdesc="Tmux helper"
url="https://github.com/house-of-vanity/tmux-helper.git" url="https://github.com/house-of-vanity/tmux-helper.git"

View File

@@ -82,14 +82,3 @@ jobs:
export GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }} export GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }}
./bin/linux/amd64/github-release upload -u house-of-vanity -r tmux-helper --tag ${{ steps.get_version.outputs.FULL_TAG }} --name arch_linux_tmux-helper-${{ steps.get_version.outputs.VERSION }}-x86_64.pkg.tar.zst --file ./tmux-helper-x86_64.pkg.tar.zst ./bin/linux/amd64/github-release upload -u house-of-vanity -r tmux-helper --tag ${{ steps.get_version.outputs.FULL_TAG }} --name arch_linux_tmux-helper-${{ steps.get_version.outputs.VERSION }}-x86_64.pkg.tar.zst --file ./tmux-helper-x86_64.pkg.tar.zst
./bin/linux/amd64/github-release upload -u house-of-vanity -r tmux-helper --tag ${{ steps.get_version.outputs.FULL_TAG }} --name tmux-helper-${{ steps.get_version.outputs.VERSION }} --file ./tmux-helper ./bin/linux/amd64/github-release upload -u house-of-vanity -r tmux-helper --tag ${{ steps.get_version.outputs.FULL_TAG }} --name tmux-helper-${{ steps.get_version.outputs.VERSION }} --file ./tmux-helper
# SCP to arch repo
- name: Copy package to repository
uses: appleboy/scp-action@master
with:
host: ${{ secrets.SSH_HOST }}
username: github_deploy
port: 22
key: ${{ secrets.SSH_KEY }}
source: "./tmux-helper-x86_64.pkg.tar.zst"
target: "/srv/arch-repo/"

View File

@@ -1,6 +1,6 @@
[package] [package]
name = "tmux-helper" name = "tmux-helper"
version = "0.3.3" version = "0.3.4"
description = "Utility for printing system info for tmux status line." description = "Utility for printing system info for tmux status line."
authors = ["Ultra Desu <ultradesu@hexor.ru>"] authors = ["Ultra Desu <ultradesu@hexor.ru>"]
edition = "2018" edition = "2018"

View File

@@ -36,3 +36,4 @@ OPTIONS:
-a, --mpd-address <mpd_address> <ADDR>:<PORT> of MPD server. -a, --mpd-address <mpd_address> <ADDR>:<PORT> of MPD server.
-u, --utctime <utctime> UTC time -u, --utctime <utctime> UTC time
``` ```

View File

@@ -200,6 +200,21 @@ fn format_player(track_info: TrackInfo, config: &config::Config) {
} }
let artist_line = shorten(track_info.artist, max_len, 6); let artist_line = shorten(track_info.artist, max_len, 6);
let title_line = shorten(track_info.title, max_len, 6); let title_line = shorten(track_info.title, max_len, 6);
if track_info.position == "00:00" || track_info.duration == "" {
println!(
"#[none]#[bold]{}{}{}#[none]{}{}{}{} {}{} {}#[default]",
config.color_track_name,
title_line,
config.color_end,
separator,
config.color_track_artist,
artist_line,
config.color_end,
config.color_track_time,
track_info.status,
config.color_end,
);
} else {
println!( println!(
"#[none]#[bold]{}{}{}#[none]{}{}{}{} {}[{}/{}] {} {}#[default]", "#[none]#[bold]{}{}{}#[none]{}{}{}{} {}[{}/{}] {} {}#[default]",
config.color_track_name, config.color_track_name,
@@ -216,6 +231,7 @@ fn format_player(track_info: TrackInfo, config: &config::Config) {
config.color_end, config.color_end,
); );
} }
}
pub fn mpris(config: &config::Config) { pub fn mpris(config: &config::Config) {
match player_info(get_player().unwrap()) { match player_info(get_player().unwrap()) {