feat: add project script, change rofi oneline config
This commit is contained in:
@@ -1,106 +0,0 @@
|
||||
configuration {
|
||||
modi: "drun";
|
||||
font: "JetBrainsMono Nerd Font 10";
|
||||
show-icons: false;
|
||||
terminal: "ghostty";
|
||||
icon-theme: "Papirus-Dark";
|
||||
drun-display-format: "{name}";
|
||||
display-drun: "";
|
||||
timeout {
|
||||
action: "kb-cancel";
|
||||
delay: 0;
|
||||
}
|
||||
filebrowser {
|
||||
directories-first: true;
|
||||
sorting-method: "name";
|
||||
}
|
||||
kb-row-up: "Up,Control+k";
|
||||
kb-row-left: "Left,Control+h";
|
||||
kb-row-right: "Right,Control+l";
|
||||
kb-row-down: "Down,Control+j";
|
||||
|
||||
kb-accept-entry: "Control+z,Control+y,Return,KP_Enter";
|
||||
|
||||
//fixing up
|
||||
kb-remove-to-eol: "";
|
||||
kb-move-char-back: "Control+b";
|
||||
kb-remove-char-back: "BackSpace";
|
||||
kb-move-char-forward: "Control+f";
|
||||
kb-mode-complete: "Control+o";
|
||||
}
|
||||
|
||||
@theme "/dev/null"
|
||||
|
||||
* {
|
||||
bg: #232933;
|
||||
fg: #d8dee9;
|
||||
selected: #2d3543;
|
||||
accent: #4d6a8e;
|
||||
background-color: @bg;
|
||||
|
||||
color: @fg;
|
||||
border: 0;
|
||||
border-color: @bg;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
spacing: 0;
|
||||
highlight: none;
|
||||
}
|
||||
|
||||
window {
|
||||
width: 700px;
|
||||
}
|
||||
|
||||
element {
|
||||
padding: 6 5 7 5;
|
||||
text-color: @fg;
|
||||
}
|
||||
|
||||
element-text {
|
||||
vertical-align: 0.5;
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
element selected {
|
||||
background-color: @selected;
|
||||
}
|
||||
|
||||
element-text selected {
|
||||
background-color: @selected;
|
||||
}
|
||||
|
||||
element-icon selected {
|
||||
background-color: @selected;
|
||||
}
|
||||
|
||||
element-icon {
|
||||
size: 30;
|
||||
}
|
||||
|
||||
entry {
|
||||
background-color: @bg;
|
||||
columns: 1;
|
||||
lines: 20;
|
||||
}
|
||||
|
||||
inputbar {
|
||||
children: [prompt, entry];
|
||||
}
|
||||
|
||||
prompt {
|
||||
text-color: @bg;
|
||||
background-color: @accent;
|
||||
padding: 12 12 12 12;
|
||||
}
|
||||
|
||||
entry {
|
||||
text-color: @bg;
|
||||
background-color: @accent;
|
||||
padding: 12 5 12 0;
|
||||
}
|
||||
|
||||
listview {
|
||||
background-color: @bg;
|
||||
columns: 1;
|
||||
lines: 6;
|
||||
}
|
||||
138
custom/rofi/oneline-tokyonight.rasi
Normal file
138
custom/rofi/oneline-tokyonight.rasi
Normal file
@@ -0,0 +1,138 @@
|
||||
/*
|
||||
* Tokyonight colorscheme for rofi
|
||||
* User: w8ste
|
||||
*/
|
||||
|
||||
|
||||
// define colors etc.
|
||||
* {
|
||||
bg: #24283b;
|
||||
hv: #9274ca;
|
||||
primary: #C5C8C6;
|
||||
ug: #0B2447;
|
||||
font: "Monospace 11";
|
||||
background-color: @bg;
|
||||
//dark: @bg;
|
||||
border: 0px;
|
||||
kl: #7aa2f7;
|
||||
black: #000000;
|
||||
|
||||
transparent: rgba(46,52,64,0);
|
||||
}
|
||||
|
||||
// defines different aspects of the window
|
||||
window {
|
||||
width: 700;
|
||||
/*since line wont work with height, i comment it out
|
||||
if you rather control the size via height
|
||||
just comment it out */
|
||||
//height: 500;
|
||||
|
||||
orientation: horizontal;
|
||||
location: center;
|
||||
anchor: center;
|
||||
transparency: "screenshot";
|
||||
border-color: @primary;
|
||||
border: 3px;
|
||||
border-radius: 6px;
|
||||
spacing: 0;
|
||||
children: [ mainbox ];
|
||||
}
|
||||
|
||||
mainbox {
|
||||
spacing: 0;
|
||||
children: [ inputbar, message, listview ];
|
||||
}
|
||||
|
||||
inputbar {
|
||||
color: @kl;
|
||||
padding: 11px;
|
||||
border: 0 0 2px 0;
|
||||
border-color: @primary;
|
||||
}
|
||||
|
||||
message {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
textbox {
|
||||
color: @kl;
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
entry, prompt, case-indicator {
|
||||
text-font: inherit;
|
||||
text-color: inherit;
|
||||
}
|
||||
|
||||
entry {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
prompt {
|
||||
margin: 0px 5px 0px 0px;
|
||||
}
|
||||
|
||||
listview {
|
||||
layout: vertical;
|
||||
//spacing: 5px;
|
||||
padding: 8px;
|
||||
lines: 12;
|
||||
columns: 1;
|
||||
dynamic: false;
|
||||
}
|
||||
|
||||
element {
|
||||
padding: 2px;
|
||||
vertical-align: 1;
|
||||
color: @kl;
|
||||
font: inherit;
|
||||
}
|
||||
|
||||
element-text {
|
||||
background-color: inherit;
|
||||
text-color: inherit;
|
||||
}
|
||||
|
||||
element selected.normal {
|
||||
color: @black;
|
||||
background-color: @hv;
|
||||
}
|
||||
|
||||
element normal active {
|
||||
background-color: @hv;
|
||||
color: @black;
|
||||
}
|
||||
|
||||
element-text, element-icon {
|
||||
background-color: inherit;
|
||||
text-color: inherit;
|
||||
}
|
||||
|
||||
element normal urgent {
|
||||
background-color: @primary;
|
||||
}
|
||||
|
||||
element selected active {
|
||||
background: @hv;
|
||||
foreground: @bg;
|
||||
}
|
||||
|
||||
button {
|
||||
padding: 6px;
|
||||
color: @primary;
|
||||
horizonatal-align: 0.5;
|
||||
|
||||
border: 2px 0px 2px 2px;
|
||||
border-radius: 4px 0px 0px 4px;
|
||||
border-color: @primary;
|
||||
}
|
||||
|
||||
button selected normal {
|
||||
border: 2px 0px 2px 2px;
|
||||
border-color: @primary;
|
||||
}
|
||||
|
||||
scrollbar {
|
||||
enabled: true;
|
||||
}
|
||||
38
nix/flake.lock
generated
38
nix/flake.lock
generated
@@ -103,19 +103,11 @@
|
||||
"nixpkgs": "nixpkgs"
|
||||
},
|
||||
"locked": {
|
||||
<<<<<<< Updated upstream
|
||||
"lastModified": 1758785683,
|
||||
"narHash": "sha256-mRn51IeEBXeNh5a6xNLylk4PKBX0s/QQxgkEbYoPq/w=",
|
||||
"owner": "nix-community",
|
||||
"repo": "NixOS-WSL",
|
||||
"rev": "1bfb978f2f6261b6086e04af17f9418e1fe36d70",
|
||||
=======
|
||||
"lastModified": 1759833546,
|
||||
"narHash": "sha256-rOfkgIiiZNPUbf61OqEym60wXEODeDG8XH+gV/SUoUc=",
|
||||
"owner": "nix-community",
|
||||
"repo": "NixOS-WSL",
|
||||
"rev": "7c0c0f4c3a51761434f18209fa9499b8579ff730",
|
||||
>>>>>>> Stashed changes
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -127,19 +119,11 @@
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
<<<<<<< Updated upstream
|
||||
"lastModified": 1758277210,
|
||||
"narHash": "sha256-iCGWf/LTy+aY0zFu8q12lK8KuZp7yvdhStehhyX1v8w=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "8eaee110344796db060382e15d3af0a9fc396e0e",
|
||||
=======
|
||||
"lastModified": 1759733170,
|
||||
"narHash": "sha256-TXnlsVb5Z8HXZ6mZoeOAIwxmvGHp1g4Dw89eLvIwKVI=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "8913c168d1c56dc49a7718685968f38752171c3b",
|
||||
>>>>>>> Stashed changes
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -151,19 +135,11 @@
|
||||
},
|
||||
"nixpkgs_2": {
|
||||
"locked": {
|
||||
<<<<<<< Updated upstream
|
||||
"lastModified": 1758791193,
|
||||
"narHash": "sha256-F8WmEwFoHsnix7rt290R0rFXNJiMbClMZyIC/e+HYf0=",
|
||||
"lastModified": 1759994382,
|
||||
"narHash": "sha256-wSK+3UkalDZRVHGCRikZ//CyZUJWDJkBDTQX1+G77Ow=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "25e53aa156d47bad5082ff7618f5feb1f5e02d01",
|
||||
=======
|
||||
"lastModified": 1759735786,
|
||||
"narHash": "sha256-a0+h02lyP2KwSNrZz4wLJTu9ikujNsTWIC874Bv7IJ0=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "20c4598c84a671783f741e02bf05cbfaf4907cff",
|
||||
>>>>>>> Stashed changes
|
||||
"rev": "5da4a26309e796daa7ffca72df93dbe53b8164c7",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -190,19 +166,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
<<<<<<< Updated upstream
|
||||
"lastModified": 1759030640,
|
||||
"narHash": "sha256-53VP3BqMXJqD1He1WADTFyUnpta3mie56H7nC59tSic=",
|
||||
"owner": "Mic92",
|
||||
"repo": "sops-nix",
|
||||
"rev": "9ac51832c70f2ff34fcc97b05fa74b4a78317f9e",
|
||||
=======
|
||||
"lastModified": 1759635238,
|
||||
"narHash": "sha256-UvzKi02LMFP74csFfwLPAZ0mrE7k6EiYaKecplyX9Qk=",
|
||||
"owner": "Mic92",
|
||||
"repo": "sops-nix",
|
||||
"rev": "6e5a38e08a2c31ae687504196a230ae00ea95133",
|
||||
>>>>>>> Stashed changes
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
||||
@@ -77,7 +77,10 @@
|
||||
kanata.apple = true;
|
||||
users.users.luca = {
|
||||
isNormalUser = true;
|
||||
extraGroups = [ "wheel" ]; # Enable ‘sudo’ for the user.
|
||||
extraGroups = [
|
||||
"wheel"
|
||||
"docker"
|
||||
]; # Enable ‘sudo’ for the user.
|
||||
shell = pkgs.zsh;
|
||||
packages = with pkgs; [
|
||||
tree
|
||||
|
||||
@@ -64,11 +64,8 @@
|
||||
python3
|
||||
jdt-language-server
|
||||
gradle
|
||||
<<<<<<< Updated upstream
|
||||
cmake
|
||||
=======
|
||||
doppler
|
||||
>>>>>>> Stashed changes
|
||||
];
|
||||
programs.nix-ld.enable = lib.mkDefault true;
|
||||
programs.zsh.enable = lib.mkDefault true;
|
||||
|
||||
@@ -199,6 +199,7 @@
|
||||
"$mod, Space, togglesplit"
|
||||
"$mod SHIFT, v, exec, bash -c ~/dotfiles/scripts/copy.sh"
|
||||
"$mod SHIFT, s, exec, bash -c ~/dotfiles/scripts/screenshot.sh"
|
||||
"$mod, p, exec, bash -c ~/dotfiles/scripts/project.sh"
|
||||
|
||||
"$mod, 0, workspace, 10"
|
||||
"$mod SHIFT, 0, movetoworkspacesilent, 10"
|
||||
@@ -230,7 +231,7 @@
|
||||
];
|
||||
general = {
|
||||
gaps_in = 0;
|
||||
gaps_out = 0;
|
||||
gaps_out = 10;
|
||||
};
|
||||
dwindle = {
|
||||
preserve_split = true;
|
||||
|
||||
@@ -1 +1 @@
|
||||
cliphist list | rofi -dmenu -p "Copy to clipboard:" -config ~/.config/rofi/oneline-config.rasi | cliphist decode | wl-copy
|
||||
cliphist list | rofi -dmenu -p "Copy to clipboard:" | cliphist decode | wl-copy
|
||||
|
||||
27
scripts/project.sh
Executable file
27
scripts/project.sh
Executable file
@@ -0,0 +1,27 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
projects=$(find ~/src -maxdepth 1 -type d -not -path ~/src | xargs -I {} basename {})
|
||||
projects="$projects"$'\n'"dotfiles"
|
||||
|
||||
selected=$(echo "$projects" | rofi -dmenu -p "Select project:")
|
||||
|
||||
if [[ -n "$selected" ]]; then
|
||||
if [[ "$selected" == "dotfiles" ]]; then
|
||||
project_path="$HOME/dotfiles"
|
||||
else
|
||||
project_path="$HOME/src/$selected"
|
||||
fi
|
||||
|
||||
if [[ -d "$project_path" ]]; then
|
||||
ghostty --working-directory="$project_path" -e bash -c "
|
||||
# Check if tmux session already exists
|
||||
if tmux has-session -t '$selected' 2>/dev/null; then
|
||||
tmux attach-session -t '$selected'
|
||||
else
|
||||
tmux new-session -s '$selected' -c '$project_path'
|
||||
fi
|
||||
"
|
||||
else
|
||||
notify-send "Error" "Project directory $project_path does not exist"
|
||||
fi
|
||||
fi
|
||||
@@ -1,6 +1,6 @@
|
||||
workspaces=$(hyprctl workspaces -j | jq -r '.[].name')
|
||||
|
||||
target=$(echo "$workspaces" | rofi -dmenu -config ~/.config/rofi/oneline-config.rasi -p "Switch to workspace:")
|
||||
target=$(echo "$workspaces" | rofi -dmenu -p "Switch to workspace:")
|
||||
|
||||
if [[ -n "$target" ]]; then
|
||||
hyprctl dispatch workspace "$target"
|
||||
|
||||
Reference in New Issue
Block a user