aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--nvim/.config/nvim/lua/plugins/presence.lua139
-rw-r--r--pass/.config/environment.d/50-password-store.conf (renamed from sh/.config/environment.d/50-password-store.conf)0
-rw-r--r--pass/.config/sway/config.d/50-pass.conf2
-rw-r--r--sway/.config/sway/config59
4 files changed, 33 insertions, 167 deletions
diff --git a/nvim/.config/nvim/lua/plugins/presence.lua b/nvim/.config/nvim/lua/plugins/presence.lua
index a005df9..453a764 100644
--- a/nvim/.config/nvim/lua/plugins/presence.lua
+++ b/nvim/.config/nvim/lua/plugins/presence.lua
@@ -21,145 +21,6 @@ function M:config(opts)
local plugin_managers = require("presence/plugin_managers")
plugin_managers["lazy"] = "lazy"
- -- HACK: Overwrite functions to remove WSL related stuff
- ---@diagnostic disable-next-line: duplicate-set-field
- function Presence:get_discord_socket_path()
- local sock_name = "discord-ipc-0"
- local sock_path = nil
-
- if self.os.name == "windows" then
- -- Use named pipe in NPFS for Windows
- sock_path = [[\\.\pipe\]] .. sock_name
- elseif self.os.name == "macos" then
- -- Use $TMPDIR for macOS
- local path = os.getenv("TMPDIR")
-
- if path then
- sock_path = path:match("/$") and path .. sock_name or path .. "/" .. sock_name
- end
- elseif self.os.name == "linux" then
- -- Check various temp directory environment variables
- local env_vars = {
- "XDG_RUNTIME_DIR",
- "TEMP",
- "TMP",
- "TMPDIR",
- }
-
- for i = 1, #env_vars do
- local var = env_vars[i]
- local path = os.getenv(var)
- if path then
- self.log:debug(string.format("Using runtime path: %s", path))
- sock_path = path:match("/$") and path .. sock_name or path .. "/" .. sock_name
- break
- end
- end
- end
-
- return sock_path
- end
-
- -- HACK: Fix grep command for neovim socket
- ---@diagnostic disable-next-line: duplicate-set-field
- function Presence:get_nvim_socket_paths(on_done)
- self.log:debug("Getting nvim socket paths...")
- local sockets = {}
- local parser = {}
- local cmd
-
- if self.os.name == "windows" then
- cmd = {
- "powershell.exe",
- "-Command",
- [[(Get-ChildItem \\.\pipe\).FullName | findstr 'nvim']],
- }
- elseif self.os.name == "macos" then
- if vim.fn.executable("netstat") == 0 then
- self.log:warn("Unable to get nvim socket paths: `netstat` command unavailable")
- return
- end
-
- -- Define macOS BSD netstat output parser
- function parser.parse(data)
- return data:match("%s(/.+)")
- end
-
- cmd = table.concat({
- "netstat -u",
- [[grep --color=never "nvim.*/0"]],
- }, "|")
- elseif self.os.name == "linux" then
- if vim.fn.executable("ss") == 1 then
- -- Use `ss` if available
- cmd = table.concat({
- "ss -lx",
- [[grep "nvim.*\.0"]],
- }, "|")
-
- -- Define ss output parser
- function parser.parse(data)
- return data:match("%s(/.-)%s")
- end
- elseif vim.fn.executable("netstat") == 1 then
- -- Use `netstat` if available
- cmd = table.concat({
- "netstat -u",
- [[grep --color=never "nvim.*\.0"]],
- }, "|")
-
- -- Define netstat output parser
- function parser.parse(data)
- return data:match("%s(/.+)")
- end
- else
- local warning_msg = "Unable to get nvim socket paths: `netstat` and `ss` commands unavailable"
- self.log:warn(warning_msg)
- return
- end
- else
- local warning_fmt = "Unable to get nvim socket paths: Unexpected OS: %s"
- self.log:warn(string.format(warning_fmt, self.os.name))
- return
- end
-
- local function handle_data(_, data)
- if not data then
- return
- end
-
- for i = 1, #data do
- local socket = parser.parse and parser.parse(vim.trim(data[i])) or vim.trim(data[i])
- if socket and socket ~= "" and socket ~= self.socket then
- table.insert(sockets, socket)
- end
- end
- end
-
- local function handle_error(_, data)
- if not data then
- return
- end
-
- if data[1] ~= "" then
- self.log:error(string.format("Unable to get nvim socket paths: %s", data[1]))
- end
- end
-
- local function handle_exit()
- self.log:debug(string.format("Got nvim socket paths: %s", vim.inspect(sockets)))
- on_done(sockets)
- end
-
- local cmd_str = type(cmd) == "table" and table.concat(cmd, ", ") or cmd
- self.log:debug(string.format("Executing command: `%s`", cmd_str))
- vim.fn.jobstart(cmd, {
- on_stdout = handle_data,
- on_stderr = handle_error,
- on_exit = handle_exit,
- })
- end
-
function Presence:handle_focus_lost()
self:start_idle_timer(self.options.focus_lost_delay, function()
self:cancel()
diff --git a/sh/.config/environment.d/50-password-store.conf b/pass/.config/environment.d/50-password-store.conf
index 82a9c1e..82a9c1e 100644
--- a/sh/.config/environment.d/50-password-store.conf
+++ b/pass/.config/environment.d/50-password-store.conf
diff --git a/pass/.config/sway/config.d/50-pass.conf b/pass/.config/sway/config.d/50-pass.conf
new file mode 100644
index 0000000..a0bc1e2
--- /dev/null
+++ b/pass/.config/sway/config.d/50-pass.conf
@@ -0,0 +1,2 @@
+bindsym $mod+p exec passmenu
+bindsym $mod+Shift+p exec passmenu --type
diff --git a/sway/.config/sway/config b/sway/.config/sway/config
index f1e6b23..88998e6 100644
--- a/sway/.config/sway/config
+++ b/sway/.config/sway/config
@@ -36,17 +36,18 @@ focus_on_window_activation focus
default_border pixel
hide_edge_borders smart
+output * bg ~/.local/share/gruvbox/sway.png fill
+
for_window [shell=".*"] inhibit_idle fullscreen
for_window [app_id="pavucontrol" title="^Volume Control$"] floating enable
-for_window [app_id="" title="^Streamlink Twitch GUI$"] floating enable
-for_window [app_id="mpv"] floating enable
+for_window [class="^steam$"] floating enable
+for_window [class="^steam$" title="^Steam$"] floating disable
+for_window [app_id="mpv"] fullscreen enable
for_window [app_id="firefox" title="Firefox — Sharing Indicator"] kill
+for_window [app_id="" title="^Streamlink Twitch GUI$"] floating enable
-# NOTE: Configure asynchronously with swaymsg as workaround for Firefox crash on reload
-# See: https://bugzilla.mozilla.org/show_bug.cgi?id=1652820#c51
-exec_always swaymsg seat * hide_cursor 8000
-
-output * bg ~/.local/share/gruvbox/sway.png fill
+assign [app_id="mpv"] s
+assign [class="^discord$" instance="^discord$"] d
input type:pointer {
accel_profile flat
@@ -66,29 +67,24 @@ bindsym $mod+Shift+c reload
bindsym $mod+Shift+Escape exec swaynag -t warning -m 'Exit sway?' -B 'Yes' 'swaymsg exit'
bindsym $mod+ctrl+q exec loginctl lock-session
bindsym $mod+Escape exec powermenu list | $menu | powermenu
-bindsym $mod+space exec j4-dmenu-desktop --no-generic --dmenu='$menu' --term="$TERMINAL"
-# rg --pcre2 '(?<=^Name=).*' /usr/share/applications --only-matching --max-count=1 --no-filename |
-# bemenu | xargs -I_ rg "^Name=_" /usr/share/applications --max-count=1 --files-with-matches |
-# xargs basename 2>/dev/null
-bindsym $mod+shift+space exec bemenu-run
-bindsym $mod+p exec passmenu
-bindsym $mod+Shift+p exec passmenu --type
-bindsym $mod+y exec yubikey-oath-dmenu --notify --clipboard
-bindsym $mod+Shift+y exec yubikey-oath-dmenu --notify --type
bindsym $mod+return exec $TERMINAL
bindsym $mod+w exec $BROWSER
bindsym Print exec slurp | grim -g - - | wl-copy --type image/png
bindsym $mod+Print exec /usr/share/sway/scripts/grimshot --notify save area
+bindsym $mod+space exec j4-dmenu-desktop --no-generic --dmenu='$menu' --term="$TERMINAL"
+bindsym $mod+shift+space exec bemenu-run
+bindsym $mod+y exec yubikey-oath-dmenu --notify --clipboard
+bindsym $mod+Shift+y exec yubikey-oath-dmenu --notify --type
-bindsym --locked XF86AudioRaiseVolume exec pactl set-sink-volume @DEFAULT_SINK@ +5%
-bindsym --locked XF86AudioLowerVolume exec pactl set-sink-volume @DEFAULT_SINK@ -5%
-bindsym --locked XF86AudioMute exec pactl set-sink-mute @DEFAULT_SINK@ toggle
-bindsym --locked XF86AudioMicMute exec pactl set-source-mute @DEFAULT_SOURCE@ toggle
-bindsym --locked XF86AudioPlay exec playerctl play-pause
-bindsym --locked XF86AudioNext exec playerctl next
-bindsym --locked XF86AudioPrev exec playerctl previous
-bindsym --locked XF86MonBrightnessDown exec brightnessctl set 5%-
-bindsym --locked XF86MonBrightnessUp exec brightnessctl set +5%
+bindsym XF86AudioRaiseVolume exec pactl set-sink-volume @DEFAULT_SINK@ +5%
+bindsym XF86AudioLowerVolume exec pactl set-sink-volume @DEFAULT_SINK@ -5%
+bindsym XF86AudioMute exec pactl set-sink-mute @DEFAULT_SINK@ toggle
+bindsym XF86AudioMicMute exec pactl set-source-mute @DEFAULT_SOURCE@ toggle
+bindsym XF86AudioPlay exec playerctl play-pause
+bindsym XF86AudioNext exec playerctl next
+bindsym XF86AudioPrev exec playerctl previous
+bindsym XF86MonBrightnessDown exec brightnessctl set 5%-
+bindsym XF86MonBrightnessUp exec brightnessctl set +5%
bindsym $mod+$left focus left
bindsym $mod+$down focus down
@@ -141,13 +137,21 @@ bindsym $mod+Shift+6 move container to workspace number 6; workspace number 6
bindsym $mod+Shift+7 move container to workspace number 7; workspace number 7
bindsym $mod+Shift+8 move container to workspace number 8; workspace number 8
bindsym $mod+Shift+9 move container to workspace number 9; workspace number 9
-bindsym $mod+Shift+0 move container to workspace number 10
+bindsym $mod+Shift+0 move container to workspace number 10; workspace number 10
+
+bindsym $mod+Shift+d move container to workspace d
+bindsym $mod+Shift+s move container to workspace s
+
+bindsym $mod+d workspace d
+bindsym $mod+s workspace s
bindsym $mod+f fullscreen
+bindsym $mod+Shift+f floating toggle
bindsym $mod+Shift+backslash split toggle
bindsym $mod+minus splith
bindsym $mod+backslash splitv
bindsym $mod+r mode 'resize'
+
mode 'resize' {
bindsym $left resize shrink width 10px
bindsym $down resize grow height 10px
@@ -160,8 +164,7 @@ mode 'resize' {
bar {
status_command i3status-rs
font pango:Hack Nerd Font 15
- status_padding 0
- tray_padding 0
+ tray_padding 5
colors {
background $base00
separator $base01