Compare commits

...

10 Commits

Author SHA1 Message Date
4b1d0cd562 add scripts and config 2023-07-12 17:02:27 +07:00
520fb7cd75 Mastodon theme for tut 2023-06-21 21:36:15 +07:00
05d6556f31 add swaync conf 2023-06-21 21:33:18 +07:00
030ec42b17 add kitty conf 2023-06-21 21:28:54 +07:00
61d5019f9d add Hyprland config 2023-06-21 21:25:06 +07:00
60bb2ad303 add Hyprland rice: rockethype 2023-06-21 21:21:41 +07:00
Maksim Totmin
d49c0bae99 add README 2022-05-08 17:59:58 +07:00
Maksim Totmin
828655dcac matbook screenshot add 2022-05-08 17:08:08 +07:00
Maksim Totmin
ab03f33212 wallpaper w add 2022-05-08 17:06:24 +07:00
Maksim Totmin
3bfa324d00 dotfiles add 2022-05-08 17:02:59 +07:00
52 changed files with 2222 additions and 1 deletions

View File

@ -1 +1,5 @@
My Dotfiles
# My Dotfiles
## matbook-sway
![matbook-sway](images/screenshots/matbook-sway.png)

Binary file not shown.

After

Width:  |  Height:  |  Size: 648 KiB

BIN
images/wallpapers/w.jpg Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 151 KiB

View File

@ -0,0 +1,47 @@
font_family iosevka Medium
bold_font Iosevka Bold
italic_font Iosevka Medium Italic
font_size 9.0
enable_audio_bell no
window_border_width 0.0
tab_title_template {index}:{title}
tab_bar_min_tabs 2
tab_bar_edge top
tab_bar_style powerline
active_tab_background #5294E2
active_tab_foreground #ffffff
inactive_tab_background #272d3b
inactive_tab_foreground #888888
clear_all_shortcuts yes
kitty_mod ctrl
map kitty_mod+insert copy_to_clipboard
map shift+insert paste_from_clipboard
map kitty_mod+t new_tab
map kitty_mod+w close_tab
map alt+l next_tab
map kitty_mod+right next_tab
map alt+h previous_tab
map kitty_mod+left previous_tab
map kitty_mod+alt+t set_tab_title
map kitty_mod+g axis vertical
map alt+1 goto_tab 1
map alt+2 goto_tab 2
map alt+3 goto_tab 3
map alt+4 goto_tab 4
map alt+5 goto_tab 5
map alt+6 goto_tab 6
map alt+7 goto_tab 7
map alt+8 goto_tab 8
map alt+9 goto_tab 9
map kitty_mod+alt+r launch --type=tab ranger
include ./theme.conf

View File

@ -0,0 +1,31 @@
background #1f2227
foreground #abb2bf
selection_background #abb2bf
selection_foreground #282c34
url_color #565c64
cursor #abb2bf
active_border_color #545862
inactive_border_color #353b45
active_tab_background #1f2227
active_tab_foreground #abb2bf
inactive_tab_background #353b45
inactive_tab_foreground #565c64
tab_bar_background #353b45
color0 #282c34
color8 #282c34
color1 #e06c75
color9 #e06c75
color2 #98c379
color10 #98c379
color3 #e5c07b
color11 #e5c07b
color4 #81A1C1
color12 #81A1C1
color5 #c678dd
color13 #c678dd
color6 #56b6c2
color14 #56b6c2
color7 #c8ccd4
color15 #c8ccd4
# vim: ft=kitty

20
matboot-sway/config/mako/config Executable file
View File

@ -0,0 +1,20 @@
#my simple mako
sort=-time
max-visible=5
layer=top
anchor=top-right
font=iosevka Nerd Font 9
background-color=#1f2227
text-color=#e5c07b
width=300
height=180
margin=12
padding=15
border-size=2
border-color=#88c0d0
icons=1
default-timeout=5000

View File

@ -0,0 +1,15 @@
/* colors */
* {
al: #c8ccd4;
bg: #1f2227;
se: #413E4Aff;
fg: #abb2bf;
ac: #B38184ff;
red: #e06c75;
green: #98c379;
yellow: #e5c07b;
blue: #81a1c1;
purple: #BA68C8ff;
cyan: #56b6c2;
}

View File

@ -0,0 +1,28 @@
configuration {
lines: 15;
columns: 1;
font: "Iosevka Nerd Font 9";
bw: 0;
location: 0;
padding: 0;
fixed-num-lines: true;
show-icons: false;
sidebar-mode: true;
separator-style: "none";
hide-scrollbar: true;
fullscreen: false;
fake-transparency: false;
scroll-method: 0;
click-to-exit: true;
show-match: false;
combi-hide-mode-prefix: false;
display-window: " ";
display-windowcd: " ";
display-run: " ";
display-ssh: " ";
display-drun: " ";
display-combi: " ";
window-format: "{w} ··· [{c}] ··· {t}";
}
@theme "matbook"

View File

@ -0,0 +1,143 @@
@import "colors.rasi"
* {
background-color: @bg;
text-color: @fg;
}
window {
border: 0px;
border-color: @ac;
border-radius: 4px;
padding: 15;
width: 25%;
}
prompt {
spacing: 0;
border: 0;
text-color: @fg;
}
textbox-prompt-colon {
expand: false;
str: " ";
margin: 0px 4px 0px 0px;
text-color: @fg;
}
entry {
spacing: 0;
text-color: @fg;
}
case-indicator {
spacing: 0;
text-color: @fg;
}
inputbar {
spacing: 0px;
text-color: @fg;
padding: 1px;
children: [ prompt,textbox-prompt-colon,entry,overlay,case-indicator ];
}
mainbox {
border: 0px;
border-color: @ac;
padding: 6;
}
listview {
fixed-height: 0;
border: 0px;
border-color: @ac;
spacing: 4px;
scrollbar: false;
padding: 5px 5px 0px 5px;
}
element {
border: 0px;
border-radius: 2px;
padding: 1.8px;
}
element normal.normal {
background-color: @bg;
text-color: @fg;
}
element normal.urgent {
background-color: @bg;
text-color: @red;
}
element normal.active {
background-color: @green;
text-color: @bg;
}
element selected.normal {
background-color: @fg;
text-color: @bg;
}
element selected.urgent {
background-color: @bg;
text-color: @red;
}
element selected.active {
background-color: @fg;
text-color: @bg;
}
element alternate.normal {
background-color: @bg;
text-color: @fg;
}
element alternate.urgent {
background-color: @bg;
text-color: @fg;
}
element alternate.active {
background-color: @bg;
text-color: @fg;
}
sidebar {
border: 0px;
border-color: @ac;
border-radius: 0px;
}
button {
background-color: @fg;
margin: 5px;
padding: 5px;
text-color: @bg;
border: 0px;
border-radius: 4px;
border-color: @fg;
}
button selected {
background-color: @red;
text-color: @fg;
border: 0px;
border-radius: 4px;
border-color: @fg;
}
scrollbar {
width: 4px;
border: 0px;
handle-color: @fg;
handle-width: 8px;
padding: 0;
}
message {
border: 0px;
border-color: @ac;
padding: 1px;
}
textbox {
text-color: @red;
}

185
matboot-sway/config/sway/config Executable file
View File

@ -0,0 +1,185 @@
################################################################################
### VARIABLES
################################################################################
set $mod Mod4
set $term kitty
set $file_man kitty -e ranger
set $menu rofi -show run
set $browser firefox
set $alt_browser waterfox
set $audio_man pavucontrol
set $email_client mutt
set $left h
set $down j
set $up k
set $right l
################################################################################
### STARTUP
################################################################################
exec light -A 100
workspace 1
exec $term
workspace 2
exec $browser
workspace 1
exec mako
################################################################################
### STYLING
################################################################################
font pango:iosevka Medium 9
default_border pixel 1
client.focused #81a1c1 #81a1c1 #FFFFFF #81a1c1 #81a1c1
client.focused_inactive #282c34 #282c34 #FFFFFF #282c34 #282c34
client.urgent #e06c75 #e06c75 #FFFFFF #e06c75 #e06c75
client.unfocused #282c34 #282c34 #FFFFFF #282c34 #282c34
gaps inner 3
gaps outer 5
output "*" background "~/Documents/Wallpapers/w.jpg" fill
################################################################################
### KEYBINDINGS
################################################################################
## Applications:
bindsym --to-code $mod+Return exec $term
bindsym --to-code $mod+Shift+Return exec $file_man
bindsym --to-code $mod+d exec $menu
bindsym $mod+Escape exec powermenu
bindsym --to-code $mod+n exec notesmenu
bindsym --to-code $mod+b exec $browser
bindsym --to-code $mod+Shift+b exec $alt_browser
bindsym --to-code $mod+Alt+a exec $audio_man
bindsym --to-code $mod+Alt+b exec blueman-manager
bindsym --to-code $mod+y exec playweb
## Sway:
bindsym --to-code $mod+q kill
bindsym --to-code $mod+Shift+q exec swaymsg exit
bindsym --to-code $mod+Shift+c reload
floating_modifier $mod normal
## Window Navigation:
# Move your focus around
bindsym $mod+$left focus left
bindsym $mod+$down focus down
bindsym $mod+$up focus up
bindsym $mod+$right focus right
# Move the focused window with the same, but add Shift
bindsym $mod+Shift+$left move left
bindsym $mod+Shift+$down move down
bindsym $mod+Shift+$up move up
bindsym $mod+Shift+$right move right
## Workspaces:
# Switch to workspace
bindsym $mod+1 workspace number 1
bindsym $mod+2 workspace number 2
bindsym $mod+3 workspace number 3
bindsym $mod+4 workspace number 4
bindsym $mod+5 workspace number 5
bindsym $mod+6 workspace number 6
# Move focused container to workspace
bindsym $mod+Shift+1 move container to workspace number 1
bindsym $mod+Shift+2 move container to workspace number 2
bindsym $mod+Shift+3 move container to workspace number 3
bindsym $mod+Shift+4 move container to workspace number 4
bindsym $mod+Shift+5 move container to workspace number 5
bindsym $mod+Shift+6 move container to workspace number 6
## Layout stuff:
# Switch layout style of current container
bindsym --to-code $mod+w layout tabbed
bindsym --to-code $mod+e layout toggle split
# bindsym $mod+space focus mode_toggle
bindsym --to-code $mod+f fullscreen
bindsym --to-code $mod+t floating toggle
bindsym --to-code $mod+a focus parent
## Scratchpad:
bindsym $mod+Shift+minus move scratchpad
bindsym $mod+minus scratchpad show
## Spotify:
bindsym $mod+s+p exec spotifycli --playpause
bindsym $mod+s+l exec spotifycli --next
bindsym $mod+s+h exec spotifycli --previous
# Random Stuff:
bindsym --to-code $mod+p exec screenshot
mode "resize" {
bindsym $left resize grow width 10px
bindsym $down resize grow height 10px
bindsym $up resize shrink height 10px
bindsym $right resize shrink width 10px
bindsym Return mode "default"
bindsym Escape mode "default"
}
bindsym --to-code $mod+r mode "resize"
## Layout keyboard
input * {
xkb_layout "us,ru"
xkb_options "grp:caps_toggle"
}
input <identifier> xkb_model "pc101"
## Display light
bindsym XF86MonBrightnessUp exec light -A 1
bindsym XF86MonBrightnessDown exec light -U 1
# Volumes
bindsym XF86AudioRaiseVolume exec pactl set-sink-volume @DEFAULT_SINK@ +1%
bindsym XF86AudioLowerVolume exec pactl set-sink-volume @DEFAULT_SINK@ -1%
bindsym XF86AudioMute exec pactl set-sink-mute @DEFAULT_SINK@ toggle
################################################################################
### GET GTK WORKING IN SWAY
################################################################################
set $gnome-schema org.gnome.desktop.interface
exec_always {
gsettings set org.gnome.desktop.interface gtk-theme "matbook"
gsettings set org.gnome.desktop.interface icon-theme "Arc"
gsettings set org.gnome.desktop.interface cursor-theme "DMZ-Black"
gsettings set $gnome-schema cursor-theme 'Adwaita'
gsettings set $gnome-schema font-name 'iosevka Medium 9'
}
################################################################################
### STATUS BAR
################################################################################
bar {
swaybar_command waybar
}
}
include /etc/sway/config.d/*

View File

@ -0,0 +1,12 @@
set encoding=utf-8
set mouse=a
set hlsearch
set t_Co=256
set clipboard=unnamed
set noswapfile
syntax on
inoremap jk <esc>
set directory=~/.config/vim,.
set viminfo+=n~/.config/vim/viminfo

View File

@ -0,0 +1,24 @@
{
"arrowParens": "always",
"bracketSpacing": true,
"endOfLine": "lf",
"htmlWhitespaceSensitivity": "css",
"printWidth": 80,
"proseWrap": "always",
"requirePragma": false,
"semi": true,
"singleQuote": false,
"tabWidth": 4,
"trailingComma": "all",
"useTabs": false,
"vueIndentScriptAndStyle": true,
"overrides": [
{
"files": "*.json"
},
{
"files": "*.rasi",
"options": { "parser": "css" }
}
]
}

117
matboot-sway/config/waybar/config Executable file
View File

@ -0,0 +1,117 @@
{
"position": "bottom",
"modules-left": ["custom/launch", "sway/workspaces"],
"modules-center": ["custom/spotify"],
"modules-right": [
"custom/xkblayout",
"pulseaudio",
"backlight",
"custom/wgstatus",
"network",
"memory",
"battery",
"clock",
"custom/off"
],
"custom/launch": {
"format": " ",
"on-click": "rofi -show run"
},
"sway/workspaces": {
"disable-scroll": true,
"all-outputs": true,
"format": " {icon} ",
"persistent_workspaces": {
"1": [],
"2": [],
"3": [],
"4": [],
"5": [],
"6": []
},
"format-icons": {
"1": " ",
"2": " ",
"3": " ",
"4": " ",
"5": " ",
"6": " ",
"urgent": " ",
"focused": " ",
"default": " "
}
},
"custom/spotify": {
"exec": "/usr/bin/python3 $XDG_CONFIG_HOME/waybar/scripts/mediaplayer.py --player spotify",
"format": "{}",
"return-type": "json",
"on-click": "spotifycli --playpause",
"on-scroll-up": "spotifycli --next",
"on-scroll-down": "spotifycli --previous"
},
"custom/xkblayout": {
"exec": "~/.config/waybar/scripts/xkblayout.py",
"format": " {} ",
"tooltip": false
},
"pulseaudio": {
"scroll-step": 5,
"format": "{icon} {volume}%", "format-bluetooth": "{volume}% {icon} {format_source}",
"format-bluetooth-muted": "婢 {icon} muted",
"format-muted": "婢 muted",
"format-icons": {
"speaker": " ",
"hands-free": "",
"headset": "",
"phone": "",
"portable": "",
"car": "",
"headphone": [" ", " ", " "]
},
"on-click": "pavucontrol"
},
"backlight": {
"device": "intel_backlight",
"format": " {percent}%",
"on-scroll-up": "light -A 1",
"on-scroll-down": "light -U 1"
},
"custom/wgstatus": {
"interval": 1,
"exec": "~/.config/waybar/scripts/wgstatus",
"format": "  {} ",
"tooltip": false,
"on-click": "~/.config/waybar/scripts/wgstatus -toggle"
},
"network": {
"format-wifi": "直 {essid}",
"format-ethernet": "直 {ifname}: {ipaddr}/{cidr}",
"format-linked": "直 {ifname} (No IP)",
"format-disconnected": "睊 Disconnected",
"format-alt": "直 {ifname}: {ipaddr}/{cidr}",
"on-click-middle": "~/.config/waybar/scripts/wgstatus -toggle"
},
"memory": {
"interval": 3,
"format": " {}%",
"max-length": 10
},
"battery": {
"interval": 60,
"states": {
"warning": 30,
"critical": 15
},
"format": "{icon} {capacity}%",
"format-icons": [" ", " ", " ", " ", " "]
},
"clock": {
"interval": 1,
"format": " {:%I:%M %p}",
"format-alt": " {:%b %d, %G}"
},
"custom/off": {
"format": " ",
"on-click": "powermenu"
}
}i

View File

@ -0,0 +1,144 @@
#!/usr/bin/env python3
import argparse
import logging
import sys
import signal
import gi
import json
gi.require_version("Playerctl", "2.0")
from gi.repository import Playerctl, GLib
logger = logging.getLogger(__name__)
def write_output(text, player):
logger.info("Writing output")
output = {
"text": text,
"class": "custom-" + player.props.player_name,
"alt": player.props.player_name,
}
sys.stdout.write(json.dumps(output) + "\n")
sys.stdout.flush()
def on_play(player, status, manager):
logger.info("Received new playback status")
on_metadata(player, player.props.metadata, manager)
def on_metadata(player, metadata, manager):
logger.info("Received new metadata")
track_info = ""
if (
player.props.player_name == "spotify"
and "mpris:trackid" in metadata.keys()
and ":ad:" in player.props.metadata["mpris:trackid"]
):
track_info = "AD PLAYING"
elif player.get_artist() != "" and player.get_title() != "":
track_info = "{artist} - {title}".format(
artist=player.get_artist(), title=player.get_title()
)
else:
track_info = player.get_title()
if player.props.status != "Playing" and track_info:
track_info = "" + track_info
elif player.props.status == "Playing" and track_info:
track_info = "" + track_info
write_output(track_info, player)
def on_player_appeared(manager, player, selected_player=None):
if player is not None and (
selected_player is None or player.name == selected_player
):
init_player(manager, player)
else:
logger.debug("New player appeared, but it's not the selected player, skipping")
def on_player_vanished(manager, player):
logger.info("Player has vanished")
sys.stdout.write("\n")
sys.stdout.flush()
def init_player(manager, name):
logger.debug("Initialize player: {player}".format(player=name.name))
player = Playerctl.Player.new_from_name(name)
player.connect("playback-status", on_play, manager)
player.connect("metadata", on_metadata, manager)
manager.manage_player(player)
on_metadata(player, player.props.metadata, manager)
def signal_handler(sig, frame):
logger.debug("Received signal to stop, exiting")
sys.stdout.write("\n")
sys.stdout.flush()
# loop.quit()
sys.exit(0)
def parse_arguments():
parser = argparse.ArgumentParser()
# Increase verbosity with every occurence of -v
parser.add_argument("-v", "--verbose", action="count", default=0)
# Define for which player we're listening
parser.add_argument("--player")
return parser.parse_args()
def main():
arguments = parse_arguments()
# Initialize logging
logging.basicConfig(
stream=sys.stderr,
level=logging.DEBUG,
format="%(name)s %(levelname)s %(message)s",
)
# Logging is set by default to WARN and higher.
# With every occurrence of -v it's lowered by one
logger.setLevel(max((3 - arguments.verbose) * 10, 0))
# Log the sent command line arguments
logger.debug("Arguments received {}".format(vars(arguments)))
manager = Playerctl.PlayerManager()
loop = GLib.MainLoop()
manager.connect(
"name-appeared", lambda *args: on_player_appeared(*args, arguments.player)
)
manager.connect("player-vanished", on_player_vanished)
signal.signal(signal.SIGINT, signal_handler)
signal.signal(signal.SIGTERM, signal_handler)
for player in manager.props.player_names:
if arguments.player is not None and arguments.player != player.name:
logger.debug(
"{player} is not the filtered player, skipping it".format(
player=player.name
)
)
continue
init_player(manager, player)
loop.run()
if __name__ == "__main__":
main()

View File

@ -0,0 +1,23 @@
#!/bin/bash
WGON(){
echo "VPN"
WGS='true'
}
WGOFF(){
# echo "Off"
WGS='false'
}
ifconfig n2400 &>/dev/null && WGON ||WGOFF
if [ "$1" = '-toggle' ]; then
if [ "$WGS" = 'true' ]; then
sudo wg-quick down n2400 &>/dev/null
else
sudo wg-quick up n2400 &>/dev/null
fi
fi
exit 0

View File

@ -0,0 +1,50 @@
#!/usr/bin/env -S python3 -u
# vi:syntax=python
import os
import signal
import i3ipc
pri_layout_code = "Eng"
sec_layout_code = "Rus"
sec_layout_name = "russian"
input_event_change = "xkb_layout"
sway_sock_path = os.environ["SWAYSOCK"]
sway = i3ipc.Connection(socket_path=sway_sock_path, auto_reconnect=False)
def on_posix_signal(sig, frame):
sway.main_quit()
signal.signal(signal.SIGHUP, on_posix_signal)
signal.signal(signal.SIGINT, on_posix_signal)
signal.signal(signal.SIGQUIT, on_posix_signal)
signal.signal(signal.SIGTERM, on_posix_signal)
# print the primary layout as it's the default
print(pri_layout_code)
def on_input_change(conn, event):
if event.change != input_event_change:
return
if event.input.xkb_active_layout_name.lower() == sec_layout_name:
print(sec_layout_code)
else:
print(pri_layout_code)
def on_shutdown_or_reload(conn, event):
conn.main_quit()
sway.on(i3ipc.Event.INPUT, on_input_change)
sway.on(i3ipc.Event.SHUTDOWN, on_shutdown_or_reload)
sway.on(i3ipc.Event.SHUTDOWN_EXIT, on_shutdown_or_reload)
sway.on(i3ipc.Event.SHUTDOWN_RESTART, on_shutdown_or_reload)
sway.on(i3ipc.Event.BARCONFIG_UPDATE, on_shutdown_or_reload)
sway.main()

View File

@ -0,0 +1,184 @@
/*
Color Pallete
foreground: '#abb2bf'
background: '#1f2227'
alt-background: '#282c34'
alt-foreground: '#1f2227'
black: '#282c34'
red: '#e06c75'
green: '#98c379'
yellow: '#e5c07b'
blue: '#81A1C1'
magenta: '#c678dd'
cyan: '#56b6c2'
white: '#c8ccd4'
*/
* {
border: 0px solid rgba(40, 44, 52, 0);
border-radius: 2px;
font-family: Iosevka Nerd Font, Font Awesome, Arial, sans-serif;
font-weight: 700;
font-size: 13px;
min-height: 0;
padding: 0px;
}
window#waybar {
background-color: #1f2227;
background: transparent;
color: #c8ccd4;
transition-property: background-color;
transition-duration: 0.5s;
border-radius: 0;
}
window > box {
margin-left: 6.5px;
margin-right: 6.5px;
margin-bottom: 6.5px;
background: #1f2227;
color: #c8ccd4;
}
window#waybar.hidden {
opacity: 0.2;
}
label:focus {
background-color: #282c34;
}
@keyframes blink {
to {
background-color: #c8ccd4;
color: #282c34;
}
}
#battery,
#cpu,
#memory,
#disk,
#temperature,
#backlight,
#network,
#pulseaudio,
#workspaces,
#clock,
#tray,
#mode,
#idle_inhibitor,
#mpd {
padding: 0 10px;
margin: 4px 4px 4px 4px;
color: #1f2227;
}
#custom-launch {
margin-right: 10px;
margin-left: 4px;
padding-left: 10px;
padding-right: 10px;
margin-top: 4px;
margin-bottom: 4px;
font-size: 17px;
background-color: #81a1c1;
color: #1f2227;
}
#workspaces button {
padding: 5px 5px;
background-color: transparent;
border-radius: 4px;
margin-left: 1px;
color: #c8ccd4;
}
#workspaces button:hover {
background-color: #c8ccd4;
color: #1f2227;
}
#workspaces button.focused {
background-color: #e06c75;
color: #282c34;
}
#workspaces button.urgent {
background-color: #e04753;
}
#custom-spotify {
padding-left: 10px;
padding-right: 10px;
margin-top: 4px;
margin-bottom: 4px;
font-size: 17px;
font-weight: 500;
background-color: #98c379;
color: #1f2227;
}
#custom-xkblayout {
color: #81a1c1;
}
#pulseaudio {
color: #e06c75;
}
#pulseaudio.muted {
background-color: #81a1c1;
color: #282c34;
}
#backlight {
color: #e5c07b;
}
#network {
color: #81a1c1;
}
#memory {
color: #e06c75;
}
#battery {
color: #e5c07b;
}
#battery.charging,
#battery.plugged {
color: #e06c75;
}
#battery.critical:not(.charging) {
color: #e06c75;
animation-name: blink;
animation-duration: 0.5s;
animation-timing-function: linear;
animation-iteration-count: infinite;
animation-direction: alternate;
}
#clock {
color: #98c379;
}
#custom-off {
margin-right: 4px;
margin-left: 11px;
padding-left: 10px;
padding-right: 8px;
margin-top: 4px;
margin-bottom: 4px;
font-size: 17px;
background-color: #e06c75;
color: #1f2227;
}

View File

@ -0,0 +1,10 @@
#!/bin/zsh
# ALIASES
alias df='df -l -H'
alias ls='ls_extended'
alias sn='sncli -c ~/.config/sncli/snclirc'
alias neofetch='neofetch --config ~/.config/neofetch/matbook.conf'
alias sirot='pacman -Qdt && sudo pacman -Rs $(pacman -Qtdq)'
alias swayconf='vim ~/.config/sway/config'

View File

@ -0,0 +1,42 @@
#!/bin/zsh
# АРХИВЫ
unpack() {
if [ -f $1 ] ; then
case $1 in
*.tar.bz2) tar xjf $1 ;;
*.tar.gz) tar xzf $1 ;;
*.tar.xz) tar xf $1 ;;
*.bz2) bunzip2 $1 ;;
*.rar) unrar x $1 ;;
*.gz) gunzip $1 ;;
*.tar) tar xf $1 ;;
*.tbz2) tar xjf $1 ;;
*.tgz) tar xzf $1 ;;
*.zip) unzip $1 ;;
*.Z) uncompress $1 ;;
*.7z) 7z x $1 ;;
*) echo "$fg_bold[red]Ошибка:$reset_color Невозможно распаковать '$1'..." ;;
esac
else
echo "$fg_bold[red]Ошибка:$reset_color '$1' - неподдерживаемый тип файла"
fi
}
pack() {
if [ $1 ] ; then
case $1 in
tbz) tar cjvf $2.tar.bz2 $2 ;;
tgz) tar czvf $2.tar.gz $2 ;;
tar) tar cpvf $2.tar $2 ;;
bz2) bzip $2 ;;
gz) gzip -c -9 -n $2 > $2.gz ;;
zip) zip -r $2.zip $2 ;;
7z) 7z a $2.7z $2 ;;
*) echo "$fg_bold[red]Ошибка:$reset_color '$1' не может быть упакован через pack()" ;;
esac
else
echo "$fg_bold[red]Ошибка:$reset_color '$1' - неподдерживаемый тип файла"
fi
}

View File

@ -0,0 +1,11 @@
#!/bin/zsh
#BINDS
bindkey '^[[24~' clear-screen
bindkey "^[OH" beginning-of-line
bindkey "^[OF" end-of-line
bindkey '^[[1;5D' backward-word
bindkey '^[[1;5C' forward-word
bindkey '^R' history-incremental-search-backward

View File

@ -0,0 +1,9 @@
#!/bin/zsh
#git
autoload -Uz vcs_info
precmd_vcs_info() { vcs_info }
precmd_functions+=( precmd_vcs_info )
setopt prompt_subst
zstyle ':vcs_info:git:*' formats '[ %b]'

View File

@ -0,0 +1,19 @@
#!/bin/zsh
#HISTORY
##Где хранить историю
HISTFILE=~/.config/zsh-history
##Число команд, сохраняемых в HISTFILE
SAVEHIST=5000
##Чucлo кoмaнд, coxpaняeмыx в сеансе
HISTSIZE=5000
##Игнорировать повторяющиеся команды
setopt HIST_IGNORE_ALL_DUPS
##Игнopupoвать лишние пpoбeлы
setopt HIST_IGNORE_SPACE
##Удалять из файл истории пустые строки
setopt HIST_REDUCE_BLANKS
##время выполнения команд
setopt extended_history
##История становится общей между всеми сессиями
setopt share_history

View File

@ -0,0 +1,11 @@
#!/bin/zsh
autoload -Uz compinit
compinit
# Completion for kitty
kitty + complete setup zsh | source /dev/stdin
# Kitty aliases
alias icat='kitty +kitten icat'
alias clear='icat --clear && clear'

View File

@ -0,0 +1,36 @@
#!/bin/zsh
autoload -U colors && colors
export PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/mat/.local/bin:/usr/bin/core_perl"
export EDITOR="vim"
export MUTT_EDITOR="vim"
export VISUAL="vim"
export VIMINIT="source ~/.config/vim/vimrc"
export SSH_KEY_PATH="~/.ssh/"
export TERM="xterm-kitty"
export TERMINAL="kitty"
export MOZ_ENABLE_WAYLAND=1
#НАВИГАЦИЯ
##авто cd
setopt autocd
setopt extended_glob
##автодополнение TAB
autoload -Uz compinit && compinit
_comp_options+=(globdots)
# Установка-снятие опций шелла
setopt notify globdots correct pushdtohome cdablevars autolist
setopt correctall autocd recexact longlistjobs
setopt autoresume histignoredups pushdsilent noclobber
setopt autopushd pushdminus extendedglob rcquotes mailwarning
unsetopt bgnice autoparamslash
unsetopt nomatch
autoload -Uz bracketed-paste-magic
zle -N bracketed-paste bracketed-paste-magic
autoload -Uz url-quote-magic
zle -N self-insert url-quote-magic
unsetopt nomatch

View File

@ -0,0 +1,5 @@
#!/bin/zsh
# PROMPTS
PROMPT=%{$fg_bold[blue]%}'[%n][%~]» '%{$reset_color%}
RPROMPT=%{$fg_bold[green]%}\$vcs_info_msg_0_%{$reset_color%}%{$fg_bold[red]%}'[%T]'%{$reset_color%}

11
matboot-sway/config/zsh/zshrc Executable file
View File

@ -0,0 +1,11 @@
#!/bin/zsh
for conf in ~/.config/zsh/*.zsh; do
source $conf
done
#start sway
if [ "$(tty)" = "/dev/tty1" ]; then
exec sway
fi

View File

@ -0,0 +1,15 @@
#!/bin/sh
# usage: import-gsettings
config="${XDG_CONFIG_HOME:-$HOME/.config}/gtk-3.0/settings.ini"
if [ ! -f "$config" ]; then exit 1; fi
gnome_schema="org.gnome.desktop.interface"
gtk_theme="$(grep 'gtk-theme-name' "$config" | sed 's/.*\s*=\s*//')"
icon_theme="$(grep 'gtk-icon-theme-name' "$config" | sed 's/.*\s*=\s*//')"
cursor_theme="$(grep 'gtk-cursor-theme-name' "$config" | sed 's/.*\s*=\s*//')"
font_name="$(grep 'gtk-font-name' "$config" | sed 's/.*\s*=\s*//')"
gsettings set "$gnome_schema" gtk-theme "$gtk_theme"
gsettings set "$gnome_schema" icon-theme "$icon_theme"
gsettings set "$gnome_schema" cursor-theme "$cursor_theme"
gsettings set "$gnome_schema" font-name "$font_name"

View File

@ -0,0 +1,44 @@
#!/bin/bash
option0=" Lock"
option1=" Poweroff"
option2=" Reboot"
option3=" Exit"
option4="Enable Display"
option5="Disable Display"
options="$option0\n$option1\n$option2\n$option3\n$option4\n$option5"
selected="$(echo -e "$options" | rofi -lines 4 -dmenu -P " Powermenu:")"
case $selected in
$option0)
swaylock \
--screenshots \
--clock \
--indicator \
--indicator-radius 100 \
--indicator-thickness 7 \
--effect-blur 6x5 \
--effect-vignette 0.5:0.5 \
--ring-color 1f2227 \
--key-hl-color e06c75 \
--line-color 00000000 \
--inside-color 00000088 \
--separator-color 00000000 \
--grace 2 \
--fade-in 0.2;;
$option1)
systemctl poweroff;;
$option2)
systemctl reboot;;
$option3)
swaymsg exit;;
$option4)
swaymsg output eDP-1 enable;;
$option5)
swaymsg output eDP-1 disable;;
esac
exit 0

View File

@ -0,0 +1,5 @@
#!/bin/bash
slurp | grim -g - $HOME/$(date +'screenshot_%Y-%m-%d-%H%M%S.png')
exit 0

View File

@ -0,0 +1,8 @@
[General]
startOnSysTray=true
[Window]
main-height=1356
main-width=3412
main-x-pos=2560
main-y-pos=0

Binary file not shown.

View File

@ -0,0 +1,190 @@
########################################################################################
# My cozy Hyprland conf
########################################################################################
autogenerated = 0
# Monitor setting
misc:disable_hyprland_logo=true
monitor=DP-1,3440x1440@144,2560x0,1
monitor=DP-2,2560x1440@165,0x0,1
# Fix slow startup
#exec systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP
#exec dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY XDG_CURRENT_DESKTOP
# Keyboard
input {
kb_layout = us,ru
kb_options = grp:caps_toggle,grp_led:caps
follow_mouse = 1
touchpad {
natural_scroll = no
}
sensitivity = 0
}
# Window Rules
windowrule = workspace 2 silent,firefox
windowrule = workspace 4 silent,discord
windowrulev2 = tile, noblur, class:^(Pulse Browser)(.*)$
windowrulev2 = tile, class:^(steam_app)(.*)$
windowrulev2 = tile, class:^(thunar)(.*)$
windowrulev2 = tile, class:^(lutris)(.*)$
windowrulev2 = workspace 2, class:^(Pulse Browser)$
windowrulev2 = workspace 3, class:^(Steam)$
windowrulev2 = workspace 3, class:^(lutris)$
windowrulev2 = workspace 6, class:^(Spotify)$
windowrulev2 = workspace 8, class:^(Corectrl)$
windowrulev2 = workspace 3, class:^(gamescope)$
windowrulev2 = float, class:^(org.kde.polkit-kde-authentication-agent-1)$
# Autostart
exec-once=import-gsettings
exec-once=desktop-portal
exec-once=/usr/lib/polkit-kde-authentication-agent-1
exec-once=night-mode
exec-once=wallpapers
exec-once=swayosd
exec-once=waybar
exec-once=swaync
exec-once=[workspace 4 silent;noanim] discord
exec-once=transmission-daemon
exec-once=steam-native -silent
# Styling
general {
gaps_in = 5
gaps_out = 12.5
border_size = 2
col.active_border = rgba(313455ee) rgba(00ff99ee) 45deg
col.inactive_border = rgba(595959aa)
layout = dwindle
}
decoration {
rounding = 4
blur = yes
blur_size = 3
blur_passes = 1
blur_new_optimizations = on
drop_shadow = yes
shadow_range = 4
shadow_render_power = 3
col.shadow = rgba(1a1a1aee)
}
animations {
enabled = yes
bezier = overshot, 0.05, 0.9, 0.1, 1.05
bezier = smoothOut, 0.36, 0, 0.66, -0.56
bezier = smoothIn, 0.25, 1, 0.5, 1
animation = windows, 1, 5, overshot, slide
animation = windowsOut, 1, 4, smoothOut, slide
animation = windowsMove, 1, 4, default
animation = border, 1, 10, default
animation = fade, 1, 10, smoothIn
animation = fadeDim, 1, 10, smoothIn
animation = workspaces, 1, 6, default
}
dwindle {
pseudotile = yes
preserve_split = yes
}
master {
new_is_master = true
}
gestures {
workspace_swipe = off
}
device:compx-2.4g-wireless-receiver {
kb_layout = us,ru
kb_options = grp:caps_toggle,grp_led:caps
}
$mainMod = SUPER
# KeyBinding
bind = $mainMod, RETURN, exec, kitty
bind = $mainMod, Q, killactive,
bind = $mainMod, M, exit,
bind = $mainMod, E, exec, dolphin
bind = $mainMod, V, togglefloating,
bind = $mainMod, R, exec, menurun
bind = $mainMod, D, exec, menudrun
bind = $mainMod, Y, exec, menupass
bind = $mainMod, W, pseudo,
bind = $mainMod, S, togglesplit,
bind = $mainMod, P, exec, screenshot
bind = $mainMod, B, exec, pulse-browser
bind = $mainMod, X, exec, wl-paste
bind = $mainMod, G, exec, menugames
bind = $mainMod, Z, exec, killall -SIGUSR1 waybar
bind = $mainMod, ESCAPE, exec, menupower
bind = $mainMod SHIFT, Q, exec, hyprctl kill
bind = $mainMod SHIFT, N, exec, swaync-client -t -sw
bind = $mainMod SHIFT, B, exec, pulse-browser --private-window
bind = $mainMod SHIFT, W, exec, menuwallpapers
# Move focus with mainMod + arrow keys
bind = $mainMod, left, movefocus, l
bind = $mainMod, right, movefocus, r
bind = $mainMod, up, movefocus, u
bind = $mainMod, down, movefocus, d
# Switch workspaces with mainMod + [1-8]
bind = $mainMod, 1, workspace, 1
bind = $mainMod, 2, workspace, 2
bind = $mainMod, 3, workspace, 3
bind = $mainMod, 4, workspace, 4
bind = $mainMod, 5, workspace, 5
bind = $mainMod, 6, workspace, 6
bind = $mainMod, 7, workspace, 7
bind = $mainMod, 8, workspace, 8
# Binding workspaces
workspace = DP-1, 1, default:true
workspace = DP-1, 2, default:true
workspace = DP-1, 3, default:true
workspace = DP-1, 4, default:true
workspace = DP-2, 5, default:true
workspace = DP-2, 6, default:true
workspace = DP-2, 7, default:true
workspace = DP-2, 8, default:true
# Move active window to a workspace with mainMod + SHIFT + [0-9]
bind = $mainMod SHIFT, 1, movetoworkspace, 1
bind = $mainMod SHIFT, 2, movetoworkspace, 2
bind = $mainMod SHIFT, 3, movetoworkspace, 3
bind = $mainMod SHIFT, 4, movetoworkspace, 4
bind = $mainMod SHIFT, 5, movetoworkspace, 5
bind = $mainMod SHIFT, 6, movetoworkspace, 6
bind = $mainMod SHIFT, 7, movetoworkspace, 7
bind = $mainMod SHIFT, 8, movetoworkspace, 8
# Scroll through existing workspaces with mainMod + scroll
bind = $mainMod, mouse_down, workspace, e+1
bind = $mainMod, mouse_up, workspace, e-1
# Move/resize windows with mainMod + LMB/RMB and dragging
bindm = $mainMod, mouse:272, movewindow
bindm = $mainMod, mouse:273, resizewindow
# Binding volume and caps osd
binde = $mainMod, F11, exec, swayosd --output-volume lower
binde = $mainMod, F12, exec, swayosd --output-volume raise
# Apps a really long time to open
exec-once=dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP

View File

@ -0,0 +1,43 @@
font_family JetBrains Mono
bold_font JetBrains Mono Bold
italic_font JetBrains Mono Italic
font_size 11.0
enable_audio_bell no
window_border_width 0.0
window_margin_width 2
window_padding_width 3
confirm_os_window_close 0
tab_title_template {index}:{title}
tab_bar_min_tabs 2
tab_bar_edge top
tab_bar_style powerline
clear_all_shortcuts yes
kitty_mod ctrl
map kitty_mod+insert copy_to_clipboard
map shift+insert paste_from_clipboard
map kitty_mod+t new_tab
map kitty_mod+w close_tab
map alt+l next_tab
map kitty_mod+right next_tab
map alt+h previous_tab
map kitty_mod+left previous_tab
map kitty_mod+alt+t set_tab_title
map kitty_mod+g axis vertical
map alt+1 goto_tab 1
map alt+2 goto_tab 2
map alt+3 goto_tab 3
map alt+4 goto_tab 4
map alt+5 goto_tab 5
map alt+6 goto_tab 6
map alt+7 goto_tab 7
map alt+8 goto_tab 8
map alt+9 goto_tab 9
map kitty_mod+alt+r launch --type=tab ranger
include ./theme.conf

View File

@ -0,0 +1,29 @@
background #303030
foreground #abb2bf
selection_background #abb2bf
selection_foreground #282c34
url_color #565c64
cursor #abb2bf
active_border_color #545862
inactive_border_color #353b45
active_tab_background #e06c75
active_tab_foreground #abb2bf
inactive_tab_background #323232
inactive_tab_foreground #565c64
tab_bar_background #303030
color0 #282c34
color8 #282c34
color1 #e06c75
color9 #e06c75
color2 #98c379
color10 #98c379
color3 #e5c07b
color11 #e5c07b
color4 #81A1C1
color12 #81A1C1
color5 #c678dd
color13 #c678dd
color6 #56b6c2
color14 #56b6c2
color7 #c8ccd4
color15 #c8ccd4

View File

@ -0,0 +1,67 @@
{
"$schema": "/etc/xdg/swaync/configSchema.json",
"positionX": "right",
"positionY": "top",
"layer": "top",
"cssPriority": "application",
"control-center-margin-top": 0,
"control-center-margin-bottom": 0,
"control-center-margin-right": 0,
"control-center-margin-left": 0,
"notification-icon-size": 48,
"notification-body-image-height": 100,
"notification-body-image-width": 200,
"timeout": 10,
"timeout-low": 5,
"timeout-critical": 0,
"fit-to-screen": true,
"control-center-width": 512,
"control-center-height": 600,
"notification-window-width": 500,
"keyboard-shortcuts": true,
"image-visibility": "when-available",
"transition-time": 200,
"hide-on-clear": true,
"hide-on-action": true,
"script-fail-notify": true,
"scripts": {
"example-script": {
"exec": "echo 'Do something...'",
"urgency": "Normal"
},
"example-action-script": {
"exec": "echo 'Do something actionable!'",
"urgency": "Normal",
"run-on": "action"
}
},
"notification-visibility": {
"example-name": {
"state": "muted",
"urgency": "Low",
"app-name": "Spotify"
}
},
"widgets": [
"title",
"notifications"
],
"widget-config": {
"title": {
"text": "Control Center",
"clear-all-button": true,
"button-text": "󰅙"
},
"dnd": {
"text": "DND"
},
"label": {
"max-lines": 5,
"text": "Label Text"
},
"mpris": {
"image-size": 96,
"image-radius": 6
}
}
}

View File

@ -0,0 +1,247 @@
/*
* vim: ft=less
*/
@define-color cc-bg rgba(50, 50, 50, 1);
@define-color noti-border-color rgba(255, 255, 255, 0.15);
@define-color noti-bg rgb(48, 48, 48);
@define-color noti-bg-hover rgb(56, 56, 56);
@define-color noti-bg-focus rgba(224, 108, 117, 0.9);
@define-color noti-close-bg rgba(255, 255, 255, 0.1);
@define-color noti-close-bg-hover rgba(255, 255, 255, 0.15);
@define-color bg-selected rgb(0, 128, 255);
.notification-row {
outline: none;
}
.notification-row:focus,
.notification-row:hover {
background: @noti-bg-focus;
}
.notification {
border-radius: 6px;
margin: 16px 16px;
box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.3), 0 1px 3px 1px rgba(0, 0, 0, 0.7),
0 2px 6px 2px rgba(0, 0, 0, 0.3);
padding: 0;
}
/* Uncomment to enable specific urgency colors
.low {
background: yellow;
padding: 6px;
border-radius: 6px;
}
.normal {
background: green;
padding: 6px;
border-radius: 6px;
}
.critical {
background: red;
padding: 6px;
border-radius: 6px;
}
*/
.notification-content {
background: transparent;
padding: 6px;
border-radius: 6px;
}
.close-button {
background: @noti-close-bg;
color: white;
text-shadow: none;
padding: 0;
border-radius: 100%;
margin-top: 10px;
margin-right: 16px;
box-shadow: none;
border: none;
min-width: 24px;
min-height: 24px;
}
.close-button:hover {
box-shadow: none;
background: @noti-close-bg-hover;
transition: all 0.15s ease-in-out;
border: none;
}
.notification-default-action,
.notification-action {
padding: 4px;
margin: 0;
box-shadow: none;
background: @noti-bg;
border: 1px solid @noti-border-color;
color: white;
}
.notification-default-action:hover,
.notification-action:hover {
-gtk-icon-effect: none;
background: @noti-bg-hover;
}
.notification-default-action {
border-radius: 6px;
}
/* When alternative actions are visible */
.notification-default-action:not(:only-child) {
border-bottom-left-radius: 6px;
border-bottom-right-radius: 6px;
}
.notification-action {
border-radius: 0px;
border-top: none;
border-right: none;
}
/* add bottom border radius to eliminate clipping */
.notification-action:first-child {
border-bottom-left-radius: 6px;
}
.notification-action:last-child {
border-bottom-right-radius: 6px;
border-right: 1px solid @noti-border-color;
}
.image {
}
.body-image {
margin-top: 6px;
background-color: white;
border-radius: 6px;
}
.summary {
font-size: 16px;
font-weight: bold;
background: transparent;
color: white;
text-shadow: none;
}
.time {
font-size: 16px;
font-weight: bold;
background: transparent;
color: white;
text-shadow: none;
margin-right: 18px;
}
.body {
font-size: 15px;
font-weight: normal;
background: transparent;
color: white;
text-shadow: none;
}
/* The "Notifications" and "Do Not Disturb" text widget */
.top-action-title {
color: white;
text-shadow: none;
}
.control-center {
background: @cc-bg;
margin-right: 12.5px;
margin-top: 12.5px;
margin-bottom: 12.5px;
border-radius: 6px;
border: 3px solid rgb(40, 44, 52);
border-color: #282c34;
}
.control-center-list {
background: transparent;
}
.floating-notifications {
background: transparent;
}
/* Window behind control center and on all other monitors */
.blank-window {
background: alpha(black, 0.25);
}
/*** Widgets ***/
/* Title widget */
.widget-title {
margin: 8px;
font-size: 1.5rem;
}
.widget-title > button {
font-size: initial;
color: white;
text-shadow: none;
background: @noti-bg;
border: 1px solid @noti-border-color;
box-shadow: none;
border-radius: 6px;
}
.widget-title > button:hover {
background: @noti-bg-hover;
}
/* DND widget */
.widget-dnd {
margin: 8px;
font-size: 1.1rem;
}
.widget-dnd > switch {
font-size: initial;
border-radius: 12px;
background: @noti-bg;
border: 1px solid @noti-border-color;
box-shadow: none;
}
.widget-dnd > switch:checked {
background: @bg-selected;
}
.widget-dnd > switch slider {
background: @noti-bg-hover;
border-radius: 12px;
}
/* Label widget */
.widget-label {
margin: 8px;
}
.widget-label > label {
font-size: 1.1rem;
}
/* Mpris widget */
.widget-mpris {
/* The parent to all players */
}
.widget-mpris-player {
padding: 8px;
margin: 8px;
}
.widget-mpris-title {
font-weight: bold;
font-size: 1.25rem;
}
.widget-mpris-subtitle {
font-size: 1.1rem;
}

View File

@ -0,0 +1,27 @@
background="#303030"
text="#abb2bf"
subtle="#abb2bf"
warning-text="#d7005f"
text-special-one="#81A1C1"
text-special-two="#c678dd"
top-bar-background="#81A1C1"
top-bar-text="#ffffff"
status-bar-background="#81A1C1"
status-bar-text="#abb2bf"
status-bar-view-background="#e06c75"
status-bar-view-text="#abb2bf"
list-selected-background="#e06c75"
list-selected-text="#ffffff"
command-text="#abb2bf"
list-selected-inactive-background="#6d6d6d"
list-selected-inactive-text="#ffffff"
controls-text="#abb2bf"
controls-highlight="#98c379"
autocomplete-background="#e06c75"
autocomplete-text="#abb2bf"
autocomplete-selected-background="#4271ae"
autocomplete-selected-text="#ffffff"
button-color-one="#e06c75"
button-color-two="#fafafa"
timeline-name-background="#e5c07b"
timeline-name-text="#000000"

View File

@ -0,0 +1,11 @@
#!/bin/bash
LB=$(pidof pw-loopback)
if [[ $LB > 0 ]]; then
killall pw-loopback
else
pw-loopback --capture "alsa_input.usb-AVerMedia_Technologies__Inc._Live_Gamer_MINI_5203206100308-03.pro-input-0" &
fi
exit 0

5
rockethype/local/bin/menudrun Executable file
View File

@ -0,0 +1,5 @@
#!/bin/bash
wofi || exit 0
exit 0

21
rockethype/local/bin/menugames Executable file
View File

@ -0,0 +1,21 @@
#!/usr/bin/env python
import json
import os
import subprocess
tmp = os.popen("lutris -ojl").read()
games = json.loads(tmp)
gameslist = ""
concat = ""
for item in games:
gameslist = gameslist + concat + item["name"]
concat = "\n"
tmp = subprocess.getoutput("echo \"" + gameslist + "\" | wofi -n -d -p \"Select Game:\"")
for item in games:
if item["name"] == tmp:
subprocess.Popen(["lutris","lutris:rungameid/" + str(item["id"])])
break

176
rockethype/local/bin/menupass Executable file
View File

@ -0,0 +1,176 @@
#!/bin/sh
set -eu
autotype=0
copyisset=0
fileisuser=0
help=0
onlypassword=0
squash=0
typeisset=0
COPY_CMD="wl-copy"
TYPE_CMD="wtype -"
_trim() {
var="$*"
# remove leading whitespace characters
var="${var#"${var%%[![:space:]]*}"}"
# remove trailing whitespace characters
var="${var%"${var##*[![:space:]]}"}"
printf '%s' "$var"
}
# the explicit newlines here are funky, but needed due to command substitution
# stripping trailing newlines so `printf '%s\n' "$line"` cannot be used
_parse_fields() {
has_username=0
fields="$(pass show "$password" | tail -n +2 | cut -d: -f1 -s)"
field_list="password
"
if [ "$fileisuser" -eq 1 ]; then
has_username=1
line="username"
field_list="$field_list$line
"
fi
for line in $fields; do
if [ "$line" = "username" ]; then
has_username=1
field_list="$field_list$line
"
elif [ "$line" = "otpauth" ]; then
field_list="${field_list}OTP
"
elif [ "$line" = autotype_always ]; then
autotype=1
else
field_list="$field_list$line
"
fi
done
if [ "$typeisset" -eq 1 ] && [ "$has_username" -eq 1 ]; then
printf "autotype
"
fi
printf '%s' "$field_list"
}
_pass_field() {
_trim "$(pass show "$password" | tail -n+2 | grep "^${*}:.*$" | cut -d: -f1 -s --complement)"
}
_pass_get() {
if [ "$1" = "password" ]; then
pass show "$password" | { IFS= read -r pass; printf %s "$pass"; }
elif [ "$1" = "OTP" ]; then
pass otp "$password" | tail -n1 | { IFS= read -r pass; printf %s "$pass"; }
elif [ "$fileisuser" -eq 1 ] && [ "$1" = "username" ]; then
printf %s "$passname"
else
_pass_field "$@"
fi
}
_usage() {
printf "Usage: wofi-pass [options]\n"
printf " -a, --autotype autotype whatever entry is chosen\n"
printf " -c, --copy=[cmd] copy to clipboard. Defaults to wl-copy if no cmd is given.\n"
printf " -f, --fileisuser use the name of the password file as username\n"
printf " -h, --help show this help message\n"
printf " -s, --squash don't show field choice if password file only contains password\n"
printf " -t, --type=[cmd] type the selection instead of copying to clipboard.\n"
printf " Defaults to wtype if no cmd is given.\n"
}
OPTS="$(getopt --options ac::fhst:: --longoptions autotype,copy::,fileisuser,help,squash,type:: -n 'wofi-pass' -- "$@")"
eval set -- "$OPTS"
while true; do
case "$1" in
-a | --autotype ) autotype=1; shift ;;
-c ) copyisset=1; copy_cmd="$COPY_CMD"; shift ;;
--copy )
copyisset=1
if [ -n "$2" ]; then
copy_cmd="$2"
shift 2
else
copy_cmd="$COPY_CMD"
shift
fi ;;
-f | --fileisuser ) fileisuser=1; shift;;
-h | --help ) help=1; shift ;;
-s | --squash ) squash=1; shift ;;
-t ) typeisset=1; type_cmd="$TYPE_CMD"; shift ;;
--type )
typeisset=1
if [ -n "$2" ]; then
type_cmd="$2"
shift 2
else
type_cmd="$TYPE_CMD"
shift
fi ;;
-- ) shift; break;;
* ) break;;
esac
done
if [ "$help" -eq 1 ]; then
_usage >&2
exit 0
fi
if [ "$typeisset" -eq 1 ] && [ "$copyisset" -eq 1 ]; then
printf "copy and type cannot be used at same time. Please pass only one.\n"
exit 1
elif [ "$typeisset" -eq 0 ] && [ "$copyisset" -eq 0 ]; then
printf "neither -c/--copy or -t/--type passed. Defaulting to copying with wl-copy."
copy_cmd="$COPY_CMD"
fi
cd "${PASSWORD_STORE_DIR:-$HOME/.password-store}"
password_files="$(find . -name "*.gpg" | sed "s/^\.\/\(.*\)\.gpg$/\1/")"
password=$(printf '%s\n' "$password_files" | wofi --dmenu)
[ -n "$password" ] || exit
if [ "$fileisuser" -eq 1 ]; then
passname=$(printf '%s' "$password" | sed "s,.*/\(\),\1,")
fi
field_list="$(_parse_fields)"
field_count="$(printf '%s' "$field_list" | wc -l)"
if [ "$squash" -eq 1 ] && [ "$field_count" -eq 0 ]; then
field="password"
onlypassword=1
elif [ "$autotype" -ne 1 ]; then
field=$(printf '%s\n' "$field_list" | wofi --dmenu)
fi
# get the command to output to
if [ "$typeisset" -eq 1 ]; then
output_cmd=$type_cmd
else
output_cmd=$copy_cmd
fi
if [ "$autotype" -eq 1 ] || [ "$field" = "autotype" ]; then
if [ "$fileisuser" -eq 1 ]; then
username="$passname"
else
username=$(_pass_get "username")
fi
password=$(_pass_get "password")
# check if we are autotyping a password-only file
if [ "$onlypassword" -eq 1 ]; then
printf '%s\n' "$password" | $output_cmd
else
printf '%s\t%s\n' "$username" "$password" | $output_cmd
fi
else
_pass_get "$field" | $output_cmd
fi

44
rockethype/local/bin/menupower Executable file
View File

@ -0,0 +1,44 @@
#!/bin/bash
option0=" Lock"
option1=" Poweroff"
option2=" Reboot"
option3=" Exit"
option4=" Monitor toggle"
option5=" VPN Toggle"
options="$option0\n$option1\n$option2\n$option3\n$option4\n$option5"
selected="$(echo -e "$options" | wofi --show dmenu --location top_right --xoffset -32 --yoffset 14 --width 256 --height 228 -p "Powermenu:" || exit 0)"
case $selected in
$option0)
swaylock \
--screenshots \
--clock \
--indicator \
--indicator-radius 100 \
--indicator-thickness 7 \
--effect-blur 6x5 \
--effect-vignette 0.5:0.5 \
--ring-color 1f2227 \
--key-hl-color e06c75 \
--line-color 00000000 \
--inside-color 00000088 \
--separator-color 00000000 \
--grace 2 \
--fade-in 0.2;;
$option1)
systemctl poweroff;;
$option2)
systemctl reboot;;
$option3)
exec exit;;
$option4)
monitor-toggle;;
$option5)
exec $HOME/.config/waybar/scripts/wgstatus -toggle;;
esac
exit 0

9
rockethype/local/bin/menurun Executable file
View File

@ -0,0 +1,9 @@
#!/bin/bash
exec wofi \
--show drun \
--location top_left \
--xoffset 14 \
--yoffset 14 \
--width 384 \
--height 512 \
-p Application:

View File

@ -0,0 +1,8 @@
#!/bin/bash
WALLPATH="$HOME/.local/share/backgrounds/"
WALLFILE="$(ls $WALLPATH | wofi --show dmenu -p Wallpapers:)"
swww img $WALLPATH$WALLFILE --transition-type wipe --transition-step 30 --transition-fps 165 > /dev/null
exit 0

View File

@ -0,0 +1,19 @@
#!/bin/bash
MONON(){
hyprctl keyword monitor DP-2,2560x1440@165,0x0,1
}
MONOFF(){
hyprctl keyword monitor DP-2,disable
}
MONTEMP=$(hyprctl monitors | grep "(ID 1)")
if [[ $MONTEMP = "Monitor DP-2 (ID 1):" ]]; then
MONOFF
else
MONON
fi
exit 0

11
rockethype/local/bin/night-mode Executable file
View File

@ -0,0 +1,11 @@
#!/bin/bash
NM=$(pidof gammastep)
if [[ $NM > 0 ]]; then
killall gammastep
else
gammastep -b 1:0.9 -l 56.01:92.86 -t 5600:4500 &
fi
exit 0

29
rockethype/local/bin/perf Executable file
View File

@ -0,0 +1,29 @@
#!/bin/bash
SPACEPORT(){
notify-send -e -i "$ICONPATH/space-base.png" "$HNOTIFY" "Низкая производительность"
corectrl -m Spaceport
}
COSMIC(){
notify-send -e -i "$ICONPATH/spaceship.png" "$HNOTIFY" "Средняя производительность"
corectrl -m Cosmic
}
ROCKET(){
notify-send -e -i "$ICONPATH/rocket.png" "$HNOTIFY" "Высокая производительность"
corectrl -m Rocket
}
ICONPATH="/home/mat/.config/streamdeck/sources/Keys/applications"
HNOTIFY="Центр Управления Полетами"
if [[ $1 = 'spaceport' ]]; then
SPACEPORT
elif [[ $1 = 'cosmic' ]]; then
COSMIC
elif [[ $1 = 'rocket' ]]; then
ROCKET
fi
exit 0

23
rockethype/local/bin/screenshot Executable file
View File

@ -0,0 +1,23 @@
#!/bin/bash
SCREENFILE=$HOME/Documents/Images/Screenshots/$(date +'screenshot_%Y-%m-%d-%H%M%S.png')
ICONPATH="/home/mat/.config/streamdeck/sources/Keys/applications"
HNOTIFY="Центр Управления Полетами"
SCREENZONE(){
grim -g "$(slurp -d)" - | wl-copy && wl-paste > $SCREENFILE
notify-send -e -i "$ICONPATH/screenshots.png" "$HNOTIFY" "Скриншот скопирован и сохранен"
}
SCREENFULL(){
grim - | wl-copy && wl-paste > $SCREENFILE
notify-send -e -i "$ICONPATH/screenshots.png" "$HNOTIFY" "Скриншот скопирован и сохранен"
}
if [[ $1 = 'full' ]]; then
SCREENFULL
else
SCREENZONE
fi
exit 0

9
rockethype/local/bin/thunar Executable file
View File

@ -0,0 +1,9 @@
#!/bin/bash
if [[ $1 == --daemon ]]; then
until pgrep gvfs >/dev/null; do
sleep 1
done
exec /usr/bin/Thunar "$@"
else
exec /usr/bin/Thunar "$@"
fi