Compare commits
3 Commits
ad705c3834
...
3bffa00e0a
Author | SHA1 | Date | |
---|---|---|---|
3bffa00e0a | |||
2c9ff2a6a6 | |||
3b9cde5436 |
@ -31,5 +31,3 @@ alias mixer="pulsemixer"
|
||||
|
||||
# tmux '-2' colors
|
||||
alias tmux="tmux -2"
|
||||
# open spotify web client on firefox
|
||||
alias spw="firefox --new-window https://open.spotify.com/ & exit"
|
||||
|
30
.config/scripts/functions/fzf
Normal file
30
.config/scripts/functions/fzf
Normal file
@ -0,0 +1,30 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# These are functions related to fzf used to go to locations, edit
|
||||
# configurations, or start a tmux session in common directories.
|
||||
|
||||
# Finds within current directory and cd into the location of the file or
|
||||
# directory.
|
||||
goto()
|
||||
{
|
||||
path=$(find $1 | fzf)
|
||||
[ -f "$path" ] && path=$(dirname "$path")
|
||||
cd "$path"
|
||||
}
|
||||
|
||||
# Quickly find and edit a file within ~/.config or ~/Documents
|
||||
cfg()
|
||||
{
|
||||
file=$(find $HOME/.config $HOME/Documents -type f | fzf)
|
||||
[ -z "$file" ] && return
|
||||
$EDITOR "$file"
|
||||
}
|
||||
|
||||
# Quickly find a directory within ~/.config or ~/Documents and start a tmux
|
||||
# session there with the name of the directory.
|
||||
ts()
|
||||
{
|
||||
dir=$(find $HOME/.config $HOME/Documents -type d | fzf)
|
||||
[ -z "$dir" ] && return
|
||||
tmux new -s $(basename "$dir") -c "$dir"
|
||||
}
|
@ -137,7 +137,8 @@ exec swayidle -w \
|
||||
bindsym $mod+Control+q exec swaymsg exit
|
||||
|
||||
# Lock Sway
|
||||
bindsym $mod+Escape exec sh -c 'swaylock -f -c 000000; sleep 0.1; pkill -10 swayidle'
|
||||
#bindsym $mod+Escape exec sh -c 'swaylock -f -c 000000; sleep 0.1; pkill -10 swayidle'
|
||||
bindsym $mod+Escape exec swaylock -f -c 000000
|
||||
#
|
||||
# Moving around:
|
||||
#
|
||||
@ -174,6 +175,9 @@ exec swayidle -w \
|
||||
bindsym $mod+x workspace number 6:x
|
||||
bindsym $mod+c workspace number 7:c
|
||||
bindsym $mod+v workspace number 8:v
|
||||
# Trash workspace
|
||||
bindsym $mod+Mod1+1 workspace left
|
||||
bindsym $mod+Mod1+2 workspace right
|
||||
# Trash workspace
|
||||
bindsym $mod+Mod1+a workspace trash
|
||||
# Move focused container to workspace
|
||||
@ -188,22 +192,25 @@ exec swayidle -w \
|
||||
# Note: workspaces can have any name you want, not just numbers.
|
||||
# We just use 1-10 as the default.
|
||||
|
||||
# bind workspaces to monitor
|
||||
# Bind workspaces to monitor
|
||||
workspace 1:a output $mon1
|
||||
workspace 2:r output $mon1
|
||||
workspace 3:s output $mon1
|
||||
workspace 4:t output $mon1
|
||||
workspace 5:z output $mon2
|
||||
workspace 6:x output $mon3
|
||||
workspace 5:z output $mon1
|
||||
workspace 6:x output $mon1
|
||||
workspace 7:c output $mon1
|
||||
workspace 8:v output $mon1
|
||||
workspace left output $mon2
|
||||
workspace right output $mon3
|
||||
|
||||
#
|
||||
# Monitors:
|
||||
#
|
||||
bindsym $mod+comma focus output left
|
||||
bindsym $mod+period focus output right
|
||||
bindsym $mod+shift+comma move workspace to output left
|
||||
bindsym $mod+shift+period move workspace to output right
|
||||
bindsym $mod+Shift+comma move container to output left
|
||||
bindsym $mod+Shift+period move container to output right
|
||||
#
|
||||
# Layout stuff:
|
||||
#
|
||||
@ -217,6 +224,7 @@ exec swayidle -w \
|
||||
bindsym $mod+u layout stacking
|
||||
bindsym $mod+y layout tabbed
|
||||
bindsym $mod+n layout toggle split
|
||||
bindsym $mod+Shift+n split toggle
|
||||
|
||||
# Make the current focus fullscreen
|
||||
bindsym $mod+f fullscreen
|
||||
@ -229,7 +237,7 @@ exec swayidle -w \
|
||||
|
||||
# Move focus to the parent container
|
||||
bindsym $mod+p focus parent
|
||||
bindsym $mod+shift+p focus child
|
||||
bindsym $mod+Shift+p focus child
|
||||
#
|
||||
# Scratchpad:
|
||||
#
|
||||
@ -279,7 +287,7 @@ mode "gaming" {
|
||||
}
|
||||
bindsym $mod+g mode "gaming"
|
||||
#
|
||||
# Status Bar:
|
||||
# Status ar:
|
||||
#
|
||||
# Read `man 5 sway-bar` for more information about this section.
|
||||
font pango:$font
|
||||
@ -318,10 +326,12 @@ client.background $base03
|
||||
|
||||
bindsym $mod+Control+h gaps horizontal current plus 200
|
||||
bindsym $mod+Control+l gaps horizontal current minus 200
|
||||
bindsym $mod+shift+f gaps horizontal current toggle 400
|
||||
bindsym $mod+Shift+f gaps horizontal current toggle 400
|
||||
|
||||
smart_gaps inverse_outer
|
||||
|
||||
gaps inner 2
|
||||
|
||||
default_border pixel 3
|
||||
|
||||
#
|
||||
@ -347,14 +357,14 @@ assign [app_id="Discord Firefox"] workspace 3:s
|
||||
for_window [title="^Discord — Mozilla Firefox$"] fullscreen disable
|
||||
assign [class="WebCord"] workspace 3:s
|
||||
assign [class="Signal"] workspace 3:s
|
||||
for_window [title="^WhatsApp — Mozilla Firefox$"] move container to workspace 3:s;
|
||||
assign [class="Steam"] workspace 4:t
|
||||
# Space Games, as joystick usage without mouse and keyboard count as idle.
|
||||
for_window [class="steam_app_359320"] inhibit_idle focus
|
||||
for_window [class="starcitizen.exe"] inhibit_idle focus
|
||||
# Inhibit idle if fullscreen
|
||||
for_window [app_id="^.*"] inhibit_idle fullscreen
|
||||
for_window [class="^.*"] inhibit_idle fullscreen
|
||||
# Inhibit idle on focus
|
||||
for_window [class="WebCord"] inhibit_idle focus
|
||||
for_window [app_id="org.jellyfin.jellyfinmediaplayer"] inhibit_idle focus
|
||||
for_window [class="steam_app_888790"] inhibit_idle focus
|
||||
# Floating windows
|
||||
for_window [title="^Firefox — Sharing Indicator$"] floating enable, move position 50ppt 0px;
|
||||
for_window [class="^Steam$"] floating enable
|
||||
|
Loading…
Reference in New Issue
Block a user