mirror of
https://github.com/markqvist/Sideband.git
synced 2024-12-15 10:54:23 -05:00
24 lines
390 B
Python
24 lines
390 B
Python
'''
|
|
Module of Linux API for plyer.devicename.
|
|
'''
|
|
|
|
import socket
|
|
from plyer.facades import DeviceName
|
|
|
|
|
|
class LinuxDeviceName(DeviceName):
|
|
'''
|
|
Implementation of Linux DeviceName API.
|
|
'''
|
|
|
|
def _get_device_name(self):
|
|
hostname = socket.gethostname()
|
|
return hostname
|
|
|
|
|
|
def instance():
|
|
'''
|
|
Instance for facade proxy.
|
|
'''
|
|
return LinuxDeviceName()
|