feat: full sway config, removed awesome config

This commit is contained in:
AngeD 2022-05-10 11:41:59 +02:00
parent 11bbdb42eb
commit fe1959f01a
31 changed files with 641 additions and 1350 deletions

View File

@ -109,7 +109,7 @@ window:
#multiplier: 3 #multiplier: 3
# Font configuration # Font configuration
#font: font:
# Normal (roman) font face # Normal (roman) font face
#normal: #normal:
# Font family # Font family
@ -157,7 +157,7 @@ window:
#style: Bold Italic #style: Bold Italic
# Point size # Point size
#size: 11.0 size: 14.0
# Offset is the extra space around each character. `offset.y` can be thought # Offset is the extra space around each character. `offset.y` can be thought
# of as modifying the line spacing, and `offset.x` as modifying the letter # of as modifying the line spacing, and `offset.x` as modifying the letter

@ -1 +0,0 @@
Subproject commit c442715ab1ec9c78c3f6559204da4beaac0b7a24

View File

@ -1,671 +0,0 @@
-- If LuaRocks is installed, make sure that packages installed through it are
-- found (e.g. lgi). If LuaRocks is not installed, do nothing.
pcall(require, "luarocks.loader")
-- Standard awesome library
local gears = require("gears")
local awful = require("awful")
require("awful.autofocus")
-- Widget and layout library
local wibox = require("wibox")
-- Theme handling library
local beautiful = require("beautiful")
-- Notification library
local naughty = require("naughty")
local menubar = require("menubar")
local hotkeys_popup = require("awful.hotkeys_popup")
-- Widgets
local brightness_widget = require("awesome-wm-widgets.brightness-widget.brightness")
local volume_widget = require('awesome-wm-widgets.volume-widget.volume')
-- {{{ Error handling
if awesome.startup_errors then
naughty.notify{
preset = naughty.config.presets.critical,
title = "Oops, there were errors during startup!",
text = awesome.startup_errors
}
end
do
local in_error = false
awesome.connect_signal(
"debug::error",
function(err)
if in_error then
return
end
in_error = true
naughty.notify{
preset = naughty.config.presets.critical,
title = "Oops, an error happened!",
text = tostring(err)
}
in_error = false
end
)
end
-- }}}
-- {{{ Variable definitions
config_dir = gears.filesystem.get_configuration_dir()
wallpaper_dir = gears.filesystem.get_xdg_config_home() .. "wallpapers/"
beautiful.init(config_dir .. "theme.lua")
mytags = {
{name = "TTY" },
{name = "WEB", layout = awful.layout.suit.max },
{name = "DEV" },
{name = "SBX", layout = awful.layout.suit.max },
{name = "GAM", layout = awful.layout.suit.max },
{name = "MED", layout = awful.layout.suit.max },
{name = "DOC", layout = awful.layout.suit.max },
{name = "GFX", layout = awful.layout.suit.max },
{name = "ETC" },
}
terminal = "alacritty"
editor = os.getenv("EDITOR") or "nvim"
editor_cmd = terminal .. " -e " .. editor
browser = "brave"
files = "pcmanfm"
wallpaper = "mount_cook.jpg"
lock = "i3lock -fti" .. wallpaper_dir .. "lock.png"
screenshot = "flameshot full -c"
screenshot_gui = "flameshot gui"
modkey = "Mod4"
awful.layout.layouts = {
awful.layout.suit.tile,
awful.layout.suit.max,
awful.layout.suit.floating,
}
-- }}}
-- {{{ Wibar
-- Create a wibox for each screen and add it
local taglist_buttons = gears.table.join(
awful.button(
{}, 1,
function(t)
t:view_only()
end
),
awful.button(
{modkey}, 1,
function(t)
if client.focus then
client.focus:move_to_tag(t)
end
end
)
)
local tasklist_buttons = gears.table.join(
awful.button(
{}, 1,
function(c)
if c ~= client.focus then
c:emit_signal("request::activate", "tasklist", {raise = true})
end
end
)
)
local function set_wallpaper(s)
if beautiful.wallpaper then
gears.wallpaper.maximized(wallpaper_dir .. wallpaper, s, true)
end
end
local function set_clock(s)
local dpi = require("beautiful.xresources").apply_dpi
s.mytextclock = wibox.widget.textclock()
s.month_calendar = awful.widget.calendar_popup.month{screen = s}
s.month_calendar:attach(s.mytextclock)
end
-- Re-set wallpaper when a screen's geometry changes (e.g. different resolution)
screen.connect_signal("property::geometry", set_wallpaper)
awful.screen.connect_for_each_screen(
function(s)
-- Wallpaper and clock
set_wallpaper(s)
set_clock(s)
-- Each screen has its own tag table.
for i, tag in pairs(mytags) do
awful.tag.add(
tag.name, {
layout = tag.layout or awful.layout.layouts[1],
screen = s,
selected = i == 1
}
)
end
-- Create an imagebox widget which will contain an icon indicating which layout we're using.
-- We need one layoutbox per screen.
s.mylayoutbox = awful.widget.layoutbox(s)
s.mylayoutbox:buttons(gears.table.join(
awful.button(
{}, 1,
function()
awful.layout.inc(1)
end
),
awful.button(
{}, 3,
function()
awful.layout.inc(-1)
end
),
awful.button(
{}, 4,
function()
awful.layout.inc(1)
end
),
awful.button(
{}, 5,
function()
awful.layout.inc(-1)
end
)
))
-- Create a taglist widget
s.mytaglist = awful.widget.taglist{
screen = s,
filter = awful.widget.taglist.filter.all,
buttons = taglist_buttons
}
-- Create a tasklist widget
s.mytasklist = awful.widget.tasklist{
screen = s,
filter = awful.widget.tasklist.filter.currenttags,
buttons = tasklist_buttons
}
-- Create the wibox
s.mywibox = awful.wibar{position = "top", screen = s}
-- Add widgets to the wibox
s.mywibox:setup{
layout = wibox.layout.align.horizontal,
{ -- Left widgets
layout = wibox.layout.fixed.horizontal,
s.mytaglist,
},
s.mytasklist, -- Middle widget
{ -- Right widgets
layout = wibox.layout.fixed.horizontal,
wibox.widget.systray(),
brightness_widget{program = "xbacklight", step = 10},
volume_widget(),
s.mytextclock,
s.mylayoutbox,
},
}
end
)
-- }}}
-- {{{ Key bindings
globalkeys = gears.table.join(
-- Awesome
awful.key(
{modkey}, "s",
hotkeys_popup.show_help,
{description="show help", group="awesome"}
),
awful.key(
{modkey, "Shift"}, "r",
awesome.restart,
{description = "reload awesome", group = "awesome"}
),
awful.key(
{modkey, "Shift"}, "q",
awesome.quit,
{description = "quit awesome", group = "awesome"}
),
awful.key(
{modkey}, "j",
function()
awful.client.focus.byidx(1)
end,
{description = "focus next by index", group = "client"}
),
awful.key(
{modkey}, "k",
function()
awful.client.focus.byidx(-1)
end,
{description = "focus previous by index", group = "client"}
),
-- Layout manipulation
awful.key(
{modkey, "Shift"}, "j",
function()
awful.client.swap.byidx(1)
end,
{description = "swap with next client by index", group = "client"}
),
awful.key(
{modkey, "Shift"}, "k",
function()
awful.client.swap.byidx(-1)
end,
{description = "swap with previous client by index", group = "client"}
),
awful.key(
{modkey, "Control"}, "j",
function()
awful.screen.focus_relative(1)
end,
{description = "focus the next screen", group = "screen"}
),
awful.key(
{modkey, "Control"}, "k",
function()
awful.screen.focus_relative(-1)
end,
{description = "focus the previous screen", group = "screen"}
),
awful.key(
{modkey}, "u",
awful.client.urgent.jumpto,
{description = "jump to urgent client", group = "client"}
),
-- Standard program
awful.key(
{modkey}, "Return",
function()
awful.spawn(terminal)
end,
{description = "open a terminal", group = "launcher"}
),
awful.key(
{modkey}, "r",
function()
menubar.show()
end,
{description = "show the menubar", group = "launcher"}
),
awful.key(
{modkey}, "b",
function()
awful.spawn(browser)
end,
{description = "open " .. browser, group = "launcher"}
),
awful.key(
{modkey}, "e",
function()
awful.spawn(files)
end,
{description = "open " .. files, group = "launcher"}
),
awful.key(
{modkey}, "l",
function()
awful.spawn.with_shell(lock)
end,
{description = "lock the screen", group = "launcher"}
),
awful.key(
{}, "Print",
function()
awful.spawn(screenshot)
end,
{description = "take a screenshot", group = "launcher"}
),
awful.key(
{"Shift"}, "Print",
function()
awful.spawn(screenshot_gui)
end,
{description = "take a rectangular screenshot", group = "launcher"}
),
awful.key(
{modkey}, "m",
function(c)
awful.layout.set(awful.layout.suit.max)
end,
{description = "switch to max layout", group = "layout"}
),
awful.key(
{modkey}, "t",
function(c)
awful.layout.set(awful.layout.suit.tile)
end,
{description = "switch to tiling layout", group = "layout"}
),
-- Hotkeys
awful.key(
{}, "XF86AudioRaiseVolume",
function()
awful.spawn.with_shell("pactl set-sink-mute 0 0 && pactl set-sink-volume 0 +2%")
end,
{description = "increase volume", group = "hotkeys"}
),
awful.key(
{}, "XF86AudioLowerVolume",
function()
awful.spawn.with_shell("pactl set-sink-mute 0 0 && pactl set-sink-volume 0 -2%")
end,
{description = "decrease volume", group = "hotkeys"}
),
awful.key(
{}, "XF86AudioMute",
function()
awful.spawn("pactl set-sink-mute 0 toggle")
end,
{description = "toggle mute", group = "hotkeys"}
),
awful.key(
{"Shift"}, "XF86AudioMute",
function()
awful.spawn("pactl set-source-mute 0 toggle")
end,
{description = "toggle mic mute", group = "hotkeys"}
),
awful.key(
{}, "XF86AudioPlay",
function()
awful.spawn("playerctl play-pause")
end,
{description = "play / pause media", group = "hotkeys"}
),
awful.key(
{"Control"}, "XF86AudioMute",
function()
awful.spawn.with_shell("pactl set-sink-volume 0 20%")
end,
{description = "set volume to 20%", group = "hotkeys"}
),
awful.key(
{"Control"}, "XF86AudioLowerVolume",
function()
awful.spawn.with_shell("pactl set-sink-volume 0 50%")
end,
{description = "set volume to 50%", group = "hotkeys"}
),
awful.key(
{"Control"}, "XF86AudioRaiseVolume",
function()
awful.spawn.with_shell("pactl set-sink-volume 0 100%")
end,
{description = "set volume to 100%", group = "hotkeys"}
),
awful.key(
{"Control"}, "Insert",
function()
awful.spawn("playerctl play-pause")
end,
{description = "play / pause media", group = "hotkeys"}
),
awful.key(
{}, "XF86AudioNext",
function()
awful.spawn("playerctl next")
end,
{description = "play next media", group = "hotkeys"}
),
awful.key(
{"Control"}, "Next",
function()
awful.spawn("playerctl next")
end,
{description = "play next media", group = "hotkeys"}
),
awful.key(
{}, "XF86AudioPrev",
function()
awful.spawn("playerctl previous")
end,
{description = "play previous media", group = "hotkeys"}
),
awful.key(
{"Control"}, "Prior",
function()
awful.spawn("playerctl previous")
end,
{description = "play previous media", group = "hotkeys"}
),
awful.key(
{"Control"}, "F4",
function()
awful.spawn.with_shell("toggle-touchpad")
end,
{description = "toggle touchpad", group = "hotkeys"}
),
awful.key(
{}, "XF86MonBrightnessUp",
function()
brightness_widget:inc()
end,
{description = "increase brightness", group = "hotkeys"}
),
awful.key(
{}, "XF86MonBrightnessDown",
function()
brightness_widget:dec()
end,
{description = "decrease brightness", group = "hotkeys"}
)
)
clientkeys = gears.table.join(
awful.key(
{modkey}, "f",
function(c)
c.fullscreen = not c.fullscreen
c:raise()
end,
{description = "toggle fullscreen", group = "client"}
),
awful.key(
{modkey, "Shift"}, "c",
function(c)
c:kill()
end,
{description = "close", group = "client"}
),
awful.key(
{modkey}, "space",
awful.client.floating.toggle,
{description = "toggle floating", group = "client"}
),
awful.key(
{modkey}, "o",
function(c)
c:move_to_screen()
end,
{description = "move to screen", group = "client"}
)
)
-- Bind all key numbers to tags.
-- Be careful: we use keycodes to make it work on any keyboard layout.
-- This should map on the top row of your keyboard, usually 1 to 9.
for i = 1, 9 do
globalkeys = gears.table.join(
globalkeys,
-- View tag only.
awful.key(
{modkey}, "#" .. i + 9,
function()
local screen = awful.screen.focused()
local tag = screen.tags[i]
if tag then
tag:view_only()
end
end,
{description = "view tag #" .. i, group = "tag"}
),
-- Move client to tag.
awful.key(
{modkey, "Shift"}, "#" .. i + 9,
function()
if client.focus then
local tag = client.focus.screen.tags[i]
if tag then
client.focus:move_to_tag(tag)
tag:view_only()
end
end
end,
{description = "move focused client to tag #" .. i, group = "tag"}
)
)
end
clientbuttons = gears.table.join(
awful.button(
{}, 1,
function(c)
c:emit_signal("request::activate", "mouse_click", {raise = true})
end
),
awful.button(
{modkey}, 1,
function(c)
c:emit_signal("request::activate", "mouse_click", {raise = true})
awful.mouse.client.move(c)
end
),
awful.button(
{modkey}, 3,
function(c)
c:emit_signal("request::activate", "mouse_click", {raise = true})
awful.mouse.client.resize(c)
end
)
)
-- Set keys
root.keys(globalkeys)
-- }}}
-- {{{ Rules
-- Rules to apply to new clients (through the "manage" signal).
awful.rules.rules = {
-- All clients will match this rule.
{
rule = {},
properties = {
border_width = beautiful.border_width,
border_color = beautiful.border_normal,
focus = awful.client.focus.filter,
raise = true,
maximized = false,
keys = clientkeys,
buttons = clientbuttons,
screen = awful.screen.preferred,
placement = awful.placement.no_overlap + awful.placement.no_offscreen
}
},
-- Floating clients.
{
rule_any = {
instance = {
"DTA", -- Firefox addon DownThemAll.
"copyq", -- Includes session name in class.
"pinentry",
},
class = {
"Arandr",
"Blueman-manager",
"Gpick",
"Kruler",
"MessageWin", -- kalarm.
"Sxiv",
"Tor Browser", -- Needs a fixed window size to avoid fingerprinting by screen size.
"Wpa_gui",
"veromix",
"xtightvncviewer"
},
-- Note that the name property shown in xprop might be set slightly after creation of the client
-- and the name shown there might not match defined rules here.
name = {
"Event Tester", -- xev.
},
role = {
"AlarmWindow", -- Thunderbird's calendar.
"ConfigManager", -- Thunderbird's about:config.
"pop-up", -- e.g. Google Chrome's (detached) Developer Tools.
}
},
properties = {floating = true}
},
}
-- }}}
-- {{{ Signals
-- Signal function to execute when a new client appears.
client.connect_signal(
"manage",
function(c)
-- Set the windows at the slave,
-- i.e. put it at the end of others instead of setting it master.
-- if not awesome.startup then awful.client.setslave(c) end
if awesome.startup and
not c.size_hints.user_position and
not c.size_hints.program_position then
-- Prevent clients from being unreachable after screen count changes.
awful.placement.no_offscreen(c)
end
end
)
client.connect_signal(
"mouse::enter",
function(c)
c:emit_signal("request::activate", "mouse_enter", {raise = false})
end
)
client.connect_signal(
"focus",
function(c)
c.border_color = beautiful.border_focus
end
)
client.connect_signal(
"unfocus",
function(c)
c.border_color = beautiful.border_normal
end
)
-- }}}
apps = {
"/usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1",
"xss-lock --transfer-sleep-lock -- " .. lock,
"picom",
"redshift-gtk",
"nm-applet",
"flameshot",
"cbatticon -i symbolic",
}
awful.spawn.with_shell("bash -c 'while killall redshift; do continue; done; redshift -x'")
awful.spawn.with_shell("killall cbatticon")
for _, app in ipairs(apps) do
awful.spawn(app)
end

View File

@ -1,131 +0,0 @@
---------------------------
-- Default awesome theme --
---------------------------
local theme_assets = require("beautiful.theme_assets")
local xresources = require("beautiful.xresources")
local dpi = xresources.apply_dpi
local gfs = require("gears.filesystem")
local themes_path = gfs.get_themes_dir()
local theme = {}
theme.font = "sans 9"
theme.bg_normal = "#222222"
theme.bg_focus = "#535d6c"
theme.bg_urgent = "#ff0000"
theme.bg_minimize = "#444444"
theme.bg_systray = theme.bg_normal
theme.fg_normal = "#aaaaaa"
theme.fg_focus = "#ffffff"
theme.fg_urgent = "#ffffff"
theme.fg_minimize = "#ffffff"
theme.useless_gap = dpi(4)
theme.border_width = dpi(1)
theme.border_normal = "#000000"
theme.border_focus = "#d75f5f"
theme.border_marked = "#91231c"
-- There are other variable sets
-- overriding the default one when
-- defined, the sets are:
-- taglist_[bg|fg]_[focus|urgent|occupied|empty|volatile]
-- tasklist_[bg|fg]_[focus|urgent]
-- titlebar_[bg|fg]_[normal|focus]
-- tooltip_[font|opacity|fg_color|bg_color|border_width|border_color]
-- mouse_finder_[color|timeout|animate_timeout|radius|factor]
-- prompt_[fg|bg|fg_cursor|bg_cursor|font]
-- hotkeys_[bg|fg|border_width|border_color|shape|opacity|modifiers_fg|label_bg|label_fg|group_margin|font|description_font]
-- Example:
--theme.taglist_bg_focus = "#ff0000"
-- Generate taglist squares:
local taglist_square_size = dpi(4)
theme.taglist_squares_sel = theme_assets.taglist_squares_sel(
taglist_square_size, theme.fg_normal
)
theme.taglist_squares_unsel = theme_assets.taglist_squares_unsel(
taglist_square_size, theme.fg_normal
)
-- Variables set for theming notifications:
-- notification_font
-- notification_[bg|fg]
-- notification_[width|height|margin]
-- notification_[border_color|border_width|shape|opacity]
-- Variables set for theming the menu:
-- menu_[bg|fg]_[normal|focus]
-- menu_[border_color|border_width]
theme.menu_submenu_icon = themes_path.."default/submenu.png"
theme.menu_height = dpi(15)
theme.menu_width = dpi(100)
-- You can add as many variables as
-- you wish and access them by using
-- beautiful.variable in your rc.lua
--theme.bg_widget = "#cc0000"
-- Define the image to load
theme.titlebar_close_button_normal = themes_path.."default/titlebar/close_normal.png"
theme.titlebar_close_button_focus = themes_path.."default/titlebar/close_focus.png"
theme.titlebar_minimize_button_normal = themes_path.."default/titlebar/minimize_normal.png"
theme.titlebar_minimize_button_focus = themes_path.."default/titlebar/minimize_focus.png"
theme.titlebar_ontop_button_normal_inactive = themes_path.."default/titlebar/ontop_normal_inactive.png"
theme.titlebar_ontop_button_focus_inactive = themes_path.."default/titlebar/ontop_focus_inactive.png"
theme.titlebar_ontop_button_normal_active = themes_path.."default/titlebar/ontop_normal_active.png"
theme.titlebar_ontop_button_focus_active = themes_path.."default/titlebar/ontop_focus_active.png"
theme.titlebar_sticky_button_normal_inactive = themes_path.."default/titlebar/sticky_normal_inactive.png"
theme.titlebar_sticky_button_focus_inactive = themes_path.."default/titlebar/sticky_focus_inactive.png"
theme.titlebar_sticky_button_normal_active = themes_path.."default/titlebar/sticky_normal_active.png"
theme.titlebar_sticky_button_focus_active = themes_path.."default/titlebar/sticky_focus_active.png"
theme.titlebar_floating_button_normal_inactive = themes_path.."default/titlebar/floating_normal_inactive.png"
theme.titlebar_floating_button_focus_inactive = themes_path.."default/titlebar/floating_focus_inactive.png"
theme.titlebar_floating_button_normal_active = themes_path.."default/titlebar/floating_normal_active.png"
theme.titlebar_floating_button_focus_active = themes_path.."default/titlebar/floating_focus_active.png"
theme.titlebar_maximized_button_normal_inactive = themes_path.."default/titlebar/maximized_normal_inactive.png"
theme.titlebar_maximized_button_focus_inactive = themes_path.."default/titlebar/maximized_focus_inactive.png"
theme.titlebar_maximized_button_normal_active = themes_path.."default/titlebar/maximized_normal_active.png"
theme.titlebar_maximized_button_focus_active = themes_path.."default/titlebar/maximized_focus_active.png"
theme.wallpaper = themes_path.."default/background.png"
-- You can use your own layout icons like this:
theme.layout_fairh = themes_path.."default/layouts/fairhw.png"
theme.layout_fairv = themes_path.."default/layouts/fairvw.png"
theme.layout_floating = themes_path.."default/layouts/floatingw.png"
theme.layout_magnifier = themes_path.."default/layouts/magnifierw.png"
theme.layout_max = themes_path.."default/layouts/maxw.png"
theme.layout_fullscreen = themes_path.."default/layouts/fullscreenw.png"
theme.layout_tilebottom = themes_path.."default/layouts/tilebottomw.png"
theme.layout_tileleft = themes_path.."default/layouts/tileleftw.png"
theme.layout_tile = themes_path.."default/layouts/tilew.png"
theme.layout_tiletop = themes_path.."default/layouts/tiletopw.png"
theme.layout_spiral = themes_path.."default/layouts/spiralw.png"
theme.layout_dwindle = themes_path.."default/layouts/dwindlew.png"
theme.layout_cornernw = themes_path.."default/layouts/cornernww.png"
theme.layout_cornerne = themes_path.."default/layouts/cornernew.png"
theme.layout_cornersw = themes_path.."default/layouts/cornersww.png"
theme.layout_cornerse = themes_path.."default/layouts/cornersew.png"
-- Generate Awesome icon:
theme.awesome_icon = theme_assets.awesome_icon(
theme.menu_height, theme.bg_focus, theme.fg_focus
)
-- Define the icon theme for application icons. If not set then the icons
-- from /usr/share/icons and /usr/share/icons/hicolor will be used.
theme.icon_theme = nil
return theme
-- vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80

View File

@ -1,3 +0,0 @@
[Settings]
gtk-theme-name=Materia-dark
gtk-icon-theme-name=Papirus-Dark

View File

@ -9,13 +9,60 @@ set ignorecase
set smartcase set smartcase
set list set list
set mouse=a set mouse=a
au BufNewFile,BufRead *.c set cc=81 au FileType c,cpp,python set cc=81
au BufNewFile,BufRead *.h set cc=81
" packages " packages
source ~/.config/nvim/epitech_header.vim so ~/.config/nvim/epitech_header.vim
packadd! nvim-treesitter packadd! nvim-treesitter
lua require('nvim-treesitter.configs').setup{highlight = {enable = true}} lua require('nvim-treesitter.configs').setup{highlight = {enable = true}}
"packadd! nvim-lspconfig
"lua <<EOF
" -- Mappings.
" -- See `:help vim.diagnostic.*` for documentation on any of the below functions
" local opts = { noremap=true, silent=true }
" vim.api.nvim_set_keymap('n', '<space>e', '<cmd>lua vim.diagnostic.open_float()<CR>', opts)
" vim.api.nvim_set_keymap('n', '[d', '<cmd>lua vim.diagnostic.goto_prev()<CR>', opts)
" vim.api.nvim_set_keymap('n', ']d', '<cmd>lua vim.diagnostic.goto_next()<CR>', opts)
" vim.api.nvim_set_keymap('n', '<space>q', '<cmd>lua vim.diagnostic.setloclist()<CR>', opts)
"
" -- Use an on_attach function to only map the following keys
" -- after the language server attaches to the current buffer
" local on_attach = function(client, bufnr)
" -- Enable completion triggered by <c-x><c-o>
" vim.api.nvim_buf_set_option(bufnr, 'omnifunc', 'v:lua.vim.lsp.omnifunc')
"
" -- Mappings.
" -- See `:help vim.lsp.*` for documentation on any of the below functions
" vim.api.nvim_buf_set_keymap(bufnr, 'n', 'gD', '<cmd>lua vim.lsp.buf.declaration()<CR>', opts)
" vim.api.nvim_buf_set_keymap(bufnr, 'n', 'gd', '<cmd>lua vim.lsp.buf.definition()<CR>', opts)
" vim.api.nvim_buf_set_keymap(bufnr, 'n', 'K', '<cmd>lua vim.lsp.buf.hover()<CR>', opts)
" vim.api.nvim_buf_set_keymap(bufnr, 'n', 'gi', '<cmd>lua vim.lsp.buf.implementation()<CR>', opts)
" vim.api.nvim_buf_set_keymap(bufnr, 'n', '<C-k>', '<cmd>lua vim.lsp.buf.signature_help()<CR>', opts)
" vim.api.nvim_buf_set_keymap(bufnr, 'n', '<space>wa', '<cmd>lua vim.lsp.buf.add_workspace_folder()<CR>', opts)
" vim.api.nvim_buf_set_keymap(bufnr, 'n', '<space>wr', '<cmd>lua vim.lsp.buf.remove_workspace_folder()<CR>', opts)
" vim.api.nvim_buf_set_keymap(bufnr, 'n', '<space>wl', '<cmd>lua print(vim.inspect(vim.lsp.buf.list_workspace_folders()))<CR>', opts)
" vim.api.nvim_buf_set_keymap(bufnr, 'n', '<space>D', '<cmd>lua vim.lsp.buf.type_definition()<CR>', opts)
" vim.api.nvim_buf_set_keymap(bufnr, 'n', '<space>rn', '<cmd>lua vim.lsp.buf.rename()<CR>', opts)
" vim.api.nvim_buf_set_keymap(bufnr, 'n', '<space>ca', '<cmd>lua vim.lsp.buf.code_action()<CR>', opts)
" vim.api.nvim_buf_set_keymap(bufnr, 'n', 'gr', '<cmd>lua vim.lsp.buf.references()<CR>', opts)
" vim.api.nvim_buf_set_keymap(bufnr, 'n', '<space>f', '<cmd>lua vim.lsp.buf.formatting()<CR>', opts)
" end
"
" -- Use a loop to conveniently call 'setup' on multiple servers and
" -- map buffer local keybindings when the language server attaches
" local servers = { 'clangd' }
" for _, lsp in pairs(servers) do
" require('lspconfig')[lsp].setup {
" on_attach = on_attach,
" flags = {
" -- This will be the default in neovim 0.7+
" debounce_text_changes = 150,
" }
" }
" end
"EOF
" keybindings " keybindings
nnoremap <C-c><C-h> :Header<CR> nnoremap <C-c><C-h> :Header<CR>
tnoremap <Esc> <C-\><C-n>

@ -1 +1 @@
Subproject commit dca9cfcda9c95a3820b6443084a203bba260197a Subproject commit 2f37b2ca07a3f89e7994b3b7f54c997e2cb3400a

@ -1 +1 @@
Subproject commit a13b40248a1f467dd7794b2860492fe23fdad098 Subproject commit aaf5d370f477dd2ff5f7704fed93483f46d0eef0

View File

@ -1,420 +0,0 @@
#################################
# Shadows #
#################################
# Enabled client-side shadows on windows. Note desktop windows
# (windows with '_NET_WM_WINDOW_TYPE_DESKTOP') never get shadow,
# unless explicitly requested using the wintypes option.
#
# shadow = false
#shadow = true;
# The blur radius for shadows, in pixels. (defaults to 12)
# shadow-radius = 12
shadow-radius = 7;
# The opacity of shadows. (0.0 - 1.0, defaults to 0.75)
# shadow-opacity = .75
# The left offset for shadows, in pixels. (defaults to -15)
# shadow-offset-x = -15
shadow-offset-x = -7;
# The top offset for shadows, in pixels. (defaults to -15)
# shadow-offset-y = -15
shadow-offset-y = -7;
# Avoid drawing shadows on dock/panel windows. This option is deprecated,
# you should use the *wintypes* option in your config file instead.
#
# no-dock-shadow = false
# Don't draw shadows on drag-and-drop windows. This option is deprecated,
# you should use the *wintypes* option in your config file instead.
#
# no-dnd-shadow = false
# Red color value of shadow (0.0 - 1.0, defaults to 0).
# shadow-red = 0
# Green color value of shadow (0.0 - 1.0, defaults to 0).
# shadow-green = 0
# Blue color value of shadow (0.0 - 1.0, defaults to 0).
# shadow-blue = 0
# Do not paint shadows on shaped windows. Note shaped windows
# here means windows setting its shape through X Shape extension.
# Those using ARGB background is beyond our control.
# Deprecated, use
# shadow-exclude = 'bounding_shaped'
# or
# shadow-exclude = 'bounding_shaped && !rounded_corners'
# instead.
#
# shadow-ignore-shaped = ''
# Specify a list of conditions of windows that should have no shadow.
#
# examples:
# shadow-exclude = "n:e:Notification";
#
# shadow-exclude = []
shadow-exclude = [
"name = 'Notification'",
"class_g = 'Conky'",
"class_g ?= 'Notify-osd'",
"class_g = 'Cairo-clock'",
"_GTK_FRAME_EXTENTS@:c"
];
# Specify a X geometry that describes the region in which shadow should not
# be painted in, such as a dock window region. Use
# shadow-exclude-reg = "x10+0+0"
# for example, if the 10 pixels on the bottom of the screen should not have shadows painted on.
#
# shadow-exclude-reg = ""
# Crop shadow of a window fully on a particular Xinerama screen to the screen.
# xinerama-shadow-crop = false
#################################
# Fading #
#################################
# Fade windows in/out when opening/closing and when opacity changes,
# unless no-fading-openclose is used.
# fading = false
fading = true
# Opacity change between steps while fading in. (0.01 - 1.0, defaults to 0.028)
# fade-in-step = 0.028
fade-in-step = 0.03;
# Opacity change between steps while fading out. (0.01 - 1.0, defaults to 0.03)
# fade-out-step = 0.03
# The time between steps in fade step, in milliseconds. (> 0, defaults to 10)
# fade-delta = 10
# Specify a list of conditions of windows that should not be faded.
# fade-exclude = []
# Do not fade on window open/close.
# no-fading-openclose = false
# Do not fade destroyed ARGB windows with WM frame. Workaround of bugs in Openbox, Fluxbox, etc.
# no-fading-destroyed-argb = false
#################################
# Transparency / Opacity #
#################################
# Opacity of inactive windows. (0.1 - 1.0, defaults to 1.0)
# inactive-opacity = 1
# Opacity of window titlebars and borders. (0.1 - 1.0, disabled by default)
# frame-opacity = 1.0
# Default opacity for dropdown menus and popup menus. (0.0 - 1.0, defaults to 1.0)
# menu-opacity = 1.0
# Let inactive opacity set by -i override the '_NET_WM_OPACITY' values of windows.
# inactive-opacity-override = true
inactive-opacity-override = false;
# Default opacity for active windows. (0.0 - 1.0, defaults to 1.0)
# active-opacity = 1.0
# Dim inactive windows. (0.0 - 1.0, defaults to 0.0)
# inactive-dim = 0.0
# Specify a list of conditions of windows that should always be considered focused.
# focus-exclude = []
focus-exclude = [ "class_g = 'Cairo-clock'" ];
# Use fixed inactive dim value, instead of adjusting according to window opacity.
# inactive-dim-fixed = 1.0
# Specify a list of opacity rules, in the format `PERCENT:PATTERN`,
# like `50:name *= "Firefox"`. picom-trans is recommended over this.
# Note we don't make any guarantee about possible conflicts with other
# programs that set '_NET_WM_WINDOW_OPACITY' on frame or client windows.
# example:
# opacity-rule = [ "80:class_g = 'URxvt'" ];
#
# opacity-rule = []
#################################
# Background-Blurring #
#################################
# Parameters for background blurring, see the *BLUR* section for more information.
# blur-method =
# blur-size = 12
#
# blur-deviation = false
# Blur background of semi-transparent / ARGB windows.
# Bad in performance, with driver-dependent behavior.
# The name of the switch may change without prior notifications.
#
# blur-background = false
# Blur background of windows when the window frame is not opaque.
# Implies:
# blur-background
# Bad in performance, with driver-dependent behavior. The name may change.
#
# blur-background-frame = false
# Use fixed blur strength rather than adjusting according to window opacity.
# blur-background-fixed = false
# Specify the blur convolution kernel, with the following format:
# example:
# blur-kern = "5,5,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1";
#
# blur-kern = ''
blur-kern = "3x3box";
# Exclude conditions for background blur.
# blur-background-exclude = []
blur-background-exclude = [
"window_type = 'dock'",
"window_type = 'desktop'",
"_GTK_FRAME_EXTENTS@:c"
];
#################################
# General Settings #
#################################
# Daemonize process. Fork to background after initialization. Causes issues with certain (badly-written) drivers.
# daemon = false
# Specify the backend to use: `xrender`, `glx`, or `xr_glx_hybrid`.
# `xrender` is the default one.
#
# backend = 'glx'
backend = "xrender";
# Enable/disable VSync.
# vsync = false
vsync = true
# Enable remote control via D-Bus. See the *D-BUS API* section below for more details.
# dbus = false
# Try to detect WM windows (a non-override-redirect window with no
# child that has 'WM_STATE') and mark them as active.
#
# mark-wmwin-focused = false
mark-wmwin-focused = true;
# Mark override-redirect windows that doesn't have a child window with 'WM_STATE' focused.
# mark-ovredir-focused = false
mark-ovredir-focused = true;
# Try to detect windows with rounded corners and don't consider them
# shaped windows. The accuracy is not very high, unfortunately.
#
# detect-rounded-corners = false
detect-rounded-corners = true;
# Detect '_NET_WM_OPACITY' on client windows, useful for window managers
# not passing '_NET_WM_OPACITY' of client windows to frame windows.
#
# detect-client-opacity = false
detect-client-opacity = true;
# Specify refresh rate of the screen. If not specified or 0, picom will
# try detecting this with X RandR extension.
#
# refresh-rate = 60
refresh-rate = 0
# Limit picom to repaint at most once every 1 / 'refresh_rate' second to
# boost performance. This should not be used with
# vsync drm/opengl/opengl-oml
# as they essentially does sw-opti's job already,
# unless you wish to specify a lower refresh rate than the actual value.
#
# sw-opti =
# Use EWMH '_NET_ACTIVE_WINDOW' to determine currently focused window,
# rather than listening to 'FocusIn'/'FocusOut' event. Might have more accuracy,
# provided that the WM supports it.
#
# use-ewmh-active-win = false
# Unredirect all windows if a full-screen opaque window is detected,
# to maximize performance for full-screen windows. Known to cause flickering
# when redirecting/unredirecting windows.
#
# unredir-if-possible = false
# Delay before unredirecting the window, in milliseconds. Defaults to 0.
# unredir-if-possible-delay = 0
# Conditions of windows that shouldn't be considered full-screen for unredirecting screen.
# unredir-if-possible-exclude = []
# Use 'WM_TRANSIENT_FOR' to group windows, and consider windows
# in the same group focused at the same time.
#
# detect-transient = false
detect-transient = true
# Use 'WM_CLIENT_LEADER' to group windows, and consider windows in the same
# group focused at the same time. 'WM_TRANSIENT_FOR' has higher priority if
# detect-transient is enabled, too.
#
# detect-client-leader = false
detect-client-leader = true
# Resize damaged region by a specific number of pixels.
# A positive value enlarges it while a negative one shrinks it.
# If the value is positive, those additional pixels will not be actually painted
# to screen, only used in blur calculation, and such. (Due to technical limitations,
# with use-damage, those pixels will still be incorrectly painted to screen.)
# Primarily used to fix the line corruption issues of blur,
# in which case you should use the blur radius value here
# (e.g. with a 3x3 kernel, you should use `--resize-damage 1`,
# with a 5x5 one you use `--resize-damage 2`, and so on).
# May or may not work with *--glx-no-stencil*. Shrinking doesn't function correctly.
#
# resize-damage = 1
# Specify a list of conditions of windows that should be painted with inverted color.
# Resource-hogging, and is not well tested.
#
# invert-color-include = []
# GLX backend: Avoid using stencil buffer, useful if you don't have a stencil buffer.
# Might cause incorrect opacity when rendering transparent content (but never
# practically happened) and may not work with blur-background.
# My tests show a 15% performance boost. Recommended.
#
# glx-no-stencil = false
# GLX backend: Avoid rebinding pixmap on window damage.
# Probably could improve performance on rapid window content changes,
# but is known to break things on some drivers (LLVMpipe, xf86-video-intel, etc.).
# Recommended if it works.
#
# glx-no-rebind-pixmap = false
# Disable the use of damage information.
# This cause the whole screen to be redrawn everytime, instead of the part of the screen
# has actually changed. Potentially degrades the performance, but might fix some artifacts.
# The opposing option is use-damage
#
# no-use-damage = false
use-damage = true
# Use X Sync fence to sync clients' draw calls, to make sure all draw
# calls are finished before picom starts drawing. Needed on nvidia-drivers
# with GLX backend for some users.
#
# xrender-sync-fence = false
# GLX backend: Use specified GLSL fragment shader for rendering window contents.
# See `compton-default-fshader-win.glsl` and `compton-fake-transparency-fshader-win.glsl`
# in the source tree for examples.
#
# glx-fshader-win = ''
# Force all windows to be painted with blending. Useful if you
# have a glx-fshader-win that could turn opaque pixels transparent.
#
# force-win-blend = false
# Do not use EWMH to detect fullscreen windows.
# Reverts to checking if a window is fullscreen based only on its size and coordinates.
#
# no-ewmh-fullscreen = false
# Dimming bright windows so their brightness doesn't exceed this set value.
# Brightness of a window is estimated by averaging all pixels in the window,
# so this could comes with a performance hit.
# Setting this to 1.0 disables this behaviour. Requires --use-damage to be disabled. (default: 1.0)
#
# max-brightness = 1.0
# Make transparent windows clip other windows like non-transparent windows do,
# instead of blending on top of them.
#
# transparent-clipping = false
# Set the log level. Possible values are:
# "trace", "debug", "info", "warn", "error"
# in increasing level of importance. Case doesn't matter.
# If using the "TRACE" log level, it's better to log into a file
# using *--log-file*, since it can generate a huge stream of logs.
#
# log-level = "debug"
log-level = "warn";
# Set the log file.
# If *--log-file* is never specified, logs will be written to stderr.
# Otherwise, logs will to written to the given file, though some of the early
# logs might still be written to the stderr.
# When setting this option from the config file, it is recommended to use an absolute path.
#
# log-file = '/path/to/your/log/file'
# Show all X errors (for debugging)
# show-all-xerrors = false
# Write process ID to a file.
# write-pid-path = '/path/to/your/log/file'
# Window type settings
#
# 'WINDOW_TYPE' is one of the 15 window types defined in EWMH standard:
# "unknown", "desktop", "dock", "toolbar", "menu", "utility",
# "splash", "dialog", "normal", "dropdown_menu", "popup_menu",
# "tooltip", "notification", "combo", and "dnd".
#
# Following per window-type options are available: ::
#
# fade, shadow:::
# Controls window-type-specific shadow and fade settings.
#
# opacity:::
# Controls default opacity of the window type.
#
# focus:::
# Controls whether the window of this type is to be always considered focused.
# (By default, all window types except "normal" and "dialog" has this on.)
#
# full-shadow:::
# Controls whether shadow is drawn under the parts of the window that you
# normally won't be able to see. Useful when the window has parts of it
# transparent, and you want shadows in those areas.
#
# redir-ignore:::
# Controls whether this type of windows should cause screen to become
# redirected again after been unredirected. If you have unredir-if-possible
# set, and doesn't want certain window to cause unnecessary screen redirection,
# you can set this to `true`.
#
wintypes:
{
tooltip = { fade = true; shadow = true; opacity = 0.75; focus = true; full-shadow = false; };
dock = { shadow = false; }
dnd = { shadow = false; }
popup_menu = { opacity = 1.0; }
dropdown_menu = { opacity = 1.0; }
};

4
.config/sway/config Normal file
View File

@ -0,0 +1,4 @@
# Config for sway
# Read `man 5 sway` for a complete reference.
include "config.d/*.conf

View File

@ -0,0 +1,35 @@
set $mod Mod4
# direction keys
set $left h
set $down j
set $up k
set $right l
set $menu dmenu_path | dmenu | xargs swaymsg exec --
set $term alacritty
set $browser firefox
set $files thunar
set $wallpapers $HOME/.config/wallpapers
set $lock swaylock -F -f -i $wallpapers/lock.png
set $screenshot grim - | wl-copy
set $screenshot_rect grim -g "$(slurp)" - | wl-copy
set $raise_volume set-vol +2
set $lower_volume set-vol -2
set $raise_backlight set-light +10
set $lower_backlight set-light -10
set $ws1 1:TTY
set $ws2 2:WEB
set $ws3 3:DEV
set $ws4 4:SBX
set $ws5 5:GAM
set $ws6 6:MED
set $ws7 7:DOC
set $ws8 8:GFX
set $ws9 9:ETC
default_border pixel
gaps inner 4
gaps outer 4
set $screen_timeout 600

View File

@ -0,0 +1,22 @@
input type:keyboard {
xkb_layout "us"
xkb_variant "altgr-intl"
xkb_numlock "enable"
}
input type:pointer {
accel_profile "flat"
}
input type:touchpad {
click_method "clickfinger"
natural_scroll "enabled"
tap "enabled"
}
output {
HDMI-A-1 position 1920,0
eDP-1 mode --custom 1920x1080@120Hz position 0,0
* bg $wallpapers/landscape.png fill
}

View File

@ -0,0 +1,31 @@
# Lock after $screen_timeout
# Turn off screen after $screem_timeout - 10
# Lock if screen off
xwayland force
# fix slow startup time
exec dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK
# GTK theme
exec gsettings set org.gnome.desktop.interface gtk-theme "Materia-dark"
exec gsettings set org.gnome.desktop.interface icon-theme "Papirus-Dark"
bar swaybar_command waybar
exec /usr/libexec/polkit-gnome-authentication-agent-1
#exec swayidle -w \
# timeout $(($screen_timeout + 10)) $lock \
# timeout $screen_timeout 'swaymsg "output * dpms off"' \
# resume 'swaymsg "output * dpms on"' \
# before-sleep $lock
exec gammastep
exec nm-applet --indicator
exec flameshot
exec swayidle -w \
timeout $(($screen_timeout + 10)) "$lock" \
timeout $screen_timeout 'swaymsg "output * dpms off"' \
resume 'swaymsg "output * dpms on"' \
before-sleep "$lock"

View File

@ -0,0 +1,77 @@
## Basics:
# Default apps
bindsym $mod+Return exec $term
bindsym $mod+b exec $browser
bindsym $mod+e exec $files
bindsym $mod+l exec $lock
bindsym Print exec $screenshot
bindsym Shift+Print exec $screenshot_rect
# Hotkeys
bindsym XF86AudioRaiseVolume exec $raise_volume
bindsym XF86AudioLowerVolume exec $lower_volume
bindsym XF86AudioMute exec pactl set-sink-mute 0 toggle
bindsym Ctrl+XF86AudioMute exec pactl set-source-mute 0 toggle
bindsym XF86AudioPlay exec playerctl play-pause
bindsym XF86AudioPrev exec playerctl previous
bindsym XF86AudioNext exec playerctl next
bindsym Ctrl+F4 input type:touchpad events toggle
bindsym XF86MonBrightnessDown exec $lower_backlight
bindsym XF86MonBrightnessUp exec $raise_backlight
# Kill focused window
bindsym $mod+Shift+c kill
# Start your launcher
bindsym $mod+r exec $menu
# Drag window $mod + left
# Resize window $mod + right
floating_modifier $mod normal
# Exit sway
bindsym $mod+Shift+q exit
bindsym $mod+Shift+r reload
## Moving around:
# Move your focus around
bindsym $mod+$down focus prev
bindsym $mod+$up focus next
# Move the focused window with the same, but add Shift
bindsym $mod+Shift+$left move left
bindsym $mod+Shift+$down move down
bindsym $mod+Shift+$up move up
bindsym $mod+Shift+$right move right
## Workspaces:
# Switch to 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
# Move focused client to workspace
bindsym $mod+Shift+1 move container to workspace $ws1;
bindsym $mod+Shift+2 move container to workspace $ws2;
bindsym $mod+Shift+3 move container to workspace $ws3;
bindsym $mod+Shift+4 move container to workspace $ws4;
bindsym $mod+Shift+5 move container to workspace $ws5;
bindsym $mod+Shift+6 move container to workspace $ws6;
bindsym $mod+Shift+7 move container to workspace $ws7;
bindsym $mod+Shift+8 move container to workspace $ws8;
bindsym $mod+Shift+9 move container to workspace $ws9;
# Switch the current container between different layout styles
bindsym $mod+m layout tabbed
bindsym $mod+t layout toggle split
# Make the current focus fullscreen
bindsym $mod+f fullscreen
# Toggle the current focus between tiling and floating mode
bindsym $mod+space floating toggle

76
.config/waybar/config Normal file
View File

@ -0,0 +1,76 @@
{
"modules-left": ["sway/workspaces"],
"modules-center": ["sway/window"],
"modules-right": ["pulseaudio", "cpu", "memory", "temperature", "backlight", "battery", "tray", "clock"],
"backlight": {
"format": "{percent}% {icon}",
"format-icons": ["", ""],
"on-scroll-up": "set-light +10",
"on-scroll-down": "set-light -10",
"smooth-scrolling-threshold": 1,
},
"battery": {
"states": {
"warning": 30,
"critical": 15,
},
"format": "{capacity}% {icon}",
"format-charging": "{capacity}% ",
"format-plugged": "{capacity}% ",
"format-alt": "{time} {icon}",
"format-icons": ["", "", "", "", ""],
},
"clock": {
"format": "{:%a %b %d, %R}",
"tooltip-format": "<tt>{calendar}</tt>",
},
"cpu": {
"format": "{usage}% ",
},
"idle_inhibitor": {
"format": "{icon}",
"format-icons": {
"activated": "",
"deactivated": "",
},
},
"memory": {
"format": "{}% ",
},
"pulseaudio": {
"format": "{volume}% {icon} {format_source}",
"format-bluetooth": "{volume}% {icon} {format_source}",
"format-bluetooth-muted": " {icon} {format_source}",
"format-muted": " {format_source}",
"format-source": "{volume}% ",
"format-source-muted": "",
"format-icons": {
"headphone": "",
"hands-free": "",
"headset": "",
"phone": "",
"portable": "",
"car": "",
"default": ["", "", ""],
},
"on-click": "pavucontrol",
"on-scroll-up": "set-vol +2",
"on-scroll-down": "set-vol -2",
"smooth-scrolling-threshold": 1,
},
"temperature": {
"critical-threshold": 80,
"format": "{temperatureC}°C {icon}",
"format-icons": ["", "", ""],
},
"tray": {
"icon-size": 21,
"spacing": 10,
},
"sway/workspaces": {
"disable-scroll": true,
"format": "{name}",
},
}
// vim: ft=css

255
.config/waybar/style.css Normal file
View File

@ -0,0 +1,255 @@
* {
border: none;
border-radius: 0;
/* `otf-font-awesome` is required to be installed for icons */
font-family: Roboto, Helvetica, Arial, sans-serif;
font-size: 13px;
min-height: 0;
}
window#waybar {
background-color: rgba(43, 48, 59, 0.5);
border-bottom: 3px solid rgba(100, 114, 125, 0.5);
color: #ffffff;
transition-property: background-color;
transition-duration: .5s;
}
window#waybar.hidden {
opacity: 0.2;
}
/*
window#waybar.empty {
background-color: transparent;
}
window#waybar.solo {
background-color: #FFFFFF;
}
*/
window#waybar.termite {
background-color: #3F3F3F;
}
window#waybar.chromium {
background-color: #000000;
border: none;
}
#workspaces button {
padding: 0 5px;
background-color: transparent;
color: #ffffff;
/* Use box-shadow instead of border so the text isn't offset */
box-shadow: inset 0 -3px transparent;
}
/* https://github.com/Alexays/Waybar/wiki/FAQ#the-workspace-buttons-have-a-strange-hover-effect */
#workspaces button:hover {
background: rgba(0, 0, 0, 0.2);
box-shadow: inset 0 -3px #ffffff;
}
#workspaces button.focused {
background-color: #64727D;
box-shadow: inset 0 -3px #ffffff;
}
#workspaces button.urgent {
background-color: #eb4d4b;
}
#mode {
background-color: #64727D;
border-bottom: 3px solid #ffffff;
}
#clock,
#battery,
#cpu,
#memory,
#disk,
#temperature,
#backlight,
#network,
#pulseaudio,
#custom-media,
#tray,
#mode,
#idle_inhibitor,
#mpd {
padding: 0 10px;
margin: 0 4px;
color: #ffffff;
}
#window,
#workspaces {
margin: 0 4px;
}
/* If workspaces is the leftmost module, omit left margin */
.modules-left > widget:first-child > #workspaces {
margin-left: 0;
}
/* If workspaces is the rightmost module, omit right margin */
.modules-right > widget:last-child > #workspaces {
margin-right: 0;
}
#clock {
background-color: #64727D;
}
#battery {
background-color: #ffffff;
color: #000000;
}
#battery.charging, #battery.plugged {
color: #ffffff;
background-color: #26A65B;
}
@keyframes blink {
to {
background-color: #ffffff;
color: #000000;
}
}
#battery.critical:not(.charging) {
background-color: #f53c3c;
color: #ffffff;
animation-name: blink;
animation-duration: 0.5s;
animation-timing-function: linear;
animation-iteration-count: infinite;
animation-direction: alternate;
}
label:focus {
background-color: #000000;
}
#cpu {
background-color: #2ecc71;
color: #000000;
}
#memory {
background-color: #9b59b6;
}
#disk {
background-color: #964B00;
}
#backlight {
background-color: #90b1b1;
}
#network {
background-color: #2980b9;
}
#network.disconnected {
background-color: #f53c3c;
}
#pulseaudio {
background-color: #f1c40f;
color: #000000;
}
#pulseaudio.muted {
background-color: #90b1b1;
color: #2a5c45;
}
#custom-media {
background-color: #66cc99;
color: #2a5c45;
min-width: 100px;
}
#custom-media.custom-spotify {
background-color: #66cc99;
}
#custom-media.custom-vlc {
background-color: #ffa000;
}
#temperature {
background-color: #f0932b;
}
#temperature.critical {
background-color: #eb4d4b;
}
#tray {
background-color: #2980b9;
}
#tray > .passive {
-gtk-icon-effect: dim;
}
#tray > .needs-attention {
-gtk-icon-effect: highlight;
background-color: #eb4d4b;
}
#idle_inhibitor {
background-color: #2d3436;
}
#idle_inhibitor.activated {
background-color: #ecf0f1;
color: #2d3436;
}
#mpd {
background-color: #66cc99;
color: #2a5c45;
}
#mpd.disconnected {
background-color: #f53c3c;
}
#mpd.stopped {
background-color: #90b1b1;
}
#mpd.paused {
background-color: #51a37a;
}
#language {
background: #00b093;
color: #740864;
padding: 0 5px;
margin: 0 5px;
min-width: 16px;
}
#keyboard-state {
background: #97e1ad;
color: #000000;
padding: 0 0px;
margin: 0 5px;
min-width: 16px;
}
#keyboard-state > label {
padding: 0 5px;
}
#keyboard-state > label.locked {
background: rgba(0, 0, 0, 0.2);
}

3
.gitmodules vendored
View File

@ -4,6 +4,3 @@
[submodule ".config/nvim/pack/plugins/opt/nvim-treesitter"] [submodule ".config/nvim/pack/plugins/opt/nvim-treesitter"]
path = .config/nvim/pack/plugins/opt/nvim-treesitter path = .config/nvim/pack/plugins/opt/nvim-treesitter
url = https://github.com/nvim-treesitter/nvim-treesitter url = https://github.com/nvim-treesitter/nvim-treesitter
[submodule ".config/awesome/awesome-wm-widgets"]
path = .config/awesome/awesome-wm-widgets
url = https://github.com/streetturtle/awesome-wm-widgets.git

View File

@ -1,2 +0,0 @@
gtk-theme-name="Materia-dark"
gtk-icon-theme-name="Papirus-Dark"

View File

@ -1,12 +0,0 @@
let g:netrw_dirhistmax =10
let g:netrw_dirhistcnt =6
let g:netrw_dirhist_6='/home/ange/.config/sway/config.d'
let g:netrw_dirhist_5='/home/ange/.config/sway'
let g:netrw_dirhist_4='/home/ange/delivery/pushswap/tests/pushswap-tester'
let g:netrw_dirhist_3='/home/ange/delivery/pushswap/include'
let g:netrw_dirhist_2='/home/ange/delivery/pushswap/src'
let g:netrw_dirhist_1='/usr/include/X11'
let g:netrw_dirhist_0='/usr/include'
let g:netrw_dirhist_9='/home/ange/.config/sway/config.d'
let g:netrw_dirhist_8='/home/ange/.config/sway'
let g:netrw_dirhist_7='/home/ange/.config/sway/config.d'

View File

@ -1,35 +0,0 @@
function! EpitechHeader()
let com_arr = {
\ 'c': {'top': '/*', 'mid': '**', 'bot': '*/'},
\ 'cpp': {'top': '/*', 'mid': '**', 'bot': '*/'},
\ 'make': {'top': '##', 'mid': '##', 'bot': '##'}
\ }
if (!com_arr->has_key(&filetype))
echoerr "Unsupported filetype: " . &filetype
return
endif
let top = com_arr[&filetype]['top']
let mid = com_arr[&filetype]['mid']
let bot = com_arr[&filetype]['bot']
let dir_name = fnamemodify(getcwd(), ':t')
let proj_name = input('Enter project name (default ' . dir_name . '): ')
let file_name = expand('%:t:r')
let file_desc = input('Enter file description (default ' . file_name . '): ')
if file_desc == ''
let file_desc = file_name
endif
if proj_name == ''
let proj_name = dir_name
endif
call append(0, top)
call append(1, mid . ' EPITECH PROJECT, ' . strftime('%Y'))
call append(2, mid . ' ' . proj_name)
call append(3, mid . ' File description:')
call append(4, mid . ' ' . file_desc)
call append(5, bot)
endfunction
command Header call EpitechHeader()

27
.vimrc
View File

@ -1,27 +0,0 @@
" system config
unlet! skip_defaults_vim
source $VIMRUNTIME/defaults.vim
" variables
let &path = getcwd() . '/**' . ',' . &path
let g:netrw_liststyle=3 " tree style file explorer
set expandtab
set shiftwidth=4
set tabstop=4
set number relativenumber
set ignorecase
set smartcase
set list
set listchars=tab:\ \ ,multispace:⸱,trail:⸱
set hlsearch
set smartindent
set splitright
set ttymouse=sgr
au BufNewFile,BufRead *.c set cc=81
au BufNewFile,BufRead *.h set cc=81
" packages
source ~/.vim/epitech_header.vim
" keybindings
nnoremap <C-c><C-h> :Header<CR>

11
.zshrc
View File

@ -1,6 +1,5 @@
# If you come from bash you might have to change your $PATH. # If you come from bash you might have to change your $PATH.
export PATH="$HOME/bin:$HOME/Applications:$PATH" # export PATH=$HOME/bin:/usr/local/bin:$PATH
typeset -U path
# Path to your oh-my-zsh installation. # Path to your oh-my-zsh installation.
export ZSH="$HOME/.oh-my-zsh" export ZSH="$HOME/.oh-my-zsh"
@ -100,9 +99,11 @@ source $ZSH/oh-my-zsh.sh
# users are encouraged to define aliases within the ZSH_CUSTOM folder. # users are encouraged to define aliases within the ZSH_CUSTOM folder.
# For a full list of active aliases, run `alias`. # For a full list of active aliases, run `alias`.
alias pls="sudo " alias pls="sudo "
alias cls="clear && ll" alias cls="clear && l"
alias -g G="|grep -i" alias -g G="|grep -i"
alias config="git --git-dir=$HOME/.dotfiles --work-tree=$HOME" alias config="git --git-dir=$HOME/.dotfiles --work-tree=$HOME"
alias wconfig="$EDITOR $HOME/.config/awesome" alias wconfig="$EDITOR $HOME/.config/sway"
alias xcopy="xclip -selection clipboard"
alias zshconf="$EDITOR $HOME/.zshrc && source $HOME/.zshrc" alias zshconf="$EDITOR $HOME/.zshrc && source $HOME/.zshrc"
alias startgui="exec sway &> sway.log"
alias minecraft="DRI_PRIME=1 minecraft-launcher"
alias umnt="sudo umount /mnt -R"

View File

@ -1,13 +1,18 @@
# dotfiles # dotfiles
To clone the repo : To clone the repo :
``` ```console
$ git clone --bare git@github.com:AustralEpitech/.dotfiles.git ~/.dotfiles $ git clone --bare git@github.com:AustralEpitech/.dotfiles.git ~/.dotfiles
$ alias config='git --git-dir=$HOME/.dotfiles --work-tree=$HOME' $ alias config='git --git-dir=$HOME/.dotfiles --work-tree=$HOME'
$ config checkout $ config checkout
# remove conflicted files and re-run the command # remove conflicted files and re-run the command
$ config submodule update --init --recursive $ config submodule update --init --recursive --remote
$ config config status.showUntrackedFiles no $ config config status.showUntrackedFiles no
``` ```
To update submodules:
```
$ config submodule update --recursive --remote
```

View File

@ -1,11 +1,4 @@
#!/usr/bin/bash #!/usr/bin/bash
set -e set -e
if [ "$EUID" -ne 0 ]; then docker run -it --rm -v "$PWD":/tmp epitechcontent/epitest-docker:latest /bin/bash
echo "error: you cannot perform this operation unless you are root."
exit 1
fi
systemctl start docker
docker run -it --rm --name epitest -v "$PWD":/tmp epitechcontent/epitest-docker:latest /bin/bash
systemctl stop docker

BIN
bin/minecraft-launcher Executable file

Binary file not shown.

10
bin/set-ddc-light Executable file
View File

@ -0,0 +1,10 @@
#!/usr/bin/bash
set -e
CUR_LIGHT="$(set-light "$@")"
SCREENS="$(ddcutil detect | awk '$1 == "Display" {print $2}')"
for i in $SCREENS; do
ddcutil -d "$i" setvcp 10 "$CUR_LIGHT"
done

39
bin/set-light Executable file
View File

@ -0,0 +1,39 @@
#!/usr/bin/bash
set -e
shopt -s extglob nullglob
set_brightness() {
MAX="$(cat "$1"/max_brightness)"
FILE="$1"/brightness
VAL="$(($2 * MAX / 100))"
echo "$VAL" > "$FILE"
}
CUR_FILE=/var/tmp/current_brightness
set +e
CUR="$(cat "$CUR_FILE" || echo 50)"
set -e
case "${1:0:1}" in
"")
exit 1
;;
"+"|"-")
NEW="$((CUR + $1))"
;;
*)
NEW="$1"
;;
esac
[ "$NEW" -lt 0 ] && NEW=0
[ "$NEW" -gt 100 ] && NEW=100
for dev in /sys/class/backlight/*; do
set_brightness "$dev" "$NEW"
done
echo "$NEW" > "$CUR_FILE"
echo "$NEW"

24
bin/set-vol Executable file
View File

@ -0,0 +1,24 @@
#!/usr/bin/bash
set -e
CUR="$(pactl get-sink-volume 0 | awk '$1 == "Volume:" {print substr($5, 1, length($5) - 1)}')"
SHIFT="${1}"
case "${1:0:1}" in
"")
exit 1
;;
"+"|"-")
NEW="$((CUR - CUR % SHIFT + SHIFT))"
;;
*)
NEW="$1"
;;
esac
[ "$NEW" -gt 100 ] && NEW=100
pactl set-sink-volume 0 "$NEW"%
pactl set-sink-mute 0 0
echo "$NEW"

View File

@ -1,8 +0,0 @@
#!/usr/bin/bash
set -e
device="PNP0C50:0e 06CB:7E7E Touchpad"
enabled=$(xinput list-props "$device" | awk -F ':' '$1 ~ "Device Enabled" {print $2}')
xinput set-prop "$device" "Device Enabled" "$((1 - enabled))"

View File

@ -1,15 +0,0 @@
#!/usr/bin/bash
set -e
if [ "$EUID" -eq 0 ]; then
echo "error: cannot be root."
exit 1
fi
sudo systemctl start libvirtd
sudo virsh net-start default
virt-manager --no-fork
sudo virsh net-destroy default
sudo systemctl stop libvirtd