Browse Source

mpv settings, sway config compartmentalisation

master
Tim 5 months ago
parent
commit
745c642c84
  1. 12
      bin/soundmenu
  2. 1
      config/mpv/.gitignore
  3. 20
      config/mpv/mpv.conf
  4. 41
      config/sway/apps.conf
  5. 40
      config/sway/bindings.conf
  6. 16
      config/sway/colorscheme.conf
  7. 164
      config/sway/config
  8. 6
      config/sway/environment.conf
  9. 13
      config/sway/input.conf
  10. 16
      config/sway/output.conf
  11. 18
      config/sway/reboot.conf
  12. 13
      config/sway/screencapture.conf

12
bin/soundmenu

@ -11,9 +11,15 @@ options="$option0\n$option1\n$option2"
chosen="$(echo -e "$options" | rofi -lines 3 -dmenu -width 20 -p "sound")"
case $chosen in
$option0)
pactl set-default-sink alsa_output.pci-0000_0b_00.4.analog-surround-21;;
pactl set-card-profile alsa_card.pci-0000_0b_00.4 output:analog-surround-21+input:analog-stereo
pactl set-default-sink alsa_output.pci-0000_0b_00.4.analog-surround-21
;;
$option1)
pactl set-default-sink alsa_output.pci-0000_09_00.1.hdmi-stereo-extra4;;
pactl set-card-profile alsa_card.pci-0000_09_00.1 output:hdmi-stereo-extra4
pactl set-default-sink alsa_output.pci-0000_09_00.1.hdmi-stereo-extra4
;;
$option2)
pactl set-default-sink alsa_output.pci-0000_09_00.1.hdmi-stereo-extra5;;
pactl set-card-profile alsa_card.pci-0000_09_00.1 output:hdmi-stereo-extra3
pactl set-default-sink alsa_output.pci-0000_09_00.1.hdmi-stereo-extra5
;;
esac

1
config/mpv/.gitignore vendored

@ -0,0 +1 @@
watch_later

20
config/mpv/mpv.conf

@ -0,0 +1,20 @@
hwdec=auto
sub-auto=fuzzy
volume=50
save-position-on-quit=yes
ignore-path-in-watch-later-config=yes
write-filename-in-watch-later-config=yes
[extension.gif]
loop-file=inf
[extension.webm]
loop-file=inf
[extension.jpg]
pause
[extension.png]
pause

41
config/sway/apps.conf

@ -0,0 +1,41 @@
### Application assignments
#
# To find them, do: `xdotool search csgo`. If it finds something you are on the right track
# for wayland: do: `window-info` (see bin/)
# for criteria, see `man sway.5`
#assign [class="Firefox"] 2
#assign [class="vlc"] 9
assign [class="Signal"] 2
assign [class="Steam"] 4
assign [class="csgo_linux64"] 5
assign [class="Cities.x64"] 5
assign [class="overwatch.exe"] 5
for_window [class="overwatch.exe"] floating enable
#assign [class=".*wine.*"] 6
for_window [class=".*wine.*"] floating enable
# Enable or disable floating
for_window [app_id="pavucontrol"] floating enable
for_window [app_id="feh"] floating enable
for_window [window_role="pop-up"] floating enable
for_window [title="Picture-in-Picture"] floating enable
for_window [window_role="bubble"] floating enable
for_window [window_role="task_dialog"] floating enable
for_window [window_role="Preferences"] floating enable
for_window [window_type="dialog"] floating enable
for_window [window_type="menu"] floating enable
for_window [app_id="mpv"] floating enable, resize set width 531 height 300, move position 120 700
### Applications we start
# Notifications
exec mako
# Auto-Focus
exec i3-focus-last server
# Start our Apps
exec firefox
exec signal-desktop
exec alacritty

40
config/sway/bindings.conf

@ -0,0 +1,40 @@
### Key bindings
# Start a terminal
bindsym $mod+Return exec $term
# Kill focused window
bindsym $mod+Shift+q kill
# Start your launcher
bindsym $mod+d exec $menu
# Drag floating windows by holding down $mod and left mouse button.
# Resize them with right mouse button + $mod.
# Despite the name, also works for non-floating windows.
# Change normal to inverse to use left mouse button for resizing and right
# mouse button for dragging.
floating_modifier $mod normal
# Reload the configuration file
bindsym $mod+Shift+c reload
# Exit sway (logs you out of your Wayland session)
bindsym $mod+Shift+e exec swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -b 'Yes, exit sway' 'swaymsg exit'
### Media Keys
bindsym XF86AudioPlay exec 'playerctl play-pause && mpc toggle'
bindsym XF86AudioPrev exec 'playerctl previous || mpc prev'
bindsym XF86AudioNext exec 'playerctl next || mpc next'
# F6,F7,F8 Incase you dont have media keys
bindsym $mod+F7 exec 'playerctl play-pause && mpc toggle'
bindsym $mod+F6 exec 'playerctl previous || mpc prev'
bindsym $mod+F8 exec 'playerctl next || mpc next'
# Volume
bindsym XF86AudioRaiseVolume exec amixer sset Master 5%+ unmute
bindsym XF86AudioLowerVolume exec amixer sset Master 5%- unmute
# Logout
bindsym $mod+F9 exec wlogout

16
config/sway/colorscheme.conf

@ -0,0 +1,16 @@
# Color scheme (Gruvbox dark)
set $color_normal_white #a89984
set $color_bright_white #ebdbb2
set $color_normal_gray #222222
set $color_bright_gray #3c3836
set $color_bright_yellow #d79921
set $color_normal_black #282828
set $color_unused #ff0000
# Colors border background text indicator child_border
client.focused $color_bright_gray $color_bright_gray $color_bright_white $color_bright_gray $color_normal_black
client.focused_inactive $color_bright_gray $color_bright_gray $color_bright_white $color_bright_gray $color_normal_black
client.unfocused $color_normal_gray $color_normal_gray $color_normal_white $color_normal_gray $color_normal_black
client.urgent $color_bright_yellow $color_bright_yellow $color_normal_black $color_unused $color_unused
client.placeholder $color_unused $color_unused $color_unused $color_unused $color_unused

164
config/sway/config

@ -1,5 +1,6 @@
# Read `man 5 sway` for a complete reference.
font pango:Inconsolata 12
### Variables
#
# Logo key. Use Mod1 for Alt.
@ -19,71 +20,27 @@ set $term alacritty
set $menu "rofi -show run"
bindsym $mod+p exec --no-startup-id "rofi -show drun "
bindsym $mod+c exec --no-startup-id "rofi -show calc -modi calc -no-sort -no-bold > /dev/null"
### Output configuration
#
set $screen1 "DP-1"
set $screen2 "HDMI-A-1"
output $screen1 resolution 3840x2160 scale 1.5 position 0,0
# You can get the names of your outputs by running: swaymsg -t get_outputs
### Wallpaper
set $wallpapers_path $HOME/Pictures/wg
output $screen1 bg $(find $wallpapers_path -type f -maxdepth 1 | shuf -n 1) fill
output $screen2 bg $(find $wallpapers_path -type f -maxdepth 1 | shuf -n 1) fill
### Idle configuration
# This will lock your screen after X seconds of inactivity, then turn off
# your displays after another X seconds, and turn your screens back on when
# resumed. It will also lock your screen before your computer goes to sleep.
exec swayidle -w \
timeout 600 'swaylock -C $HOME/.config/swaylock/config' \
timeout 1800 'swaymsg "output * dpms off"' resume 'swaymsg "output * dpms on"' \
before-sleep 'swaylock -C $HOME/.config/swaylock/config'
#
# This will lock your screen after X seconds of inactivity, then turn off
# your displays after another X seconds, and turn your screens back on when
# resumed. It will also lock your screen before your computer goes to sleep.
### Input configuration
#
# Example configuration:
#
# input "2:14:SynPS/2_Synaptics_TouchPad" {
# dwt enabled
# tap enabled
# natural_scroll enabled
# middle_emulation enabled
# }
#
# You can get the names of your inputs by running: swaymsg -t get_inputs
# Read `man 5 sway-input` for more information about this section.
### Key bindings
#
# Basics:
#
# Start a terminal
bindsym $mod+Return exec $term
# Kill focused window
bindsym $mod+Shift+q kill
# Start your launcher
bindsym $mod+d exec $menu
# Drag floating windows by holding down $mod and left mouse button.
# Resize them with right mouse button + $mod.
# Despite the name, also works for non-floating windows.
# Change normal to inverse to use left mouse button for resizing and right
# mouse button for dragging.
floating_modifier $mod normal
### Window configs
gaps inner 5
gaps outer 50
# Reload the configuration file
bindsym $mod+Shift+c reload
default_border pixel 5
default_floating_border none
#hide_edge_borders --i3 smart
#smart_borders on
#smart_gaps on
# Exit sway (logs you out of your Wayland session)
bindsym $mod+Shift+e exec swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -b 'Yes, exit sway' 'swaymsg exit'
#
# Moving around:
#
### Moving around:
# Move your focus around
bindsym $mod+$left focus left
bindsym $mod+$down focus down
@ -133,6 +90,7 @@ bindsym $mod+Shift+0 move container to workspace number 10
# Note: workspaces can have any name you want, not just numbers.
# We just use 1-10 as the default.
#workspace back_and_forth
#
# Layout stuff:
@ -197,102 +155,14 @@ mode "resize" {
}
bindsym $mod+r mode "resize"
#
# Screen capture
#
set $ps1 Print
set $ps2 Control+Print
set $ps3 Alt+Print
set $ps4 Alt+Control+Print
bindsym $ps1 exec grim - | wl-copy
bindsym $ps2 exec grim -g "$(slurp)" - | wl-copy
bindsym $ps3 exec grim $(xdg-user-dir PICTURES)/ps_$(date +"%Y%m%d%H%M%S").png
bindsym $ps4 exec grim -g "$(slurp)" $(xdg-user-dir PICTURES)/ps_$(date +"%Y%m%d%H%M%S").png
#
# Our hotkey reboot - Superseeded by `wlogout`
#
set $mode_system System (l) lock, (e) logout, (s) suspend, (h) hibernate, (r) reboot, (Shift+s) shutdown
mode "$mode_system" {
bindsym l exec --no-startup-id $Locker, mode "default"
bindsym e exec --no-startup-id swaymsg exit, mode "default"
bindsym s exec --no-startup-id systemctl suspend, mode "default"
bindsym h exec --no-startup-id systemctl hibernate,mode "default"
bindsym r exec --no-startup-id systemctl reboot, mode "default"
bindsym Shift+s exec --no-startup-id systemctl poweroff -i, mode "default"
# back to normal: Enter or Escape
bindsym Return mode "default"
bindsym Escape mode "default"
}
bindsym $mod+F9 exec wlogout
### Media Keys
bindsym XF86AudioPlay exec 'playerctl play-pause && mpc toggle'
bindsym XF86AudioPrev exec 'playerctl previous || mpc prev'
bindsym XF86AudioNext exec 'playerctl next || mpc next'
# F6,F7,F8 Incase you dont have media keys
bindsym $mod+F7 exec 'playerctl play-pause && mpc toggle'
bindsym $mod+F6 exec 'playerctl previous || mpc prev'
bindsym $mod+F8 exec 'playerctl next || mpc next'
# volume
bindsym XF86AudioRaiseVolume exec amixer sset Master 5%+ unmute
bindsym XF86AudioLowerVolume exec amixer sset Master 5%- unmute
### Window configs
gaps inner 5
gaps outer 10
default_border pixel 5
#smart_borders on
smart_gaps on
# To find them, do: `xdotool search csgo`. If it finds something you are on the right track
#assign [class="Firefox"] 2
#assign [class="vlc"] 9
for_window [class="Signal"] 2
for_window [class="Steam"] 4
for_window [class="csgo_linux64"] 5
for_window [class="Cities.x64"] 5
for_window [class="overwatch.exe"] 5
for_window [class="overwatch.exe"] floating enable
#assign [class=".*wine.*"] 6
for_window [class=".*wine.*"] floating enable
# Enable or disable floating
for_window [app_id="pavucontrol"] floating enable
for_window [app_id="feh"] floating enable
for_window [window_role="pop-up"] floating enable
for_window [window_role="bubble"] floating enable
for_window [window_role="task_dialog"] floating enable
for_window [window_role="Preferences"] floating enable
for_window [window_type="dialog"] floating enable
for_window [window_type="menu"] floating enable
for_window [app_id="mpv"] floating enable, resize set width 531 height 300, move position 120 700
## Status Bar
bar {
swaybar_command waybar
}
## Environment thingies
exec systemctl --user import-environment DISPLAY WAYLAND_DISPLAY SWAYSOCK
exec hash dbus-update-activation-environment 2>/dev/null && \
dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP=sway
## Start Services
### Notifications
exec mako
### Auto-Focus
exec i3-focus-last server
## Start our Apps
exec firefox
exec signal-desktop
exec alacritty
# Include our config options
include $HOME/.config/sway/*.conf
# Defaults
include /etc/sway/config.d/*

6
config/sway/environment.conf

@ -0,0 +1,6 @@
## Environment thingies
exec systemctl --user import-environment DISPLAY WAYLAND_DISPLAY SWAYSOCK
exec hash dbus-update-activation-environment 2>/dev/null && \
dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP=sway

13
config/sway/input.conf

@ -0,0 +1,13 @@
# Input
input "type:keyboard" {
repeat_rate 30
repeat_delay 300
xkb_options caps:escape
}
input "type:mouse" {
accel_profile "flat"
}
seat * hide_cursor when-typing enable

16
config/sway/output.conf

@ -0,0 +1,16 @@
### Output configuration
#
# You can get the names of your outputs by running: swaymsg -t get_outputs
set $screen1 "DP-1"
set $screen2 "HDMI-A-1"
output $screen1 resolution 3840x2160 scale 1.5 position 0,0
#output $screen1 resolution 2560x1440 scale 1 position 0,0
exec swaymsg focus output $screen1
### Wallpaper
set $wallpapers_path $HOME/Pictures/wg
output $screen1 bg $(find $wallpapers_path -type f -maxdepth 1 | shuf -n 1) fill
output $screen2 bg $(find $wallpapers_path -type f -maxdepth 1 | shuf -n 1) fill

18
config/sway/reboot.conf

@ -0,0 +1,18 @@
#
# Our hotkey reboot - Superseeded by `wlogout`
#
set $mode_system System (l) lock, (e) logout, (s) suspend, (h) hibernate, (r) reboot, (Shift+s) shutdown
mode "$mode_system" {
bindsym l exec --no-startup-id $Locker, mode "default"
bindsym e exec --no-startup-id swaymsg exit, mode "default"
bindsym s exec --no-startup-id systemctl suspend, mode "default"
bindsym h exec --no-startup-id systemctl hibernate,mode "default"
bindsym r exec --no-startup-id systemctl reboot, mode "default"
bindsym Shift+s exec --no-startup-id systemctl poweroff -i, mode "default"
# back to normal: Enter or Escape
bindsym Return mode "default"
bindsym Escape mode "default"
}
#bindsym $mod+F9 exec wlogout

13
config/sway/screencapture.conf

@ -0,0 +1,13 @@
#
# Screen capture
#
set $ps1 Print
set $ps2 Control+Print
set $ps3 Alt+Print
set $ps4 Alt+Control+Print
bindsym $ps1 exec grim - | wl-copy
bindsym $ps2 exec grim -g "$(slurp)" - | wl-copy
bindsym $ps3 exec grim $(xdg-user-dir PICTURES)/ps_$(date +"%Y%m%d%H%M%S").png
bindsym $ps4 exec grim -g "$(slurp)" $(xdg-user-dir PICTURES)/ps_$(date +"%Y%m%d%H%M%S").png
Loading…
Cancel
Save