Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
S
scom
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
SulinOS
scom
Commits
de51be5d
Kaydet (Commit)
de51be5d
authored
Ock 17, 2018
tarafından
Suleyman Poyraz
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
xterm icin script getirildi. lazım olur ilerde
üst
1695be28
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
0 deletions
+31
-0
xterm.py
sorg/sorg/xterm.py
+31
-0
No files found.
sorg/sorg/xterm.py
0 → 100755
Dosyayı görüntüle @
de51be5d
# -*- coding: utf-8 -*-
#
# Copyright (C) 2006, TUBITAK/UEKAE
#
# This program is free software; you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free
# Software Foundation; either version 2 of the License, or (at your option)
# any later version.
#
# Please read the COPYING file.
#
import
sys
import
os
def
set_title
(
message
):
"""Set message as console window title."""
if
"TERM"
in
os
.
environ
and
sys
.
stderr
.
isatty
():
terminalType
=
os
.
environ
[
"TERM"
]
for
term
in
[
"xterm"
,
"Eterm"
,
"aterm"
,
"rxvt"
,
"screen"
,
"kterm"
,
"rxvt-unicode"
]:
if
terminalType
.
startswith
(
term
):
sys
.
stderr
.
write
(
"
\x1b
]2;"
+
str
(
message
)
+
"
\x07
"
)
sys
.
stderr
.
flush
()
break
def
reset_title
():
"""Reset console window title."""
if
"TERM"
in
os
.
environ
:
set_title
(
""
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment