Commit dda00645 authored by Franciszek Madej's avatar Franciszek Madej 🤞

Switched bar and updated stack

parent 9f193727
shadow = true;
no-dnd-shadow = true;
no-dock-shadow = true;
no-dock-shadow = false;
clear-shadow = true;
shadow-radius = 7;
shadow-offset-x = -7;
......@@ -9,7 +9,8 @@ shadow-opacity = 0.7;
shadow-red = 0.0;
shadow-green = 0.0;
shadow-blue = 0.0;
shadow-exclude = [ "name = 'Notification'", "class_g = 'Conky'", "class_g ?= 'Notify-osd'", "class_g = 'Cairo-clock'" ];
shadow-exclude = [ "name = 'Notification'", "class_g = 'Conky'", "class_g ?=
'Notify-osd'", "class_g = 'Cairo-clock'", "class_g = 'stalonetray'" ];
shadow-ignore-shaped = false;
menu-opacity = 1.0;
inactive-opacity = 1.0;
......
[global]
font = benis uushi 9
font = Fira Code 8
# Allow a small subset of html markup:
# <b>bold</b>
......@@ -11,7 +11,7 @@
# <http://developer.gnome.org/pango/stable/PangoMarkupFormat.html>.
# If markup is not allowed, those tags will be stripped out of the
# message.
allow_markup = yes
markup = yes
# The format of the message. Possible variables are:
# %a appname
......@@ -37,7 +37,7 @@
# window allows bounces back and forth.
# This option conflicts with "word_wrap".
# Set to 0 to disable.
bounce_freq = 0
bounce_freq = 10
# Show age of message if message is older than show_age_threshold
# seconds.
......@@ -64,7 +64,7 @@
# the top and down respectevly.
# The width can be negative. In this case the actual width is the
# screen width minus the width defined in within the geometry option.
geometry = "0x8-5+38"
geometry = "150x8-6+28"
# Shrink window if it's smaller than the width. Will be ignored if
# width is 0.
......@@ -73,7 +73,7 @@
# The transparency of the window. Range: [0; 100].
# This option will only work if a compositing windowmanager is
# present (e.g. xcompmgr, compiz, etc.).
transparency = 20
transparency = 0
# Don't remove messages, if the user is idle (no mouse or keyboard input)
# for longer than idle_threshold seconds.
......@@ -145,11 +145,11 @@
icon_position = off
# Paths to default icons.
icon_folders = /usr/share/icons/gnome/16x16/status/:/usr/share/icons/gnome/16x16/devices/
icon_path = /usr/share/icons/gnome/16x16/status/:/usr/share/icons/gnome/16x16/devices/
[frame]
width = 0
color = "#CFCFCF"
# Looks!
frame_width = 0
frame_color = "#CFCFCF"
[shortcuts]
......
''' This is qtile config made by kosciak9.
'''
This is qtile config made by kosciak9.
Feel free to edit it, clone it, no need for any attribiuton.
I hope to see you soon on /r/unixporn tho! '''
I hope to see you soon on /r/unixporn tho!
'''
import json
import os
import subprocess
from libqtile import bar, layout, widget
from libqtile import layout
from libqtile.command import lazy
# Let's go with groups first, cause it's one of the most visible things.
from libqtile.config import Click, Drag, Group, Key, Screen, hook
from libqtile.config import Click, Drag, Group, Match, Key, Screen, hook
# Adding startup hook
home = os.path.expanduser('~')
# Adding per host setup
# defaults
settings = {
'hostname': 'unknown',
'type': 'desktop'
}
# or loaded settings
with open('.host.json') as json_data:
settings = json.load(json_data)
# Visuals
font = 'Fira Code Retina'
color_list = {
'black': '#1d1f21',
......@@ -37,50 +24,52 @@ color_list = {
'purple': '#b294bb'
}
font = 'Fira Code Retina'
# Adding startup hook
home = os.path.expanduser('~')
@hook.subscribe.startup
def autostart():
""".xprofile failed me for the last time."""
subprocess.call([home + '/documents/scripts/autostart.sh'])
subprocess.call([home + '/documents/scripts/spawn'])
groups_list = [
'',
'',
'',
'',
'',
''
]
mod = 'mod4' # ~super
keys = []
groups = [
Group(''),
Group(''),
Group(''),
Group(''),
Group(''),
Group(''),
Group('', init=False, persist=False,
matches=[Match(wm_class=["Firefox"])],
position=1),
Group('', position=2),
Group('', position=3),
Group('', init=False, persist=False,
matches=[Match(wm_class=["Thunderbird"])],
position=4),
Group('',
matches=[Match(wm_class=["TelegramDesktop"])],
position=5),
Group('', position=6),
]
for index, group_name in enumerate(groups):
key = index + 1
keys.append(
Key([mod], str(key), lazy.group[group_name.name].toscreen())
# move yourself around groups
)
keys.append(
Key([mod, 'shift'], str(key), lazy.window.togroup(group_name.name))
# move windows around groups
)
# layouts are quite important but I tend to use Max and switch groups a lot
layouts = [
layout.MonadTall(border_focus=color_list['yellow'],
border_width=1, margin=15, ratio=0.65),
layout.Stack(border_focus=color_list['yellow'],
border_width=1, margin=15),
layout.Max(),
]
# keybidings!
mod = 'mod4' # gotta get icon change on it, Tux > Windows
# long as heck, all colors present here tho!
keys = [
keys += [
# typical, not-exactly-wm-yet setup
Key(
......@@ -159,14 +148,6 @@ keys = [
[mod], 'l',
lazy.layout.right()
),
Key(
[mod, 'control'], 'h',
lazy.layout.delete()
),
Key(
[mod, 'control'], 'l',
lazy.layout.add()
),
Key(
[mod, "shift"], "h",
lazy.layout.swap_left()
......@@ -192,8 +173,8 @@ keys = [
lazy.layout.shrink()
),
Key(
[mod], "n",
lazy.layout.normalize()
[mod, "shift"], "m",
lazy.window.toggle_fullscreen()
),
Key(
[mod], "o",
......@@ -204,64 +185,8 @@ keys = [
lazy.layout.flip())
]
i = 1 # helper variable, I went probably around but it seems to work
for groupie in groups_list:
keys.append(
Key([mod], str(i), lazy.group[groupie].toscreen())
# move yourself around groups
)
keys.append(
Key([mod, 'shift'], str(i), lazy.window.togroup(groupie))
# move windows around groups
)
i = i + 1
# bar is the always present, so it's really important to craft it well -
# look at this exceptional invisible window name widget made
# as flexible separator
font_awesome = 'Font Awesome 5 Free'
widget_defaults = dict(
font=font,
fontsize=11,
padding=2,
)
widget_list = [
widget.GroupBox(
fontsize=14,
padding=6,
borderwidth=2,
urgent_border=color_list['yellow'],
highlight_method="line",
this_current_screen_border=color_list['yellow'],
other_screen_border=color_list['red']
),
widget.WindowName(foreground=color_list['black']),
widget.Systray(
padding=6
),
widget.TextBox('', font=font_awesome),
widget.Volume(),
widget.TextBox('', font=font_awesome),
widget.Clock(format='%b %d'),
widget.TextBox('', font=font_awesome),
widget.Clock(format='%H:%M'),
]
if settings["type"] == "laptop":
widget_list.append(widget.TextBox('', font=font_awesome))
widget_list.append(widget.Battery(format='{percent:2.0%}'))
screens = [
Screen(
top=bar.Bar(
widget_list,
28,
background=color_list['black'],
),
),
Screen(),
]
# we all do love to tile... but sometimes we need to float
......
......@@ -36,11 +36,10 @@ rofi.separator-style: solid
rofi.font: Fira Code Retina 9
! Modi
rofi.combi-modi: drun,ssh,pass
rofi.combi-modi: drun,ssh,window
rofi.modi: combi
rofi.display-combi:
rofi.display-drun:
rofi.display-pass: password
! Icons
rofi.show-icons: true
......
# vim:filetype=config:tw=80:et
#
# This is sample ~/.stalonetrayrc, resembling default configuration.
# Remember: command line parameters take precedence.
#
# Directives introduced in 0.8 are marked with "NEW in 0.8"
#
####################################################################
#
# stalonetray understands following directives
#
####################################################################
# background <color> # color can be specified as an HTML hex triplet or
# as a name from rgb.txt, note that '#' must be quoted
background "#1D1F21"
# decorations <decspec> # set trays window decorations; possible values for
# decspec are: all, title, border, none
decorations none
# display <display name> # as usual
# dockapp_mode <mode> # set dockapp mode, which can be either simple (for
# e.g. OpenBox, wmaker for WindowMaker, or none
# (default). NEW in 0.8.
dockapp_mode none
# fuzzy_edges [<level>] # enable fuzzy edges and set fuzziness level. level
# can be from 0 (disabled) to 3; this setting works
# with tinting and/or transparent and/or pixmap
# backgrounds
fuzzy_edges 0
# geometry <geometry> # tray's geometry in standard X notation; width and
# height are specified in slot_size multiples
geometry 5x1-120+4
# grow_gravity <gravity> # one of N, S, E, W, NW, NE, SW, SE; tray will grow
# in the direction opposite to one specified by
# grow_gravity; if horizontal or vertical
# direction is not specified, tray will not grow in
# that direction
grow_gravity E
# icon_gravity <gravity> # icon placement gravity, one of NW, NE, SW, SE
icon_gravity E
# icon_size <int> # specifies dimensions of typical icon slot
icon_size 14
# log_level <level> # controls the amount of logging output, level can
# be err (default), info, or trace (enabled only
# when stalonetray configured with --enable-debug)
# NEW in 0.8.
log_level err
# kludges kludge[,kludge] # enable specific kludges to work around
# non-conforming WMs and/or stalonetray bugs.
# NEW in 0.8. Argument is a
# comma-separated list of
# * fix_window_pos - fix tray window position on
# erroneous moves by WM
# * force_icons_size - ignore resize events on all
# icons; force their size to be equal to
# icon_size
# * use_icon_hints - use icon window hints to
# dtermine icon size
# max_geometry <geometry> # maximal tray dimensions; 0 in width/height means
# no limit
max_geometry 0x0
# no_shrink [<bool>] # disables shrink-back mode
no_shrink false
# parent_bg [<bool>] # whether to use pseudo-transparency
# (looks better when reparented into smth like FvwmButtons)
parent_bg false
# pixmap_bg <path_to_xpm> # use pixmap from specified xpm file for (tiled) background
# pixmap_bg /home/user/.stalonetraybg.xpm
# scrollbars <mode> # enable/disable scrollbars; mode is either
# vertical, horizontal, all or none (default)
# NEW in 0.8.
scrollbars none
# scrollbars-size <size> # scrollbars step in pixels; default is slot_size / 4
# scrollbars-step 8
# scrollbars-step <step> # scrollbars step in pixels; default is slot_size / 2
# scrollbars-step 32
# slot_size <int> # specifies size of icon slot, defaults to
# icon_size NEW in 0.8.
# skip_taskbar [<bool>] # hide tray`s window from the taskbar
skip_taskbar true
# sticky [<bool>] # make a tray`s window sticky across the
# desktops/pages
sticky true
# tint_color <color> # set tinting color
tint_color white
# tint_level <level> # set tinting level; level ranges from 0 (disabled)
# to 255
tint_level 0
# transparent [<bool>] # whether to use root-transparency (background
# image must be set with Esetroot or compatible utility)
transparent false
# vertical [<bool>] # whether to use vertical layout (horisontal layout
# is used by default)
vertical false
# window_layer <layer> # set the EWMH-compatible window layer; one of:
# bottom, normal, top
window_layer normal
# window_strut <mode> # enable/disable window struts for tray window (to
# avoid converting of tray window by maximized
# windows); mode defines to which screen border tray
# will be attached; it can be either top, bottom,
# left, right, none or auto (default)
window_strut auto
# window_type <type> # set the EWMH-compatible window type; one of:
# desktop, dock, normal, toolbar, utility
window_type dock
# xsync [<bool>] # whether to operate on X server synchronously (SLOOOOW)
xsync false
#!/bin/sh
xautolock -locker "i3lock -i /home/kosciak/.config/misc/wallpaper-tile.png -t" -time 2
xautolock -time 1 -locker ~/documents/scripts/i3lock-custom
#!/bin/sh
i3lock -k -B=300 \
--timestr="%H:%M" \
--datestr="%d.%m.%Y" \
--time-font="Fira Code Retina" \
--date-font="Fira Code Retina" \
--wrong-font="Fira Code Retina" \
--verif-font="Fira Code Retina" \
--timesize=17 \
--datesize=17 \
--wrongsize=15 \
--verifsize=17 \
--wrongtext="Smile to the camera!" \
--radius 140 \
--datecolor "#DDDDDDFF" \
--timecolor "#DDDDDDFF" \
--insidevercolor "#81A2BEFF" \
--insidewrongcolor "#81A2BEFF" \
--insidevercolor "#81A2BEFF" \
--insidecolor "#81A2BE30" \
--ringvercolor "#81A2BEFF" \
--ringcolor "#81A2BEFF" \
--keyhlcolor "#F0C674FF" \
--line-uses-ring \
--indpos "400:500" \
-i ~/.config/misc/wallpaper-lock.jpg
#!/bin/zsh
#!/bin/sh
~/documents/scripts/toplane &
dunst &
compton -b &
unclutter &
feh --bg-tile ~/.config/misc/wallpaper-tile.png &
dunst &
redshift &
rescuetime &
setxkbmap pl &
xrdb ~/.Xresources &
task sync &
indicator-kdeconnect &
mopidy &
sudo pommed &
setxkbmap pl &
unclutter &
~/documents/scripts/autolock &
wpa_gui &
redshift &
firefox &
thunderbird &
telegram-desktop &
spotify &
sleep 5 && stalonetray &
#!/usr/bin/env python3
# Simple bar script using lemonbar
from libqtile.command import Client
from datetime import datetime
from socket import gethostname
from psutil import sensors_battery
from subprocess import Popen, PIPE
# start with functions
def print_groups():
end_string = ''
c = Client()
groups = c.groups()
for name, group in groups.items():
if group['screen'] == 0:
end_string += ' %{+u}%{U#FFDDDDDD}'
else:
end_string += ' '
if group['focus']:
end_string += '%{F#FFDDDDDD}'
else:
end_string += '%{F#FF81A2BE}'
end_string += name + '%{-u}%{F-}'
return end_string
def print_date():
today = datetime.now()
# end_string = '%{F#DDDDDD}'
end_string = '%{T2} ' + today.strftime('%b %d').lower()
end_string += '  ' + today.strftime('%H:%M')
return end_string
if __name__ == '__main__':
# constantly running loop with result
settings = {
'hostname': gethostname(),
'laptop': bool(sensors_battery()),
}
process = Popen([
'lemonbar',
'-f', 'Fira Code Retina-7',
'-o', '1',
'-f', 'Font Awesome 5 Free-8',
'-o', '0',
'-f', 'Font Awesome 5 Brands-8',
'-o', '0',
'-gx22', '-p',
'-B', '#1D1F21'],
stdout=PIPE,
stdin=PIPE,
bufsize=1)
last_string = ""
while True:
end_string = ' %{l} ' + print_groups()
end_string += '%{r}' + print_date() + ' '
if end_string != last_string:
process.stdin.write(end_string.encode())
process.stdin.flush()
last_string = end_string
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment