finalize sway conf
This commit is contained in:
@@ -5,9 +5,6 @@ dots for my lenovo yoga slim 7i pro 「itomori」, managed with =gnu stow=.
|
|||||||
Files can be =stow='ed and un'=stow='ed with =stow.sh=.
|
Files can be =stow='ed and un'=stow='ed with =stow.sh=.
|
||||||
It will link all dotfiles to their correct place.
|
It will link all dotfiles to their correct place.
|
||||||
|
|
||||||
* dotfiles
|
|
||||||
All files in =files/= are currently being used and =stow='ed.
|
|
||||||
|
|
||||||
* fonts
|
* fonts
|
||||||
Should be installed manually or via system package manager.
|
Should be installed manually or via system package manager.
|
||||||
Fallsback are provided in =fallback-fonts/=
|
Fallsback are provided in =fallback-fonts/=
|
||||||
@@ -20,9 +17,5 @@ Fallsback are provided in =fallback-fonts/=
|
|||||||
- =ripgrep-all=
|
- =ripgrep-all=
|
||||||
- =wlogout=
|
- =wlogout=
|
||||||
- =bemenu=
|
- =bemenu=
|
||||||
- =wayshot=
|
- =slurp=, =grim=, =swappy=
|
||||||
- =slurp=
|
|
||||||
- =SwayNotificationCenter=
|
- =SwayNotificationCenter=
|
||||||
|
|
||||||
* legacy packages
|
|
||||||
+ fcitx5 (=fcitx5 fcitx5-configtool fcitx5-gtk fcitx5-mozc fcitx5-qt=)
|
|
||||||
|
|||||||
@@ -561,7 +561,7 @@ I need my =hjkl= :(
|
|||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
*** org-screenshot
|
*** org-screenshot
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp :tangle no
|
||||||
(use-package org-attach-screenshot
|
(use-package org-attach-screenshot
|
||||||
:straight t
|
:straight t
|
||||||
:config (setq org-attach-screenshot-command-line "gnome-screenshot -a -f %f"
|
:config (setq org-attach-screenshot-command-line "gnome-screenshot -a -f %f"
|
||||||
|
|||||||
@@ -1,7 +1,21 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
date=$(date +'%A, %d.%m %R')
|
date=$(date +'%A, %d.%m %R')
|
||||||
|
|
||||||
battery=$(cat /sys/class/power_supply/BAT1/capacity)
|
battery=$(cat /sys/class/power_supply/BAT1/capacity)
|
||||||
|
|
||||||
echo $battery"% <> "$date" <>"
|
if [ $(cat /sys/bus/platform/drivers/ideapad_acpi/VPC2004:00/conservation_mode) = '1' ]; then
|
||||||
|
conservation='on'
|
||||||
|
else
|
||||||
|
conservation='off'
|
||||||
|
fi
|
||||||
|
|
||||||
|
wifi=$(iwgetid -r)
|
||||||
|
if [ -z $wifi ]; then
|
||||||
|
wifi='no wifi'
|
||||||
|
fi
|
||||||
|
|
||||||
|
powermode=$(cat /sys/firmware/acpi/platform_profile)
|
||||||
|
|
||||||
|
sep='-'
|
||||||
|
echo $battery"% "$conservation $sep $powermode $sep $wifi $sep $date
|
||||||
|
|||||||
@@ -37,12 +37,6 @@ client.focused_inactive $baseA2 $baseA2 $baseB2 $violet
|
|||||||
client.unfocused $baseA2 $baseA2 $baseB1 $baseA1
|
client.unfocused $baseA2 $baseA2 $baseB1 $baseA1
|
||||||
client.urgent $yellow $yellow $baseB3 $orange
|
client.urgent $yellow $yellow $baseB3 $orange
|
||||||
|
|
||||||
# Terminal
|
|
||||||
set $term gnome-terminal
|
|
||||||
|
|
||||||
# Application Launcer
|
|
||||||
set $menu dmenu_path | bemenu -l 5 --tf "#859900" --hf "#859900" --nb "#002b36" --hb "#002b36" --tb "#002b36" --fb "#002b36" --fn "JuliaMono 13" | xargs swaymsg exec --
|
|
||||||
|
|
||||||
# Output configuration
|
# Output configuration
|
||||||
set $laptop eDP-1
|
set $laptop eDP-1
|
||||||
|
|
||||||
@@ -52,10 +46,12 @@ bindswitch --reload --locked lid:on output $laptop disable
|
|||||||
bindswitch --reload --locked lid:off output $laptop enable
|
bindswitch --reload --locked lid:off output $laptop enable
|
||||||
|
|
||||||
# Idle configuration
|
# Idle configuration
|
||||||
# exec swayidle -w \
|
# Lock after 20 minutes
|
||||||
# timeout 300 'swaylock -f -c 000000' \
|
# Suspend after 30 minutes
|
||||||
# timeout 600 'swaymsg "output * dpms off"' resume 'swaymsg "output * dpms on"' \
|
exec swayidle -w \
|
||||||
# before-sleep 'swaylock -f -c 000000'
|
timeout 1200 'swaylock -f' \
|
||||||
|
timeout 1800 'swaymsg "output * dpms off"' resume 'swaymsg "output * dpms on"' \
|
||||||
|
before-sleep 'swaylock -f'
|
||||||
|
|
||||||
# Input configuration
|
# Input configuration
|
||||||
input type:pointer {
|
input type:pointer {
|
||||||
@@ -69,26 +65,27 @@ input type:keyboard {
|
|||||||
|
|
||||||
# Key bindings
|
# Key bindings
|
||||||
# Basics:
|
# Basics:
|
||||||
# Start a terminal
|
# Floating
|
||||||
bindsym $mod+Return exec $term
|
floating_modifier $mod normal
|
||||||
|
|
||||||
|
# Terminal
|
||||||
|
bindsym $mod+Return exec gnome-terminal
|
||||||
|
|
||||||
# Kill focused window
|
# Kill focused window
|
||||||
bindsym $mod+Shift+Backspace kill
|
bindsym $mod+Shift+Backspace kill
|
||||||
|
|
||||||
# Start your launcher
|
# Application launcher
|
||||||
bindsym $mod+d exec $menu
|
bindsym $mod+d exec dmenu_path | bemenu -l 5 --tf "#859900" --hf "#859900" --nb "#002b36" --hb "#002b36" --tb "#002b36" --fb "#002b36" --fn "JuliaMono 13" | xargs swaymsg exec --
|
||||||
|
|
||||||
# Floating
|
|
||||||
floating_modifier $mod normal
|
|
||||||
|
|
||||||
# Screenshot
|
# Screenshot
|
||||||
bindsym $mod+Shift+s exec wayshot -s "$(slurp -f '%x %y %w %h')" --stdout | wl-copy
|
# bindsym $mod+Shift+s exec wayshot -s "$(slurp -f '%x %y %w %h')" --stdout | wl-copy
|
||||||
|
bindsym $mod+Shift+s exec grim -g "$(slurp)" - | swappy -f -
|
||||||
|
|
||||||
# Reload the configuration file
|
# Reload the configuration file
|
||||||
bindsym $mod+Shift+r reload
|
bindsym $mod+Shift+r reload
|
||||||
|
|
||||||
# Logout etc
|
# Logout etc
|
||||||
bindsym $mod+Backspace exec wlogout
|
bindsym $mod+Ctrl+Backspace exec wlogout
|
||||||
|
|
||||||
# Show notifications
|
# Show notifications
|
||||||
bindsym $mod+v exec swaync-client -t -sw
|
bindsym $mod+v exec swaync-client -t -sw
|
||||||
@@ -98,9 +95,13 @@ input type:keyboard {
|
|||||||
bindsym XF86MonBrightnessDown exec light -U 10
|
bindsym XF86MonBrightnessDown exec light -U 10
|
||||||
|
|
||||||
# Audio
|
# Audio
|
||||||
bindsym XF86AudioPlay exec pactl set-sink-mute @DEFAULT_SINK@ toggle
|
bindsym XF86AudioPlay exec playerctl play-pause
|
||||||
|
bindsym XF86AudioPrev exec playerctl previous
|
||||||
|
bindsym XF86AudioNext exec playerctl next
|
||||||
bindsym XF86AudioRaiseVolume exec pactl set-sink-volume @DEFAULT_SINK@ +5%
|
bindsym XF86AudioRaiseVolume exec pactl set-sink-volume @DEFAULT_SINK@ +5%
|
||||||
bindsym XF86AudioLowerVolume exec pactl set-sink-volume @DEFAULT_SINK@ -5%
|
bindsym XF86AudioLowerVolume exec pactl set-sink-volume @DEFAULT_SINK@ -5%
|
||||||
|
bindsym XF86AudioMicMute exec pactl set-source-mute @DEFAULT_SOURCE@ toggle
|
||||||
|
bindsym XF86AudioMute exec pactl set-sink-mute @DEFAULT_SINK@ toggle
|
||||||
|
|
||||||
# Moving around:
|
# Moving around:
|
||||||
# Move your focus around
|
# Move your focus around
|
||||||
@@ -126,28 +127,39 @@ input type:keyboard {
|
|||||||
bindsym $mod+Shift+Right move right
|
bindsym $mod+Shift+Right move right
|
||||||
|
|
||||||
# Workspaces:
|
# Workspaces:
|
||||||
|
# Declare workspaces
|
||||||
|
set $ws1 '1'
|
||||||
|
set $ws2 '2'
|
||||||
|
set $ws3 '3'
|
||||||
|
set $ws4 '4'
|
||||||
|
set $ws5 '5'
|
||||||
|
set $ws6 '6'
|
||||||
|
set $ws7 '7'
|
||||||
|
set $ws8 '8'
|
||||||
|
set $ws9 '9'
|
||||||
|
set $ws10 '10'
|
||||||
# Switch to workspace
|
# Switch to workspace
|
||||||
bindsym $mod+1 workspace number 1
|
bindsym $mod+1 workspace $ws1
|
||||||
bindsym $mod+2 workspace number 2
|
bindsym $mod+2 workspace $ws2
|
||||||
bindsym $mod+3 workspace number 3
|
bindsym $mod+3 workspace $ws3
|
||||||
bindsym $mod+4 workspace number 4
|
bindsym $mod+4 workspace $ws4
|
||||||
bindsym $mod+5 workspace number 5
|
bindsym $mod+5 workspace $ws5
|
||||||
bindsym $mod+6 workspace number 6
|
bindsym $mod+6 workspace $ws6
|
||||||
bindsym $mod+7 workspace number 7
|
bindsym $mod+7 workspace $ws7
|
||||||
bindsym $mod+8 workspace number 8
|
bindsym $mod+8 workspace $ws8
|
||||||
bindsym $mod+9 workspace number 9
|
bindsym $mod+9 workspace $ws9
|
||||||
bindsym $mod+0 workspace number 10
|
bindsym $mod+0 workspace $ws10
|
||||||
# Move focused container to workspace
|
# Move focused container to workspace
|
||||||
bindsym $mod+Shift+1 move container to workspace number 1
|
bindsym $mod+Shift+1 move container to workspace $ws1
|
||||||
bindsym $mod+Shift+2 move container to workspace number 2
|
bindsym $mod+Shift+2 move container to workspace $ws2
|
||||||
bindsym $mod+Shift+3 move container to workspace number 3
|
bindsym $mod+Shift+3 move container to workspace $ws3
|
||||||
bindsym $mod+Shift+4 move container to workspace number 4
|
bindsym $mod+Shift+4 move container to workspace $ws4
|
||||||
bindsym $mod+Shift+5 move container to workspace number 5
|
bindsym $mod+Shift+5 move container to workspace $ws5
|
||||||
bindsym $mod+Shift+6 move container to workspace number 6
|
bindsym $mod+Shift+6 move container to workspace $ws6
|
||||||
bindsym $mod+Shift+7 move container to workspace number 7
|
bindsym $mod+Shift+7 move container to workspace $ws7
|
||||||
bindsym $mod+Shift+8 move container to workspace number 8
|
bindsym $mod+Shift+8 move container to workspace $ws8
|
||||||
bindsym $mod+Shift+9 move container to workspace number 9
|
bindsym $mod+Shift+9 move container to workspace $ws9
|
||||||
bindsym $mod+Shift+0 move container to workspace number 10
|
bindsym $mod+Shift+0 move container to workspace $ws10
|
||||||
# Note: workspaces can have any name you want, not just numbers.
|
# Note: workspaces can have any name you want, not just numbers.
|
||||||
# We just use 1-10 as the default.
|
# We just use 1-10 as the default.
|
||||||
|
|
||||||
@@ -163,16 +175,15 @@ input type:keyboard {
|
|||||||
# Swap focus between the tiling area and the floating area
|
# Swap focus between the tiling area and the floating area
|
||||||
bindsym $mod+space focus mode_toggle
|
bindsym $mod+space focus mode_toggle
|
||||||
|
|
||||||
for_window [title="shotman"] move position 30 30, floating enable
|
# Window rules
|
||||||
|
for_window [app_id="firefox" title="Firefox — Sharing Indicator"] kill
|
||||||
|
|
||||||
# Status Bar
|
# Status Bar
|
||||||
# man 5 sway-bar
|
# man 5 sway-bar
|
||||||
bar {
|
bar {
|
||||||
position top
|
position top
|
||||||
|
tray_output none
|
||||||
# When the status_command prints a new line to stdout, swaybar updates.
|
status_command while ~/.config/sway/bar.sh; do sleep 5; done
|
||||||
# The default just shows the current date and time.
|
|
||||||
status_command while ~/.config/sway/bar.sh; do sleep 1; done
|
|
||||||
|
|
||||||
colors {
|
colors {
|
||||||
separator $blue
|
separator $blue
|
||||||
@@ -190,7 +201,6 @@ bar {
|
|||||||
|
|
||||||
# Startup programs
|
# Startup programs
|
||||||
exec syncthing
|
exec syncthing
|
||||||
exec keepassxc
|
|
||||||
exec swaync
|
exec swaync
|
||||||
|
|
||||||
# Include some defaults
|
# Include some defaults
|
||||||
|
|||||||
@@ -51,12 +51,14 @@ ocr() {
|
|||||||
ocrmypdf -l deu+eng+jpn --output-type pdf $1 OCR_$1
|
ocrmypdf -l deu+eng+jpn --output-type pdf $1 OCR_$1
|
||||||
}
|
}
|
||||||
|
|
||||||
conservation() {
|
conservationmode() {
|
||||||
location='/sys/bus/platform/drivers/ideapad_acpi/VPC2004:00/conservation_mode'
|
location='/sys/bus/platform/drivers/ideapad_acpi/VPC2004:00/conservation_mode'
|
||||||
if [ -z $1 ]; then
|
if [ -z $1 ]; then
|
||||||
cat $location
|
cat $location
|
||||||
elif [ $1 = '0' ] || [ $1 = '1' ]; then
|
elif [ $1 = '0' ] || [ $1 = '1' ]; then
|
||||||
echo $1 | sudo tee $location
|
echo $1 | sudo tee $location
|
||||||
|
else
|
||||||
|
echo 'Invalid option'
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -67,12 +69,17 @@ powermode() {
|
|||||||
echo "Can be one of:" $(cat /sys/firmware/acpi/platform_profile_choices)
|
echo "Can be one of:" $(cat /sys/firmware/acpi/platform_profile_choices)
|
||||||
elif [ $1 = 'low-power' ] || [ $1 = 'balanced' ] || [ $1 = 'performance' ]; then
|
elif [ $1 = 'low-power' ] || [ $1 = 'balanced' ] || [ $1 = 'performance' ]; then
|
||||||
echo $1 | sudo tee $location
|
echo $1 | sudo tee $location
|
||||||
|
else
|
||||||
|
echo 'Invalid option'
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
alias o='xdg-open'
|
||||||
|
alias con='nmcli con'
|
||||||
|
alias conup='nmcli con up id'
|
||||||
|
alias condown='nmcli con down id'
|
||||||
alias truecolor='curl -s https://raw.githubusercontent.com/JohnMorales/dotfiles/master/colors/24-bit-color.sh | bash'
|
alias truecolor='curl -s https://raw.githubusercontent.com/JohnMorales/dotfiles/master/colors/24-bit-color.sh | bash'
|
||||||
alias nssh='SSH_AUTH_SOCK= ssh'
|
alias nssh='SSH_AUTH_SOCK= ssh'
|
||||||
alias cpu='watch -n.1 "grep \"^[c]pu MHz\" /proc/cpuinfo"'
|
alias cpu='watch -n.1 "grep \"^[c]pu MHz\" /proc/cpuinfo"'
|
||||||
alias suspend='systemctl suspend'
|
|
||||||
|
|
||||||
# troll
|
# troll
|
||||||
alias powershell='clear && PS1="windowsadm@powershell$ " bash'
|
alias powershell='clear && PS1="windowsadm@powershell$ " bash'
|
||||||
|
|||||||
Reference in New Issue
Block a user