1
0
Fork 0

Compare commits

...

7 Commits

Author SHA1 Message Date
urosm 71ef2901c3 update `.profile` 2024-03-01 12:52:12 +01:00
urosm 2829e8a26b update `apt` config 2024-03-01 12:51:50 +01:00
urosm 85eaa47392 update `.bashrc` 2024-03-01 12:51:18 +01:00
urosm 1cb9f82d14 update `sway` config 2024-02-28 17:05:49 +01:00
urosm 62e396ceff remove `swaylock` config 2024-02-19 22:01:44 +01:00
urosm e875c7c3a8 remove `swayidle` config 2024-02-19 22:01:28 +01:00
urosm e9b4b41ba7 update `sway` config 2024-02-19 22:01:14 +01:00
8 changed files with 234 additions and 251 deletions

12
.bashrc
View File

@ -3,14 +3,11 @@
# if not running interactively, don't do anything
[ -z "$PS1" ] && return
# title
PS1="\[\e]0;\u@\h:\w\a\]$PS1"
# readline
bind "set editing-mode vi"
bind "set keyseq-timeout 50"
bind "set show-mode-in-prompt on"
bind "set vi-ins-mode-string \1\e[35m\2+\1\e[0m\2"
bind "set vi-ins-mode-string \1\e[01;35m\2+\1\e[0m\2"
bind "set vi-cmd-mode-string :"
bind "set keymap vi-command"
@ -25,9 +22,14 @@ bind "set completion-display-width 0"
bind "set colored-stats on"
bind "set visible-stats on"
# prompt
PS1=" \[\e[1m\]\u@\h\[\e[0m\] \[\e[1;34m\]\w\[\e[0m\] \[\e[1m\]\$\[\e[0m\] "
# title
PS1="\[\e]0;\u@\h:\w\a\]$PS1"
# alias
alias q="exit"
alias e='${EDITOR:-vi}'
alias diff="diff --color=auto"
alias grep="grep --color=auto"
alias ls="ls --color=auto"

View File

@ -1,11 +1,11 @@
deb http://deb.debian.org/debian/ testing main contrib non-free non-free-firmware
deb-src http://deb.debian.org/debian/ testing main contrib non-free non-free-firmware
deb http://deb.debian.org/debian/ testing main non-free-firmware
deb-src http://deb.debian.org/debian/ testing main non-free-firmware
deb http://security.debian.org/debian-security testing-security main contrib non-free non-free-firmware
deb-src http://security.debian.org/debian-security testing-security main contrib non-free non-free-firmware
deb http://security.debian.org/debian-security testing-security main non-free-firmware
deb-src http://security.debian.org/debian-security testing-security main non-free-firmware
deb http://deb.debian.org/debian/ unstable main contrib non-free non-free-firmware
deb-src http://deb.debian.org/debian/ unstable main contrib non-free non-free-firmware
deb http://deb.debian.org/debian/ unstable main non-free-firmware
deb-src http://deb.debian.org/debian/ unstable main non-free-firmware
deb http://deb.debian.org/debian/ experimental main contrib non-free non-free-firmware
deb-src http://deb.debian.org/debian/ experimental main contrib non-free non-free-firmware
deb http://deb.debian.org/debian/ experimental main non-free-firmware
deb-src http://deb.debian.org/debian/ experimental main non-free-firmware

View File

@ -1,183 +1,232 @@
# variables ####################################################################
set $mod Mod4
set $left h
set $down j
set $up k
# set ##########################################################################
# keys
set $mod mod4
set $left h
set $down j
set $up k
set $right l
# workspaces
set $ws1 1:www
set $ws2 2:txt
set $ws3 3:doc
set $ws4 4:pdf
set $ws5 5:cmd
set $ws6 6:cmd
set $ws7 7:cmd
set $ws8 8:cmd
set $ws9 9:cmd
set $ws0 10:rdp
# colors
set $bg #000000
set $dimmed #856cff
set $accent #ff1170
set $error #fa3500
set $black #000000
set $white #e2e2e2
set $blue #856cff
set $magenta #ff1170
set $red #fa3500
# key bindings #################################################################
bindsym $mod+return exec footclient
bindsym $mod+shift+return exec foot
bindsym $mod+w exec firefox
bindsym $mod+shift+w exec thunderbird
# fuzzel
bindsym $mod+space exec fuzzel
bindsym $mod+shift+space exec fuzzel_open.sh\
-e $HOME/.cache\
-e $HOME/.mozilla\
-e $HOME/.thunderbird\
-e *.git*
bindsym $mod+home exec fuzzel_nmcli.sh
bindsym $mod+end exec fuzzel_udisksctl.sh
# makoctl
bindsym $mod+x exec makoctl dismiss
bindsym $mod+shift+x exec makoctl dismiss -a
bindsym --to-code $mod+z exec makoctl restore
# screenshot
bindsym print exec grim - | wl-copy
# workspaces
set $wsw 1:w:www
set $wse 2:e:txt
set $wsr 3:r:doc
set $wst 4:t:cmd
set $wsy 5:y:cmd
set $wsu 6:u:cmd
set $wsi 7:i:cmd
set $wso 8:o:cmd
set $wsp 9:p:rdp
# window management ############################################################
workspace_layout tabbed
focus_follows_mouse yes
focus_wrapping yes
floating_modifier $mod normal
# kill
bindsym $mod+q kill
# move focus
bindsym $mod+$up focus up
bindsym $mod+$down focus down
bindsym $mod+$left focus left
bindsym $mod+$right focus right
# move container
bindsym $mod+shift+$up move up
bindsym $mod+shift+$down move down
bindsym $mod+shift+$left move left
bindsym $mod+shift+$right move right
# move focus workspace
bindsym $mod+1 workspace $ws1
bindsym $mod+2 workspace $ws2
bindsym $mod+3 workspace $ws3
bindsym $mod+4 workspace $ws4
bindsym $mod+5 workspace $ws5
bindsym $mod+6 workspace $ws6
bindsym $mod+7 workspace $ws7
bindsym $mod+8 workspace $ws8
bindsym $mod+9 workspace $ws9
bindsym $mod+0 workspace $ws0
bindsym --to-code $mod+bracketleft workspace prev
bindsym --to-code $mod+bracketright workspace next
bindsym $mod+tab workspace back_and_forth
# move container workspace
bindsym $mod+shift+1 move container to workspace $ws1, workspace $ws1
bindsym $mod+shift+2 move container to workspace $ws2, workspace $ws2
bindsym $mod+shift+3 move container to workspace $ws3, workspace $ws3
bindsym $mod+shift+4 move container to workspace $ws4, workspace $ws4
bindsym $mod+shift+5 move container to workspace $ws5, workspace $ws5
bindsym $mod+shift+6 move container to workspace $ws6, workspace $ws6
bindsym $mod+shift+7 move container to workspace $ws7, workspace $ws7
bindsym $mod+shift+8 move container to workspace $ws8, workspace $ws8
bindsym $mod+shift+9 move container to workspace $ws9, workspace $ws9
bindsym $mod+shift+0 move container to workspace $ws0, workspace $ws0
bindsym --to-code $mod+shift+bracketleft move container to workspace prev, workspace prev
bindsym --to-code $mod+shift+bracketright move container to workspace next, workspace next
bindsym $mod+shift+tab move container to workspace back_and_forth, workspace back_and_forth
# resize
bindsym $mod+control+$left resize shrink width
bindsym $mod+control+$down resize grow height
bindsym $mod+control+$up resize shrink height
bindsym $mod+control+$right resize grow width
# layout
bindsym $mod+a focus parent
bindsym $mod+shift+a focus child
bindsym $mod+s layout toggle split
bindsym $mod+shift+s split toggle
bindsym $mod+d layout toggle tabbed split
bindsym $mod+f fullscreen toggle
bindsym $mod+shift+f floating toggle
bindsym $mod+g focus mode_toggle
bindsym $mod+shift+g sticky toggle
bindsym $mod+period scratchpad show
bindsym $mod+shift+period move scratchpad
# modes
set $session_mode " session: (r)eload (l)ock (q)uit (s)uspend re(b)oot (p)oweroff "
set $layout_mode " layout: split(h) split(v) (s)tacking (t)abbed "
# laptop #######################################################################
bindsym XF86AudioRaiseVolume exec wpctl set-volume @DEFAULT_AUDIO_SINK@ 1%+;\
exec notify-send -e -t 2000 -h string:x-canonical-private-synchronous:audio_sink "$(wpctl get-volume @DEFAULT_AUDIO_SINK@)"
bindsym XF86AudioLowerVolume exec wpctl set-volume @DEFAULT_AUDIO_SINK@ 1%-;\
exec notify-send -e -t 2000 -h string:x-canonical-private-synchronous:audio_sink "$(wpctl get-volume @DEFAULT_AUDIO_SINK@)"
bindsym XF86AudioMute exec wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle;\
exec notify-send -e -t 2000 -h string:x-canonical-private-synchronous:audio_sink "$(wpctl get-volume @DEFAULT_AUDIO_SINK@)"
bindsym XF86AudioMicMute exec wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle;\
exec notify-send -e -t 2000 -h string:x-canonical-private-synchronous:audio_source "$(wpctl get-volume @DEFAULT_AUDIO_SOURCE@)"
bindsym XF86MonBrightnessUp exec brightnessctl set "+1%";\
exec notify-send -e -t 2000 -h string:x-canonical-private-synchronous:brightness "Brightness: $(brightnessctl get)"
bindsym XF86MonBrightnessDown exec brightnessctl set "1%-";\
exec notify-send -e -t 2000 -h string:x-canonical-private-synchronous:brightness "Brightness: $(brightnessctl get)"
bindsym shift+XF86MonBrightnessUp exec brightnessctl set "+10%";\
exec notify-send -e -t 2000 -h string:x-canonical-private-synchronous:brightness "Brightness: $(brightnessctl get)"
bindsym shift+XF86MonBrightnessDown exec brightnessctl set "10%-";\
exec notify-send -e -t 2000 -h string:x-canonical-private-synchronous:brightness "Brightness: $(brightnessctl get)"
# session ######################################################################
set $session_mode "session: (r)eload (l)ock (q)uit (s)uspend re(b)oot (p)oweroff"
mode $session_mode {
bindsym r reload, mode default
bindsym l exec swaylock, mode default
bindsym q exit, mode default
bindsym s exec systemctl suspend, mode default
bindsym b exec systemctl reboot, mode default
bindsym p exec systemctl poweroff, mode default
# return
bindsym escape mode default
bindsym $mod+escape mode default
}
bindsym $mod+escape mode $session_mode, fullscreen disable
# theme ########################################################################
output * background $bg solid_color
seat * hide_cursor 5000
font monospace 12
default_border normal 1
default_floating_border normal 1
# class border background text indicator child_border
client.focused $accent $accent $bg $error $bg
client.focused_inactive $dimmed $dimmed $bg $bg $bg
client.unfocused $dimmed $dimmed $bg $bg $bg
client.urgent $error $error $bg $error $bg
# statusbar ####################################################################
# bar ##########################################################################
bar {
status_command status.sh
separator_symbol " | "
separator_symbol ""
status_command status.sh
status_edge_padding 0
status_padding 0
strip_workspace_numbers yes
wrap_scroll yes
colors {
background $bg
statusline $dimmed
separator $dimmed
# border background text
focused_workspace $bg $bg $accent
active_workspace $dimmed $bg $dimmed
inactive_workspace $bg $bg $dimmed
urgent_workspace $bg $bg $error
background $blue
statusline $black
separator $black
# border background text
focused_workspace $magenta $magenta $black
active_workspace $magenta $magenta $white
inactive_workspace $blue $blue $black
urgent_workspace $red $red $black
}
}
# workspace_layout #############################################################
workspace_layout tabbed
# xwayland #####################################################################
xwayland disable
# autostart ####################################################################
exec swayidle
exec mako
exec wlsunset -l 45 -L 15
workspace $ws1, exec thunderbird, exec firefox
workspace $ws2, exec foot --server
# bindsym ######################################################################
bindsym {
# floating
$mod+shift+f floating toggle
exec systemctl --user import-environment DISPLAY WAYLAND_DISPLAY SWAYSOCK
exec dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK
# focus
$mod+$up focus up
$mod+$down focus down
$mod+$left focus left
$mod+$right focus right
$mod+a focus parent
$mod+s focus child
$mod+g focus mode_toggle
# include ######################################################################
include $XDG_CONFIG_HOME/sway/`hostname`
# fullscreen
$mod+f fullscreen toggle
# mode
$mod+d mode $layout_mode, fullscreen disable
$mod+escape mode $session_mode, fullscreen disable
# move
$mod+shift+$up move up
$mod+shift+$down move down
$mod+shift+$left move left
$mod+shift+$right move right
--to-code $mod+shift+tab move workspace back_and_forth, workspace back_and_forth
--to-code $mod+shift+w move workspace $wsw, workspace $wsw
--to-code $mod+shift+e move workspace $wse, workspace $wse
--to-code $mod+shift+r move workspace $wsr, workspace $wsr
--to-code $mod+shift+t move workspace $wst, workspace $wst
--to-code $mod+shift+y move workspace $wsy, workspace $wsy
--to-code $mod+shift+u move workspace $wsu, workspace $wsu
--to-code $mod+shift+i move workspace $wsi, workspace $wsi
--to-code $mod+shift+o move workspace $wso, workspace $wso
--to-code $mod+shift+p move workspace $wsp, workspace $wsp
--to-code $mod+shift+bracketleft move workspace prev, workspace prev
--to-code $mod+shift+bracketright move workspace next, workspace next
$mod+colon move scratchpad
# scratchpad
$mod+semicolon scratchpad show
# sticky
$mod+shift+g sticky toggle
# exec
$mod+return exec footclient
$mod+shift+return exec foot
$mod+space exec fuzzel
$mod+shift+space exec fuzzel_open.sh -e $HOME/.cache -e $HOME/.mozilla -e $HOME/.thunderbird -e *.git*
$mod+home exec fuzzel_nmcli.sh
$mod+end exec fuzzel_udisksctl.sh
$mod+x exec makoctl dismiss
$mod+shift+x exec makoctl restore
print exec grim - | wl-copy
# exec (laptop)
XF86AudioRaiseVolume exec wpctl set-volume @DEFAULT_AUDIO_SINK@ 1%+; exec notify-send -e -t 2000 -h string:x-canonical-private-synchronous:audio_sink "$(wpctl get-volume @DEFAULT_AUDIO_SINK@)"
XF86AudioLowerVolume exec wpctl set-volume @DEFAULT_AUDIO_SINK@ 1%-; exec notify-send -e -t 2000 -h string:x-canonical-private-synchronous:audio_sink "$(wpctl get-volume @DEFAULT_AUDIO_SINK@)"
XF86AudioMute exec wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle; exec notify-send -e -t 2000 -h string:x-canonical-private-synchronous:audio_sink "$(wpctl get-volume @DEFAULT_AUDIO_SINK@)"
XF86AudioMicMute exec wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle; exec notify-send -e -t 2000 -h string:x-canonical-private-synchronous:audio_source "$(wpctl get-volume @DEFAULT_AUDIO_SOURCE@)"
XF86MonBrightnessUp exec brightnessctl set "+1%"; exec notify-send -e -t 2000 -h string:x-canonical-private-synchronous:brightness "Brightness: $(brightnessctl get)"
XF86MonBrightnessDown exec brightnessctl set "1%-"; exec notify-send -e -t 2000 -h string:x-canonical-private-synchronous:brightness "Brightness: $(brightnessctl get)"
shift+XF86MonBrightnessUp exec brightnessctl set "+10%"; exec notify-send -e -t 2000 -h string:x-canonical-private-synchronous:brightness "Brightness: $(brightnessctl get)"
shift+XF86MonBrightnessDown exec brightnessctl set "10%-"; exec notify-send -e -t 2000 -h string:x-canonical-private-synchronous:brightness "Brightness: $(brightnessctl get)"
# kill
$mod+q kill
# resize
$mod+control+$left resize shrink width
$mod+control+$down resize grow height
$mod+control+$up resize shrink height
$mod+control+$right resize grow width
# workspace
--to-code $mod+tab workspace back_and_forth
--to-code $mod+w workspace $wsw
--to-code $mod+e workspace $wse
--to-code $mod+r workspace $wsr
--to-code $mod+t workspace $wst
--to-code $mod+y workspace $wsy
--to-code $mod+u workspace $wsu
--to-code $mod+i workspace $wsi
--to-code $mod+o workspace $wso
--to-code $mod+p workspace $wsp
--to-code $mod+bracketleft workspace prev
--to-code $mod+bracketright workspace next
}
# client.* #####################################################################
# class border background text indicator child_border
client.focused $magenta $magenta $black $red $black
client.focused_inactive $blue $blue $black $black $black
client.unfocused $blue $blue $black $black $black
client.urgent $red $red $black $red $black
# default_border ###############################################################
default_border normal 0
# default_floating_border ######################################################
default_floating_border normal 0
# exec #########################################################################
exec {
systemctl --user import-environment DISPLAY WAYLAND_DISPLAY SWAYSOCK
dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK
swayidle -w \
timeout 300 'swaylock -fu -c$blue' \
timeout 600 'swaymsg "output * power off"' resume 'swaymsg "output * power on"' \
before-sleep 'swaylock -fu -c$blue'
wlsunset -l 45 -L 15
mako
foot --server
firefox
thunderbird
}
# focus_wrapping ###############################################################
focus_wrapping yes
# font #########################################################################
font monospace 13
# input ########################################################################
# keyboard
input "type:keyboard" {
xkb_layout us,si
xkb_options caps:escape,grp:alt_shift_toggle
repeat_delay 200
repeat_rate 30
}
# touchpad
input "type:touchpad" {
tap enabled
}
# mode #########################################################################
# session
mode $session_mode {
bindsym {
r reload, mode default
l exec swaylock -fu -c$blue, mode default
q exit, mode default
s exec systemctl suspend, mode default
b exec systemctl reboot, mode default
p exec systemctl poweroff, mode default
escape mode default
}
}
# layout
mode $layout_mode {
bindsym {
h layout splith, mode default
v layout splitv, mode default
s layout stacking, mode default
t layout tabbed, mode default
escape mode default
}
}
# seat #########################################################################
seat * hide_cursor 1000
# output #######################################################################
output * background $blue solid_color
# workspace ####################################################################
workspace $wse

View File

@ -1,15 +0,0 @@
# output
output * {
adaptive_sync on
}
# input
input "type:keyboard" {
xkb_layout us,si
xkb_options caps:escape,grp:alt_shift_toggle
repeat_delay 200
repeat_rate 30
}
input "type:touchpad" {
tap enabled
}

View File

@ -1,16 +0,0 @@
# clamshell
set $laptop LVDS-1
bindswitch --reload --locked lid:on output $laptop disable
bindswitch --reload --locked lid:off output $laptop enable
# input
input "type:keyboard" {
xkb_layout us,si
xkb_options caps:escape,grp:alt_shift_toggle
xkb_numlock enabled
repeat_delay 300
repeat_rate 30
}
input "type:touchpad" {
tap enabled
}

View File

@ -1,3 +0,0 @@
timeout 300 'swaylock'
timeout 1800 'swaymsg "output * dpms off"' resume 'swaymsg "output * dpms on"'
before-sleep 'swaylock'

View File

@ -1,34 +0,0 @@
no-unlock-indicator
show-failed-attempts
daemonize
color=000000
bs-hl-color=00000000
caps-lock-bs-hl-color=00000000
caps-lock-key-hl-color=00000000
font=monospace
font-size=12
inside-color=00000000
inside-clear-color=00000000
inside-caps-lock-color=00000000
inside-ver-color=00000000
inside-wrong-color=00000000
key-hl-color=00000000
layout-bg-color=00000000
layout-border-color=00000000
layout-text-color=856cff
line-color=00000000
line-clear-color=00000000
line-caps-lock-color=00000000
line-ver-color=00000000
line-wrong-color=00000000
ring-color=00000000
ring-clear-color=00000000
ring-caps-lock-color=00000000
ring-ver-color=00000000
ring-wrong-color=00000000
separator-color=00000000
text-color=856cff
text-clear-color=d06600
text-caps-lock-color=856cff
text-ver-color=d06600
text-wrong-color=fa3500

View File

@ -9,7 +9,7 @@ if [ -n "$BASH_VERSION" ]; then
fi
# set PATH so it includes user's private bin if it exists
if [ -d "$HOME/bin" ] ; then
if [ -d "$HOME/bin" ]; then
PATH="$HOME/bin:$PATH"
fi
@ -81,7 +81,7 @@ export OPAMROOT=$XDG_DATA_HOME/opam
export EDITOR=vi
# desktop
if [ "$(tty)" = "/dev/tty1" ] && command -v sway &>/dev/null; then
if [ "$(tty)" = "/dev/tty1" ] && command -v sway >/dev/null; then
# locale
export LANG=sl_SI.UTF-8
export LC_MESSAGES=en_US.UTF-8