Skip to content
GitLab
Explorer
Connexion
Navigation principale
Rechercher ou aller à…
Projet
X
xmonad
Gestion
Activité
Membres
Labels
Programmation
Tickets
Tableaux des tickets
Jalons
Wiki
Code
Requêtes de fusion
Dépôt
Branches
Validations
Étiquettes
Graphe du dépôt
Comparer les révisions
Extraits de code
Déploiement
Releases
Registre de conteneur
Registre de modèles
Surveillance
Incidents
Analyse
Données d'analyse des chaînes de valeur
Analyse des contributeurs
Données d'analyse du dépôt
Expériences du modèle
Aide
Aide
Support
Documentation de GitLab
Comparer les forfaits GitLab
Forum de la communauté
Contribuer à GitLab
Donner votre avis
Raccourcis clavier
?
Extraits de code
Groupes
Projets
Ce projet est archivé. Le dépôt et les autres ressources du projet sont en lecture seule.
Afficher davantage de fils d'Ariane
Kubat
xmonad
Validations
4ed9d818
Vérifiée
Valider
4ed9d818
rédigé
4 years ago
par
Kubat
Parcourir les fichiers
Options
Téléchargements
Correctifs
Plain Diff
Trayer
parent
9a3692b4
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
Modifications
3
Masquer les modifications d'espaces
En ligne
Côte à côte
Affichage de
3 fichiers modifiés
trayer-padding-icon.sh
+48
-0
48 ajouts, 0 suppression
trayer-padding-icon.sh
xmobar.hs
+2
-1
2 ajouts, 1 suppression
xmobar.hs
xmonad.hs
+5
-3
5 ajouts, 3 suppressions
xmonad.hs
avec
55 ajouts
et
4 suppressions
trayer-padding-icon.sh
0 → 100755
+
48
−
0
Voir le fichier @
4ed9d818
#!/bin/sh
# Copied from https://github.com/jaor/xmobar/issues/239#issuecomment-233206552
# Detects the width of running trayer-srg window (xprop name 'panel')
# and creates an XPM icon of that width, 1px height, and transparent.
# Outputs an <icon>-tag for use in xmobar to display the generated
# XPM icon.
#
# Run script from xmobar:
# `Run Com "/where/ever/trayer-padding-icon.sh" [] "trayerpad" 10`
# and use `%trayerpad%` in your template.
# Function to create a transparent Wx1 px XPM icon
create_xpm_icon
()
{
timestamp
=
$(
date
)
pixels
=
$(
for
i
in
`
seq
$1
`
;
do
echo
-n
"."
;
done
)
cat
<<
EOF
> "
$2
"
/* XPM *
static char * trayer_pad_xpm[] = {
/* This XPM icon is used for padding in xmobar to */
/* leave room for trayer-srg. It is dynamically */
/* updated by by trayer-padding-icon.sh which is run */
/* by xmobar. */
/* Created:
${
timestamp
}
*/
/* <w/cols> <h/rows> <colors> <chars per pixel> */
"
$1
1 1 1",
/* Colors (none: transparent) */
". c none",
/* Pixels */
"
$pixels
"
};
EOF
}
# Width of the trayer window
width
=
$(
xprop
-name
panel |
grep
'program specified minimum size'
|
cut
-d
' '
-f
5
)
# Icon file name
iconfile
=
"/tmp/trayer-padding-
${
width
}
px.xpm"
# If the desired icon does not exist create it
if
[
!
-f
$iconfile
]
;
then
create_xpm_icon
$width
$iconfile
fi
# Output the icon tag for xmobar
echo
"<icon=
${
iconfile
}
/>"
Ce diff est replié.
Cliquez pour l'agrandir.
xmobar.hs
+
2
−
1
Voir le fichier @
4ed9d818
...
@@ -19,10 +19,11 @@ Config { font = "xft:HackNerdFont:size=10:antialias=true,IPAPGothic:size=10:
...
@@ -19,10 +19,11 @@ Config { font = "xft:HackNerdFont:size=10:antialias=true,IPAPGothic:size=10:
,
Run
Com
"/home/kubat/.local/libexec/get_pa_volume.sh"
[]
"volume"
2
,
Run
Com
"/home/kubat/.local/libexec/get_pa_volume.sh"
[]
"volume"
2
,
Run
Com
"/home/kubat/.local/libexec/is_vpn_running.sh"
[]
"vpn"
50
,
Run
Com
"/home/kubat/.local/libexec/is_vpn_running.sh"
[]
"vpn"
50
,
Run
Com
"/usr/local/bin/lkt.sh"
[
"current"
]
"lektor"
5
,
Run
Com
"/usr/local/bin/lkt.sh"
[
"current"
]
"lektor"
5
,
Run
Com
"/home/kubat/.xmonad/trayer-padding-icon.sh"
[]
"trayerpad"
20
,
Run
StdinReader
,
Run
StdinReader
]
]
,
allDesktops
=
False
,
allDesktops
=
False
,
sepChar
=
"%"
,
sepChar
=
"%"
,
alignSep
=
"}{"
,
alignSep
=
"}{"
,
template
=
" <icon=haskell_20.xpm/> %StdinReader% } %lektor% { %cpu% %coretemp% %memory% <fc=#b58900>Vol</fc> %volume% %vpn%%battery% | <fc=#b58900>%date%</fc> "
,
template
=
" <icon=haskell_20.xpm/> %StdinReader% } %lektor% { %cpu% %coretemp% %memory% <fc=#b58900>Vol</fc> %volume% %vpn%%battery% | <fc=#b58900>%date%</fc>
%trayerpad%
"
}
}
Ce diff est replié.
Cliquez pour l'agrandir.
xmonad.hs
+
5
−
3
Voir le fichier @
4ed9d818
...
@@ -131,9 +131,11 @@ myStartupHook = do
...
@@ -131,9 +131,11 @@ myStartupHook = do
spawnOnce
"/home/kubat/.local/bin/xbanish"
spawnOnce
"/home/kubat/.local/bin/xbanish"
spawn
"/home/kubat/.xmonad/init.sh"
spawn
"/home/kubat/.xmonad/init.sh"
spawn
"xrdb /home/kubat/.Xresources"
spawn
"xrdb /home/kubat/.Xresources"
spawnOnce
"twmnd &"
spawnOnce
"nm-applet &"
spawnOnce
"feh --bg-scale /home/kubat/.xmonad/wallpaper &"
spawnOnce
"feh --bg-scale /home/kubat/.xmonad/wallpaper &"
spawn
"setxkbmap kubat"
spawn
"setxkbmap kubat"
spawnOnce
"t
wmnd
&"
spawnOnce
"t
rayer --edge top --align right --widthtype request --padding 6 --SetDockType true --SetPartialStrut true --expand true --monitor 1 --tint 0x002b36 --transparent true --alpha 0 --height 18
&"
myLayoutHook
=
myLayoutHook
=
minimize
$
boringAuto
(
toggleLayouts
(
noBorders
Full
)
others
)
minimize
$
boringAuto
(
toggleLayouts
(
noBorders
Full
)
others
)
...
@@ -230,8 +232,8 @@ myAdditionalKeys =
...
@@ -230,8 +232,8 @@ myAdditionalKeys =
])
])
-- Volume, with pulseaudio
-- Volume, with pulseaudio
,
((
mod4Mask
,
xK_F11
),
spawn
"pavolume voldown 5"
)
,
((
mod4Mask
,
xK_F11
),
spawn
"pavolume voldown 5
--noshow
"
)
,
((
mod4Mask
,
xK_F12
),
spawn
"pavolume volup 5"
)
,
((
mod4Mask
,
xK_F12
),
spawn
"pavolume volup 5
--noshow
"
)
,
((
mod4Mask
,
xK_F10
),
spawn
"pavolume mutetoggle"
)
,
((
mod4Mask
,
xK_F10
),
spawn
"pavolume mutetoggle"
)
-- Lektord
-- Lektord
...
...
Ce diff est replié.
Cliquez pour l'agrandir.
Aperçu
0%
Chargement en cours
Veuillez réessayer
ou
joindre un nouveau fichier
.
Annuler
You are about to add
0
people
to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Enregistrer le commentaire
Annuler
Veuillez vous
inscrire
ou vous
se connecter
pour commenter