Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #! /usr/bin/env python
- # -*- coding: utf-8 -*-
- from i3pystatus import Status
- from i3pystatus.calendar import google as google_cal
- from i3pystatus.weather import weathercom
- status = Status(logfile='$HOME/tmp/i3pystatus.log')
- # ИСПОЛЬЗУЕМЫЕ ЦВЕТА
- ## MONOCHROME
- colors_bg = ['#352A3D', '#24323d', '#223642', '#2C5630', '#39703E', '#643a37', '#503745', '#472933', '#473333', '#84312E']
- colors_fnt = ['#BFC2C0', '#BFC2C0', '#BFC2C0', '#BFC2C0', '#BFC2C0', '#BFC2C0', '#BFC2C0', '#BFC2C0']
- # РАСКЛАДКА
- status.register("xkblayout",
- #hints = {"markup": "pango", "separator": False},
- #format = "<span background ='" + colors_bg[8] + "' color = '#002B36'></span> {symbol}",
- format=" {symbol}",
- layouts = ["us", "ru"],)
- # ЧАСЫ
- status.register("clock",
- hints = {"markup": "pango", "separator": False, "border_right": 0, "border_left":0,},
- format = "<span background ='" + colors_bg[0] + "' color = '#002B36'></span>" + " %a %-d %b %X",
- color = colors_fnt[0],
- interval = 1,
- on_leftclick = "gnome-calendar",
- )
- # ИНДИКАТОР КЛАВИШ УПРАВЛЕНИЯ
- status.register("keyboard_locks",
- hints = {"markup": "pango", "separator": False, "separator_block_width": 0, "border_right": 0, "border_left":0,},
- format = "<span background ='" + colors_bg[1] + "' color = '" + colors_bg[0] + "'></span\
- ><span background = '" + colors_bg[0] + "'>{caps} {num}</span>",
- )
- # PULSEAUDIO
- status.register("pulseaudio",
- hints= {"markup": "pango", "separator": False, "separator_block_width": 0, "border_right": 0, "border_left":0,},
- format = "<span background='" + colors_bg[2] + "' color='" + colors_bg[1] + "'></span\
- ><span background='" + colors_bg[1] + "' > {volume}% </span>",
- format_muted = "<span background='" + colors_bg[2] + "' color='" + colors_bg[1] + "'></span\
- ><span background='" + colors_bg[1] + "' > [muted] </span>",
- step = 2,
- )
- # BACKLIGHT
- status.register("backlight",
- interval = 5,
- color = colors_fnt[3],
- hints= {"markup": "pango","separator": False,"separator_block_width": 0},
- format = "<span background='" + colors_bg[3] + "' color='" + colors_bg[2] + "'></span\
- ><span background='" + colors_bg[2] + "'> {percentage:.0f}% </span>",
- on_upscroll = "light -A 1",
- on_downscroll = "light -U 1",
- )
- # БАТАРЕЯ
- status.register("battery",
- battery_ident = "BAT1",
- interval = 3,
- hints = {"markup": "pango","separator": False,"separator_block_width": 0},
- format = "<span background='" + colors_bg[4] + "' color='" + colors_bg[3] + "'></span\
- ><span background='" + colors_bg[3] + "'>{status} {percentage:.0f}%</span>",
- alert = True,
- alert_percentage = 30,
- color = colors_fnt[4],
- full_color = "#f2edcd",
- charging_color = "#ece6b6",
- critical_color = "#e5d18d",
- status = {
- "DIS": " ",
- "CHR": " ",
- "FULL": " ",
- },
- )
- # ТЕМПЕРАТУРА
- status.register("temp",
- hints= {"markup": "pango","separator": False,"separator_block_width": 0},
- format = "<span background='" + colors_bg[5] + "' color='" + colors_bg[4] + "'></span\
- ><span background='" + colors_bg[4] + "'> {temp}°</span>",
- color = colors_fnt[5],
- alert_color = "#FFEF00",
- alert_temp = 60,
- )
- # CPU
- status.register("cpu_usage",
- color = colors_fnt[6],
- hints = {"markup": "pango", "separator": False, "separator_block_width": 0},
- on_leftclick = "terminology -e 'top -u tevildo'",
- format = "<span background='" + colors_bg[7] + "' color='" + colors_bg[5] + "'></span\
- ><span background='" + colors_bg[5] + "' > {usage}%</span>",
- )
- # SPOTIFY
- # Индикатор музыкальных проигрывателей. Подхватывает активный
- status.register("spotify",
- hints = {"markup": "pango", "separator": False, "separator_block_width": 0},
- format = "<span color='" + colors_bg[8] + "'></span\
- ><span background='" + colors_bg[7] + "' >[{artist}/{album}/]{title}{status}</span>",
- format_no_player = "<span color='" + colors_bg[8] + "'></span\
- ><span background='" + colors_bg[7] + "' >♬ [no player]</span>",
- on_middleclick=["stop"],
- on_doubleleftclick="terminology -e 'ncmpcpp'",
- on_doublerightclick="sonata",
- status={
- "pause": " ",
- "play": " ",
- "stop": " ",
- },
- )
- # # ПОГОДА
- # status.register('weather',
- # #hints = {"markup": "pango", "separator": False, "separator_block_width": 0},
- # #format = "{condition} {current_temp}{temp_unit}{icon}[ Hi: {high_temp}] Lo: {low_temp}",
- # format = "weath:{condition}{current_temp}{temp_unit}{feelslike}{icon}",
- # #format = "<span color='" + colors_bg[7] + "'></span\
- # #><span background='" + colors_bg[7] + "' >{condition} {current_temp}{temp_unit}{icon}[ Hi: {high_temp}] Lo: {low_temp}</span>",
- # colorize = True,
- # backend = weathercom.Weathercom(
- # location_code = "RSXX0091:1:RS",
- # units = "metric",
- # update_error="!",
- # ),
- # )
- # status.register(
- # 'weather',
- # format='{condition} {current_temp}{temp_unit}[ {icon}][ Hi: {high_temp}][ Lo: {low_temp}][ {update_error}]',
- # interval=60,
- # colorize=True,
- # hints={'markup': 'pango'},
- # backend=weathercom.Weathercom(
- # location_code='94107:4:US',
- # units='imperial',
- # update_error='<span color="#ff0000">!</span>',
- # ),
- # )
- status.run()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement