[+] update pr34
1. add dotfiles deploy via .tar.xz; 2. update .sway/config; 3. update test_crypto.py;
This commit is contained in:
parent
add9d858d8
commit
ff786e3ce6
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -0,0 +1 @@
|
||||
releases/tar/** filter=lfs diff=lfs merge=lfs -text
|
9
Makefile
9
Makefile
@ -80,3 +80,12 @@ dotfiles_fetch:
|
||||
commands install -f -p ~ -s ~/.config/katerc -t dotfiles
|
||||
commands install -f -p ~ -s ~/.config/Code\ -\ OSS/User/keybindings.json -t dotfiles
|
||||
commands install -f -p ~ -s ~/.config/Code\ -\ OSS/User/settings.json -t dotfiles
|
||||
|
||||
DOTFILES_VERSION ?= 0.1
|
||||
|
||||
dotfiles_deploy:
|
||||
mkdir -p releases/tar
|
||||
tar -cvf - \
|
||||
dotfiles \
|
||||
| xz --compress -9 --stdout > \
|
||||
releases/tar/dotfiles-$(DOTFILES_VERSION).tar.xz
|
||||
|
@ -19,7 +19,8 @@ set $term weston-terminal
|
||||
# on the original workspace that the command was run on.
|
||||
#for_window [app_id="^launcher$"] floating enable, sticky enable, resize set 30 ppt 60 ppt, border pixel 10
|
||||
#set $menu exec $term --class=launcher -e /usr/bin/sway-launcher-desktop
|
||||
set $dmenu_path /usr/bin/bemenu-run
|
||||
#set $dmenu_path /usr/bin/bemenu-run
|
||||
set $dmenu_path rofi -modes run -show run
|
||||
set $menu $dmenu_path | xargs swaymsg exec --
|
||||
|
||||
|
||||
@ -64,10 +65,12 @@ bindgesture swipe:4:right workspace prev
|
||||
|
||||
for_window [shell="xwayland"] title_format "[XWayland] %title"
|
||||
|
||||
#set $lock_cmd \
|
||||
# loginctl list-sessions | \
|
||||
# tail '-n' +2 | head -n -2 | awk '{print $1}' | \
|
||||
# xargs loginctl lock-session
|
||||
set $lock_cmd \
|
||||
loginctl list-sessions | \
|
||||
tail '-n' +2 | head -n -2 | awk '{print $1}' | \
|
||||
xargs loginctl lock-session
|
||||
zsh -c "commands loginctl --action lock-session"
|
||||
|
||||
bindgesture swipe:4:up exec $lock_cmd
|
||||
|
||||
@ -76,14 +79,14 @@ bindgesture swipe:4:up exec $lock_cmd
|
||||
#
|
||||
# Basics:
|
||||
#
|
||||
bindsym $mod+Shift+l exec $lock_cmd
|
||||
bindsym Shift+$mod+l exec $lock_cmd
|
||||
|
||||
bindsym Shift+mod1+1 \
|
||||
bindsym --locked Shift+mod1+1 \
|
||||
exec ~/.local/bin/commands \
|
||||
desktop-services \
|
||||
--cpufreq-action performance
|
||||
|
||||
bindsym Shift+mod1+2 \
|
||||
bindsym --locked Shift+mod1+2 \
|
||||
exec ~/.local/bin/commands \
|
||||
desktop-services \
|
||||
--cpufreq-action powersave
|
||||
@ -140,7 +143,11 @@ floating_modifier $mod normal
|
||||
bindsym $mod+Shift+c reload
|
||||
|
||||
# Exit sway (logs you out of your Wayland session)
|
||||
bindsym $mod+Shift+e exec swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -b 'Yes, exit sway' 'swaymsg exit'
|
||||
bindsym $mod+Shift+e \
|
||||
exec swaynag -t warning \
|
||||
-m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' \
|
||||
-b 'Yes, exit sway' \
|
||||
'swaymsg exit'
|
||||
#
|
||||
# Moving around:
|
||||
#
|
||||
@ -224,7 +231,8 @@ bindsym $mod+p floating toggle
|
||||
## Swap focus between the tiling area and the floating area
|
||||
#bindsym $mod+space focus mode_toggle
|
||||
|
||||
bindsym --release Print exec bash -c "commands wl-screenshot"
|
||||
bindsym --release Print exec zsh -c "commands wl-screenshot"
|
||||
bindsym --release $mod+s exec zsh -c "commands wl-screenshot"
|
||||
|
||||
# Move focus to the parent container
|
||||
#bindsym $mod+a focus parent
|
||||
@ -265,6 +273,40 @@ mode "resize" {
|
||||
}
|
||||
bindsym $mod+r mode "resize"
|
||||
|
||||
set $black #000000
|
||||
set $red #ff0000
|
||||
set $green #00ff00
|
||||
set $blue #0000ff
|
||||
set $white #ffffff
|
||||
set $grey #757575
|
||||
set $pale_green #9df882
|
||||
set $pale_green2 #6baf54
|
||||
set $dark_green #1a7000
|
||||
set $pale_blue #7da9f9
|
||||
set $dark_blue #005ba6
|
||||
set $pale_greenblue #2da078
|
||||
set $pale_greenblue2 #66c473
|
||||
set $yellow #fffd0d
|
||||
set $dark_yellow #908f00
|
||||
|
||||
set $color1 #18ff00
|
||||
set $color2 #000000
|
||||
set $color3 #ff00ff
|
||||
set $color4 #ff0000
|
||||
set $color5 #00000000
|
||||
set $color6 #00000000
|
||||
set $color7 #00000000
|
||||
|
||||
set $border_focused $pale_green
|
||||
set $border_unfocused $color2
|
||||
set $background_focused $pale_greenblue2
|
||||
set $background_unfocused $grey
|
||||
set $child_border_focused $white
|
||||
set $child_border_unfocused $color2
|
||||
|
||||
set $bright_text $white
|
||||
set $dark_text $black
|
||||
|
||||
#
|
||||
# Status Bar:
|
||||
#
|
||||
@ -284,27 +326,34 @@ bar {
|
||||
height 16
|
||||
|
||||
colors {
|
||||
statusline #565656
|
||||
background #dfdfdf
|
||||
inactive_workspace #dfdfdf #dfdfdf #000000
|
||||
active_workspace #dfdfdf #efefef #000000
|
||||
focused_workspace #dfdfdf #efefef #000000
|
||||
statusline $bright_text
|
||||
background $pale_green2
|
||||
inactive_workspace $black $white $dark_text
|
||||
active_workspace $black $white $bright_text
|
||||
focused_workspace $dark_yellow $yellow $dark_text
|
||||
}
|
||||
}
|
||||
|
||||
client.focused #f3f3f3 #dfdfdf #565656 #f3f3f3 #f3f3f3
|
||||
client.unfocused #f3f3f3 #dfdfdf #565656 #f3f3f3 #f3f3f3
|
||||
|
||||
#client.focused #f3f3f3 #dfdfdfdd #565656 #f3f3f3 #f3f3f3
|
||||
client.focused $border_focused $background_focused $white $white $child_border_focused
|
||||
client.unfocused $border_unfocused $background_unfocused $white $white $child_border_unfocused
|
||||
|
||||
for_window [all] border 1
|
||||
|
||||
#font pango:Helvetica Neue 10
|
||||
font pango:Terminus 10
|
||||
font pango:Terminus 12
|
||||
|
||||
titlebar_padding 1 4
|
||||
titlebar_padding 32 1
|
||||
titlebar_border_thickness 1
|
||||
title_align center
|
||||
|
||||
#for_window [class=".*"] title_format "<b>%title</b>"
|
||||
|
||||
for_window [class="^firefox$"] floating enable
|
||||
|
||||
for_window [all] opacity set 0.95
|
||||
|
||||
input * {
|
||||
xkb_layout "us,ru"
|
||||
xkb_options "grp:win_space_toggle"
|
||||
@ -313,4 +362,3 @@ input type:keyboard xkb_model "pc101"
|
||||
|
||||
include /etc/sway/config.d/*
|
||||
include ~/.sway/config.d/*
|
||||
|
||||
|
@ -6,14 +6,15 @@ class TestCrypto(unittest.TestCase):
|
||||
def test_password_utils(self) -> None:
|
||||
salt = b'asdfasdfasdf'
|
||||
|
||||
self.assertEqual(
|
||||
crypto.PasswordUtils.encrypt(
|
||||
'blah',
|
||||
mode='bytes',
|
||||
salt=salt,
|
||||
),
|
||||
[
|
||||
salt,
|
||||
b'asdfasdf',
|
||||
]
|
||||
encrypt_res = crypto.PasswordUtils.encrypt(
|
||||
'blah',
|
||||
mode='bytes',
|
||||
salt=salt,
|
||||
)
|
||||
self.assertEqual(
|
||||
encrypt_res,
|
||||
(
|
||||
salt,
|
||||
b'\xdak\xd15\xfa\x8e\xc8\r\xc3\xd2c\xf1m\xb0\xbf\xe6\x98\x01$!j\xc8\xc0Hh\x84\xea,\x91\x8b\x08\xce',
|
||||
),
|
||||
)
|
||||
|
BIN
releases/tar/dotfiles-0.1.tar.xz
(Stored with Git LFS)
Normal file
BIN
releases/tar/dotfiles-0.1.tar.xz
(Stored with Git LFS)
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user