nowe podejście
This commit is contained in:
@ -15,6 +15,7 @@ window:
|
||||
dynamic_padding: true
|
||||
dynamic_title: true
|
||||
decorations: none
|
||||
opacity: 0.9
|
||||
class:
|
||||
instance: Alacritty
|
||||
general: Alacritty
|
||||
@ -39,8 +40,6 @@ font:
|
||||
x: 0
|
||||
y: 0
|
||||
|
||||
background_opacity: 0.9
|
||||
|
||||
selection:
|
||||
semantic_escape_chars: ",│`|:\"' ()[]{}<>\t"
|
||||
ave_to_clipboard: true
|
||||
@ -159,43 +158,138 @@ key_bindings:
|
||||
#- { key: N, mods: Command, action: SpawnNewInstance }
|
||||
#- { key: F, mods: Command|Control, action: ToggleFullscreen }
|
||||
|
||||
# colors:
|
||||
# # Default colors
|
||||
# primary:
|
||||
# background: '0x000000'
|
||||
# foreground: '0xbcbcbc'
|
||||
|
||||
# # Colors the cursor will use if `custom_cursor_colors` is true
|
||||
# cursor:
|
||||
# text: '0x262626'
|
||||
# cursor: '0xbcbcbc'
|
||||
|
||||
# # Normal colors
|
||||
# normal:
|
||||
# black: '0x262626'
|
||||
# red: '0x5f8787'
|
||||
# green: '0x87af87'
|
||||
# yellow: '0x5f8787'
|
||||
# blue: '0xffffaf'
|
||||
# magenta: '0x87afd7'
|
||||
# cyan: '0x5f875f'
|
||||
# white: '0xbcbcbc'
|
||||
|
||||
# # Bright colors
|
||||
# bright:
|
||||
# black: '0x6c6c6c'
|
||||
# red: '0x5f8787'
|
||||
# green: '0x87af87'
|
||||
# yellow: '0x5f8787'
|
||||
# blue: '0xffffaf'
|
||||
# magenta: '0x87afd7'
|
||||
# cyan: '0x5f875f'
|
||||
# white: '0xffffff'
|
||||
|
||||
# indexed_colors:
|
||||
# - { index: 16, color: '0xff8700' }
|
||||
# - { index: 17, color: '0x5f87af' }
|
||||
# - { index: 18, color: '0x303030' }
|
||||
# - { index: 19, color: '0x333333' }
|
||||
# - { index: 20, color: '0x787878' }
|
||||
# - { index: 21, color: '0xc9c9c9' }
|
||||
|
||||
# # Colors (Gruvbox dark)
|
||||
# colors:
|
||||
# # Default colors
|
||||
# primary:
|
||||
# # hard contrast: background = '0x1d2021'
|
||||
# background: '0x282828'
|
||||
# # soft contrast: background = '0x32302f'
|
||||
# foreground: '0xebdbb2'
|
||||
|
||||
# # Normal colors
|
||||
# normal:
|
||||
# black: '0x282828'
|
||||
# red: '0xcc241d'
|
||||
# green: '0x98971a'
|
||||
# yellow: '0xd79921'
|
||||
# blue: '0x458588'
|
||||
# magenta: '0xb16286'
|
||||
# cyan: '0x689d6a'
|
||||
# white: '0xa89984'
|
||||
|
||||
# # Bright colors
|
||||
# bright:
|
||||
# black: '0x928374'
|
||||
# red: '0xfb4934'
|
||||
# green: '0xb8bb26'
|
||||
# yellow: '0xfabd2f'
|
||||
# blue: '0x83a598'
|
||||
# magenta: '0xd3869b'
|
||||
# cyan: '0x8ec07c'
|
||||
# white: '0xebdbb2'
|
||||
|
||||
|
||||
|
||||
# Colors (Hyper)
|
||||
colors:
|
||||
# Default colors
|
||||
primary:
|
||||
background: '0x000000'
|
||||
foreground: '0xbcbcbc'
|
||||
|
||||
# Colors the cursor will use if `custom_cursor_colors` is true
|
||||
foreground: '0xffffff'
|
||||
cursor:
|
||||
text: '0x262626'
|
||||
cursor: '0xbcbcbc'
|
||||
text: '0xF81CE5'
|
||||
cursor: '0xffffff'
|
||||
|
||||
# Normal colors
|
||||
normal:
|
||||
black: '0x262626'
|
||||
red: '0x5f8787'
|
||||
green: '0x87af87'
|
||||
yellow: '0x5f8787'
|
||||
blue: '0xffffaf'
|
||||
magenta: '0x87afd7'
|
||||
cyan: '0x5f875f'
|
||||
white: '0xbcbcbc'
|
||||
black: '0x000000'
|
||||
red: '0xfe0100'
|
||||
green: '0x33ff00'
|
||||
yellow: '0xfeff00'
|
||||
blue: '0x0066ff'
|
||||
magenta: '0xcc00ff'
|
||||
cyan: '0x00ffff'
|
||||
white: '0xd0d0d0'
|
||||
|
||||
# Bright colors
|
||||
bright:
|
||||
black: '0x6c6c6c'
|
||||
red: '0x5f8787'
|
||||
green: '0x87af87'
|
||||
yellow: '0x5f8787'
|
||||
blue: '0xffffaf'
|
||||
magenta: '0x87afd7'
|
||||
cyan: '0x5f875f'
|
||||
white: '0xffffff'
|
||||
black: '0x808080'
|
||||
red: '0xfe0100'
|
||||
green: '0x33ff00'
|
||||
yellow: '0xfeff00'
|
||||
blue: '0x0066ff'
|
||||
magenta: '0xcc00ff'
|
||||
cyan: '0x00ffff'
|
||||
white: '0xFFFFFF'
|
||||
|
||||
|
||||
# Colors (Gotham)
|
||||
# colors:
|
||||
# # Default colors
|
||||
# primary:
|
||||
# background: '0x0a0f14'
|
||||
# foreground: '0x98d1ce'
|
||||
|
||||
indexed_colors:
|
||||
- { index: 16, color: '0xff8700' }
|
||||
- { index: 17, color: '0x5f87af' }
|
||||
- { index: 18, color: '0x303030' }
|
||||
- { index: 19, color: '0x333333' }
|
||||
- { index: 20, color: '0x787878' }
|
||||
- { index: 21, color: '0xc9c9c9' }
|
||||
# # Normal colors
|
||||
# normal:
|
||||
# black: '0x0a0f14'
|
||||
# red: '0xc33027'
|
||||
# green: '0x26a98b'
|
||||
# yellow: '0xedb54b'
|
||||
# blue: '0x195465'
|
||||
# magenta: '0x4e5165'
|
||||
# cyan: '0x33859d'
|
||||
# white: '0x98d1ce'
|
||||
|
||||
# # Bright colors
|
||||
# bright:
|
||||
# black: '0x10151b'
|
||||
# red: '0xd26939'
|
||||
# green: '0x081f2d'
|
||||
# yellow: '0x245361'
|
||||
# blue: '0x093748'
|
||||
# magenta: '0x888ba5'
|
||||
# cyan: '0x599caa'
|
||||
# white: '0xd3ebe9'
|
||||
|
@ -7,4 +7,4 @@
|
||||
*
|
||||
*/
|
||||
|
||||
@import "cocoa.rasi"
|
||||
@import "faded.rasi"
|
||||
|
@ -9,4 +9,4 @@
|
||||
*
|
||||
*/
|
||||
|
||||
@import "Blue.rasi"
|
||||
@import "Orange.rasi"
|
||||
|
@ -8,4 +8,4 @@
|
||||
*
|
||||
*/
|
||||
|
||||
@import "faded.rasi"
|
||||
@import "mask.rasi"
|
||||
|
11
.config/sway/bin/alarms.py
Executable file
11
.config/sway/bin/alarms.py
Executable file
@ -0,0 +1,11 @@
|
||||
#!/usr/bin/env python3
|
||||
"""
|
||||
Alarmy moich SNS
|
||||
"""
|
||||
|
||||
|
||||
import boto3
|
||||
|
||||
client = boto3.client('sns')
|
||||
|
||||
print(client.list_subscriptions())
|
@ -10,4 +10,4 @@ swaylock --indicator-radius 100 \
|
||||
--text-color ECEFF4 \
|
||||
--text-caps-lock-color ECEFF4 \
|
||||
--show-failed-attempts \
|
||||
-i /home/paramah/Wallpapers/relax.png
|
||||
-i /home/paramah/Downloads/lockscreen.png
|
98
.config/sway/bin/mysway.py
Executable file
98
.config/sway/bin/mysway.py
Executable file
@ -0,0 +1,98 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
"""
|
||||
Prosty demoninik do aktualizacji nazw workspace
|
||||
"""
|
||||
|
||||
from i3ipc import Connection, Event
|
||||
|
||||
i3 = Connection()
|
||||
|
||||
|
||||
def glyph(ws_number):
|
||||
"""
|
||||
Nazwy worspace
|
||||
"""
|
||||
# glyphs = ["", "", "", "", "", "", "", ""]
|
||||
glyphs = [
|
||||
".::term:::.",
|
||||
".:::web:::.",
|
||||
".:::work::.",
|
||||
".::((4))::.",
|
||||
".::debug::.",
|
||||
".::((6))::.",
|
||||
".::books::.",
|
||||
".::meets::.",
|
||||
".::music::.",
|
||||
".::mail:::."
|
||||
]
|
||||
try:
|
||||
return glyphs[ws_number - 1]
|
||||
except IndexError:
|
||||
return "?"
|
||||
|
||||
|
||||
def change_workspace_name(name):
|
||||
"""
|
||||
Zmiana nazwy
|
||||
"""
|
||||
try:
|
||||
pass
|
||||
except Exception:
|
||||
raise
|
||||
else:
|
||||
pass
|
||||
finally:
|
||||
pass
|
||||
|
||||
|
||||
def assign_generic_name(i3, e):
|
||||
"""
|
||||
i3 events
|
||||
"""
|
||||
try:
|
||||
if not e.change == 'rename': # avoid looping
|
||||
con = i3.get_tree().find_focused()
|
||||
if not con.type == 'workspace':
|
||||
if not e.change == 'new':
|
||||
is_floating = con.type == 'floating_con' or con.floating and '_on' in con.floating
|
||||
|
||||
# Tiling mode or floating indication. Change symbols if necessary.
|
||||
ws_old_name = con.workspace().name
|
||||
ws_name = "%s: %s " % (
|
||||
con.workspace().num, glyph(con.workspace().num))
|
||||
|
||||
i3.command('rename workspace "%s" to %s' %
|
||||
(ws_old_name, ws_name))
|
||||
else:
|
||||
# In sway we may open a new window w/o moving focus; let's give the workspace a name anyway.
|
||||
con = i3.get_tree().find_by_id(e.container.id)
|
||||
ws_num = con.workspace().num
|
||||
w_name = con.name if con.name else ''
|
||||
|
||||
if w_name and ws_num:
|
||||
name = "%s: %s\u00a0%s" % (
|
||||
ws_num, glyph(ws_num), w_name)
|
||||
i3.command('rename workspace "%s" to %s' %
|
||||
(ws_num, name))
|
||||
|
||||
else:
|
||||
# Give the (empty) workspace a generic name: "number: glyph" (like "1: ")
|
||||
ws_num = con.workspace().num
|
||||
ws_new_name = "%s: %s" % (ws_num, glyph(ws_num))
|
||||
|
||||
i3.command('rename workspace to "{}"'.format(ws_new_name))
|
||||
except:
|
||||
pass
|
||||
|
||||
|
||||
def main():
|
||||
# Subscribe to events
|
||||
i3.on(Event.WORKSPACE_FOCUS, assign_generic_name)
|
||||
i3.on(Event.BINDING, assign_generic_name)
|
||||
|
||||
i3.main()
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
8
.config/sway/bin/test.sh
Executable file
8
.config/sway/bin/test.sh
Executable file
@ -0,0 +1,8 @@
|
||||
#!/bin/bash
|
||||
WS=$(i3-msg -t 'get_workspaces' | sed -e 's/{"num/\n{"num/g' | grep \"focused\":true | sed -e 's/,"/\n/g' | grep name | cut -d\" -f 3)
|
||||
WS_TEXT=$(echo $WS | cut -d \: -f 2)
|
||||
WS_NR=$(echo $WS | cut -d \: -f 1)
|
||||
NEW=$(zenity --text="Enter new name:" --entry --title="Rename workspace $WS" --entry-text="$WS_TEXT")
|
||||
i3-msg "rename workspace \"$WS\" to \"$WS_NR:$NEW\""
|
||||
|
||||
|
14
.config/sway/bin/workspaces.sh
Executable file
14
.config/sway/bin/workspaces.sh
Executable file
@ -0,0 +1,14 @@
|
||||
#!/bin/sh
|
||||
|
||||
swaymsg rename workspace number 1 to '1: .>'
|
||||
swaymsg rename workspace number 2 to '2: .::web::.'
|
||||
swaymsg rename workspace number 3 to '3: .::IDE::.'
|
||||
swaymsg rename workspace number 4 to '4: .::VSCode::.'
|
||||
swaymsg rename workspace number 5 to '5: .::debug::.'
|
||||
swaymsg rename workspace number 6 to '6: .::tmux::.'
|
||||
swaymsg rename workspace number 7 to '7: .::sessions::.'
|
||||
swaymsg rename workspace number 8 to '8: .::terraform::.'
|
||||
swaymsg rename workspace number 9 to '9: .::music::.'
|
||||
swaymsg rename workspace number 10 to '10: .::mail::.'
|
||||
|
||||
|
@ -1,12 +1,23 @@
|
||||
# Define names for workspaces
|
||||
|
||||
set $ws1 "1: terminal "
|
||||
set $ws2 "2: web "
|
||||
set $ws3 "3: code "
|
||||
set $ws1 "1: .>"
|
||||
set $ws2 "2: (web)"
|
||||
set $ws3 "3: (work)"
|
||||
set $ws4 "4: (frontend)"
|
||||
set $ws5 "5: (debug)"
|
||||
|
||||
set $ws9 "9: (music)"
|
||||
set $ws10 "10: (mail)"
|
||||
|
||||
workspace 1 output eDP-1
|
||||
workspace 2 output eDP-1
|
||||
|
||||
workspace 1 output eDP1
|
||||
workspace 2 output eDP1
|
||||
workspace 3 output DP-3
|
||||
workspace 4 output DP-3
|
||||
|
||||
workspace 5 output DP-4
|
||||
|
||||
workspace 10 output eDP-1
|
||||
|
||||
|
||||
|
||||
|
@ -12,5 +12,9 @@ for_window [class="zoom"] move scratchpad, floating enable
|
||||
for_window [class="Signal"] move scratchpad
|
||||
|
||||
for_window [class="pavucontrol"] floating enable
|
||||
for_window [app_id="zenity"] floating enable
|
||||
|
||||
for_window [app_id="gnome-calendar"] floating enable
|
||||
|
||||
|
||||
for_window [class="Joplin"] move scratchpad, floating enable
|
@ -141,6 +141,8 @@ bindsym $mod+r mode "resize"
|
||||
## Lock screen
|
||||
bindsym $mod+z exec ~/.config/sway/bin/lock.sh
|
||||
|
||||
bindsym Shift+$mod+b exec rofi-buku
|
||||
|
||||
## Screenshot // Screenshot active display // <Print> ##
|
||||
#bindsym Print exec $BIN_DIR/screenshots.sh display
|
||||
#bindsym --locked Print exec grim -o "$(swaymsg --type get_outputs --raw | jq -r '.[] | select(.focused) | .name')" - | swappy -f -
|
||||
@ -208,4 +210,4 @@ bindsym $mod+u exec env RUST_BACKTRACE=1 swayr switch-window >> /tmp/swayr.log 2
|
||||
|
||||
bindsym $mod+Tab exec env RUST_BACKTRACE=1 swayr switch-to-urgent-or-lru-window >> /tmp/swayr.log 2>&1
|
||||
|
||||
bindsym $mod+$alt+Space exec env RUST_BACKTRACE=1 swayr switch-workspace-or-window >> /tmp/swayr.log 2>&1
|
||||
bindsym $mod+$alt+Space exec env RUST_BACKTRACE=1 swayr switch-workspace-or-window >> /tmp/swayr.log 2>&1
|
||||
|
@ -1,4 +1,4 @@
|
||||
exec --no-startup-id swaymsg 'workspace 1; exec $TERMINAL; workspace 2; exec brave;'
|
||||
exec --no-startup-id swaymsg 'workspace number 1; exec alacritty; workspace number 10; exec thunderbird; workspace number 9; exec spotify; workspace number 2; exec brave'
|
||||
|
||||
exec wl-paste -t text --watch clipman store
|
||||
exec nm-applet --indicator
|
||||
@ -13,5 +13,14 @@ exec_always {
|
||||
gsettings set org.gnome.desktop.wm.preferences button-layout ''
|
||||
}
|
||||
|
||||
exec --no-startup-id swaymsg rename workspace number 1 to $ws1
|
||||
exec --no-startup-id swaymsg rename workspace number 2 to $ws2
|
||||
exec --no-startup-id swaymsg rename workspace number 3 to $ws3
|
||||
exec --no-startup-id swaymsg rename workspace number 4 to $ws4
|
||||
exec --no-startup-id swaymsg rename workspace number 5 to $ws5
|
||||
exec --no-startup-id swaymsg rename workspace number 9 to $ws9
|
||||
exec --no-startup-id swaymsg rename workspace number 10 to $ws10
|
||||
|
||||
|
||||
exec ~/.config/sway/bin/session.sh
|
||||
#exec ~/.config/sway/bin/assign-cgroups.py
|
1
.config/systemd/user/default.target.wants/yubikey-agent.service
Symbolic link
1
.config/systemd/user/default.target.wants/yubikey-agent.service
Symbolic link
@ -0,0 +1 @@
|
||||
/usr/lib/systemd/user/yubikey-agent.service
|
17
.config/systemd/user/mysway.service
Normal file
17
.config/systemd/user/mysway.service
Normal file
@ -0,0 +1,17 @@
|
||||
[Unit]
|
||||
Description=mySway.py script
|
||||
Documentation=mySway
|
||||
PartOf=sway-session.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
Environment="XDG_CURRENT_DESKTOP=Unity"
|
||||
ExecStart=/home/paramah/.config/sway/bin/mysway.py
|
||||
ExecReload=kill -SIGUSR2 $MAINPID
|
||||
ExecStop=/bin/kill -2 $MAINPID
|
||||
Restart=on-failure
|
||||
RestartSec=1
|
||||
TimeoutStopSec=10
|
||||
|
||||
[Install]
|
||||
WantedBy=sway-session.target
|
1
.config/systemd/user/sway-session.target.wants/mysway.service
Symbolic link
1
.config/systemd/user/sway-session.target.wants/mysway.service
Symbolic link
@ -0,0 +1 @@
|
||||
/home/paramah/.config/systemd/user/mysway.service
|
1
.config/systemd/user/sway-session.target.wants/swayr.service
Symbolic link
1
.config/systemd/user/sway-session.target.wants/swayr.service
Symbolic link
@ -0,0 +1 @@
|
||||
/home/paramah/.config/systemd/user/swayr.service
|
17
.config/systemd/user/swayr.service
Normal file
17
.config/systemd/user/swayr.service
Normal file
@ -0,0 +1,17 @@
|
||||
[Unit]
|
||||
Description=A swayr window switcher
|
||||
Documentation=man:swayrd(1)
|
||||
PartOf=sway-session.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
Environment="XDG_CURRENT_DESKTOP=Unity"
|
||||
ExecStart=/sbin/swayrd
|
||||
ExecReload=kill -SIGUSR2 $MAINPID
|
||||
ExecStop=/bin/kill -2 $MAINPID
|
||||
Restart=on-failure
|
||||
RestartSec=1
|
||||
TimeoutStopSec=10
|
||||
|
||||
[Install]
|
||||
WantedBy=sway-session.target
|
@ -129,7 +129,7 @@
|
||||
"warning": 30,
|
||||
"critical": 15
|
||||
},
|
||||
"format": "{icon} {capacity}%",
|
||||
"format": "{icon} {capacity}%",
|
||||
"format-icons": [
|
||||
"",
|
||||
"",
|
||||
|
@ -5,14 +5,14 @@
|
||||
font-size: 12px;
|
||||
font-family: Terminus;
|
||||
border: none;
|
||||
padding: 0px 5px 0px 5px;
|
||||
padding: 0px 0px 0px 0px;
|
||||
min-height: 10px;
|
||||
border-radius: 25px;
|
||||
border-radius: 0px;
|
||||
}
|
||||
|
||||
window#waybar {
|
||||
background: none;
|
||||
color: @dark;
|
||||
background: black;
|
||||
color: white;
|
||||
}
|
||||
|
||||
#custom-right-arrow-dark,
|
||||
@ -33,20 +33,20 @@ window#waybar {
|
||||
#memory,
|
||||
#cpu,
|
||||
#disk {
|
||||
background: @dark;
|
||||
color: @back;
|
||||
background: none;
|
||||
color: white;
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
#workspaces {
|
||||
background: @dark;
|
||||
color: @back;
|
||||
background: none;
|
||||
color: white;
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
#tray {
|
||||
background: @dark;
|
||||
color: @back;
|
||||
background: none;
|
||||
color: white;
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
@ -57,13 +57,13 @@ window#waybar {
|
||||
#custom-pressure,
|
||||
#custom-pm_25,
|
||||
#custom-pm_10 {
|
||||
background: @dark;
|
||||
color: @back;
|
||||
background: none;
|
||||
color: white;
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
#workspaces:active {
|
||||
color: @background;
|
||||
color: white;
|
||||
margin-right: 0;
|
||||
}
|
||||
|
||||
@ -71,11 +71,11 @@ window#waybar {
|
||||
#workspaces button {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
color: @background;
|
||||
color: gray;
|
||||
}
|
||||
|
||||
#workspaces button.focused {
|
||||
color: @back;
|
||||
color: #FFA500;
|
||||
margin: 0;
|
||||
|
||||
}
|
||||
@ -88,27 +88,13 @@ window#waybar {
|
||||
padding: 0 0px;
|
||||
}
|
||||
|
||||
#pulseaudio {
|
||||
color: @back;
|
||||
}
|
||||
#memory {
|
||||
color: @back;
|
||||
}
|
||||
#cpu {
|
||||
color: @back;
|
||||
}
|
||||
#battery {
|
||||
color: @back;
|
||||
}
|
||||
#disk {
|
||||
color: @back;
|
||||
}
|
||||
|
||||
#clock,
|
||||
#pulseaudio,
|
||||
#memory,
|
||||
#cpu,
|
||||
#battery,
|
||||
#disk {
|
||||
color: white;
|
||||
background: black;
|
||||
padding: 0 10px;
|
||||
}
|
||||
|
Reference in New Issue
Block a user