kanshi, python swayidle, zsh title
This commit is contained in:
11
.config/kanshi/config
Normal file
11
.config/kanshi/config
Normal file
@ -0,0 +1,11 @@
|
||||
profile Home {
|
||||
output eDP-1 mode 1920x1080@60Hz position 1920,0
|
||||
output DP-3 mode 1920x1080@60Hz position 3830,0
|
||||
output DP-4 mode 1920x1080@60Hz position 0,0
|
||||
}
|
||||
|
||||
profile HomeAS {
|
||||
output eDP-1 mode 1920x1080@60Hz position 1920,0
|
||||
output DP-5 mode 1920x1080@60Hz position 3830,0
|
||||
output DP-6 mode 1920x1080@60Hz position 0,0
|
||||
}
|
@ -1,7 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
swaylock --daemonize \
|
||||
--indicator-radius 100 \
|
||||
swaylock --indicator-radius 100 \
|
||||
--indicator-thickness 12 \
|
||||
--ring-color 2E3440 \
|
||||
--key-hl-color ECEFF4 \
|
||||
|
68
.config/sway/bin/swayidle-conf
Executable file
68
.config/sway/bin/swayidle-conf
Executable file
@ -0,0 +1,68 @@
|
||||
#!/usr/bin/python3
|
||||
|
||||
import yaml
|
||||
import sys
|
||||
import os
|
||||
|
||||
config_files = [
|
||||
'/etc/sway/idle.yml',
|
||||
os.path.expanduser('~/.config/sway/idle.yml'),
|
||||
]
|
||||
|
||||
env_config = os.environ.get('SWAYIDLE_CONFIG')
|
||||
if env_config is not None:
|
||||
config_files += env_config
|
||||
|
||||
options = {
|
||||
'debug': '-d',
|
||||
'wait': '-w',
|
||||
}
|
||||
|
||||
config = {}
|
||||
|
||||
found = False
|
||||
for f in config_files:
|
||||
if not os.path.isfile(f):
|
||||
continue
|
||||
found = True
|
||||
try:
|
||||
with open(f) as conf:
|
||||
newconf = yaml.load(conf, yaml.SafeLoader)
|
||||
config.update(newconf)
|
||||
except Exception as e:
|
||||
sys.stderr('{}: Could not load {} ({})'.format(sys.argv[0], f, e))
|
||||
sys.stderr.flush()
|
||||
|
||||
if not found:
|
||||
sys.stderr('{}: WARNING: No config file found'.format(sys.argv[0]))
|
||||
sys.stderr.flush()
|
||||
|
||||
args = ['swayidle']
|
||||
|
||||
for k in config:
|
||||
c = config[k]
|
||||
if c is None or c is False or c is []:
|
||||
continue
|
||||
|
||||
if k == 'timeouts':
|
||||
for t in c:
|
||||
args.append('timeout')
|
||||
args.append(str(t['timeout']))
|
||||
args.append(t['command'])
|
||||
if 'resume' in t:
|
||||
args.append('resume')
|
||||
args.append(t['resume'])
|
||||
|
||||
continue
|
||||
|
||||
if k in options and c:
|
||||
args.append(options[k])
|
||||
continue
|
||||
|
||||
args.append(k)
|
||||
args.append(c)
|
||||
|
||||
args.extend(sys.argv[1:])
|
||||
|
||||
os.execvp('swayidle', args)
|
||||
|
11
.config/sway/idle.yml
Normal file
11
.config/sway/idle.yml
Normal file
@ -0,0 +1,11 @@
|
||||
---
|
||||
debug: false
|
||||
wait: true
|
||||
timeouts:
|
||||
- timeout: 300
|
||||
command: 'swaylock -f -c 000000'
|
||||
- timeout: 600
|
||||
command: 'swaymsg "output * dpms off"'
|
||||
resume: 'swaymsg "output * dpms on"'
|
||||
before-sleep: 'swaylock -f -c 000000'
|
||||
|
@ -1,2 +1,6 @@
|
||||
#general
|
||||
set $BIN_DIR ~/.config/sway/bin
|
||||
set $BIN_DIR ~/.config/sway/bin
|
||||
set $laptop eDP-1
|
||||
|
||||
bindswitch --reload --locked lid:on output $laptop disable
|
||||
bindswitch --reload --locked lid:off output $laptop enable
|
@ -27,4 +27,4 @@ client.unfocused $color2 $background $color1 $color2 $color2
|
||||
client.urgent $foreground $background $color7 $foreground $foreground
|
||||
|
||||
|
||||
output * bg ~/Wallpapers/deusex.jpg fill
|
||||
# output * bg ~/Wallpapers/deusex.jpg fill
|
@ -7,19 +7,19 @@
|
||||
|
||||
|
||||
|
||||
output "eDP-1" {
|
||||
mode 1920x1080@60Hz
|
||||
pos 1920 0
|
||||
transform normal
|
||||
}
|
||||
output "DP-3" {
|
||||
mode 1920x1080@60Hz
|
||||
pos 3840 0
|
||||
transform normal
|
||||
}
|
||||
output "DP-4" {
|
||||
mode 1920x1080@60Hz
|
||||
pos 0 0
|
||||
transform normal
|
||||
}
|
||||
# output "eDP-1" {
|
||||
# mode 1920x1080@60Hz
|
||||
# pos 1920 0
|
||||
# transform normal
|
||||
# }
|
||||
# output "DP-3" {
|
||||
# mode 1920x1080@60Hz
|
||||
# pos 3840 0
|
||||
# transform normal
|
||||
# }
|
||||
# output "DP-4" {
|
||||
# mode 1920x1080@60Hz
|
||||
# pos 0 0
|
||||
# transform normal
|
||||
# }
|
||||
|
||||
|
@ -138,6 +138,8 @@ mode "resize" {
|
||||
}
|
||||
bindsym $mod+r mode "resize"
|
||||
|
||||
## Lock screen
|
||||
bindsym $mod+z exec ~/.config/sway/bin/lock.sh
|
||||
|
||||
## Screenshot // Screenshot active display // <Print> ##
|
||||
#bindsym Print exec $BIN_DIR/screenshots.sh display
|
||||
@ -172,12 +174,23 @@ bindsym --locked XF86AudioMute exec volumectl toggle
|
||||
## Modify // Mic mute // <XF86AudioMicMute> ##
|
||||
bindsym --locked XF86AudioMicMute exec amixer -D pulse sset Capture toggle && notify-send -t 1000 "Microphone state toggled"
|
||||
|
||||
|
||||
bindsym XF86AudioPlay exec volumectl down
|
||||
|
||||
# bindsym XF86AudioRaiseVolume exec volumectl raise
|
||||
# bindsym XF86AudioLowerVolume exec volumectl lower
|
||||
# bindsym XF86AudioMute exec volumectl mute
|
||||
# bindsym XF86AudioMicMute exec volumectl mute --mic
|
||||
|
||||
# bindsym XF86MonBrightnessUp exec lightctl raise
|
||||
# bindsym XF86MonBrightnessDown exec lightctl lower
|
||||
|
||||
|
||||
## Notifications // Dismiss notification // <Alt><Space> ##
|
||||
bindsym $alt+space exec makoctl dismiss
|
||||
## Notifications // Dismiss all notifications // <Shift><Alt><Space> ##
|
||||
bindsym Shift+$alt+space exec makoctl dismiss --all
|
||||
|
||||
|
||||
## Launch // Screen sharing // <> x ##
|
||||
bindsym $mod+x exec $BIN_DIR/dmenuscreenshare.sh
|
||||
|
||||
|
@ -2,6 +2,8 @@ exec --no-startup-id swaymsg 'workspace 1; exec $TERMINAL; workspace 2; exec bra
|
||||
|
||||
exec wl-paste -t text --watch clipman store
|
||||
exec nm-applet --indicator
|
||||
exec blueman-applet
|
||||
|
||||
|
||||
set $gnome-schema org.gnome.desktop.interface
|
||||
exec_always {
|
||||
|
14
.config/systemd/user/kanshi.service
Normal file
14
.config/systemd/user/kanshi.service
Normal file
@ -0,0 +1,14 @@
|
||||
[Unit]
|
||||
Description=Dynamic output configuration
|
||||
Documentation=man:kanshi(1)
|
||||
PartOf=sway-session.target
|
||||
Requires=sway-session.target
|
||||
After=sway-session.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
ExecStart=/usr/bin/kanshi
|
||||
Restart=always
|
||||
|
||||
[Install]
|
||||
WantedBy=sway-session.target
|
1
.config/systemd/user/sway-session.target.wants/kanshi.service
Symbolic link
1
.config/systemd/user/sway-session.target.wants/kanshi.service
Symbolic link
@ -0,0 +1 @@
|
||||
/home/paramah/.config/systemd/user/kanshi.service
|
@ -1 +0,0 @@
|
||||
/home/paramah/.config/systemd/user/swayidle.service
|
@ -2,14 +2,13 @@
|
||||
Description=Idle manager for Wayland
|
||||
Documentation=man:swayidle(1)
|
||||
PartOf=sway-session.target
|
||||
Requires=sway-session.target
|
||||
After=sway-session.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
ExecStart=/usr/bin/swayidle -w timeout 300 '%h/.config/sway/bin/lock.sh' timeout 600 'swaymsg "output * dpms off"' resume 'swaymsg "output * dpms on"' before-sleep '%h/.config/sway/bin/lock.sh'
|
||||
ExecStop=/bin/kill -2 $MAINPID
|
||||
Restart=on-failure
|
||||
RestartSec=1
|
||||
TimeoutStopSec=10
|
||||
ExecStart=/home/paramah/.config/sway/bin/swayidle-conf
|
||||
Restart=always
|
||||
|
||||
[Install]
|
||||
WantedBy=sway-session.target
|
||||
|
1
.config/systemd/user/wayland-session.target.wants/kanshi.service
Symbolic link
1
.config/systemd/user/wayland-session.target.wants/kanshi.service
Symbolic link
@ -0,0 +1 @@
|
||||
/home/paramah/.config/systemd/user/kanshi.service
|
@ -125,6 +125,9 @@
|
||||
"modules-center": [
|
||||
],
|
||||
"modules-right": [
|
||||
"custom/left-arrow-dark",
|
||||
"custom/rsyncnet",
|
||||
"custom/left-arrow-light",
|
||||
"custom/left-arrow-dark",
|
||||
"tray"
|
||||
],
|
||||
@ -181,6 +184,14 @@
|
||||
"exec": "$HOME/.config/waybar/bin/sensor.sh pm10"
|
||||
},
|
||||
|
||||
"custom/rsyncnet": {
|
||||
"format": "{}",
|
||||
"return-type": "text",
|
||||
"interval": 60,
|
||||
"exec": "cat /tmp/rsync.net"
|
||||
},
|
||||
|
||||
|
||||
"battery": {
|
||||
"states": {
|
||||
"good": 95,
|
||||
|
@ -1,19 +1,19 @@
|
||||
@import "../../.cache/wal/colors-waybar.css";
|
||||
|
||||
* {
|
||||
font-size: 10px;
|
||||
font-size: 12px;
|
||||
font-family: Terminus;
|
||||
}
|
||||
|
||||
window#waybar {
|
||||
background: none;
|
||||
background: @back;
|
||||
color: @dark;
|
||||
}
|
||||
|
||||
#custom-right-arrow-dark,
|
||||
#custom-left-arrow-dark {
|
||||
color: @dark;
|
||||
background: none;
|
||||
background: @back;
|
||||
}
|
||||
#custom-right-arrow-light,
|
||||
#custom-left-arrow-light {
|
||||
@ -44,6 +44,7 @@ window#waybar {
|
||||
padding: 0 10px 0 10px;
|
||||
}
|
||||
|
||||
#custom-rsyncnet,
|
||||
#custom-temperature,
|
||||
#custom-hum,
|
||||
#custom-pressure,
|
||||
|
16
.zshrc
16
.zshrc
@ -210,7 +210,7 @@ mattermost-desktop () { # launch telegram and send it to scratchpad
|
||||
|
||||
theme () {
|
||||
wal -qi $WALLPAPER
|
||||
swaybg --bg-scale $WALLPAPER
|
||||
setwallpaper $WALLPAPER
|
||||
cp ~/.cache/wal/mako ~/.config/mako/config
|
||||
systemctl --user restart mako
|
||||
systemctl --user restart waybar
|
||||
@ -337,3 +337,17 @@ export PAGER=bat
|
||||
|
||||
alias ls="exa"
|
||||
#cat ~/.ideas
|
||||
#
|
||||
|
||||
if [[ "${TERM}" != "" && "${TERM}" == "xterm-256color" ]]
|
||||
then
|
||||
precmd()
|
||||
{
|
||||
print -Pn "\e]0;%~\a"
|
||||
}
|
||||
|
||||
preexec()
|
||||
{
|
||||
echo -en "\e]0;$(id --user --name)@$(hostname): ${1}\a"
|
||||
}
|
||||
fi
|
||||
|
Reference in New Issue
Block a user