Added important hidden files

master
Gianmarco Gargiulo 2022-08-11 17:36:15 +02:00
parent 3640b15090
commit a02420205b
6 changed files with 107 additions and 0 deletions

2
.directory Normal file
View File

@ -0,0 +1,2 @@
[Desktop Entry]
Icon=./.icon.png

17
.gitignore vendored Normal file
View File

@ -0,0 +1,17 @@
#---- Gambas files to ignore (v5)
*.gambas
.lock
*~
core
core.*
vgcore
vgcore.*
.kdbg*
.*.prof
.lang/*.pot
.gambas/*
.settings
.startup
.list
.info
#----

BIN
.icon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.0 KiB

13
.project Normal file
View File

@ -0,0 +1,13 @@
# Gambas Project File 3.0
Title=Vimus
Startup=FMain
Icon=icon2048.png
Version=0.0.1
Component=gb.image
Component=gb.gui.qt
Component=gb.form
Description="A simple song and album visualizer made with Gambas"
Authors="Gianmarco Gargiulo"
TabSize=2
Language=en_US
Packager=1

44
.src/FMain.class Normal file
View File

@ -0,0 +1,44 @@
' Gambas class file
Public Sub Timer1_Timer()
Dim songTitle As String
Dim songArtist As String
Dim songAlbum As String
Dim songYear As String
Dim songCover As String
'Getting the title
Shell "dbus-send --print-reply --session --dest=org.mpris.MediaPlayer2.clementine /org/mpris/MediaPlayer2 org.freedesktop.DBus.Properties.Get string:'org.mpris.MediaPlayer2.Player' string:'Metadata' | sed -n '/title/{n;p}' | cut -d '\"' -f 2" To songTitle
songTitle = Replace$(songTitle, "\n", "")
'Getting the artist name
Shell "dbus-send --print-reply --session --dest=org.mpris.MediaPlayer2.clementine /org/mpris/MediaPlayer2 org.freedesktop.DBus.Properties.Get string:'org.mpris.MediaPlayer2.Player' string:'Metadata' | sed -n '/artist/{n;n;p}' | cut -d '\"' -f 2" To songArtist
songArtist = Replace$(songArtist, "\n", "")
'Getting the album name
Shell "dbus-send --print-reply --session --dest=org.mpris.MediaPlayer2.clementine /org/mpris/MediaPlayer2 org.freedesktop.DBus.Properties.Get string:'org.mpris.MediaPlayer2.Player' string:'Metadata' | sed -n '/album/{n;p}' | cut -d '\"' -f 2" To songAlbum
songAlbum = Replace$(songAlbum, "\n", "")
'Getting the year
Shell "dbus-send --print-reply --session --dest=org.mpris.MediaPlayer2.clementine /org/mpris/MediaPlayer2 org.freedesktop.DBus.Properties.Get string:'org.mpris.MediaPlayer2.Player' string:'Metadata' | sed -n '/year/{n;p}' | cut -d '\"' -f 2 | awk '{ print $3 }'" To songYear
songYear = Replace$(songYear, "\n", "")
'Getting the cover art
Shell "dbus-send --print-reply --session --dest=org.mpris.MediaPlayer2.clementine /org/mpris/MediaPlayer2 org.freedesktop.DBus.Properties.Get string:'org.mpris.MediaPlayer2.Player' string:'Metadata' | sed -n '/artUrl/{n;p}' | cut -d '\"' -f 2" To songCover
songCover = Replace$(songCover, "\n", "")
songCover = Replace$(songCover, "file://", "")
'Displaying all the data on screen
TitleLabel.Text = songTitle
ArtistLabel.Text = songArtist & " · " & songAlbum & " (" & songYear & ")"
CoverPic.Picture = Picture.Load(songCover)
End
Public Sub Form_Open()
Timer1.Start
End

31
.src/FMain.form Normal file
View File

@ -0,0 +1,31 @@
# Gambas Form File 3.0
{ Form Form
MoveScaled(0,0,148,89)
Background = Color.Black
FullScreen = True
{ MainPanel Panel
MoveScaled(17.5714,15.5714,112.8571,57.8571)
{ ArtistLabel Label
MoveScaled(0.4286,51,112,6)
Font = Font["+2"]
Alignment = Align.Center
Text = ("No artist · No album (No year)")
}
{ TitleLabel Label
MoveScaled(3.4286,40,106,10)
Font = Font["Bold,+6"]
Alignment = Align.Center
Text = ("No title")
}
{ CoverPic PictureBox
MoveScaled(38.1429,0,36.5714,36.5714)
Picture = Picture.Load("icon:/256/audio")
Stretch = True
}
}
{ Timer1 #Timer
#MoveScaled(139,2)
Delay = 1
}
}