mirror of
https://github.com/artizirk/dotfiles.git
synced 2025-06-17 03:14:14 +03:00
Compare commits
28 Commits
1eabf5b21f
...
master
Author | SHA1 | Date | |
---|---|---|---|
bef9896118 | |||
84ed0b01b8 | |||
44cb9c112e | |||
a607346209 | |||
16c9af02ff | |||
e26a30d88e | |||
0bb59ae237 | |||
9a19debb44 | |||
45a31ffdd0 | |||
4f2775b4e4 | |||
09883c3d40 | |||
9515ff6317 | |||
d12e19aeb6 | |||
d1cdea99af | |||
3761124be7 | |||
e50989e39a | |||
ee48d1a87a | |||
8101774f52 | |||
7b13c2aca1 | |||
7b1f76aa47 | |||
63d1b1b493 | |||
293dabc125 | |||
6a63da1134 | |||
08e0456290 | |||
f5dc53aa6d | |||
7d816c971b | |||
f42b5eb4ac | |||
b16c433a20 |
136
.bin/create_container
Executable file
136
.bin/create_container
Executable file
@ -0,0 +1,136 @@
|
||||
#!/bin/bash
|
||||
set -euo pipefail
|
||||
|
||||
DEFAULT_SUITE="bookworm"
|
||||
BASE="/var/lib/machines"
|
||||
|
||||
if [[ $EUID -ne 0 ]]; then
|
||||
echo "This script must be run as root" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
function show_help {
|
||||
cat <<-EOF
|
||||
Usage: $0 -h | -n NAME [-s SUITE] [-t [SNAPSHOT_NAME] -r] [-d]
|
||||
|
||||
Create a nspanw container called NAME
|
||||
|
||||
-h help
|
||||
-n container name
|
||||
-s debian suite (default: ${DEFAULT_SUITE})
|
||||
-t snapshot container
|
||||
-r rollback to snapshot
|
||||
-d delete container
|
||||
EOF
|
||||
}
|
||||
|
||||
while getopts 'hn:s:t:rd' flag; do
|
||||
case "${flag}" in
|
||||
h) show_help; exit 0;;
|
||||
n) name="${OPTARG}" ;;
|
||||
s) suite="${OPTARG}" ;;
|
||||
t) snapshot="${OPTARG}" ;;
|
||||
r) rollback=1 ;;
|
||||
d) delete=1 ;;
|
||||
*) echo "Unexpected option ${flag}" ;;
|
||||
esac
|
||||
done
|
||||
|
||||
SUITE=${suite:-$DEFAULT_SUITE}
|
||||
|
||||
if [[ -z ${name:-} ]]; then
|
||||
echo "Container name is unset"
|
||||
echo
|
||||
show_help
|
||||
exit;
|
||||
else
|
||||
echo "Container name is $name and suite is ${SUITE}"
|
||||
fi
|
||||
|
||||
if [[ -n ${snapshot:-} ]]; then
|
||||
dest_snapshot_name="${BASE}/.${name}_${snapshot}"
|
||||
if [[ -n ${rollback:-} ]]; then
|
||||
if [[ -d ${dest_snapshot_name} ]]; then
|
||||
btrfs subvolume delete "${BASE}/${name}"
|
||||
btrfs subvolume snapshot "${dest_snapshot_name}" "${BASE}/${name}"
|
||||
exit 0
|
||||
else
|
||||
echo "Can't rollback as '${snapshot}' does not exist"
|
||||
exit 1
|
||||
fi
|
||||
else
|
||||
btrfs subvolume snapshot -r "${BASE}/${name}" "${dest_snapshot_name}"
|
||||
exit 0
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ -n ${delete:-} ]]; then
|
||||
btrfs subvolume delete "${BASE}/${name}" "${BASE}/.${name}_"*
|
||||
exit 0
|
||||
fi
|
||||
|
||||
btrfs subvolume create "${BASE}/${name}"
|
||||
|
||||
APT_CACHE_DIR="/var/cache/apt/archives"
|
||||
|
||||
if [[ -d ${APT_CACHE_DIR} ]]; then
|
||||
CACHE_ARGS="--cache-dir=${APT_CACHE_DIR}"
|
||||
else
|
||||
CACHE_ARGS=""
|
||||
fi
|
||||
|
||||
debootstrap ${CACHE_ARGS} "${SUITE}" "${BASE}/${name}"
|
||||
|
||||
mkdir -p "$BASE/$name/root/.ssh"
|
||||
chmod 700 "$BASE/$name/root/.ssh"
|
||||
if [ -f "/root/.ssh/authorized_keys" ]; then
|
||||
cp -v /root/.ssh/authorized_keys "$BASE/$name/root/.ssh/authorized_keys"
|
||||
chmod 600 "$BASE/$name/root/.ssh/authorized_keys"
|
||||
echo "added ssh keys to root"
|
||||
fi
|
||||
|
||||
if [[ -e "$BASE/$name/etc/resolv.conf" ]]; then
|
||||
rm "$BASE/$name/etc/resolv.conf"
|
||||
fi
|
||||
|
||||
if [[ -e "$BASE/$name/etc/hostname" ]]; then
|
||||
rm "$BASE/$name/etc/hostname"
|
||||
fi
|
||||
|
||||
systemd-nspawn --console=pipe -D "$BASE/$name" /bin/bash <<'EOF'
|
||||
echo "Now running inside nspawn $(pwd)"
|
||||
|
||||
source /etc/os-release
|
||||
|
||||
if [[ "$ID" == "ubuntu" ]]; then
|
||||
sed -i '1 s/$/ restricted universe multiverse/' /etc/apt/sources.list
|
||||
elif [[ "$ID" == "debian" ]]; then
|
||||
if [[ $VERSION_ID -le 11 ]]; then
|
||||
sed -i '1 s/$/ contrib non-free/' /etc/apt/sources.list
|
||||
else
|
||||
sed -i '1 s/$/ contrib non-free non-free-firmware/' /etc/apt/sources.list
|
||||
fi
|
||||
fi
|
||||
|
||||
apt-get update
|
||||
apt-get install --yes --no-install-recommends locales dbus ssh python3
|
||||
|
||||
echo "locales locales/default_environment_locale select en_US.UTF-8" | debconf-set-selections
|
||||
echo "locales locales/locales_to_be_generated multiselect en_US.UTF-8 UTF-8, et_EE.UTF-8 UTF-8" | debconf-set-selections
|
||||
rm /etc/locale.gen
|
||||
dpkg-reconfigure --frontend noninteractive locales
|
||||
ln -fs /usr/share/zoneinfo/Europe/Tallinn /etc/localtime
|
||||
dpkg-reconfigure -f noninteractive tzdata
|
||||
|
||||
apt install --yes --no-install-recommends neovim
|
||||
update-alternatives --set editor /usr/bin/nvim
|
||||
ln -sf /usr/share/nvim/runtime/macros/less.sh /usr/local/bin/vless
|
||||
|
||||
|
||||
systemctl enable systemd-networkd
|
||||
|
||||
# systemd-resolved package also replaces /etc/resolv.conf with a symlink that breaks DNS in our current pre setup environment
|
||||
apt install --yes --no-install-recommends libnss-resolve
|
||||
# Needed by libnss-resolve config in /etc/nsswitch.conf
|
||||
systemctl enable systemd-resolved
|
||||
EOF
|
3
.bin/no-sleep
Executable file
3
.bin/no-sleep
Executable file
@ -0,0 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
systemd-inhibit --what=sleep:idle --mode=block bash -c 'while true; do sleep 1; done'
|
@ -1,2 +1,2 @@
|
||||
#!/usr/bin/env bash
|
||||
udo sed -i -e 's#Exec=/usr/bin/slack %U#Exec=/usr/bin/slack\ %U\ --enable-features=WebRTCPipeWireCapturer#' /usr/share/applications/slack.desktop
|
||||
sudo sed -i -e 's#^Exec=/usr/bin/slack -s %U$#Exec=/usr/bin/slack\ -s\ %U --enable-features=WebRTCPipeWireCapturer,UseOzonePlatform --ozone-platform=wayland#' /usr/share/applications/slack.desktop
|
||||
|
@ -4,7 +4,7 @@ pactl subscribe | grep --line-buffered "sink" |
|
||||
while read; do
|
||||
VOL=$(amixer get Master | grep -Po "[0-9]+(?=%)" | tail -1)
|
||||
if [[ $VOL != $OLD_VOL ]]; then
|
||||
tvolnoti-show $VOL
|
||||
swayosd-client --output-volume=+0
|
||||
OLD_VOL=$VOL
|
||||
fi
|
||||
done
|
||||
|
@ -1,4 +1,18 @@
|
||||
#!/usr/bin/env python3
|
||||
"""
|
||||
Sway screenshot tool. Saved screenshots are also added to GTK recents list for easy access.
|
||||
|
||||
Uses following tools
|
||||
* grim
|
||||
* slurp
|
||||
* https://codeberg.org/vyivel/dulcepan
|
||||
* jq
|
||||
|
||||
|
||||
Region selection uses dulcepan. It works by first freezing the screen so that popups sway visible.
|
||||
Then it allows selection of the region you want to screenshot.
|
||||
"""
|
||||
|
||||
import gi
|
||||
gi.require_version('Gtk', '3.0')
|
||||
from gi.repository import Gtk, GLib
|
||||
@ -28,16 +42,7 @@ else:
|
||||
sys.exit(0)
|
||||
|
||||
elif sys.argv[1] == '--region':
|
||||
outputs = run(['swaymsg', '-t', 'get_outputs'], check=True, capture_output=True)
|
||||
for output in json.loads(outputs.stdout):
|
||||
if not output.get("focused"):
|
||||
continue
|
||||
image = Popen(["grim", "-o", f"{output.get('name')}", '-'], stdout=PIPE)
|
||||
viewer = Popen(['swayimg', '-f', '-o', f'{output.get("name")}','-'], stdin=image.stdout)
|
||||
image_viewers.append(viewer)
|
||||
|
||||
region = run('slurp', check=True, capture_output=True)
|
||||
run(["grim", '-g', '-', file_name], check=True, input=region.stdout)
|
||||
run(["dulcepan", "-o", file_name], check=True)
|
||||
|
||||
elif sys.argv[1] == '--window':
|
||||
tree = run(['swaymsg', '-t', 'get_tree'], check=True, capture_output=True)
|
||||
|
47
.config/dulcepan.cfg
Normal file
47
.config/dulcepan.cfg
Normal file
@ -0,0 +1,47 @@
|
||||
# An example configuration.
|
||||
|
||||
# RRGGBB or RRGGBBAA
|
||||
unselected-color = ffffff40
|
||||
selected-color = 00000000
|
||||
#border-color = ffffff
|
||||
border-color = 000000
|
||||
#border-secondary-color = 000000
|
||||
border-secondary-color = ffffff
|
||||
|
||||
# 0 to disable borders
|
||||
border-size = 2
|
||||
|
||||
# Border gradient type:
|
||||
# - none: only the primary border color is used
|
||||
# - linear: uses a linear gradient relative to the selection
|
||||
# - loop: uses a repeated linear gradient
|
||||
border-gradient = none
|
||||
|
||||
# For "linear" gradient mode
|
||||
# Counterclockwise, in degrees
|
||||
gradient-angle = 45
|
||||
|
||||
# For "loop" gradient mode
|
||||
# The distance between gradient stops
|
||||
loop-step = 100
|
||||
|
||||
# For "linear" and "loop" gradient modes
|
||||
# In milliseconds, 0 to disable animation
|
||||
# With "linear" mode: the time it takes for the pattern to make one full turn
|
||||
# With "loop" mode: the time it takes for the pattern to move by double the loop step
|
||||
animation-duration = 1000
|
||||
|
||||
# If true, dulcepan will save immediately when interactive selection is stopped
|
||||
# or when a whole output is selected with a mouse button.
|
||||
quick-select = true
|
||||
|
||||
# If true, dulcepan will remember selection between runs.
|
||||
# The state is stored at $XDG_CACHE_HOME/dulcepan.
|
||||
persistence = false
|
||||
|
||||
# PNG (zlib) compression level, 0-9
|
||||
png-compression = 6
|
||||
|
||||
# Key bindings
|
||||
quit-key = Escape
|
||||
save-key = Space
|
2
.config/electron-flags.conf
Normal file
2
.config/electron-flags.conf
Normal file
@ -0,0 +1,2 @@
|
||||
--enable-features=WaylandWindowDecorations
|
||||
--ozone-platform-hint=auto
|
1
.config/environment.d/99-electron_wayland.conf
Normal file
1
.config/environment.d/99-electron_wayland.conf
Normal file
@ -0,0 +1 @@
|
||||
ELECTRON_OZONE_PLATFORM_HINT="auto"
|
1
.config/environment.d/99-hwdec.conf
Normal file
1
.config/environment.d/99-hwdec.conf
Normal file
@ -0,0 +1 @@
|
||||
LIBVA_DRIVER_NAME=i965
|
2
.config/environment.d/99-qt-wayland.conf
Normal file
2
.config/environment.d/99-qt-wayland.conf
Normal file
@ -0,0 +1,2 @@
|
||||
QT_QPA_PLATFORM="wayland;xcb"
|
||||
QT_QPA_PLATFORMTHEME="qt5ct"
|
1
.config/environment.d/99-xcursor_size.conf
Normal file
1
.config/environment.d/99-xcursor_size.conf
Normal file
@ -0,0 +1 @@
|
||||
XCURSOR_SIZE=24
|
@ -1,2 +1,3 @@
|
||||
XDG_CURRENT_DESKTOP=sway
|
||||
GDK_BACKEND=wayland
|
||||
GDK_DEBUG=portals
|
||||
|
@ -4,6 +4,7 @@
|
||||
[merge]
|
||||
tool = meld
|
||||
conflictStyle = zdiff3
|
||||
keepbackup = false
|
||||
|
||||
[alias]
|
||||
plog = log --graph --pretty=format:'%h -%d %s %n' --abbrev-commit --date=relative --branches
|
||||
@ -27,6 +28,7 @@
|
||||
smtpServerPort = 587
|
||||
[diff]
|
||||
wsErrorHighlight = all
|
||||
algorithm = histogram
|
||||
[cola]
|
||||
spellcheck = false
|
||||
[push]
|
||||
@ -52,9 +54,15 @@
|
||||
fixes = Fixes: %h (\"%s\")
|
||||
[tag]
|
||||
sort = v:refname
|
||||
[url "ssh://git@github.com/krakul"]
|
||||
insteadOf = https://github.com/krakul
|
||||
[protocol "file"]
|
||||
allow = always
|
||||
[column]
|
||||
ui = auto
|
||||
[rebase]
|
||||
autosquash = true
|
||||
[branch]
|
||||
sort = -committerdate
|
||||
[fetch]
|
||||
prune = true
|
||||
[includeIf "gitdir:~/code/messente/"]
|
||||
path = ~/code/messente/gitconfig
|
@ -7,9 +7,9 @@ if [[ "${INSTANCE}" != "" ]]; then
|
||||
ARGUMENTS="--player ${INSTANCE}"
|
||||
fi
|
||||
|
||||
ICON_PLAY="➤"
|
||||
ICON_PAUSE="Ⅱ"
|
||||
ICON_STOP="[]"
|
||||
ICON_PLAY="( |> )"
|
||||
ICON_PAUSE="( II )"
|
||||
ICON_STOP="( [] )"
|
||||
CUR_ICON=""
|
||||
|
||||
if [[ "${BLOCK_BUTTON}" -eq 1 ]]; then
|
||||
|
@ -1,4 +1,5 @@
|
||||
configuration {
|
||||
font: "Terminus 12";
|
||||
run-command: "bash -c 'systemd-run --user --unit=app-rofi-\$(systemd-escape \"{cmd}\")-\$RANDOM {cmd}'";
|
||||
}
|
||||
@theme "/usr/share/rofi/themes/android_notification.rasi"
|
||||
|
@ -2,20 +2,22 @@
|
||||
for_window [workspace=$chat_workspace] layout tabbed
|
||||
|
||||
for_window [app_id="evolution"] move to workspace $chat_workspace
|
||||
exec evolution
|
||||
for_window [app_id="org.gnome.Evolution"] move to workspace $chat_workspace
|
||||
exec systemd-run --user --unit=evolution /usr/bin/evolution
|
||||
|
||||
for_window [app_id="org.kde.quassel"] move to workspace $chat_workspace
|
||||
for_window [app_id="quasselclient"] move to workspace $chat_workspace
|
||||
exec quasselclient
|
||||
exec systemd-run --user --unit=quasselclient /usr/bin/quasselclient
|
||||
|
||||
for_window [class="Element"] move to workspace $chat_workspace
|
||||
exec element-desktop
|
||||
for_window [app_id="Element"] move to workspace $chat_workspace
|
||||
exec systemd-run --user --unit=element-desktop /usr/bin/element-desktop
|
||||
|
||||
for_window [class="Slack"] move to workspace $chat_workspace
|
||||
for_window [app_id="Slack"] move to workspace $chat_workspace
|
||||
exec slack --enable-features=WaylandWindowDecorations,WebRTCPipeWireCapturer --ozone-platform-hint=auto
|
||||
exec flatpak run com.slack.Slack
|
||||
exec systemd-run --user --unit=slack /usr/bin/slack --enable-features=WaylandWindowDecorations,WebRTCPipeWireCapturer --ozone-platform-hint=auto
|
||||
exec systemd-run --user --unit=slack-flatpak /usr/bin/flatpak run com.slack.Slack
|
||||
|
||||
for_window [app_id="telegramdesktop"] move to workspace $chat_workspace
|
||||
for_window [app_id="org.telegram.desktop"] move to workspace $chat_workspace
|
||||
exec telegram-desktop
|
||||
exec systemd-run --user --unit=telegram /usr/bin/env XDG_CURRENT_DESKTOP=GNOME telegram-desktop
|
||||
|
@ -53,7 +53,7 @@ exec xrdb -load ~/.Xresources
|
||||
exec mako
|
||||
|
||||
# Volume and Brightness notification
|
||||
exec tvolnoti -n -T dark
|
||||
#exec swayosd-server # started via systemd for Restart=always
|
||||
|
||||
# Monitor volume changes
|
||||
exec ~/.bin/volume_subscribe.sh
|
||||
@ -76,6 +76,7 @@ exec swayidle \
|
||||
timeout 300 '$lockcmd' \
|
||||
timeout 600 'swaymsg "output * dpms off"' \
|
||||
resume 'swaymsg "output * dpms on"' \
|
||||
after-resume 'swaymsg "output * enable"' \
|
||||
before-sleep '$lockcmd' \
|
||||
lock '$lockcmd' \
|
||||
unlock 'pkill -9 swaylock'
|
||||
@ -86,18 +87,13 @@ for_window [class="Firefox"] inhibit_idle fullscreen
|
||||
# wayland vesion
|
||||
for_window [app_id="firefox"] inhibit_idle fullscreen
|
||||
|
||||
# Start autotiling script
|
||||
#exec autotiling
|
||||
|
||||
# Lock screen with scroll lock button
|
||||
bindsym Scroll_Lock exec $lockcmd
|
||||
|
||||
# Alt+Tab window switcher
|
||||
bindsym Alt+Tab exec ~/.bin/switch_window.py
|
||||
|
||||
# ClickUp Time Tracker util
|
||||
bindsym $mod+c exec foot --app-id=cucli --title=cucli --window-size-chars=200x40 --working-directory=/home/arti/code/krakul/internal/cucli /home/arti/code/krakul/internal/cucli/venv/bin/cucli
|
||||
for_window [app_id="cucli"] floating enable
|
||||
bindsym $mod+p exec tessen
|
||||
|
||||
# Hack that adds a emoji to all window titles so that title height is somewhat constant
|
||||
# You can read mode about this here https://github.com/swaywm/sway/issues/3114
|
||||
@ -261,8 +257,8 @@ bindsym XF86AudioLowerVolume exec pactl set-sink-volume @DEFAULT_SINK@ -5%
|
||||
bindsym XF86AudioMute exec pactl set-sink-mute @DEFAULT_SINK@ toggle
|
||||
|
||||
#brightness control
|
||||
bindsym XF86MonBrightnessUp exec brightnessctl -m set +5% | cut -d',' -f4 | cut -d'%' -f1 | xargs -n1 tvolnoti-show -s ~/.config/tvolnoti/themes/dark/display_brightness.svg
|
||||
bindsym XF86MonBrightnessDown exec brightnessctl -m set 5%- | cut -d',' -f4 | cut -d'%' -f1 | xargs -n1 tvolnoti-show -s ~/.config/tvolnoti/themes/dark/display_brightness.svg
|
||||
bindsym XF86MonBrightnessUp exec swayosd-client --brightness=+5
|
||||
bindsym XF86MonBrightnessDown exec swayosd-client --brightness=-5
|
||||
|
||||
# Authy 2FA window
|
||||
for_window [title="^Authy$"] floating enable
|
||||
@ -277,9 +273,8 @@ for_window [class="Rofi"] floating enable
|
||||
for_window [instance="Browser" window_role="About"] floating enable
|
||||
for_window [title="Firefox - Jagamise indikaator"] floating enable
|
||||
|
||||
# Work TK app
|
||||
for_window [title="Device Programmer"] floating enable
|
||||
for_window [app_id="eu.krakul.SportScientiaTool"] floating enable
|
||||
# Evolution Alarms window
|
||||
for_window [app_id="evolution-alarm-notify"] floating enable
|
||||
|
||||
|
||||
# JetBrains
|
||||
@ -299,6 +294,7 @@ for_window [title="Microsoft Teams Notification"] move absolute position 0 px 0
|
||||
for_window [title="Slack \| mini panel"] move scratchpad
|
||||
for_window [class="Simplicity Studio™" title="Find\/Replace "] floating enable
|
||||
for_window [app_id="gnome-calculator"] floating enable
|
||||
for_window [class="drata-agent"] move absolute position 2160 px 0 px
|
||||
|
||||
# screenshots
|
||||
bindsym Print exec ~/.bin/wscreenshot.py
|
||||
@ -370,4 +366,7 @@ input 1133:16534:Logitech_ERGO_M575 {
|
||||
|
||||
include /etc/sway/config.d/*
|
||||
exec systemctl --user set-environment XDG_CURRENT_DESKTOP=sway
|
||||
exec systemctl --user set-environment DESKTOP_SESSION=sway
|
||||
exec systemctl --user set-environment XDG_SESSION_DESKTOP=sway
|
||||
exec systemctl --user set-environment XDG_SESSION_TYPE=wayland
|
||||
include autostart
|
||||
|
@ -1,7 +1,14 @@
|
||||
# Work computer
|
||||
exec /usr/bin/swaynag-battery --threshold 5
|
||||
|
||||
set $left_disp "Dell Inc. DELL U2724DE C9YPBP3"
|
||||
set $right_disp "Dell Inc. DELL U2724D J3XFCP3"
|
||||
|
||||
#set $left_disp "Dell Inc. DELL S2721DGF 8SVBP83"
|
||||
output "Dell Inc. DELL S2721DGF 8SVBP83" pos 0 0
|
||||
#set $right_disp "Dell Inc. DELL U2715H GH85D66Q08QS"
|
||||
output "Dell Inc. DELL U2715H GH85D66Q08QS" pos 2560 0
|
||||
|
||||
set $chat_workspace 10
|
||||
|
||||
output $left_disp pos 0 0
|
||||
@ -9,7 +16,7 @@ output $left_disp mode 2560x1440@120.000Hz
|
||||
output $right_disp pos 2560 0
|
||||
output $right_disp mode 2560x1440@120.000Hz
|
||||
|
||||
set $laptop "LG Display 0x06ED Unknown"
|
||||
set $laptop eDP-1
|
||||
bindswitch lid:on output $laptop disable
|
||||
bindswitch lid:off output $laptop enable
|
||||
|
||||
|
@ -5,5 +5,10 @@ exec /usr/bin/swaynag-battery --threshold 5
|
||||
#set $right_disp "Unknown 0x0791 0x00000000"
|
||||
set $chat_workspace 10
|
||||
|
||||
|
||||
set $laptop eDP-1
|
||||
bindswitch lid:on output $laptop disable
|
||||
bindswitch lid:off output $laptop enable
|
||||
|
||||
output $left_disp pos 0 0
|
||||
output $right_disp pos 370 1440
|
||||
|
1
.config/systemd/user/default.target.wants/swayosd-server.service
Symbolic link
1
.config/systemd/user/default.target.wants/swayosd-server.service
Symbolic link
@ -0,0 +1 @@
|
||||
/home/arti/.config/systemd/user/swayosd-server.service
|
11
.config/systemd/user/swayosd-server.service
Normal file
11
.config/systemd/user/swayosd-server.service
Normal file
@ -0,0 +1,11 @@
|
||||
[Unit]
|
||||
Description=SwayOSD Server
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
ExecStart=/usr/bin/swayosd-server
|
||||
Restart=always
|
||||
RestartSec=10s
|
||||
|
||||
[Install]
|
||||
WantedBy=default.target
|
22
.local/share/applications/org.telegram.desktop.desktop
Normal file
22
.local/share/applications/org.telegram.desktop.desktop
Normal file
@ -0,0 +1,22 @@
|
||||
[Desktop Entry]
|
||||
Name=Telegram Desktop
|
||||
Comment=Official desktop version of Telegram messaging app
|
||||
TryExec=env XDG_CURRENT_DESKTOP=GNOME telegram-desktop
|
||||
Exec=env XDG_CURRENT_DESKTOP=GNOME telegram-desktop -- %u
|
||||
Icon=telegram
|
||||
Terminal=false
|
||||
StartupWMClass=TelegramDesktop
|
||||
Type=Application
|
||||
Categories=Chat;Network;InstantMessaging;Qt;
|
||||
MimeType=x-scheme-handler/tg;x-scheme-handler/tonsite;
|
||||
Keywords=tg;chat;im;messaging;messenger;sms;tdesktop;
|
||||
Actions=quit;
|
||||
DBusActivatable=true
|
||||
SingleMainWindow=true
|
||||
X-GNOME-UsesNotifications=true
|
||||
X-GNOME-SingleWindow=true
|
||||
|
||||
[Desktop Action quit]
|
||||
Exec=env XDG_CURRENT_DESKTOP=GNOME telegram-desktop -quit
|
||||
Name=Quit Telegram
|
||||
Icon=application-exit
|
25
.zshrc
25
.zshrc
@ -5,11 +5,8 @@ zmodload zsh/pcre
|
||||
|
||||
# Virtualenv support
|
||||
function _virtual_env_prompt () {
|
||||
# new pyvenv has a seperate variable for custom prompt value
|
||||
REPLY=${VIRTUAL_ENV_PROMPT+${VIRTUAL_ENV_PROMPT}}
|
||||
|
||||
# Try to read the prompt name form pyvenv.cfg
|
||||
if [[ -z "${REPLY}" && -f "$VIRTUAL_ENV/pyvenv.cfg" ]]; then
|
||||
if [[ -f "$VIRTUAL_ENV/pyvenv.cfg" ]]; then
|
||||
# Matches lines with following syntax
|
||||
# prompt = 'cool prompt'
|
||||
# prompt = "cool prompt"
|
||||
@ -32,7 +29,7 @@ function _virtual_env_prompt () {
|
||||
fi
|
||||
fi
|
||||
|
||||
# support old-school virtualenv
|
||||
# fall back to using venv folder name as prompt name
|
||||
if [[ -z "${REPLY}" ]]; then
|
||||
REPLY=${VIRTUAL_ENV+(${VIRTUAL_ENV:t}) }
|
||||
fi
|
||||
@ -251,19 +248,27 @@ else
|
||||
ruby_gem_user_dir=''
|
||||
fi
|
||||
|
||||
# kubectl plugin manager Krew
|
||||
export KREW_ROOT="~/.config/krew"
|
||||
if [[ -d "${KREW_ROOT}/bin" ]]; then
|
||||
krew_bin_path="${KREW_ROOT}/bin"
|
||||
else
|
||||
krew_bin_path=''
|
||||
fi
|
||||
|
||||
|
||||
# ZSH allows $PATH to be used as an array
|
||||
path=(
|
||||
~/.bin
|
||||
~/.local/bin
|
||||
${ruby_gem_user_dir}
|
||||
${krew_bin_path}
|
||||
/usr/bin/site_perl
|
||||
/usr/bin/vendor_perl
|
||||
/usr/bin/core_perl
|
||||
"${ruby_gem_user_dir}"
|
||||
$path
|
||||
)
|
||||
|
||||
export PATH="${KREW_ROOT:-$HOME/.krew}/bin:$PATH"
|
||||
|
||||
HISTSIZE=100000
|
||||
SAVEHIST=100000
|
||||
|
||||
@ -314,6 +319,8 @@ function ssh {
|
||||
|
||||
# i don't like that systemd by default uses a pager
|
||||
export SYSTEMD_PAGER=''
|
||||
# Minio CLI is also stupid
|
||||
export MC_DISABLE_PAGER=1
|
||||
|
||||
# set man max width
|
||||
export MANWIDTH=80
|
||||
@ -328,7 +335,7 @@ fi
|
||||
|
||||
# https://neovim.io/doc/user/various.html#less
|
||||
function vless {
|
||||
/usr/share/nvim/runtime/macros/less.sh $@
|
||||
/usr/share/nvim/runtime/scripts/less.sh $@
|
||||
}
|
||||
|
||||
# If running under windows with pageagent then use it
|
||||
|
Reference in New Issue
Block a user